Bugs item #940654, was opened at 2004-04-23 14:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=940654&group_id=22866

Category: None
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Antti Lehto (anajavi)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cannot use check-valid-connection-sql on sybase w/o tx

Initial Comment:
When using check-valid-connection in *-ds.xml, cannot
use EJB's without transaction.

When doing conn.createStatement() inside
non-transactional (transaction=never) sessionbean, pool
tries to set autocommit to true. This makes sybase
throw exception, because it cannot alter state of
autocommit in the middle of a transaction. The
transaction begins when check-valid-connection-sql is run.

Is it possible to run check-valid-connection-sql with
autocommit=true or perform rollback after sql is run?
It would prevent this error.

here's a snippet from xxx-ds.xml:
<local-tx-datasource>
    <jndi-name>xxxDS</jndi-name>
   
<connection-url>jdbc:sybase:Tds:localhost:4100/xxx</connection-url>
   
<driver-class>com.sybase.jdbc2.jdbc.SybDriver</driver-class>
    <user-name>xxx</user-name>
    <password>xxx</password>
    <check-valid-connection-sql>select
1</check-valid-connection-sql>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
  </local-tx-datasource>

Haven't yet tried this with other databases.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=940654&group_id=22866


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to