Bean hangs when creating two concurrent connections
stefanfreyr Sep 29, 2003 10:50 AMHello. I have the following code which results in a hang situation:
http://kunder.greit.no/wilco/Pastecode.aspx?pasteID=564
The line: EJBHelpers.getDatabaseConnection(); refers to a method that retrieves the database connection through JNDI:
http://kunder.greit.no/wilco/Pastecode.aspx?pasteID=565
I have an informix datasource defined in an "informix-xa-ds.xml" file in my server/default/deploy dir:
http://kunder.greit.no/wilco/Pastecode.aspx?pasteID=567
Can anybody tell me what's going on?
What happens is that the operation hangs on the second call to the EJBHelpers.getDatabaseConnection() method. If left alone, the following message appears in JBoss;
[pre]
WARN [TransactionImpl] Transaction TransactionImpl:XidImpl [FormatId=257, GlobalId=pandora-stfs//35, BranchQual=] timed out. status=STATUS_ACTIVE
[/pre]
And I get the following error at the client side:
[pre]
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:87)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy2.takeFive(Unknown Source)
at is.althingi.embla.ejbservice.ParliamentSessionClient.main(ParliamentSessionClient.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:333)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
... 15 more
[/pre]