We currently have an EJB app that we've migrated from Resin. We have a SessionLocator class that looks up all of the session beans and caches references to their local homes in a static initializer. This worked great under Resin, but under JBoss this fails if the first call to SessionLocator is from a bean that does not declare an <ejb-local-ref> for all the other session beans and entity beans.

<ejb-local-ref >
<ejb-ref-name>Category</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.company.ejb.entity.CategoryLocalHome</local-home>
<local>com. company.ejb.entity.CategoryLocal</local>
<ejb-link>Category</ejb-link>
</ejb-local-ref>


I have added xdoclet tags to one of our SessionBeans so that the <ejb-local-ref> tags like that above get put into ejb-jar.xml. This is just duct tape until I find a better solution. The catch is that we have to hit a specific servlet before anything else, otherwise we get a NamingException that says:

10:59:21,852 ERROR [system] NamingExceptionjavax.naming.NameNotFoundException: Foo not bound

As far as I can tell I need to add <ejb-local-ref> tags to each of my session beans to declare what other beans it depends on. Is there a reason for this? It seemed that Resin made everything under com/env available to lookup. I've never had to use the <ejb-local-ref> tag until now. I'd rather not be troubled with doing that if I don't absolutely have to.
Is there a way to configure JBoss to behave more like Resin in this regard? Or is there any way around having to add <ejb-local-ref>s to all of my session beans?
-M@




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to