Section 10.7.14 applies only to entity beans. The original question didn't specify
session or entity homes. With words like "should" and "ideally" there doesn't appear
to be any guarantee here either.

--Victor


"John O'Shea (Groups a/c)" wrote:

> Hi Victor,
>
> Section 10.7.14 of the EJB 2.0 spec clarifies this:
> "The container should implement the distribution protocol between the
> remote client and the container such that the object references of the
> remote home and remote interfaces used by entity bean clients are usable
> for a long period of time. Ideally, a remote client should be able to
> use an object reference across a server crash and restart. An object
> reference should become invalid only when the entity object has been
> removed, or after a reconfiguration of the server environment (for
> example, when the entity bean is moved to a different EJB server or
> container)."
>
> It's a quality of implementation thing again. What you'll find is that
> the higher end servers using RMI/IIOP (and a distributed Implementation
> Repository) can avail of IIOP's underlying object location transparency
> capabilities and transparently redirect the client to the new location
> of the EJB(or Home), be it in a clustered or fail-over capacity. The
> EJB(or Home) can move from one machine to another. I'm not sure what
> interception based framework Ted was referring to?
> Home references and stateless session bean references can simply be
> redirected by the IIOP protocol. Entity beans references can also be
> redirected although there are obvious issues with db locking to contend
> with. However, there is a bit more work for the clustered server's to do
> in the case of stateful session bean references - not only does the
> client have to be redirected to an alternative location, the servers
> will probably have to be replicating or storing session state to ensure
> that the session can continue...more complicated that it sounds to
> implement efficiently.
>
> Lower end servers can simply throw back a RemoteException if the
> reference no longer points to a valid TCP/IP host + port pair...
>
> j.
>
> Victor Langelo wrote:
>
> >Ted,
> >
> >I don't believe the spec makes any such guarantee. Here's the relevant paragraph
> >from 6.2.1:
> >
> >     The lifecycle of the distributed object implementing the remote home
> >interface (the
> >     EJBHome object) or the local Java object implementing the local home
> >interface
> >     (the EJBLocalHome object) is Container-specific. A client application
> >should be
> >     able to obtain a home interface, and then use it multiple times, during the
> >client
> >     application's lifetime.
> >
> >I don't see any guarantee that the home interface will survive a container
> >restart. Is there something else in the spec that clarifies or overrides the
> >above statement?
> >
> >--Victor
> >
> >
> >Ted Neward wrote:
> >
> >>The EJB spec guarantees that a remote reference will never go stale, so long
> >>as the EJB server is running on the same machine as when the home ref was
> >>once taken. This is the power of an interception-based framework. The same
> >>is true of entity bean refs.
> >>
> >>Ted Neward
> >>{.NET||Java} Course Author & Instructor
> >>DevelopMentor (http://www.develop.com)
> >>http://www.javageeks.com/tneward/index.html
> >>
> >>>-----Original Message-----
> >>>From: A mailing list for Enterprise JavaBeans development
> >>>[mailto:[EMAIL PROTECTED]]On Behalf Of Catalfano Anthony
> >>>Sent: Tuesday, September 04, 2001 10:23 AM
> >>>To: [EMAIL PROTECTED]
> >>>Subject: [EJB-INT] caching homes on client
> >>>
> >>>
> >>>I'm caching homes on the client side. When I bounce the server, the homes
> >>>are still in the cache. Is there an efficient way of determining
> >>>when a home
> >>>ref is stale?
> >>>
> >>>Thanks
> >>>
> >>>Anthony Catalfano
> >>>Information Technology Analyst
> >>>Deere & Company
> >>>309-748-5201
> >>>

===========================================================================
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".

Reply via email to