cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Detlef Burt <>
Subject Hollow Objects after sending them via JMS
Date Thu, 22 Nov 2007 09:49:59 GMT
Hello List,

as you might expect, i got a small problem.

The scenario is the following:

I have a framework that communicates completely via OpenJMS. It has a 
"PersistenceLayer" that can be configured to use different 
PersistenceFrameworks. One of these is Cayenne.

The Program flow is the following:
1. Send a request to the server (in my Testcase: "get Extents of Class X 
from Database")
2. The PersistenceLayer handles the request and returns the correct 
results from the Database in a Vector --> Up to this point, everything 
is fine
3. Send the Vector back to the Application that requested the Data.

Now this is where my Problem is:
I get a Vector with the right amount of Entries and they all have the 
right class, but all the Objects are hollow and return null for every 
property/class field.

I found out, that I can keep the Objects contents when I call 
DataContext.unregisterObjects, but after reading some more posts on this 
group, I do remember reading something about unregisterObjects not being 
  a good solution. Quoting Andrus:

"In any event I would advise against using "unregisterObjects", unless 
you are sure there are no remaining cached objects that point to 
unregistered objects via a relationship."

So my question is:
Is there a more elegant solution to my problem? I really would like to 
keep all the Data from the Objects and maybe even the ObjectId of the 
Objects to be able to more easily reference the Objects in the Database.

Thanks in Advance,

View raw message