Re: AW: Persistent stored in Context

"Shash Chatterjee" <[email protected]> Thu, 23 Sep 2004 09:12:33 -0600
Newsgroups gmane.comp.java.keel.user
Message-ID <[email protected]>
Gene,

> Since the Serializable interface has no methods, I made my local 
> copy of Persistent extend it, built, and viola, it works like a 
> charm.  However, I'm not a java guru, so I DO NOT know if that 
> interface has any other side effects or unwanted behaviors.
> 
> A populated Map would probably work well also, especially if I start
> running into db connection problems.  I will definitely keep that in
> mind.  Thanks!
> 

It is working because the Keel context is only checking that the class in the
context is marked via Serializable interface before allowing it to be stored.
 However, serialization is used for distributed deployments, where the context
is  serialized and copied over to every Keel server in a cluster.  In that
case, it is highly unlikely that Java's default serialization will be able to
deal with every field that is used in a Persistent, and of course, we as
framework implementors have no idea what the fields that a bean associated
with a persistent are going to look in terms of serialization.

In short, it might *appear* to work for a standalone deployment, but as soon
as you JMS-enable your deployment, things are going to go awry (you are going
to get runtime errors)!

Shash