tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Crosbie <>
Subject Can cached EJB HomeHandles be invalidated?
Date Thu, 10 Nov 2005 03:13:12 GMT
I am using Tomcat 5.5.9 with WebLogic 8.1 as the EJB server/container.

I am configuring EJB references in the servlet context in my server.xml like

<Context ...>
  <Ejb name="ejb/name" type="Session" home="ejb.home" remote="ejb.remote"
factory="my.custom.weblogic.factory" />

The behavior I observe when the EJBs are first requested is the
getObjectInstance() method of my custom factory is invoked and the
getHomeHandle() method invoked on that return object. In subsequent requests
for the EJB I see the getEJBHome() method of the handle being invoked (I
created proxies to see what exactly was happening) and the create() method
then being called.

Under ideal conditions this is fine. But what I observe when the WebLogic
server has been shutdown is that calls to HomeHandle.getEJBHome() succeed
but then the call to create() fails. The problem is the HomeHandle never
gets invalidated and I am required to restart Tomcat in order for things to
start working again.

I am hoping that there is a way to instruct Tomcat to not cache the
HomeHandle but instead always delegate Home interface creation to my object
factory. I could handle the caching and any retry logic in a ServiceLocator.
Is this possible?

Thank you!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message