Re: Using multiple factories

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Nov 02 2005 - 02:40:16 EST

  • Next message: Cris Daniluk: "Re: Mixing JDK 1.4 and 1.5 in development"

    Everything looks good as far as I can tell. I even wrote a new unit
    test to check for this specific condition, and everything works as
    expected. One more thing I can suggest is to set Log4J logger for
    'org.objectstyle.cayenne.conf' package to DEBUG and inspect the logs
    printed on startup. RuntimeLoaderDelegate.shouldLoadDataNode method
    is where the factory is loaded, and it prints what factory was chosen.

    Andrus

    On Nov 2, 2005, at 1:22 AM, Kim Limbrick wrote:

    > Sure here's the code to get the data context that should use the
    > DriverDataSourceFactory:
    >
    > DataContext ctxt =
    > DataContext.createDataContext("IPACoreDomain");
    >
    > And here's the cayenne.xml file:
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <domains project-version="1.1">
    > <domain name="IPA">
    > <map name="IPAMap" location="IPAMap.map.xml"/>
    >
    > <node name="IPANode"
    > datasource="IPANode.driver.xml"
    >
    > adapter="org.objectstyle.cayenne.dba.oracle.OracleAdapter"
    > factory="com.ipa.db.IPADataSourceFactory">
    > <map-ref name="IPAMap"/>
    > </node>
    > </domain>
    > <domain name="IPACoreDomain">
    > <map name="IPACoreMap" location="IPACoreMap.map.xml"/>
    >
    > <node name="IPACoreNode"
    > datasource="IPACoreNode.driver.xml"
    >
    > adapter="org.objectstyle.cayenne.dba.oracle.OracleAdapter"
    >
    > factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
    > <map-ref name="IPACoreMap"/>
    > </node>
    > </domain>
    > </domains>
    >
    >
    > -- Kim Limbrick



    This archive was generated by hypermail 2.0.0 : Wed Nov 02 2005 - 02:40:18 EST