On Tue, 2003-09-23 at 16:05, Ricardo Coutinho wrote: > No problem. > > However I am not sure if it is functioning correctly. As I said I get > an exception from the container on the first re-use of the connection > after it was cut and after that it works okay. > > For my client application this is obviously not ideal. The reconnect > should be transparent to the client. >
The connection is not being reused, it is a different connection. If you want transparency see my other comments about validity checking. The sorter just handles destruction AFTER a failure. Transparency is not possible in general. A connection can fail halfway through a transaction. The only option is to catch the rollback and retry. Regards, Adrian > Any comments? > > > Ricardo Coutinho > > Software Engineer > > ____________________________________________ > > Odyssey Asset Management Systems S.A. > Espace Kirchberg-Eolis > > 26-28, rue Edward Steichen > L-2540 Luxembourg-Kirchberg > > Direct Line:+352 42 60 80 4425 > > fax: +352 42 91 92 > > http://www.odyssey-group.com > > > -----Original Message----- > From: Adrian Brock [mailto:[EMAIL PROTECTED] > Sent: 23 September 2003 16:33 > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] Exception Sorter Information > > > Can you allow me to include your sorter in the jboss distribution? > > Regards, > Adrian > > On Tue, 2003-09-23 at 10:30, Ricardo Coutinho wrote: > > Hi All, > > > > I have implemented an ExceptionSorter for my AS400 connection. > > > > The reconnect works, eventually, but only after it fails one time to > > recreate the connection. > > > > In other words, when the connection is lost, I get an error when > > reusing the connection. Then after another attempt it manages to > > reconnect again. Is this the normal behaviour? > > > > Here is the configuration of my datasource > > <datasources> > > <local-tx-datasource> > > <jndi-name>ODCDTA</jndi-name> > > > <connection-url>jdbc:as400:<<IP-ADDRESS>>/ODCDTA;Libraries=ODCDTA</connection-url> > > <driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class> > > <idle-timeout-minutes>5</idle-timeout-minutes> > > <application-managed-security/> > > > <exception-sorter-class-name>com.odc.server.jboss.jdbc.AS400ExceptionSorter</exception-sorter-class-name> > > </local-tx-datasource> > > </datasources> > > > > and here is the content of the isExceptionFatal method of my > exception > > sorter > > public boolean isExceptionFatal(SQLException e) > > { > > boolean ret = false; > > > > if(e != null && e.getSQLState() != null) > > ret = (e.getSQLState().equals("08003") || > > e.getSQLState().equals("08S01") || e.getSQLState().equals("40003")); > > > > if(ret) > > getLogger().debug("Connection closed by AS400. SQLState=(" + > > e.getSQLState() + "). Forcing reconnect. Error recieved:\n" + > > e.getMessage()); > > > > return ret; > > } > > Is the above implementation correct? > > > > Ricardo > > > > > > > __________________________________________________________________________ > > · This email and any files transmitted with it are CONFIDENTIAL and > > intended > > solely for the use of the individual or entity to which they are > > addressed. > > · Any unauthorized copying, disclosure, or distribution of the > > material within > > this email is strictly forbidden. > > · Any views or opinions presented within this e-mail are solely > those > > of the > > author and do not necessarily represent those of Odyssey Asset > > Management > > Systems SA unless otherwise specifically stated. > > · An electronic message is not binding on its sender. Any message > > referring to > > a binding engagement must be confirmed in writing and duly signed. > > · If you have received this email in error, please notify the sender > > immediately > > and delete the original. > -- > xxxxxxxxxxxxxxxxxxxxxxxx > Adrian Brock > Director of Support > Back Office > JBoss Group, LLC > xxxxxxxxxxxxxxxxxxxxxxxx > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > __________________________________________________________________________ > · This email and any files transmitted with it are CONFIDENTIAL and > intended > solely for the use of the individual or entity to which they are > addressed. > · Any unauthorized copying, disclosure, or distribution of the > material within > this email is strictly forbidden. > · Any views or opinions presented within this e-mail are solely those > of the > author and do not necessarily represent those of Odyssey Asset > Management > Systems SA unless otherwise specifically stated. > · An electronic message is not binding on its sender. Any message > referring to > a binding engagement must be confirmed in writing and duly signed. > · If you have received this email in error, please notify the sender > immediately > and delete the original. -- xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Director of Support Back Office JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user