Hi,

Oleg Nitz wrote:
> 
> Hi Ole,
> 
> Ole Husgaard wrote:
> OH> Currently we have one global timeout value that may be
> OH> set programmatically with TM.setTransactionTimeout().
> OH> We have no way of setting the default of this in the
> OH> configuration files, and I see no reason why we shouldn't
> OH> have that. But I am not yet familar with JMX, so I would
> OH> rather if someone else could implement that.
> Done: the default transaction timeout can be configured via
> jboss.jcml:
> 
>      <mbean name="DefaultDomain:service=TransactionManager">
>        <attribute name="TransactionTimeout">60</attribute>
>      </mbean>
> 
> The timeout is set in seconds.

Nice.
And simple too. I really should learn JMX.
 
> BTW, when I tested this, I've noticed that if the timeout is too
> small, jBoss behaves incorrectly: the error message
>    Transaction XidImpl:on/0 timed out
> appears in server log, but client doesn't receive any exception.

That is strange. When a transaction has been rolled back, an
attempt to commit it should throw an IllegalStateException.
And that should happen in the transaction interceptor and be
propagated back to the client.
No exception at the client is a bug.
What kind of bean are you using, and what is the transaction
attribute?

> OH> For seperate per-bean default timeout values things get
> OH> a bit more complicated, but still possible (at least in
> OH> theory). Problem is, the JTA TM.begin() method gives us
> OH> little information about the caller.
> I hope the solution will be found.

We could add a non-JTA method TM.begin(int timeout), and add
bean metadata for the transaction interceptor to use.


Best Regards,

Ole Husgaard.

Reply via email to