hi bruce,
i looked in source of castor what is happen, when i call
db.commit():
org/exolab/castor/jdo/engine/DatabaseImpl.java
public void commit()
throws TransactionNotInProgressException,
TransactionAbortedException
{
:
finally {
try {
_ctx.close(); // <================
} catch (Exception ex) {
}
_ctx = null;
}
:
org/exolab/castor/persist/TransactionCntext.java
public synchronized void close()
throws TransactionAbortedException
{
:
try {
// Go through all the connections opened in this transaction,
// close them one by one.
closeConnections(); // <================
} catch ( Exception except ) {
:
org/exolab/castor/jdo/engine/TransactionContextImpl.java
:
protected void closeConnections()
throws TransactionAbortedException
{
:
// Go through all the connections opened in this transaction,
// close them one by one.
// Close all that can be closed, after that report error if any.
enum = _conns.elements();
while ( enum.hasMoreElements() ) {
conn = (Connection) enum.nextElement();
try {
conn.close(); // <?????????????????????????
} catch ( SQLException except ) {
error = except;
}
:
}
:
the statement conn.close(); i don't understand. in the java.sql.Connection
class
there are two methods:
commit()
public void commit()
throws SQLException
Makes all changes made since the previous commit/rollback permanent
and releases any database locks currently held by this Connection
object. This method should be used only when auto-commit mode has
been disabled.
and close()
public void close()
throws SQLException
Releases this Connection object's database and JDBC resources
immediately instead of waiting for them to be automatically released.
why you don't invoke conn.commit() ?
regards,
antje
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev