rmi.UnexpectedException - Failed to invoke on method create
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Stan_UA1OUT
Posted On:   Thursday, November 22, 2001 03:41 AM

Hi everyone, We have a problem with our EJBs under Weblogic 6.1. The following is the easiest way to reproduce the problem using stateless beans A, B and C. 1. Client - lookup EJBHome of A 2. Client - lookup EJBHome of B 3. Client - create EJBObject of B 3.a. Srv - ejbCreate of B lookups EJBHome of C and caches it (for later use somewhere else). 4. Client – create EJBObject of A 4.a. Srv – ejbCreate of A lookups EJBHome of C and caches it 5. Client – call a method of EJBObject A 5.a. Srv – A.method tries to create an EJBObject of C 5.b. create fails throwing the followi   More>>

Hi everyone,



We have a problem with our EJBs under Weblogic 6.1.



The following is the easiest way to reproduce the problem using stateless beans A, B and C.



1. Client - lookup EJBHome of A


2. Client - lookup EJBHome of B


3. Client - create EJBObject of B


3.a. Srv - ejbCreate of B lookups EJBHome of C and caches it (for later use somewhere else).


4. Client – create EJBObject of A


4.a. Srv – ejbCreate of A lookups EJBHome of C and caches it


5. Client – call a method of EJBObject A


5.a. Srv – A.method tries to create an EJBObject of C


5.b. create fails throwing the following: java.rmi.UnexpectedException - Failed to invoke on method create



Everything works fine if


1. we skip step 3, or


2. we do not cache EJBHome in 3.a or 4.a but lookup EJBHome and get EJBObject in every method it works fine.



It seems that we have a problem with caching EJBHomes (something goes wrong when we cache EJBHome of C for the second time). May be there is something in Weblogic settings or bean descriptor that we missed. Perhaps a better solution would be to cache EJBObjects or, even better, EJBObject handles instead.



Any suggestions?



Kind regards,



Stan

   <<Less

Re: rmi.UnexpectedException - Failed to invoke on method create

Posted By:   Michael_Brown  
Posted On:   Friday, November 23, 2001 09:30 AM

A better way to maintain a reference to an EJBHome is to get its handle. Instead of holding EJBHome itself call the EJBHome.getHomeHandle() method and cache the handle to the home. When you need the home later call HomeHandle.getEJBHome().
About | Sitemap | Contact