Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » losing the JDBC connection
losing the JDBC connection [message #389757] Wed, 01 July 2009 08:33 Go to next message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 807
Registered: July 2009
Senior Member
Today I had the situation where the network connection went down temporarily. When it came back up all Informix JDBC connections were broken. I had hoped that because Eclipselink uses a JDBC connection pool, it would dump those connections and automatically open new ones. But it did not. I did find size management settings, but no flush or validity check options on the pool.

Can that be activated?


==== cause:
SQL errorcode: -79730
SQL state: IX000
local message: Connection not established
java.sql.SQLException: Connection not established
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:4 07)
at com.informix.jdbc.IfxSqliConnect.C(IfxSqliConnect.java:6478)
at com.informix.jdbc.IfxSqliConnect.createStatement(IfxSqliConn ect.java:
2272)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.tbee.util.jdbc.Connection.invoke(Connection.java:105)
at $Proxy0.createStatement(Unknown Source)
at org.tbee.util.JdbcUtil.execute(JdbcUtil.java:376)
at nl.reinders.jdbc.ReindersInformixConnection.invoke(ReindersI nformixCo
nnection.java:76)
at $Proxy31.setAutoCommit(Unknown Source)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAcce ssor.basi
cBeginTransaction(DatabaseAccessor.java:191)
at org.eclipse.persistence.internal.databaseaccess.DatasourceAc cessor.be
ginTransaction(DatasourceAccessor.java:234)
at org.eclipse.persistence.internal.sessions.AbstractSession.ba sicBeginT
ransaction(AbstractSession.java:398)
at org.eclipse.persistence.internal.sessions.AbstractSession.ba sicBeginT
ransaction(AbstractSession.java:387)
at org.eclipse.persistence.sessions.server.ClientSession.basicB eginTrans
action(ClientSession.java:127)
at org.eclipse.persistence.internal.sessions.AbstractSession.be ginTransa
ction(AbstractSession.java:552)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.beg inTransac
tion(UnitOfWorkImpl.java:509)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.beg inEarlyTr
ansaction(UnitOfWorkImpl.java:499)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getAc tivePersi
stenceContext(EntityManagerImpl.java:1229)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.merge Internal(
EntityManagerImpl.java:294)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.merge (EntityMa
nagerImpl.java:274)
Re: losing the JDBC connection [message #389780 is a reply to message #389757] Thu, 02 July 2009 14:17 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

That is odd, EclipseLink does support automatically reconnecting dead
connections. On a database error you should see a ping SQL being executed
and if it fails, the connection will be reconnected.

Are you using internal EclipseLink connection pooling, or a DataSource?
What version of EclipseLink are you using?

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: losing the JDBC connection [message #389782 is a reply to message #389780] Thu, 02 July 2009 16:59 Go to previous message
Tom Eugelink is currently offline Tom EugelinkFriend
Messages: 807
Registered: July 2009
Senior Member
> That is odd, EclipseLink does support automatically reconnecting dead
> connections. On a database error you should see a ping SQL being
> executed and if it fails, the connection will be reconnected.
>
> Are you using internal EclipseLink connection pooling, or a DataSource?
> What version of EclipseLink are you using?

I specify 4 Jdbc parameters, not a Datasource. So I'm using the internal pooling. Eclipse 1.1.1 ATM. I did not look for ping-SQLs.

I'm positive the connection could be established, because I was able to start a second instance of the application (which did connect) and copy-paste the screen contents over.

Tom
Previous Topic:[V2] Jar locked during webapplication redeploy
Next Topic:indirect resultlist
Goto Forum:
  


Current Time: Mon Nov 24 09:46:43 GMT 2014

Powered by FUDForum. Page generated in 0.03776 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software