Using Jboss 3.2.6 I've successfully deployed a single .har file:
| example1.har | -Channel.hbm.xml | -Channel.class | -META-INF | --hibernate-service.xml | | hibernate-service.xml: | | <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=HibernateExample1"> | <attribute name="DatasourceName">java:/jdbc/example1DS</attribute> | <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute> | <attribute name="Dialect">net.sf.hibernate.dialect.HSQLDialect</attribute> | <attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute> | <attribute name="ShowSqlEnabled">false</attribute> | </mbean> | | I'd like to access a different set of tables via a different datasource with a 2nd .har file. Configured much like the 1st, but with a different mbean name, and datasource: | | example2.har | -Distribution.hbm.xml | -Distribution.class | -META-INF | --hibernate-service.xml | | hibernate-service.xml: | | <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=HibernateExample2"> | <attribute name="DatasourceName">java:/jdbc/example2DS</attribute> | <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute> | <attribute name="Dialect">net.sf.hibernate.dialect.HSQLDialect</attribute> | <attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute> | <attribute name="ShowSqlEnabled">false</attribute> | </mbean> | | I deployed the 2nd .har and, when I run a query, I get a message: "net.sf.hibernate.QueryException: unexpected token: as [select v from Distribution as v] | If I remove the 1st .har file and restart the server, the query works. If I then hot deploy the 1st .har file, the 2nd .har queries work, but the 1st .har file's fail with the same sort of message. What's the trick to configuring/using two hibernate services? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861519#3861519 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861519 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
