> Hello all,
> 
> I'm new as of today, to this api.
> 
> I sat down Friday to write one ;) and then though "someone else must have
> tried this already"... and here it is!
> 
> Anyway, I'm going through the documentation now, but I wanted to know if its
> possible to make an object immutable... for instance, I've got a country
> list and the data doesn't change, and I want to make sure that one of my
> developers can't alter the table (particularly in the production env).
> Currently in my own design I'm using a fairly simple JavaBean system, and a
> factory behind the beans... this allows the factory to throw a veto
> exception if the data is immutable and someone tried to change it. Does
> anything like that exist in this API?

Have you looked at the PersistenceBrokerListener interface?  It includes a beforeStore 
method that's invoked before any object is persisted.  When beforeStore method is 
invoked, you just look at the object that's being stored.  If it's a 'country' object, 
simply throw an exception and the storage opertion will be aborted.

Ron Gallagher
Atlanta, GA
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to