Hi List,
I have developed some custom mailets that connect to a backend database
via Hibernate, which is a ORM mapper.
Usually it's safe to use a ThreadLocal variable to store the current
Hibernate Session (which is, in essence, nothing else than the current
database transaction). I've written a TransactionStarterMailet that
starts the Transaction at the start of the root chain, a
TransactionCommiterMailet that runs as the last Mailet of the root chain
and a RollbackMailet that is invoked in the error chain. So far this is
working flawlessly, but I haven't put the server under serious stress yet.
My question is pretty simple: Does James use a single thread for the
processing of a single Mail instance, working through all the matchers &
mailets? Will this work in a way similar to a servlet filter? If it does
I think my current design is safe. If it doesn't I guess I will have to
re-think it.
Are there any other/better ideas how to carry a single database
transaction from mailet to mailet?
thanks in advance,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]