I have never tried serializing an object by explicitly calling readObject()
and writeObject() on a serializable.  Does that work?

Is there a reason why you were using the EJB handle?  I'm pretty sure it's
no problem just to keep a reference to an entity bean, which will be
serialized by the container when your SSB is passivated.  If you needed a
handle (which I beleive is mostely used if you need to store a long-term
reference outside the app server,) this should also be serialized for you
automatically.

Maybe I'm not understanding what you're trying to do?

Mike

----- Original Message -----
From: "Bordet, Simone" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 17, 2001 10:15 AM
Subject: RE: [JBoss-user] SB timeout -> passivation -> activation failure


> Hi !
>
> > Q1
> > ----
> > When I checked what was happening during passivation of the
> > SFSB I was using
> > readObject() and writeObject() to serialize the handles of of
> > any referenced
> > entity beans.  A handle was obtained from an EB's remote
> > interfaces via
> > EJBObject.getHandle().  The fix was to instead serialize both
> > an EB's home
> > and primary key via EJBObject.getEJBHome() and
> > EJBObject.getPrimaryKey().
> >
> > Why does this work?  I thought that we were supposed to use
> > the handle to
> > pass EB references around.
> > What exactly should be saved to properly and portably restore the EB
> > reference?
> > And does it make a difference if the reference is being
> > passed to a real
> > remote client instead of another bean (I would hope not)?
>
> Well, if I remember well EJB spec already takes care of this, you should
not
> do anything :)
>
> > Q2
> > ----
> > So JBoss is correctly passivating SFSBs once the
> > <max-bean-age> is reached,
> > and will activate them correctly (if I don't screw it up)
> > when later needed.
> > How then does JBoss know when to finally kill off a bean (eg.
> > where the
> > client has died)?  Is there a way to configure this?
>
> As I've already specified twice, in JBoss 2.4 there is a new tag
> <max-bean-life> for this purpose
>
> Simon
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to