Re: AW: Persistent stored in Context
Gene McCullough <[email protected]> Thu, 23 Sep 2004 09:00:10 -0500
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <[email protected]> |
Just FYI, 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! gene On Mon, 2004-09-20 at 14:56, Vidakovic Aleksandar wrote: > I guess that iterating over all fields and storing a Map is not what yo= u wanted to hear?! >=20 > ;-) >=20 > I don't see why this shouldn't be possible... is there any danger that = resources like connections aren't released or something like that (->all?= )? >=20 > Would it be possible to have a Map object where you put your persistent= , and you store the map in the context...?!? >=20 > Anyway, I reviewed my code (thanks Gene... ;-) and I think I might need= this, too... now I only store an ID and retrieve the persistent every ti= me I need it. >=20 > Aleks >=20 > -----Urspr=C3=BCngliche Nachricht----- > Von: Gene McCullough [mailto:[email protected]] > Gesendet: Montag, 20. September 2004 16:13 > An: Keel Users > Betreff: [Keel User] Persistent stored in Context >=20 >=20 > I've got several models that lookup the same persistent. So, I was > wondering if maybe I should just stash the persistent in the context.=20 > However, on accomplishing this, I find out that Persistent is not > Serializable, and i get an exception (java.lang.IllegalStateException t= o > be precise). >=20 > I'd appreciate any comments from anyone on wether this is good, bad, or > indifferent (the storing of persistent in the context), to know if I > should proceed with making this work, or just keep passing the key alon= g > in parameters. I'm usually for the "if it ain't broke, don't fix it" > method of maintenance, but i'm still early in development and would lik= e > to iron it out now if worth it. >=20 > TIA > gene >=20 > _______________________________________________ > User mailing list > [email protected] > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org > _______________________________________________ > User mailing list > [email protected] > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org