Hello all,

somehow unfortunately this small thing was dropped on the floor ... I will
add it now. 
Sorry for any inconvenience.

Regards
Alexander Schröder 
SAP DB, SAP Labs Berlin

-----Original Message-----
From: Heckendorff. Ronald [mailto:[EMAIL PROTECTED] 
Sent: Montag, 6. März 2006 07:33
To: Schroeder, Alexander
Cc: Eckenfels. Bernd
Subject: RE: XA-Transaction Timeout

Hallo Alexander,
haben wir ein Chance den XATimeout in einer offiziellen JDBC Version wieder
zu finden? Bernds Mail ist jetzt ca. ein halbes Jahr her und die Version
7_6_00_20_5043 enthält es leider noch nicht.

Wir patchen das bei jeder Version per Hand nach. Unter JBoss ist das für uns
die einzige Möglichkeit unsere Anwendungen unter MaxDB lauffähig zu
bekommen.

Gruß,
Ronald

> -----Original Message-----
> From: Eckenfels. Bernd [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 15, 2005 4:33 PM
> To: Schroeder, Alexander
> Cc: maxdb@lists.mysql.com
> Subject: RE: XA-Transaction Timeout
> 
> Hallo Alexander,
> 
> > IIRC the JBoss transaction manager, which I used to check the
> implementation,
> > and the SAP Web AS always set the configured transaction timeout
> before starting
> > a transaction on an XA Resource ... so that's why I never bothered
> with the
> > default value too much ...
> 
> I havent managed to configure Jboss 3.2.6 to call setTransactionTimeout,
> I think it does not support it. Have you tried Jboss 4.0? But even if
> the method is invoked, I wonder why it is coded to return false.
> 
> So our patch involves adding a property to the xatimeout to
> DataSourceSapDBBase and acessing it from within XAConnectionSapDB (both
> com.sap.dbtech.jdbcext.*) and making the connection to return true.
> 
> Greetings
> Bernd
> 
> Index: DataSourceSapDBBase.java
> ===================================================================
> RCS file:
> /var/cvs/Products/SAP/sapdbc_patch/src/java/com/sap/dbtech/jdbcext/DataS
> ourceSapDBBase.java,v
> retrieving revision 1.1
> diff -u -r1.1 DataSourceSapDBBase.java
> --- DataSourceSapDBBase.java  28 Jun 2005 11:07:31 -0000      1.1
> +++ DataSourceSapDBBase.java  15 Jul 2005 14:26:26 -0000
> @@ -45,6 +45,7 @@
>  public class DataSourceSapDBBase
>  {
>      public static final int DEFAULT_LOGINTIMEOUT=30;
> +    public static final int DEFAULT_XATIMEOUT=30;
> 
>      protected Properties    connectProperties;
>      protected PrintWriter   logWriter;
> @@ -171,6 +172,24 @@
>          return "jdbc:sapdb://" + getServerName() + ":" + getPort() +
> "/" + getDatabaseName();
>      }
> 
> +    public void setXATimeout(int xatimeout)
> +    {
> +
> connectProperties.setProperty("xatimeout",Integer.toString(xatimeout));
> +    }
> +
> +    public int getXATimeout()
> +    {
> +        String s=connectProperties.getProperty("xatimeout");
> +        if(s == null) {
> +            return DEFAULT_XATIMEOUT;
> +        }
> +        try {
> +            return Integer.parseInt(s);
> +        } catch(NumberFormatException numberFormatEx) {
> +            return DEFAULT_XATIMEOUT;
> +        }
> +    }
> +
>      private int portFromUrl(String url)
>      {
>         int slashPos;
> @@ -428,6 +447,7 @@
>          result.add(new StringRefAddr("trace", getTrace()));
>          result.add(new StringRefAddr("tracesize", getTraceSize()));
>          result.add(new StringRefAddr("xatrace", getXATrace()));
> +        result.add(new StringRefAddr("xatimeout", getXATimeout()));
>          return result;
>      }
>  }
> 
> 
> Index: XAConnectionSapDB.java
> ===================================================================
> RCS file:
> /var/cvs/Products/SAP/sapdbc_patch/src/java/com/sap/dbtech/jdbcext/XACon
> nectionSapDB.java,v
> retrieving revision 1.1
> diff -u -r1.1 XAConnectionSapDB.java
> --- XAConnectionSapDB.java    28 Jun 2005 11:07:31 -0000      1.1
> +++ XAConnectionSapDB.java    15 Jul 2005 14:27:55 -0000
> @@ -62,8 +62,7 @@
>          this.trace=trace;
>          this.nonTxConnection=null;
>          this.currentTransaction=null;
> -        this.transactionTimeout = 30;
> +        this.transactionTimeout = ds.getXATimeout();
>      }
> 
>      boolean isTraceEnabled()
> 
> @@ -366,9 +365,9 @@
>              xaerror(null,XAException.XAER_INVAL);
>          }
>          this.transactionTimeout=transactionTimeout;
> -        return false;
> +        return true;
>      }
> 
> 
> //----------------------------------------------------------------------
>      void sendErrorEvent(SQLException sqlEx)
>      {
> 
> --
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to