cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilko Richter <thilko.rich...@web.de>
Subject Default domain in cayenne.xml
Date Thu, 18 May 2006 13:28:06 GMT
Hi everybody,


I have specified multiple domains-nodes in my cayenne.xml. When I call getDomain() I get the
exception:

...
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2B2 April 17 2006] More than one domain
is configured; use 'getDomain(String name)' instead.
...


I would like to use getDomain() in my code, is there a way to specify the default domain in
the cayenne.xml?

For example:

<?xml version="1.0" encoding="utf-8"?>
<domains project-version="1.1">
<domain name="TestDomain">
	<property name="cayenne.DataDomain.sharedCache" value="true"/>
	<map name="Sr2DomainMap" location="Sr2DomainMap.map.xml"/>

	<node name="TestDomainNode1" default="true"
		 datasource="jdbc/dbSr2"
		 factory="org.objectstyle.cayenne.conf.JNDIDataSourceFactory">
			<map-ref name="TestDomainMap"/>
	 </node>
 
        <!-- different configured... but not visible here -->
         <node name="TestDomainNode2"
		 datasource="jdbc/dbSr2"
		 factory="org.objectstyle.cayenne.conf.JNDIDataSourceFactory">
			<map-ref name="TestDomainMap"/>
	 </node>
</domain>
</domains>


thanks in advance!


Thilko



_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


Mime
View raw message