Sriram,

Your comments about passing transactional contexts seems to indicate that
transactions must always be executed in a single logic thread.  The thread
must run to completion before the commit is executed to ensure that all the
tasks in the unit-of-work are executed.  If tasks are spun off into their
own threads, then there is no way of knowing when all the tasks have
completed.

When passing a transactional context in a synchronized messaging environment
like EJB, however, there is only one logical thread.  In other words, the
bean whose method was invoked (invokie) will not return until all the tasks
are completed in that portion of the unit-of-work. If this is the case,
there shouldn't be a problem passing the transactional context because the
invoker thread will block until the invokie returns --making it impossible
to commit before invokie completes its work.  I'm assuming that the
transactional context is used by the invokie to register itself with the
same transactional manager and transactional context as the invoker.

Thanks in advance!

Richard


-----Original Message-----
From: Sriram Srinivasan
To: [EMAIL PROTECTED]
Sent: 3/9/99 1:18 PM
Subject: Re: EJBObject thoughts



You also touched on explicit context propagation .. passing the
context as an additional parameter. In general, all TP systems that
I'm aware of don't allow you to do this because there is no way for
the system to enforce checked transaction behavior (where the system
checks if all work pending in that transaction is over before it is
committed) In other words, say you are able to hand over the
transactional context to another thread and then return. If the caller
has no clue about this hand-off and issues a commit, the transaction
may or may not include the work initiated by the other thread.  If the
client does know about this hand-off, it is left up to the app
programmer to ensure that all the work initiated in that transaction
is over before a commit is issued. Although CORBA OTS allows explicit
transaction propagation, I'm told that it went into the spec over
serious objections.

- Sriram
________________________________________________________________________
Principal Engineer      BEA/WebLogic, San Francisco     www.weblogic.com

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