[Persistence, JBoss/CMP, Hibernate, Database] - Queue reconnection problem
by erez.axis
Hi.
I'm using mySql to persist queue messages.
I'm having the following problem: if the mysql server is going down and than back up, the jboss application is not able to reconnect to the sql.
Does anyone knows of this issue and how to solve this?
This is an example of the server's log:
STACKTRACE:
java.sql.SQLException: Communication link failure: java.net.SocketException, underlying cause: Connection reset
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Connection reset
STACKTRACE:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1316)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1680)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1527)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:904)
at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:851)
at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:43)
at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:164)
at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:397)
at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:373)
at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:136)
at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:153)
at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:256)
at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:136)
at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:92)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
** END NESTED EXCEPTION **
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1638)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1680)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1527)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:904)
at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:851)
at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:43)
at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:164)
at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:397)
at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:373)
at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:136)
at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:153)
at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:256)
at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:136)
at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:92)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
** END NESTED EXCEPTION **
at com.mysql.jdbc.Connection.checkClosed(Connection.java:2225)
at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1313)
at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1293)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:312)
at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:172)
at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:892)
at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:851)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030133#4030133
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030133
19Â years, 1Â month
[JBossWS] - Re: WSDL-location help?
by oskar.carlstedt
Hi!
Thanks for your help. I'm sorry to say, that is not what I actually need or do. I want to have control over my contract (the WSDL-file). That is why I'm using contract first development. I have external parts using my services (contracts). Therefore generated contacts is not a good solution for me. But that is another topic.
So, I have created the WSDL-file, and my own web service provider. I had to do this because I want to use xml beans as data binding framework.
| @Stateless
| @WebServiceProvider(
| serviceName = "MyService",
| portName = "MyServiceSoap11Port",
| targetNamespace = "http://my.domain.com/my-service",
| wsdlLocation = "WEB-INF/wsdl/my-service.wsdl")
| @ServiceMode(value = Service.Mode.PAYLOAD)
| public class MyServiceEndpointProvider implements Provider<Source> {
| ...
| }
|
So, what I want to do is to point out wsdlLocation="http://..." instead of wsdlLocation="WEB-INF/...".
Why do I want to do this? Just because I see the contract as a complete separate part of the solution. My service (might be services) implements this contract. I might have several services that implements the same contract, but doing different things in different situations.
So, my question still is: Is it a must to point out the wsdlLocation to a local path within the generated war.
Best
Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030131#4030131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030131
19Â years, 1Â month