-
1. Re: Determine JNDI name for session bean from interface clas
ojacobson May 31, 2007 2:23 PM (in response to ojacobson)Is there another forum that would be more appropriate, or failing that, more likely to have an answer, for this question?
-
2. Re: Determine JNDI name for session bean from interface clas
wolfc May 31, 2007 6:11 PM (in response to ojacobson)JBoss does it by calling container.getEjbJndiName(businessInterface).
You might be able to access the Ejb3Registry to get the right container, but it's tricky business.
I like the functionality though, you should open up a Jira issue. -
3. Re: Determine JNDI name for session bean from interface clas
ojacobson May 31, 2007 7:54 PM (in response to ojacobson)EJBTHREE-980
-
4. Re: Determine JNDI name for session bean from interface clas
ojacobson Jun 1, 2007 12:22 PM (in response to ojacobson)I did a little experimenting based on wolfc's suggestion last night; it looks like by the time code is running in a webapp context Ejb3Registry.getContainers() returns an empty collection. I'm willing to bet this is classloader-related: web applications do not run in the same classloader context as ejb3 deployment, where calls to Ejb3Registry methods normally go.
-
5. Re: Determine JNDI name for session bean from interface clas
wolfc Jun 4, 2007 7:23 AM (in response to ojacobson)You could create a stateless session bean to do the lookup.
Do you have an API in mind?
Maybe a lookup java:comp/Registry or something, which can also be injectable.