In most cases, yes, they will, as transactional context is kept for each
Thread. So, basically, this code:

InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(SOME_JNDI_BINDING);
Connection c = ds.getConnection();

PreparedStatement ps = c.prepareStatement(SOME_SQL_STATEMENT);

ps.execute();


Will work(all other things being equal) the same whether inside a
session bean or a delegating class.

One last word of advice: think carefully if you're planning to have
dual-transactional semantics classes. It might prove more difficult than
it seems at first glance.

My 2c,

Juan Pablo Lorandi
Chief Software Architect
Code Foundry Ltd.
[EMAIL PROTECTED]

Barberstown, Straffan, Co. Kildare, Ireland.
Tel: +353-1-6012050  Fax: +353-1-6012051
Mobile: +353-86-2157900
www.codefoundry.com


> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]] On Behalf Of Bruce Powell
> Sent: Monday, November 25, 2002 10:26 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Concurrent access to a method of a stateless
> session bean.
>
>
> GREAT. Thank you.
> But the following question then arises:
> Will transactions run via the container & the Server's
> datasource propogate to the dependent classes? It seems
> logical that the container will stack them regardless, until
> we reach the end of the beans method. thanks, Bruce
>
> ==============================================================
> =============
> 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".
>
>

===========================================================================
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