This TransactionConnector suspends the transaction in the main thread,
and resumes it in the child thread, for as long as it runs. The calling party
(e.g. the party that is using a streaming transformer, or is using a provided
OutputStream that may lead to a ContentHandlerOutputStream or JsonEventHandlerOutputStream)
must make sure that no transaction related code (e.g. obtaining connections) is executed
during the life of the TransactionConnector (between construction and calling of close()).
factory method, to be called from 'main' thread.
When a transaction connector has been set up, new transactional resources can only be introduced after beginChildThread() has been called,
not on the main thread anymore, because the transaction must be suspended there.
TODO: This also means that objects further downstream might need to restore the transaction context before they can add new transactional resources.
This is currently not implemented; therefore a FixedQuerySender providing an UpdateClob or UpdateBlob outputstream might behave incorrectly.
public void beginChildThread()
resume transaction, that was saved in parent thread, in the child thread.
After beginChildThread() has been called, new transactional resources cannot be enlisted in the parentThread,
because the transaction context has been prepared to be transferred to the childThread.
public void endChildThread()
endThread() to be called from child thread in a finally clause