Hello,
see inline,
James Cook wrote:
> - If that reference can be voided at some future time by the server the
> client must either:
>
> a. get a new reference in each method that utilizes the bean. I believe this
> to be a serious performance problem. JNDI lookups can occur to a variety of
> backend data stores (COS Naming, LDAP, etc.).
>
> b. to allieviate the performance problem in (a), one could store the last
> time the reference was retrieved. If the next use of that reference exceeds
> X minutes, the reference is looked up again. X would have to be specified by
> the deployer via a parameter to account for whatever timeout value was
> specified on the server.
>
> c. Every individual method call on the stateless session bean would have to
> be wrapped in a try/catch block, with the sole purpose to refetch a
> connection to the bean if a certain exception is thrown. BTW, just what is
> that exception, NoSuchObjectException? RemoteException? EJBException? Will
> all containers throw the same exception, and we be able to distinguish the
> exception from other non-application exceptions?
>
That's what I believe as well.
I've sent a answer for this saying that the ejb spec requires server
implementors to throw a NoSuchObjectException wenn the bean reference has been
discarded.
I also believe all container must throw the same exceptions, since they are
specified.
It ist only necessary to cath NoSuchObjectException before cathing the
RemoteException (super class), in other to be able to distinguisch what's
happening on the server.
-> NotSuchObjectException says that the Object no longer exists on the server.
-> A RemoteException could cover a SocketException saying that the server is
down or another networking exception. The RemoteException only addresses network
faillures.
-> An EJBException is used to state that an unexpected error has occured during
that method execution, but the server is still living. That is why it is a
subclass of RuntimeException.
-> If the developer cares not to define application exceptions extending
RemoteException or RuntimeException, no confusion will occur.
Thanks.
Francis.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".