Re: standalone application

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Jun 03 2005 - 17:15:21 EDT

  • Next message: Koen Segers: "commitchanges doesn't work?"

    > I am just starting to try cayenne. Forgive me if this is silly, I
    > looked at the archives but couldn't quite find what I was looking for.
    >
    > Instead of connecting to a server, I am using standalone hsqldb database
    > instances. From what I understand of cayenne, all of the database
    > config is loaded out of the xml file when the application is first
    > started. If , after the application is already running, I want to
    > connect to a different instance that was not previously defined, is
    > there a way to obtain a DataContext via API calls or other?
    >
    > James

    James,

    DataContext works on top of one or more DataNodes (DataNode is an
    abstraction of a single DB), so technically what you'd need is replacing a
    DataSource of a DataNode with a new one. Here is a link to a recent FAQ
    article that examplains how to do that:

    http://objectstyle.org/confluence/display/CAY/Setting+Database+Connection

    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Jun 03 2005 - 17:15:22 EDT