Issue Details (XML | Word | Printable)

Key: NUCRDBMS-628
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Any secondary (schema/sequence) connection should call release() rather than close() when finished with

Created: 14/Dec/12 10:00 AM   Updated: 31/Dec/12 07:59 PM   Resolved: 14/Dec/12 10:01 AM
Component/s: Schema, Value Generation
Affects Version/s: None
Fix Version/s: 3.2.0.m2


 Description  « Hide
close() should be handled by the connection itself, we simply release it back

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 14/Dec/12 10:01 AM
SVN trunk fixes this

Chris Colman added a comment - 20/Dec/12 12:51 AM
Is it likely that this issue could have caused 'Communications link failure' exceptions like the following or does this look like something else?

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 3,384,375 milliseconds ago. The last packet sent successfully to the server was 1 milliseconds ago.
        at sun.reflect.GeneratedConstructorAccessor84.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3352)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1971)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619)
        at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4997)
        at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)
        at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)
        at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:380)
        at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getXAResource(ConnectionFactoryImpl.java:314)
        at org.datanucleus.store.connection.ConnectionManagerImpl.enlistResource(ConnectionManagerImpl.java:354)
        at org.datanucleus.store.connection.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:226)
        at org.datanucleus.store.connection.AbstractConnectionFactory.getConnection(AbstractConnectionFactory.java:60)
        at org.datanucleus.store.AbstractStoreManager.getConnection(AbstractStoreManager.java:432)
        at org.datanucleus.store.AbstractStoreManager.getConnection(AbstractStoreManager.java:401)
        at org.datanucleus.store.rdbms.request.InsertRequest.execute(InsertRequest.java:238)
        at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertTable(RDBMSPersistenceHandler.java:166)
        at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObject(RDBMSPersistenceHandler.java:142)
        at org.datanucleus.state.JDOStateManager.internalMakePersistent(JDOStateManager.java:2377)
        at org.datanucleus.state.JDOStateManager.flush(JDOStateManager.java:3769)
        at org.datanucleus.ObjectManagerImpl.flushInternalWithOrdering(ObjectManagerImpl.java:3884)
        at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:3807)
        at org.datanucleus.store.query.Query.prepareDatastore(Query.java:1560)
        at org.datanucleus.store.query.Query.executeQuery(Query.java:1763)
        at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
        at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:243)
        ... 48 more
Caused by: java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3333)
        ... 72 more

Andy Jefferson added a comment - 20/Dec/12 07:05 AM
No. You're using a query and this issue is for schema/sequence connections. Your MySQL lost its connection with the world