Rickard Oberg wrote:
> 
> Hi!
> 
> > Rickard Oberg wrote:
> >
> > > What we should do, really, is serialize the entire bean and do some
> nifty
> > > object replacement on deserialization.
> >
> > Ok, I've done this (in CVS).  I had to
> > - use a dummy object to store instead of non-serializable fields
> > (UserTransaction and SessionContext).  not really pretty but it works.
> 
> I don't understand. Why can't you serialize UT and SC!? They should have
> overriden writeObject that stores nothing (i.e. all we want to store is the
> class name).

I tried that, but I kept getting this exception: 

java.io.InvalidClassException:
org.jboss.ejb.EnterpriseContext$EJBContextImplMissing no-arg constructor
for class

EJBContextImpl does have the no-arg constructor, but I think it has to
do fact that it is an inner class.  (I added no-arg constructors
everywhere, but always got this exception)

Any idea?  (making it a real class is going to be painful)

Sebastien


> 
> > - use the application classloader to resolve classes in
> > SessionObjectInputStream.  I am not sure it is the right way to do it
> > though...
> 
> It *is* the right way to do it. But it should work on straight SC and not a
> dummy object.
> 
> /Rickard

Reply via email to