2 Replies Latest reply on Jul 17, 2003 5:24 AM by s_thom

    Oracle XA

    s_thom Newbie

      I am using the following datasource defn - found in the examples

      <xa-datasource-property name="URL">jdbc:oracle:oci8:@EUSLND01</xa-datasource-property>
      <xa-datasource-property name="User">leatda</xa-datasource-property>
      <xa-datasource-property name="Password">leatda</xa-datasource-property>

      If I do the following lookup

      InitialContext ctx = new InitialContext();
      XADataSource xads = (XADataSource)ctx.lookup("java:/OracleXADS");

      should I expect to see an XADataSource object? I get a classcast exception. I have to treat it as a DataSource object. But if I do that and then try to call


      I get the following exception

      15:08:47,831 ERROR [MessageDrivenTxInterceptorBMT] Application error: BMT stateless bean ts/Test3MDB should complete transactions before returning (ejb1.1 spec, 11.6.1)

      Here is a snippit of the code (It's within an MDB and I am using bean managed transaction)

      public void onMessage(Message message) {

      UserTransaction ut = null;
      boolean doneEnd = false;

      try {

      ut = ctx.getUserTransaction();

      TextMessage tm = (TextMessage)message;

      / (**) After this exception is thrown
      Connection c = dataSource.getConnection();

      if ( tm.getText().startsWith("ROLLBACK:") ) {
      System.out.println("About to rollback transaction");
      doneEnd = true;
      } else {
      System.out.println("About to commit transaction");
      doneEnd = true;
      } catch ( Exception e ) {
      try {
      if ( ut != null && !doneEnd )
      } catch ( Exception ee ) {

      After the (**) getConnection I get the above exception.

      Any one got any ideas?