db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julius Stroffek <Julius.Strof...@Sun.COM>
Subject XA transaction timeout question
Date Fri, 18 May 2007 11:32:54 GMT
Hi,

I am working on implementing transaction timeout for XA transactions in
client driver in DERBY-2509.

The interface XAResource has functions set/getTransactionTimeout. In
some cases it is required for getTransactionTimeout function to return
the resource manager's default value of transaction timeout.

I have not found any DRDA stuff to query the server's settings for XA
transaction timeout. So, I am not quite sure how to deal with this.
These are the options that come to mind:

---
1.) If server is using the default transaction timeout function
getTransactionTimeout will always return 0. The value 0 is used in
setTransactionTimeout to set the resource manager's default value.

2.) Maintain the default value of a transaction timeout in a client code
rather then server. There is no need to query the server for the default
settings.

3.) Use some database function on SQL level to query the default
settings and execute the query like "VALUES
SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY("derby.jdbc.xaTransactionTimeout")".

4.) Maintain some constant value for default transaction timeout. There
is no need for a client to query server if it knows the default value.
---

I think it might be a benefit for a DB administrator to be able to
adjust the default value for the server because he might not be able to
control the applications connecting to DB and check that they set up the
transaction timeout accordingly. This would eliminate options 2.) and
4.) I am also not quite sure If I should require this.

I found the option 4.) as not very flexible so I would like to avoid it.

Option 4 seems to be a bit strange from the implementation point of
view. Probably, the server setting should be queried only once when a
XAConnection is created or the getTransactionTimeout function is called
for the first time to obtain the default value.

Please, give me your opinions.

Thanks

Julo


Mime
View raw message