cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Cross Database Queries
Date Tue, 05 Jun 2012 12:01:08 GMT

> I am also using CayenneFilter to initialize Cayenne,

This is fine.

> but I think I was reading in one of the previous threads that CayenneFilter is simple
> and in more complex situations Srging or Guice should be used to initialize.

I'd rephrase this advice as "Cayenne can be used with a user-prefrerred configuration mechanism.
If you are already using Spring, start ServerRuntime with Spring as well, if you are using
Guice, start it with Guice, if you don't have either - use CayenneFilter or use your own bootstrap
code"

> I've also read that there is only 1 ServerRuntime is being
> created and in order to create 2 ServerRuntimes I need a separate
> DataDomain. Yet I can not create another DataDomain within the same
> project in the modeller? Does that make any sense?

You are right in that there's only one DataDomain per mapping project in the Modeler and one
DataDomain per ServerRuntime. You have this part backwards: "in order to create 2 ServerRuntimes
I need a separate DataDomain". I'd say "in order to have 2 separate DataDomains, you need
to create 2 separate ServerRuntimes". I.e. ServerRuntime is a full isolated Cayenne stack.
You can have 2 ServerRuntimes in the same app started from the same XML (not sure why, but
you can), or from different XML, etc. 

Back to your issue - 2 DataNodes can easily co-exist in the same ServerRuntime (under a single
DataDomain). So I am not sure what the problem is. Maybe put a breakpoint in your Query "route"
method and run your app in debugger to start unwinding this puzzle?

Andrus

On Jun 5, 2012, at 2:45 PM, Gary Jarrel wrote:
> Hi Andrus,
> 
> No there are not!
> 
> I am also using CayenneFilter to initialize Cayenne, but I think I was
> reading in one of the previous threads that CayenneFilter is simple
> and in more complex situations Srging or Guice should be used to
> initialize. I've also read that there is only 1 ServerRuntime is being
> created and in order to create 2 ServerRuntimes I need a separate
> DataDomain. Yet I can not create another DataDomain within the same
> project in the modeller? Does that make any sense?
> 
> Gary
> 
> On Tue, Jun 5, 2012 at 9:42 PM, Andrus Adamchik <andrus@objectstyle.org> wrote:
>> Hi Gary,
>> 
>> are there any matching table names between "jay" and "jayExtranet" DataMaps?
>> 
>> Andrus
> 


Mime
View raw message