On Thu, May 31, 2001 at 04:40:29PM +1200, Justin Harrison wrote:
> Hi

Hi.  Please excuse the brevity of this response.  As I said, I'm short on
time.

> I am trying to integrate a new datasource into JBoss as a proof of concept for my 
>boss.
> 
> The jdbc driver is from a company called Transoft which provides access to AcuCOBOL 
>Vision files. It works 
> very well for client server connections but thats about all that I know. I am not 
>sure what features it 
> supports.

The level of support for transactions, specifically the JTA extensions to
JDBC 2.0, is important to know.

> I have gone through the documentation and set up all the configuration files 
>appropriatly (I hope).

They look fine.

> bean class method
> 
> public AssessmentPK ejbFindByPrimaryKey(AssessmentPK primaryKey) throws 
>FinderException {
>     Connection con = null;
>     PreparedStatement ps = null;
>     ResultSet result = null;
>     try {
>           con = this.getCobolConnection();

Please provide the code for this.

>           ps = con.prepareStatement("SELECT Code FROM assessment WHERE Code = ?");
>           ps.setString(1, primaryKey.toString());
>           result = ps.executeQuery();
>           if (!result.next()){
>             throw new ObjectNotFoundException("Cannot find Assessment : " + 
>primaryKey.toString());
>           }
>     } catch (SQLException se) {
>       throw new EJBException(se);
>     } finally {
>       try {
>         if (result != null) result.close();
>         if (ps != null) ps.close();
>         if (con != null) con.close();
>       } catch (SQLException se) {
>         se.printStackTrace();
>       }
> }

You're missing a "}"?  Not important.

> When I run my test app
> 
> The uwData = home.findByPrimary....... line causes the following error on the server 
>but it returns no 
> exception.
> 
> java.net.SocketException: Descriptor not a socket: socket write error
> java.net.SocketOutputStream.socketWrite(Native Method)
> java.net.SocketOutputStream.write(SocketOutputStream.java:83)
> jdbc.transoft.TsInet.MsgSend(TsInet.java:271)
> jdbc.transoft.TsInet.MsgTx(TsInet.java:253)
> jdbc.transoft.TsInet.Tx(TsInet.java:149)
> jdbc.transoft.Statement.close(Statement.java:133)
> 
>org.opentools.minerva.jdbc.PreparedStatementFactory.deleteObject(PreparedStatementFactory.java:39)
> 
>org.opentools.minerva.cache.LeastRecentlyUsedCache.removeNode(LeastRecentlyUsedCache.java:243)
> 
>org.opentools.minerva.cache.LeastRecentlyUsedCache.close(LeastRecentlyUsedCache.java:94)
> 
>org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl.close(XAConnectionImpl.java:108)
> 
>org.opentools.minerva.jdbc.xa.XAConnectionFactory.deleteObject(XAConnectionFactory.java:298)
> org.opentools.minerva.pool.ObjectPool.releaseObject(ObjectPool.java:665)
> 
>org.opentools.minerva.jdbc.xa.XAConnectionFactory$3.transactionFailed(XAConnectionFactory.java:153)
> 
>org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl.transactionFailed(XAConnectionImpl.java:150)
> org.opentools.minerva.jdbc.xa.wrapper.XAResourceImpl.forget(XAResourceImpl.java:142)
> org.jboss.tm.TxCapsule.gotHeuristic(TxCapsule.java:1310)
> org.jboss.tm.TxCapsule.commitResources(TxCapsule.java:1517)
> org.jboss.tm.TxCapsule.commit(TxCapsule.java:341)
> org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:318)

Ok, the container is trying to commit the transaction, but the transaction
manager detected some kind of heuristic.

This means that one of the XAResources in the transaction threw a
heuristic exception when asked to commit.  The Minerva XAResourceImpl
wrapper will throw heuristic exceptions on commit for a few reasons, but
there isn't enough logging done to really tell what's going on.

What you might want to do (because I don't have time) is to check out the
latest CVS code, in which Minerva has been replaced with JBossPool, which is
functionally identical to Minerva but has its source code included in CVS,
and add some tracing code into org.jboss.pool.jdbc.xa.wrapper.XAResourceImpl
in the commit method.

Toby.

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to