-
1. Re: Embedded EJB3.0 and Tomcat JDNI error
thillerson Oct 9, 2006 2:24 PM (in response to thillerson)I noticed a release note for RC9
[EJBTHREE-654] - remove hard coding of TransactionManager
I've also noticed that when running an embedded ejb3 app in Tomcat the jndi.properties file is not enough to make an initial context pick up the correct properties, and I need to do this to find anything that embedded ejb3 deployed:Hashtable<String, String> props = new Hashtable<String, String>(); props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); props.put("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory"); InitialContext ic = new InitialContext(props);
Perhaps there's an issue deep in there when looking up the transaction manager? I'm unsure of how to log this to JIRA... Is this an issue that should be logged to JIRA or am I doing something wrong configuring the JNDI for Tomcat? -
2. Re: Embedded EJB3.0 and Tomcat JDNI error
allonrauer Oct 12, 2006 3:50 PM (in response to thillerson)i'm having the same issue: the new InitialContext() sometimes picks up the apache tomcat properties instead of the jboss ones...
what is the correct way to configure tomcat to use the jndi implementation supplied w/ jboss ejb3? -
3. Re: Embedded EJB3.0 and Tomcat JDNI error
thillerson Oct 12, 2006 3:55 PM (in response to thillerson)Just to be clear, the error I'm getting is caused when embedded jboss starts up and tries to find the TransactionManager. This isn't a call I'm making myself.
Allon, any of my own calls I have to pass in the jboss jndi properties explicitly. -
4. Re: Embedded EJB3.0 and Tomcat JDNI error
keenan Oct 26, 2006 10:44 AM (in response to thillerson)Has anyone found a solution to this? I'm having the same problem the original poster reports, directly with the embedded-war example from the tutorial. I'm using Embeddable_ALPHA_9 and Tomcat 5.5.17 on a Windows XP machine.
I agree with the other posters that it is a JNDI properties problem, not in user code but in how the UserTransaction code finds the UserTransactionManager. So where should the jndi.properties file go?
--keenan -
5. Re: Embedded EJB3.0 and Tomcat JNDI error (was JDNI)
keenan Oct 30, 2006 6:25 PM (in response to thillerson)The problem is not limited to Tomcat, it appears with Jetty also. I took the same standalone.war from the embedded-war example, as distributed with Embeddable_ALPHA_9, and deployed it in a fresh Jetty installation, and still get the JNDI error trying to find the TransactionManager during bootstraping of the UserTransaction.
Since it happens with Jetty, I doubt it is the Tomcat read-only JNDI service properties causing the problem. (I was sure not to use a Jetty configuration that included JNDI.) Maybe the TransactionManager is getting bound somewhere unexpected?
The problem occurs with the unmodified embedded-war example from Alpha9, and happens during the microcontainer's creation of the UserTransaction (as specified in embedded-jboss-beans.xml), long before it gets to any application level code.
Has anyone successfully deployed a war containing the embedded EJB 3 container? What's your trick?
--keenan -
6. Re: Embedded EJB3.0 and Tomcat JDNI error
thillerson Oct 31, 2006 10:44 PM (in response to thillerson)Added a JIRA issue. I hope I did it right.
-
7. Re: Embedded EJB3.0 and Tomcat JDNI error
wonnekeysers Nov 21, 2006 7:41 AM (in response to thillerson)Think it is related to this issue:
http://jira.jboss.com/jira/browse/EJBTHREE-756 -
8. Re: Embedded EJB3.0 and Tomcat JDNI error
palam Dec 28, 2006 12:07 AM (in response to thillerson)i am still fcing probelm