Re: Sharing a single DataMap between multiple DataNodes

From: Bryan Lewis (brya..aine.rr.com)
Date: Tue Sep 06 2005 - 10:43:22 EDT

  • Next message: Andrus Adamchik: "Re: Sharing a single DataMap between multiple DataNodes"

    There's no requirement that a DataMap be associated with only one DataNode.
    Perhaps it appears that way in the Modeler, don't know about that, but the
    xml files are easily to edit. I've used both of the following ways:

    * Multiple DataNodes in cayenne.xml. I learned about this one when I was
    using the DataPort example to convert data from one database to another.

    <domains project-version="1.1">
      <domain name="model">
        <map name="DataMap" location="DataMap.map.xml"/>

        <node name="DataNode"
              datasource="DataNode.driver.xml"
              adapter="org.objectstyle.cayenne.dba.oracle.OracleAdapter"
              factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
            <map-ref name="DataMap"/>
        </node>

        <node name="LocalDataNode"
              datasource="LocalDataNode.driver.xml"
              adapter="org.objectstyle.cayenne.dba.postgres.PostgresAdapter"
              factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
            <map-ref name="DataMap"/> <!-- same DataMap -->
        </node>
      </domain>
    </domains>

    * Multiple cayenne.xml files sharing the same DataMap. See fopr example:

    http://article.gmane.org/gmane.comp.java.cayenne.user/2972/match=defaultconfiguration

    ----- Original Message -----
    From: "Gili" <cowwo..bs.darktech.org>
    To: <cayenne-use..bjectstyle.org>
    Sent: Tuesday, September 06, 2005 10:06 AM
    Subject: Sharing a single DataMap between multiple DataNodes

    > Hi,
    >
    > I want to be able to access the same database using JDBC from
    > standalone applications and JNDI when running inside Tomcat. It is
    > possible for both to be used simultaneously. Modeler seems to improve
    > the artificial limitation that a DataMap may be associated with at most
    > a single DataNode. Is there possible to remove this limitation or is
    > there a workaround?
    >
    > Thanks,
    > Gili
    > --
    > http://www.desktopbeautifier.com/



    This archive was generated by hypermail 2.0.0 : Tue Sep 06 2005 - 10:43:34 EDT