0

From the ejb life cycle, I think that when an ejb is timed out , the ejbRemove method is called. please correct me if I'm wrong.

Anyway if not so how to know that the ejb has timed out.

I'm using JBOSS 5.1 GA.

but actually the ejbRemove is not called when the ejb timesout, so I can't catch the ejb timeout event, please help me to catch this event somehow.

by the way is the ejb timeout related to the transaction timeout, I think not, but not sure.

note: I can change the ejb timeout time from the standardjboss.xml in the conf folder inside the JBOSS server folder from the < max-bean-life> tag under the < cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy< /cache-policy> tag

  • 1
    Well actually on OC4J : oracle standalone application server when the EJB times out the ejbRemove is called, but this doen't happen on JBOSS. might be there must be some configuration or something. please help me abou this JBOSS priblem – ahmed saleh Oct 03 '12 at 12:43

1 Answers1

0

Per the EJB specification, the caller can determine an object is timed out by calling a method on it and then catching the resulting exception:

  • java.rmi.NoSuchObjectException - EJBObject/EJBHome, or @Remote interface extending java.rmi.Remote
  • javax.ejb.NoSuchLocalObjectException - EJBLocalObject/EJBLocalHome
  • javax.ejb.NoSuchEJBException - @Local, or @Remote business interface not extending java.rmi.Remote
Brett Kail
  • 33,593
  • 2
  • 85
  • 90