Someone already reported this problem and I think found a solution. As I
recall it was in the jca forum, which I hope will be back tomorrow.
There is no autocommit setting in the rar configuration, the wrapper
implements the jca required behavior of
-- if there is a managed connection, autocommit is off (obviously)
-- if there is no managed connection, autocommit is on.
Since jdbc has the bad taste to use autocommit settings rather than
explicitly starting local transactions, a good deal of jumping through
hoops seems to be necessary. If you have a simpler way to implement this
behavior I'd like to see it.
david jencks
On 2002.06.05 00:08:34 -0400 Corby Page wrote:
> I have had great success using JBoss 2.4.x with our Sybase 12 database.
>
> But when I attempted to migrate our production system to JBoss 3.0.0, I
> immediately had problems. On server startup, several of my MBeans attempt
> to
> run queries against the database. Whenever they call Connection.close(),
> the
> code blows up with a SQLException (the text of the exception is "SET
> CHAINED
> IS NOT ALLOWED IN MULTISTATEMENT TRANSACTIONS").
>
> The offending code is in LocalManagedConnection.java:
>
> void checkTransaction() throws SQLException
> {
> if (inManagedTransaction)
> {
> return;
> } // end of if ()
> //Not in managed transaction.
> //Should we autocommit?
> if (jdbcAutoCommit && !con.getAutoCommit())
> {
> CON.SETAUTOCOMMIT(TRUE); // Emphasis Added
> return;
> } // end of if ()
> //Autocommit should be off, is it?
> if (con.getAutoCommit())
> {
> con.setAutoCommit(false);
> } // end of if ()
> }
>
> The emphasized line is the one which throws the SQLException. If I
> comment
> out the line, then my entire application is able to run just fine on 3.0.
>
> LocalManagedConnection.java seems to be a rather awkward piece of code.
> It
> hardcodes the initial value of jdbcAutoCommit, and then it continually
> attempts to override the connection's autocommit settings, regardless of
> how
> the user specifies autocommit in the RAR configuration. Sybase is barfing
>
> when LocalManagedConnection attempts to forcibly override the autocommit
> settings again, even though Sybase thinks it should be managing the
> transactional scope.
>
> While commenting out the offending line works for me, it wouldn't
> surprise
> me if that introduced concerns for other users. I hope that we can find
> an
> elegant patch that will allow Sybase users to take advantage of JBoss
> 3.0.
>
> Thanks,
> Corby
>
>
> _________________________________________________________________
> Join the world�s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>
>
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development