Re: problem creating standalone DataContext

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jan 04 2006 - 10:43:18 EST

  • Next message: Lothar Krenzien: "Re: problem creating standalone DataContext"

    On Jan 4, 2006, at 9:27 AM, Lothar Krenzien wrote:
    > For me it looks like that I have to set a JNDI resource. Normally
    > it will be set in the context.xml which is loaded by a web
    > container. But how can I specifiy the JNDI context when I run
    > cayenne without a web-container ?

    Running JNDI service without a container is not for the weak of
    heart. One option is to use an alternative cayenne.xml for testing
    that uses DriverDataSourceFactory instead of JNDIDataSourceFactory.
    Or you can take advantage of the new 1.2 feature - "Loading JNDI
    DataNodes from Local Preferences", briefly mentioned on Wiki:

    http://objectstyle.org/confluence/display/CAY/1.2+User+Guide

    This way you can fake JNDI (for Cayenne purposes only) by creating a
    DataSource via Modeler preferences. (Be aware that the last solution
    is affected by the cross-platform Modeler bug in M9 discussed
    recently; the solution is to get Modeler from the nightly build).

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Jan 04 2006 - 10:43:22 EST