Let me first rephrase your question to see whether we're talking about the
same thing..
At the beginning of each method that parcipates in the transaction I request
a connection from the connection pool and at the end of each method that
participates in the transaction I return that connection to the connection
pool... The only way to ensure transactional integrity is if all methods use
the same connection... Now how I can be sure that all methods participating
in my transaction use the same connection and is that connection
transactional?
Well the answer can be very short: the intelligence to achieve this is
somewhere in the ejbcontainer. You should be able to test this by writing a
example were you compare the connection object used by the various methods
in your transaction.
Hope that helps,
Geert
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Samuel Abraham
> Sent: Thursday, March 22, 2001 9:18 AM
> To: [EMAIL PROTECTED]
> Subject: Relation between Transaction and Connection
>
>
> hi,
> Is there any association between a transaction and the
> connection used for
> the transaction?
> For example:
> I have a Session bean with a method which is having TX_REQUIRED as
> attribute.
> In the method different classes(normal classes not Entity
> beans) modelling
> tables are used for INSERT/UPDATE etc.
> Lets assume that all these classes create a new connection
> and do the work.
> Now if an operation in one of these classes fail will the
> whole operation in
> the Session bean method rollback?
> TIA
> sam
===========================================================================
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".