cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Re[2]: Problems running Cayenne ORM Tier and CWS Client Tier on the same JVM.
Date Sat, 26 Jan 2008 11:58:40 GMT

On Jan 26, 2008, at 11:01 AM, <> <>  

> What i understood from chapter 'Running Client Without CWS' at the "

> " page is that i can use data from the same library of my ObjEntity  
> classes (actually generated client classes) through not only remote  
> source channel (HessianConnection) but also through local source  
> channel (LocalConnection). I think the only reason i would need  
> standart Cayenne classes is if i need my application work faster.

I see, we should probably remove the first example there (the one  
without a LocalConnection), as we are currently not testing such setup  
and can't guarantee that it works.

> This mixing would be the most reasonable if i have a Web application  
> and desktop swing application working with same set of entities  
> (with one database). Then i wouldn't need to generate TWO packages  
> of classes representing one set of db entities. Also they together  
> might work faster, because they would use the same cache.
> Well, this dream could come true only if both 'applications' use the  
> same Configuration. So i also thought that  
> Configuration.getSharedConfiguration() returns something other than  
> the conf CWS is using. Now that you say that CWS creates its own  
> configuration and stores  it in the application-scoped object, i  
> ask: how then i can fetch this Configuration??

You can subclass HessianService and expose its DataDomain protected  
variable to the application in a way that is appropriate for your  
app.. E.g. via a static method.  Your custom subclass name can be  
passed to HessianServlet via "service-class" init parameter in  

> What is really strange, is why everything works with  
> HESSIAN_SERIALIZATION and does not with JAVA_ and NO_.

Hmm... Yesterday I didn't realize that it worked for you with  
HESSIAN_SERIALIZATION *locally*... Now it is starting to make sense...  
I think this is due to the transient variables in some objects  
involved. During serialization they are being reset to NULL, while  
NO_SERIALIZATION leaves them in the "client state". I am still unsure  
about HESSIAN vs. JAVA though...

Anyways, let me open a bug in Jira, and please use  


View raw message