On Tue, 2003-09-23 at 17:18, Ricardo Coutinho wrote:
> Hi Adrian,
> 
> >>It is likely there are other connections still in the pool that are
> also 
> >>invalid if the problem is due a temporary outage. 
> 
> I understand the underlying connection being closed when I return
> true, it make sense. What I don't understand is why other connections
> in the pool don't re-request the underlying connection. Is this 'by
> design'?
> 

Because JBoss does not know they are invalid. Only when they are
used will the problem be discovered. Hence the valid connection
checking:

> Regarding the <check-valid-connection-sql> tag. I assume I add that to
> the xxx-ds.xml file? If so then Jboss don't like it much when I added
> the following to the xml file: <check-valid-connection-sql>select
> piroot from odcdta/macpivo0 where
> piroot='xxxyyyzzz'</check-valid-connection-sql>
> 
> I get loads of the following:
> ......
> 18:14:23,013 INFO  [TxConnectionManager$TxConnectionEventListener]
> Unregistered handle that was not registered! null for
> managedConnection:
> [EMAIL PROTECTED]
> 

The SQL failed (3.2.2 dumps the SQLException so you can see why)

> 18:13:22,107 WARN  [JBossManagedConnectionPool] Destroying connection
> that could not be successfully matched:
> [EMAIL PROTECTED]
> 

The connection is destroyed because of the validity check failure.

> 18:13:22,107 INFO  [JBossManagedConnectionPool] Exception destroying
> ManagedConnection
> ......
> 
Regards,
Adrian

> I am using Jboss 3.2.1
> 
> 
> Ricardo
> 
> > 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:26
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Exception Sorter Information
> 
> 
> The ExceptionSorter returning true causes the underlying connection
> to be closed, but only that connection.
> It is likely there are other connections still in the pool
> that are also invalid if the problem is due a temporary outage. 
> You won't find this out until you try to use them.
> 
> You can supply a <check-valid-connection-sql> that jboss runs
> before handing out a connection from the pool.
> e.g. "select 1 from a_fast_access_table"
> 
> 3.2.2RC4 includes <valid-connection-checker-class-name> that can
> implement faster mechanisms than running sql statements.
> 
> 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

Reply via email to