Re: [Likely Spam]Re: jdbc connection information

From: Michael Gentry (blacknex..mail.com)
Date: Thu Sep 13 2007 - 10:44:08 EDT

  • Next message: Andrus Adamchik: "Re: [Likely Spam]Re: jdbc connection information"

    Dan, do you use Ant to build your application? I had a Tapestry
    application using Cayenne that had a default DataNode XML file I used
    for local testing, but when I ran Ant to build the WAR file, it would
    copy an environment-specific DataNode XML file out of
    environments/development/....xml (I also had testing, acceptance, and
    production directories) to the build directory and package that into
    the WAR. So, depending on how I ran Ant, it would pull a different
    DataNode XML file (with different connection settings) to build into
    the WAR. Worked fairly well for me. (I also had different
    .properties files, etc in those target-specific directories.) Would
    that approach work for you, too?

    /dev/mrg

    On 9/13/07, Dan Morgan <dmorga..homefinder.com> wrote:
    > Not using J2EE - just POJO.
    >
    > Thanks,
    > Dan
    >
    > -----Original Message-----
    > From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    > Sent: Wednesday, September 12, 2007 9:48 AM
    > To: dmorgan
    > Subject: [Likely Spam]Re: jdbc connection information
    >
    > BTW, I would recommend to try a JNDI option first. That's where
    > WebObjects/EOF is different from J2EE - things like DataSources are normally
    > provided by container (vs. application), with container- specific config
    > replacing environment property files.
    >
    > Andrus
    >
    > On Sep 12, 2007, at 7:41 PM, Andrus Adamchik wrote:
    >
    > > There is a variety of options for customization revolving around JNDI
    > > [1], and a custom DataSource that can be configured via a custom
    > > DataSourceFactory [2] in the Modeler.
    > >
    > > Cheers,
    > > Andrus
    > >
    > > [1] http://cayenne.apache.org/doc/using-jndi.html
    > > [2] http://cayenne.apache.org/doc/api/org/apache/cayenne/conf/
    > > DataSourceFactory.html
    > >
    > >
    > > On Sep 12, 2007, at 7:29 PM, Dan Morgan wrote:
    > >
    > >> Is there a way to modify the JDBC connection information
    > >> programmatically prior to Cayenne attempting to make a connection?
    > >> With EOF you could get at the connection information and make changes
    > >> to it prior to connection. This allowed having property files that
    > >> contained the connection information and yet not have to make changes
    > >> to the driver nodes (Allowed copying the same jar file to several
    > >> different configurations (staging, production,
    > >> etc) and
    > >> just having different property files there which could be used to
    > >> modify the connection information at runtime).
    > >>
    > >> Thanks,
    > >>
    > >>
    > >> Daniel L. Morgan
    > >> EMail : <dmorga..homefinder.com>
    > >>
    > >>
    > >>
    > >>
    > >>
    > >>
    > >>
    > >>
    > >
    > >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Sep 13 2007 - 10:44:43 EDT