Hello all,

i have a problem with my datasource settings (timeout etc.). To give you a
picture of my environment, i am using orion together with a SAP DB database
and bean managed persistence (all under linux, orion 1.4.7, jdk 1.3.1 beta).
My settings looked as follows:

<data-source
      name="BaseDB"
      class="com.evermind.sql.ConnectionDataSource"
      location="jdbc/BaseDB"
      xa-location="jdbc/xa/BaseXADB"
      ejb-location="jdbc/BaseEJBDB"
      inactivity-timeout="1200"
 
url="jdbc:sapdb://beatnix.netmedia.de/DB?isolation=TRANSACTION_READ_UNCOMMIT
TED"
        connection-driver="com.sap.dbtech.jdbc.DriverSapDB"
        max-connections="200"
        min-connections="10"
        username="DBA"
        password="dba"
/>

I have an application, which imports tons of data, this import runs for
several days. After approximately 18 hours, the SAP DB threw an Exception of
the following type:
com.sap.dbtech.jdbc.exceptions.DatabaseException: SAP DBTech SQL: [750] Too
many SQL statements (work rolled back)
I talked with someone from SAP and they told me, that there is a limit of
"several million statements" that can be executed within one open
connection, then it quits work (it does not matter, if these statements are
within different transactions, it's a per session limit). Clearly, this is a
SAP problem, but i tried to avoid it with orion's datasource settings. While
trying out different things, i made some interesting observations (could be
bugs, could be my misunderstanding):

1. If the requests are made from one client process (and therefore serial),
orion uses always the same database connection instead of making some kind
of round-robin on the open connections (ok, this is no bug, just an
observation, could help to solve my problems ...).

2. If i set the inactivity-timeout="1", sometimes the pauses in my process
(even within the same transaction) are long enough to activate this timeout.
I hoped, that this would solve the problem, instead i recieved a "connection
was closed" exception in my persistence code. And what's more: i have an own
retry mechanism on SQL statements, that is, if i recieve any kind of
exception from the database, i close the connection, lookup a new one and
retry the same work (for several times). And i always recieve the same
"connection was closed" exception!!! This looks like a bug, as if a closed
connection in the pool is never replaced by a new one.

3. The timeout seems to be executed regardless of the state of the database
connection, even if there is running an active transaction on this
db-connection. This means, that it will be either rolled back or the so far
made work will be committed without reaching the end of the transaction!!!

I'd like to know if i did not get something regarding the configuration of
datasources and if others had problems with the timeout settings.

Best regards

Jens Stutte


____________________________________________
[EMAIL PROTECTED], http://www.netmedia.de

netmedia GmbH
Neugrabenweg 5-7
66123 Saarbruecken
Germany

fon: +49 (0) 681 - 3 79 88 - 0
fax: +49 (0) 681 - 3 79 88 - 99



Reply via email to