Hi, I am new to JNDI.I want to bind hibernate to JBOSS.I created a hibernate-service.xml having following content:
| <server> | <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate"> <attribute name="DatasourceName">jdbc/mysql</attribute> <attribute name="Dialect">org.hibernate.dialect.MySQLDialect</attribute> <attribute name="SessionFactoryName">testing</attribute><attribute name="Hbm2ddlAuto">create-drop</attribute> <attribute name="ShowSqlEnabled">true</attribute> </mbean></server> If I put this xml while running JBOSS,I can lookup java:/testing successfully.But if restart jboss(having this xml already),it is unable to start service jboss.har:service=Hibernate 11:59:26,437 WARN [ServiceController] Problem starting service jboss.har:service=Hibernate org.hibernate.HibernateException: Could not find datasource But I can lookup the specified datasource with 'java:jdbc/mysql'.I think problem is that jboss goes to bind hibernate binding first and when it tries to find database binding,it cannot find. Is there anyway so that my datasource get binded first and then my hibernate binding should be done by JBOSS so that Hibenate binding can lookup db binding. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3942781#3942781 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3942781 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
