Day 14

Quiz

A1:

The resource manager.

A2:

Isolation.

Exercise

A1:

Generally, when there are overloaded methods, the only way to differentiate them is by the parameter types that they take. If you want to specify any of the overloaded methods to take part in the container-managed transaction, you need to specify the <method-params> element to specify the type of parameters the method takes.

Let's assume that there are overloaded methods with the name process:

 public void process(int itemID);  public void process(String itemDesc); 

Assume that the method participating in the transaction takes a string parameter. The entry in the deployment descriptor ejb-jar.xml would be as follows:

 <assembly-descriptor>     <container-transaction>       <method>          <ejb-name>restaurantEJB</ejb-name>          <method-name>process</method-name>          <method-params>             <method-param> java.lang.String           </method-param>          </method-params>       </method>       <trans-attribute>Required</trans-attribute>    </container-transaction> </assembly-descriptor> 



Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net