[firebird-support] Exceptioin when using connection in distributed transaction in Java Application server

2014-09-18 Thread doyc...@dsoft-bg.com [firebird-support]
Hi,

This exception I get when I try to close connection that I get from a 
Datasource that I lookup from JNDI.

I use 

try {
  // Some code that uses connection
} finally {
  connection.close();
}

11:58:47,160 ERROR [STDERR] Caused by: org.firebirdsql.jdbc.FBSQLException: 
Connection enlisted in distributed transacti
on
11:58:47,160 ERROR [STDERR] at 
org.firebirdsql.jdbc.AbstractConnection.setAutoCommit(AbstractConnection.java:436)
11:58:47,160 ERROR [STDERR] at 
org.firebirdsql.jdbc.AbstractConnection.close(AbstractConnection.java:566)
11:58:47,160 ERROR [STDERR] at 
com.dsoft.framework.enterprise.session.LoginManagerBean.initializeAdminAccount(LoginM
anagerBean.java:164)
11:58:47,160 ERROR [STDERR] ... 162 more 

 Is there anything I can do to avoid this?



Re: [firebird-support] Exceptioin when using connection in distributed transaction in Java Application server

2014-09-18 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 18 Sep 2014 02:03:34 -0700, doyc...@dsoft-bg.com [firebird-support]
firebird-support@yahoogroups.com wrote:
 Hi,
 
 This exception I get when I try to close connection that I get from a
 Datasource that I lookup from JNDI.
 
 I use 
 
 try {
   // Some code that uses connection
 } finally {
   connection.close();
 }
 
 11:58:47,160 ERROR [STDERR] Caused by:
 org.firebirdsql.jdbc.FBSQLException: Connection enlisted in distributed
 transacti
 on
 11:58:47,160 ERROR [STDERR] at

org.firebirdsql.jdbc.AbstractConnection.setAutoCommit(AbstractConnection.java:436)
 11:58:47,160 ERROR [STDERR] at

org.firebirdsql.jdbc.AbstractConnection.close(AbstractConnection.java:566)
 11:58:47,160 ERROR [STDERR] at

com.dsoft.framework.enterprise.session.LoginManagerBean.initializeAdminAccount(LoginM
 anagerBean.java:164)
 11:58:47,160 ERROR [STDERR] ... 162 more 
 
  Is there anything I can do to avoid this?

The current expectation of the close() method is // autocommit is always
true for managed tx., but that is no longer true. It looks like I broke
this when fixing JDBC-344, as the expectation should now be different.
Could you file a bug at http://tracker.firebirdsql.org/browse/JDBC ?

For questions specific to Jaybird you should post to the Firebird-java
group instead.

Mark