Eric Long <[EMAIL PROTECTED]> writes:
> Is there a way to determine the current transaction ID being used? I can see
> all
> transaction IDs by using "SELECT * FROM SYSCS_DIAG.TRANSACTION_TABLE", but I
> want a way
> to return the transaction ID for the current connection.
There might be a simpler way, but at least EmbedConnection.toString()
returns a string which contains the transaction ID.
This code
Connection c = DriverManager.getConnection("jdbc:derby:db;create=true");
System.out.println(c);
will print something similar to this:
[EMAIL PROTECTED] (XID = 120), (SESSIONID = 0), (DATABASE = db), (DRDAID = null)
XID = 120 shows that the transaction ID is 120.
--
Knut Anders