Hi all,

I'am using EJB BMP and CMT in my project. And I use JDBC for persistence. I
manage Connections using ThreadLocal class (one thread -- one connection).
I'm using Stateless Session Beans as well. I set "required" transaction
atribute for business methods and "supports" for entity beans methods.
So, my business methods first calls getCurrentConnection then do some logic
and in finally section calls closeConnection method. But container calls
ejbStore methods during and after business method execution and they uses
different connections. May be it results in breaking Atomicity property of
transactions (cause of jdbc ought to rollback or commit executed statements
when connection is closed or it commits each statement itself by default).
Could anybody help me? Should it be one connection for business method and
ejbStore methods? How can I desire it?  Or container somehow spans
transaction  threw different connections (for example with hierarchical
transactions) and there is no point how I manage connections?
Or I should use BMT?

Every help will be appreciated,

Alexander Tsirel

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to