Hi all,

My scenario looks like this:
WinXP(SP2), JDK 1.5.0_04, jboss-4.0.3SP1, ASA 9.0.0.1108

The db connection is defined in sybase-ds.xml as follows:


  <local-tx-datasource>
    <jndi-name>ASA9DS</jndi-name>
    <connection-url>jdbc:sybase:Tds:xxx.xxx.xxx.xxx:2638/db01</connection-url>
    <driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
    <user-name>dba</user-name>
    sql
    <exception-sorter-class-name>
      org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter
    </exception-sorter-class-name>
    
      <type-mapping>Sybase</type-mapping>
    
  </local-tx-datasource>


My BMP session bean updates a row in ASA using this code:

public int updateXXX(String id) throws RemoteException{
  DataSource ds = null;
  Connection dbconn = null;
  int rv = 0;
  try {
    InitialContext ic = new InitialContext();
    ds = (DataSource)ic.lookup(JNDINames.DB);
    dbconn = ds.getConnection();
    PreparedStatement stmt = null;
    ResultSet result = null;
    String queryStr = "update ....";
    stmt = dbconn.prepareStatement(queryStr);
    rv = stmt.executeUpdate();
    result = null;
    stmt = null;
    dbconn.close();
  }catch(Exception e){
    cat.error("SQL error during update: ", e);
  }finally {
    try {
      dbconn.close();
    } catch(SQLException e2) {
      cat.error("SQL error in final section: ", e2);
    }
  }
  return(rv);
}

The problem is that the first update attempt works fine but from that
moment any subsequent attempts fail. Why?

Please help me, it is urgent.
Thank you,

Laszlo.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918328#3918328

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918328


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to