Re: [OT] JNDI [Was: JettyPlus w/ Cayenne JNDIDataSourceFactory]

From: Kevin Menard (kmenar..ervprise.com)
Date: Thu Oct 06 2005 - 08:02:45 EDT

  • Next message: Lothar Krenzien: "view not found by cayenne"

    On Wed, 05 Oct 2005 22:56:32 -0400, Andrus Adamchik
    <andru..bjectstyle.org> wrote:

    > What DataSource implementation is used internally by JNDI is up to the
    > admin (it can be Cayenne, DBCP or million others). Conversly, you can
    > deploy Cayenne with your own DataSource without JNDI. In this respect
    > two deployment strategies are equivalent.

    Okay, that's what I was verifying.

    > All JNDI does is making your application a good J2EE citizen,
    > externalizing certain configuration pieces and providing a "contract"
    > between an application (that you control as a developer) and J2EE
    > container (that is supposedly controlled by sysadmins).
    >
    > It is a requirement for "enterprise" deployment (whatever that means).
    > If you control the environment yourself end-to-end, you may still find
    > it useful, as a single String name in your Cayenne mapping can be used
    > to access different databases on different servers (sometimes you can
    > swap DB on a "hot" server) ... It is extra configuration though...

    Interesting. I had never thought about being able to swap DBs on the fly,
    but then again, it's never come up before. I agree it seems "wrong" to
    have the app manage its own DB connection pool, but if in this case it
    doesn't gain me anything except extra configuration, I may be willing to
    accept bad style in favor of the simplest solution.

    Thanks for the info,

    Kevin



    This archive was generated by hypermail 2.0.0 : Thu Oct 06 2005 - 08:02:49 EDT