On Jan 16, 2006, at 2:06 AM, Marcin Skladaniec wrote:
> We were running successfully those applications for some time. At
> some point in time server started to send CayenneDataObjects
> instead of Persistent using 3t ... I have looked all application
> over for few times but I cant find the cause. What can be wrong
> with our app, any clues ? cayenne.xml was not changed, generated
> classes neither. It looks like it happened at the same time as
> release 1.2M9... could there be a bug in Cayenne ?
I won't exclude a possibility of a bug, but I can't reproduce this on
my end. Can you come up with an isolated reproducible scenario? Maybe
you should try putting a breakpoint in
ClientServerChannel.onSelectObjects(..) and run the server in Eclipse
debugger to see what really happens.
> Beside this I CayeneConext.localObjects() throws
> NullPointerException in line 442 -> ObjEntity entity =
> entityResolver.lookupObjEntity(id.getEntityName()); Is that related
> to the first problem
My bad. "entityResolver" is initialized on demand, so I should be
calling 'getEntityResolver' instead of using the ivar. I will check
in the fix in 5 minutes.
> I have some more, not related questions:
> Is there a replacement to DataObjectUtils.intPKForObject( ) ?
Good point - I am also checking in this code (I simply changed the
signature of the methods as DataObject extends Persistent
interface)... 'objectForPK' is going to be more tricky as. I'll think
what we can do.
> I have tried to use sessions to provide list of users currently
> logged in to server. The only data I can get on server side is from
> http request (host, port, username etc), service context related
> data like ContextObjectId, and OPPMessage data - parameters and
> attributes. By default OPPMessages have no attributes or params. is
> there a way to add some ? I thought that overriding
> org.objectstyle.cayenne.opp.hessian.HessianService is a good way to
> get more data, should I try something different ?
Yeah, I would think that customizing the service class is the way to
go. Maybe at some point we'll come up with some fancy Spring-based
way to customize the messages on the client to pass extra info to the
server, but for now it seems like the most pragmatic approach should
be to build extra intelligence on the server end.
Andrus
This archive was generated by hypermail 2.0.0 : Mon Jan 16 2006 - 18:08:34 EST