Hello!

I've got problems running Cayenne ORM Tier and CWS Client Tier on the same JVM.
In Cayenne doc there is described a way for reusing CLIENT objects between 
server and client. So i want to 'use this reuse'.

I deploy CWS on my server and put this code somewhere on server JVM (in a 
SessionBean, actually) as written in docs:

DataDomain defaultDomain = Configuration.getSharedConfiguration().getDomain();
DataChannel serverChannel = new ClientServerChannel(defaultDomain);
ObjectContext context = new CayenneContext(serverChannel);
  
Class cl = _myclass_;
  
SelectQuery select = new SelectQuery(cl);
...and so on

The problem is that it works only when _myclass_ is a STANDART Cayenne class, 
NOT a CLIENT cayenne persistence class, otherwise i get the

org.apache.cayenne.CayenneRuntimeException: [v.3.0M2 Oct 28 2007 16:09:02] No 
DataMap found, can't route query [EMAIL PROTECTED] 
com.nic.porshe.clc.Uchgroup,name=<null>]

exception! Then where's the 'reuse' of client classes?

When i'm making queries on client using HessianConnection, everything works 
fine (with client classes).

I think the problem is that Configuration.getSharedConfiguration() returns 
wrong, 'standart' configuration. My cayenne.xml and depend xml-description 
contain information about both types of classes, client and standart.
So maybe i must fix there?

Regards,
Andrey)

Reply via email to