I think timeout and readOnly should be more straight
forward:
For timeout the XAResource Interface provides a way to set
it: https://docs.oracle.com/javase/8/docs/api/javax/transaction/xa/XAResource.html#setTransactionTimeout-int-
It seems to be a optional feature of the underlying
ResourceManager, so it would be nice to maybe log a warning in
that.
For readOnly the main benefit is in what the specific
implementaion makes of it (i.a. optimizations, as pointed out by
Christian). I think the only requirement should be, that no
entities may be updated, created or deleted. That way no work
should be enlisted and the transaction can be commited as
readonly.
For Isolation-Levels:
I do not 100% understand how the internals of the Transactional
Implementation(s) work, but from my naive standpoint shouldn't it
be possible to somehow acquire the currently used
java.sql.Connection and just do something like this:
connection.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
connection.setReadOnly(true);
As under the hood surely jdbc is used as well, or am I wrong
here?