solved - me being a dumbass

I forgot the ejb-ref from EJB-B to EJB-A

Nathan Coast wrote:
Hi,

I'm using jboss in conjunction with xdoclet to generate the ejb support classes.

I have two scenarios both of which call the same jndi lookup code to retrieve the home interface for an entity bean. Case 1 - no problem, case 2 - ejb not bound exception.

Case 1 summary  - Create EntityA

Struts action >
EntityAFacade.create >
EntityAUtil.getLocalHome >
EntityAUtil.lookupLocalHome >
Iniitial context.......
EntityLocalHome.create..........
no problem

Case 2 summary call stack - Update EntityB which has a m-m cmr relationship with EntityA, EntityB updated with a single EntityA

Struts action >
EntityBFacade.update >
EntityBLocal.setEntityBEntityValue >
EntityBCMP.setEntityBEntityValue >
EntityBCMP.addEntityA >
EntityAUtil.getLocalHome >
EntityAUtil.lookupLocalHome >
Iniitial context.......

Kaboom

javax.ejb.EJBException: null; CausedByException is:
    null; CausedByException is: ejb not bound;

Exactly the same code is called in both cases. Case 1 entityA lookup occurs within facade session ejb code, case 2 is called from facade session ejb which calls entity B which attempts to lookup local home for entityA - fails.

I'm a bit lost as to why it fails in one case but not the other. Anyone have any ideas? much appreciated.

btw the lookup is performed with this String 'java:comp/env/ejb/RoleEntityLocal'

cheers
Nathan


-- Nathan Coast Managing Director codeczar ltd mobile: (852) 9049 5581 email: mailto:[EMAIL PROTECTED] web: http://www.codeczar.com


------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to