From: Stefan L. <li...@no...> - 2004-04-14 12:58:59
|
Hi, i just wanted to use TMAPI wrappers but i did not found a TopicMapSystemFactory. i dont want to include any TM4J specific code, so my plan is to do the follwoing: ------------ //provider factory System.setProperty("ProviderFactory",org.tm4j.topicmap.hibernate.TopicMapProviderFactoryImpl"); //provide properties System.setProperty("hibernate.connection.url", "jdbc:mysql://localhost/tm4j"); System.setProperty("hibernate.connection.username","tm4j"); System.setProperty("hibernate.connection.password","tm4j"); System.setProperty("hibernate.connection.driver_class","com.mysql.jdbc.Driver"); System.setProperty("hibernate.dialect","net.sf.hibernate.dialect.MySQLDialect"); //The TM4J TopicMapSystemFactory !!! System.setProperty("org.tmapi.core.TopicMapSystemFactory",org.tm4j.tmapi.core.TopicMapSystemFactoryImpl"); TopicMapSystemFactory tmsystemfac = TopicMapSystemFactory.newInstance(); this.tmsystem = tmsystemfac.newTopicMapSystem(); ------------ Im the meantime i'll implement such a TopicMapFactory by myself containing the following Line: newInstance(){ m_tmSystem = new org.tm4j.tmapi.core.TMAPITopicMapSystemImpl("org.tm4j.topicmap.hibernate.TopicMapProviderFactoryImpl",System.getProperties()); } stefan |