Re: Hsqldb - Shutdown

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Mar 31 2006 - 11:45:14 EST

  • Next message: Dave Merrin: "RE: BindException"

    This will work if you are using Cayenne default DataSource:

    dataNode.shutdown();
    ataNode.setDataSource(new PoolManager(..));

    (this is broken in M12 and M11, but should work with earlier
    milestones and the upcoming Beta).

    Andrus

    On Mar 31, 2006, at 5:18 PM, Pirola Davide wrote:
    > Hi Enrico,
    > your suggest doesn't works :-(
    > The csv file associated to my tables don't change if i execute
    > "CHECKPOINT DEFRAG"...only with "SHUTDOWN COMPACT"... but after the
    > db is no more accesible :-(
    >
    > Thanks
    > Davide
    >
    > -----Original Message-----
    > From: Enrico Donelli [mailto:enric..nricod.it]
    > Sent: giovedì 30 marzo 2006 11.07
    > To: cayenne-use..ncubator.apache.org
    > Subject: Re: Hsqldb - Shutdown
    >
    >
    > Pirola Davide ha scritto:
    >> Hi,
    >> i'm using hsqldb with cayenne.
    >> I'm using Resin as servlet container, and also i have a connection
    >> pool under JNDI.
    >> I have some Text table associated to csv file.
    >> After executing DELETE /INSERT / UPDATE statement, this files
    >> grow... for example when a DELETE is executed, a blank line appear
    >> in the csv file.
    >> So, can happen that i have only 1 record in my table, but the file
    >> contains 100 rows!
    >> The only way that i have found for compact this files is to
    >> execute a "SHUTDOWN COMPACT" (i execute it with a Cayenne
    >> SQLTemplate).
    >> This command, reduce the size of the file, but in the while, it
    >> "close" the session (HSQLDB),and no other command can be execute
    >> on this connection, otherwise i receive this error: "Access is
    >> denied : Session is closed".
    >> I think that in this case, the connection must be closed fisically
    >> because probably when cayenne close it, it returns available in
    >> the connection pool, but for HSQLDB is no more usable!
    >> So there is a way to tell to cayenne to "destroy" this connection?
    >> ... or anyone knows a "best bractise" for this kind of problem?
    >>
    >> Thanks
    >> Davide
    >>
    >>
    >>
    > I send a command CHECKPOINT DEFRAG
    >
    > It should solve your problem. Let me know!
    >
    > Bye
    > Enrico
    >
    >>
    >>
    >>
    >>
    >>
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Mar 31 2006 - 11:45:40 EST