Hi Harish
                You have to supply multiple container transaction attribute
for each method

Here is sample xml

  <assembly-descriptor>
      <container-transaction>
         <method>
            <ejb-name>ABCSession</ejb-name>
            <method-intf>Remote</method-intf>
            <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
      </container-transaction>

      <container-transaction>
         <method>
            <ejb-name>ABCSession</ejb-name>
            <method-intf>Remote</method-intf>
            <method-name>xyzmethod</method-name>
         </method>
         <trans-attribute>Supports</trans-attribute>
      </container-transaction>

      <container-transaction>
         <method>
            <ejb-name>ABCSession</ejb-name>
            <method-intf>Remote</method-intf>
            <method-name>method2</method-name>
         </method>
         <trans-attribute>RequiresNew</trans-attribute>
      </container-transaction>

   </assembly-descriptor>


Now according to above xml
All the method of the ABCSession will by default have Required attribute.
You can override the default behavior by specifying the method name and
transaction attibute.
I think it this solves your problem.


Anil


-----Original Message-----
From: Harish S K [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 01, 2001 7:11 PM
To: [EMAIL PROTECTED]
Subject: How to specify transactions methodwise in ejb-jar.xml


Hi,

Has anyone specified container transactions bean methods selectively?

If I would like to specify only the updateABC() method of the bean to
'Require' transaction, what should I specify in "<method-name>"? Is it
simply the method name?
(I don't want all (*) methods of the bean to 'Require' transaction.)

   <assembly-descriptor>
      <container-transaction>
         <method>
            <ejb-name>ABCSession</ejb-name>
            <method-intf>Remote</method-intf>
            <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
      </container-transaction>
   </assembly-descriptor>

(Using WebLogic 5.1)

Thanks,
Harish.

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