Thanks. So I guess the cleanness of this will depend on how motivated
I am... :-)
Todd
On Jun 18, 2005, at 2:02 PM, Andrus Adamchik wrote:
> Hi Todd,
>
> On Jun 18, 2005, at 11:55 AM, Todd O'Bryan wrote:
>
>> I'm creating a small Swing-based server/client application that is
>> relatively self-contained. However, it will require a login and
>> I'd like to use the login mechanisms I already wrote for a much
>> larger web application that is running on the same server.
>>
>> Is there an easy way to include just the stuff I want from the
>> other database (basically just the User object) without including
>> all the other classes and datamaps and extraneous stuff I don't
>> need? If not, am I better off just writing vanilla JDBC to grab
>> the little bit I need to do login or is there some other way to
>> deal with this problem?
>>
>
> You'll have to split all your reusable entities in a separate
> DataMap and then package *.map.xml and all related DataObject
> classes in a single JAR and use as you would use any other library.
>
> The only caveat is that you shouldn't include cayenne.xml in this
> jar. Instead you may need to manually tweak cayenne.xml of each
> individual application to add this extra DataMap to the default
> domain.
>
>
>
>> BTW, is this the kind of stuff that nested data domains will
>> handle (I've not paid much attention to what exactly nested data
>> domains are.) or is there something else that will make
>> modularization easier so I can grab just what I need from various
>> databases on the server?
>>
>
> You can have multiple DataDomains, but they are not nested... They
> are "peers", each defining its own entity namespace and
> DataSources. Probably not very helpful in your case.
>
> Andrus
>
This archive was generated by hypermail 2.0.0 : Sat Jun 18 2005 - 14:36:49 EDT