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>
Use the depends attribute on the mbean. Have a look at:
http://wiki.jboss.org/wiki/Wiki.jsp?page=HowCanAnMBeanDependOnADatasource