From: Kal A. <ka...@te...> - 2004-09-26 14:45:00
|
Hi Mathias, I've checked in some changes for the TM4Web/Velocity package which provides a basic level of support for listing the topic maps in a database. You need a configuration like this: <provider name="hibernate" factory="org.tm4j.topicmap.hibernate.TopicMapProviderFactoryImpl"> <provider-properties> <property name="hibernate.connection.url" value="jdbc:mysql://localhost/tm4mail"/> <property name="hibernate.connection.username" value="***"/> <property name="hibernate.connection.password" value="***"/> <property name="hibernate.dialect" value="net.sf.hibernate.dialect.MySQLDialect"/> <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/> </provider-properties> <topicmaps template="topicmap.vm"/> </provider> Note the extra <topicmaps/> element that is required. The template attribute specifies the template to be used for the main topicmap page. With this update, you are forced to always use topic.vm to render topics, but I will work on adding support like you have in the normal <topicmap> element to specify the template(s) to use to render topics. In tmbrowse, all topic maps are listed on the index page with their title as the full base URL of the topic map, so you end up with the URL listed twice (because by default the index page shows the source URL as well) - you may want to edit the listmaps.vm template to shorten this. I hope this gets you the basic functionality you need right now - I'm going to add a note to the feature tracker on sourceforge so that I don't forget to finish off this support for the 0.3 release. Cheers, Kal On Sat, 2004-08-28 at 18:25, Mathias Reinhardt wrote: > Hello, > > I'm stuck with setting up TM4Web/Velocity 0.2rc1 with a hibernate > backend. > Configuration is > <provider name="hibernate" > factory="org.tm4j.topicmap.hibernate.TopicMapProviderFactoryImpl"> > <provider-properties> > <property name="hibernate.connection.url" > value="jdbc:mysql://localhost/tm4mail"/> > <property name="hibernate.connection.username" value="***"/> > <property name="hibernate.connection.password" value="***"/> > <property name="hibernate.dialect" > value="net.sf.hibernate.dialect.MySQLDialect"/> > <property name="hibernate.connection.driver_class" > value="com.mysql.jdbc.Driver"/> > </provider-properties> > </provider> > > I don't get any errors but I don't get any TopicMaps from by backend > either. In stdout.log it says > "topicmaps element ignored for provider 'hibernate' which is not in-memory." > > Do I miss something or is Hibernate support currently not available with > TM4Web/Velocity? > > Thanks, > Mathias > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users -- Kal Ahmed <ka...@te...> techquila |