I have 2 EJBs coded with XDoclet 1.2.3 and their deploy target is weblogic 8.1sp2
 
TransactionLogBean - BMP bean, everything works fine, including @weblogic.transaction-isolation tag;
SSBFacadeBean - a Stateless Session bean. I got 2 troubles.
 
1) If I set @ejb.transaction tag to class-level, it doesn't work. So I have to set it method-level as a workaround.
2) Whatever I tried with @weblogic.transaction-isolation tag. xdoclet ignores the setting - TRANSACTION_READ_COMMITTED , generated weblogic-ejb-jar.xml has an empty <isolation-level> block. Of course, weblogic.ejbc complains about it.
 
Thanks in advance!

   <transaction-isolation>

      <isolation-level></isolation-level>

      <method>
         <description><![CDATA[]]></description>
         <ejb-name>SSBFacade</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>loadAll</method-name>
         <method-params>
         </method-params>
      </method>
   </transaction-isolation>

 
The code snippet is as below
 

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/**
 * @ejb.bean
 *  type="Stateless"
 *  name="SSBFacade"
 *  jndi-name="ejb/SSBFacade"
 *  transaction-type="Container"
 *
 * @weblogic.transaction-isolation TRANSACTION_READ_COMMITTED
 */

/**
 * make sure method call is in a transaction context
 */
public class SSBFacadeBean implements SessionBean {

    private static final String SELECT_ALL_SQL = "SELECT account_id, holder_name, balance FROM UserAccount";
    private static final String SELECT_SQL = "SELECT account_id, holder_name, balance FROM UserAccount WHERE account_id = ?";
    private static final String dsName = "oracleDS";


    /**
     * @ejb.interface-method
     *  view-type="remote"
     * @ejb.transaction
     *  type="Required"
     * @weblogic.transaction-isolation TRANSACTION_READ_COMMITTED
     */
    public Collection loadAll() {
        log("loadAll()...");
        Connection conn = null;
        PreparedStatement ps = null;
        ResultSet rs = null;
        try {

            ArrayList result = new ArrayList();

 

Reply via email to