Hi,

I'm testing connections,pooling, and open cursors with a stateless session bean.

Using Minerva XA DataSource leaves open cursors AFTER the transaction has completed.

Using Oracle XA DataSource I get the following error:

Error
------
PLS-00201: identifier 'JAVA_XA.XA_START' must be declared
ORA-06550: line 1, column 8:

Unable to deregister with TransactionManager: java.lang.IllegalArgumentException:
xaRes not enlisted

I have the following container configuration:
In jboss.properties, the following line is uncommented
------------------------------------------------------
jboss.xa.xidclass=oracle.jdbc.xa.OracleXid

jdbc.drivers=oracle.jdbc.driver.OracleDriver


MLET in jboss.conf
-----------------------------------
<MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar,classes12_01.zip"
CODEBASE="../lib/ext/">
  <ARG TYPE="java.lang.String" VALUE="xa.QspDBPool">
  <ARG TYPE="java.lang.String" VALUE="oracle.jdbc.xa.client.OracleXADataSource">
</MLET>

session beans ejb-jar.xml
---------------------------------
<transaction-type>Container</transaction-type>


If I change <transaction-type>Bean</transaction>, the Oracle XA closes the cursor
after a method call.

But, if the session bean calles an BMP entity bean, the error mentioned above
re-occurs.  There is no <assembly-descripter> in the entity beans ejb-jar.xml so I
don't set a transaction type.

So I basically stuck at this point.

I recommended Jboss to our my company and we are developing a rather large project
that will go prime time in 3 months.  I would love to be able to promote Jboss.
This is a real stubling block for me.  Please help - it may be some dumb user error.



Ole Husgaard wrote:

> Hi,
>
> If your are using the Minerva pools, please be
> aware that the real DB connection is being held
> internally until the transaction is also
> terminated.
> Real XA datasources do not have this problem.
>
> Best Regards,
>
> Ole Husgaard.
>
> Paul Russo wrote:
> >
> > Hi,
> >
> > I'm having a problem with cursors being left open. Is there something I
> > can do to fource a cursor to be closed before returning the open db
> > connection to the pool?
> > I'm closing the ResultsSet and PreparedStatement before releasing the db
> > connection.  I know Oracle has a built in caching mechinism but the
> > cursor should get closed.  After a while, since cursors are not closing,
> > the app fails with 'Too many cursror open".  I have a debugging tool
> > that also shows open cursors increasing as I use the app but never
> > getting closed.  Please HELP ;(
> >
> > Here is the mbean for the db pool followed by a snippet from a session
> > bean.
> >
> >      <mbean
> > name="DefaultDomain:service=XADataSource,name=xa.QspEjbPool">
> >        <attribute name="TimestampUsed">false</attribute>
> >        <attribute name="Password">****MyPassword****</attribute>
> >        <attribute name="MaxSize">0</attribute>
> >        <attribute name="InvalidateOnError">false</attribute>
> >        <attribute name="IdleTimeout">1800000</attribute>
> >        <attribute name="GCInterval">120000</attribute>
> >        <attribute name="Blocking">false</attribute>
> >        <attribute name="LoggingEnabled">false</attribute>
> >        <attribute name="IdleTimeoutEnabled">false</attribute>
> >        <attribute name="GCEnabled">false</attribute>
> >        <attribute name="URL">****MyUrlString*****</attribute>
> >        <attribute name="Properties"></attribute>
> >        <attribute name="MinSize">0</attribute>
> >        <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
> >        <attribute name="JDBCUser">***MyUser****</attribute>
> >        <attribute name="GCMinIdleTime">1200000</attribute>
> >      </mbean>
> >
> > ------------------------------------------------------------------------------
> >
> >  log("findByAcct");
> >  List list = new ArrayList();
> >  Connection connection = getConnection(); //grab from the pool
> >
> >  PreparedStatement ps = null;
> >
> >  try {
> >      String sql =
> >       "SELECT "
> >   + "NAME, "
> >   + "ACCT "
> >   + "FROM TBCCUST "
> >   + "WHERE "
> >   + "CMPY= '" + cmpy + "' "
> >   + "AND LEDGR= '" + ledgr + "' "
> >   + "AND UPPER(ACCT) Like UPPER('%" + acct + "%') "
> >   + "Order by ACCT";
> >
> >      ps  = connection.prepareStatement(sql);
> >
> >      log(sql);
> >      ps.executeQuery();
> >      ResultSet rs = ps.getResultSet();
> >
> >      //add custBeans to the list
> >      CustBean custBean = null;
> >      String[] s;
> >      if (rs != null) {
> >          while (rs.next()) {
> >               custBean = new CustBean();
> >               custBean.name = rs.getString("NAME");
> >               custBean.acct = rs.getString("ACCT");
> >               list.add(custBean);
> >           }
> >           rs.close();
> >      }
> >  } catch (SQLException sqe) {
> >      log("SQLException:  " + sqe);
> >      throw new RemoteException(sqe.getMessage());
> >  } finally {
> >      try {
> >          ps.close();
> >           closeConnection(); //return to the pool
> >      } catch (Exception e) {e.printStackTrace();}
> >  }
> >  return list;
> > }
> >
> > Thanks for you time.
> > Paul-
> >
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > List Help?:          [EMAIL PROTECTED]
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to