06-23-2009 02:49 PM
I'm trying to reduce my in-memory handles by using the ObjectGroup.createGroup() on an array of objects. The JDE 4.1 documentation does not mention anything about the objects needing to be Persistable or that a NonPersistableObjectException can be thrown. The JDE 4.3 mentions in the class intro that it is for persistent handles but does not mention the exception.
Is there a way to group non-persistent objects?
Solved! Go to Solution.
06-23-2009 03:35 PM - edited 06-23-2009 03:36 PM
Sorry for misunderstanding.
I see the workaround in implementation of your own grouping mechanism.
For example when you are grouping a list of objects you are creating an xml structure (one string class instance).
And when you are ungrouping you are parsing this xml and creating "live" object instances.
What do you think?
06-23-2009 04:55 PM
I think the only reason they put in the Persistable requirement is so that to make the programmer think as to what objects might be copied (in the hopes the user is careful and limits the number of peristable objects and thus prevents the accidental inclusion of large trees of objects). Otherwise it appears to be a completely pointless restriction (I added a bunch of "implements Persistable" but never persist the objects and it seem to run).