-
1. Re: Hibernate 2.0 jndi datasource lookup fails
davidjencks May 8, 2003 9:27 PM (in response to wpfeiffe)Look in jndi-view from the jmx console to find out what your datasource is bound under globally and use that. It will look like
java:/myds without the comp/env part that you are currently using. There isn't a way to set up local references for mbeans so you will have to use the global jndi name. -
2. Re: Hibernate 2.0 jndi datasource lookup fails
wpfeiffe May 9, 2003 2:08 PM (in response to wpfeiffe)After some experimentation, it appears that the hibernate.sar is loading before the datasource is bound. Is there a way to control the load order of the jmx modules (a dependancy setting perhaps)?
Btw, only the global name worked.
Thanks for your help! -
3. Re: Hibernate 2.0 jndi datasource lookup fails
davidjencks May 10, 2003 6:16 AM (in response to wpfeiffe)If the Hibernate stuff is controlled by a mbean that follows the jboss service lifecycle, (has a start method, in which the jndi lookup occurs), then you can include a jboss.jca:service=TxCM,name=[the jndi name] element in the jboss-service.xml file in the .sar. Check the jmx console for the exact object name.
If it just starts when created, the easiest thing to do is probably include the *-ds.xml in the .sar (at the root) With at least the most recent 3.0 and 3.2 it should get deployed, and first.
You can also name your packages 1mydb-ds.xml, 2hibernate.sar etc and use the prefix deployment sorter. -
4. Re: Hibernate 2.0 jndi datasource lookup fails
wpfeiffe May 14, 2003 9:43 AM (in response to wpfeiffe)Solved it with a depends element. Thanks for the help.