At 15:06 23.06.00 , you wrote:
>Sorry - the first version got sent a bit early....  <wince>
>
>------------
>
>I have a question re: transactional attributes for a session (or other)
>bean.  Suppose I define a stateless session bean as follows:
>
>public class StatelessSessionBean()
>{
>    methodTransactionRequired()
>    {
>         if (...)
>            methodTransactionRequiresNew();
>    }
>
>    methodTransactionRequiresNew()
>    {
>        ...
>    }
>}
>
>where the two methods run under the appropriate transactional setting.
>
>If a client calls methodTransactionRequired() does the logic in
>methodTransactionRequiresNew() run under a new transaction or the same
>transaction?  Ordinarily, if methodTransactionRequiresNew() were run from
>another bean, it would initiate a new transaction, but in this case,
>wouldn't the call be done directly instead of being redirected through the
>AppServer?

yes, if you don't like that you should be calling the instance through its
ejbobject
(i.e. ((YourRemoteInterface)getEJBObject()).methodTransactionRequiresNew();
). If you call methods directly you circumvent the invocation layer where
all the transaction, security stuff is happening.

hope this was what you were looking for.

robert



>If methodTransactionRequiresNew() is NOT run in a separate transaction, then
>do I have any alternatives to A) Create a new StatelessSessionBean using the
>Home interface and call it's methodTransactionRequiresNew() or B) Use
>Bean-Demaracted transactions?
>
>
>Jeff 8-)
>
>===========================================================================
>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".

(-) Robert Kr�ger
(-) SIGNAL 7 Gesellschaft f�r Informationstechnologie mbH
(-) Br�der-Knau�-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de

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