[jboss-user] [Datasource Configuration] - Re: Remote Jndi Datasource: ResultSet gets randomly closed

manu patet do-not-reply at jboss.com
Tue Oct 30 02:38:05 EDT 2012


manu patet [https://community.jboss.org/people/troubleshooter] created the discussion

"Re: Remote Jndi Datasource: ResultSet gets randomly closed"

To view the discussion, visit: https://community.jboss.org/message/772904#772904

--------------------------------------------------------------
Sorry about that @Wolf-Dieter. Let me try and be clearer this time.

Our current model:
1. JBoss 1: Runs application (A1) that fetches data from database (DB) using local datasource (LDS).
2. JBoss 2: Runs application (A2) that feeds data into DB using local datasource (LDS2).

This works perfectly ok. No problems what so ever (that code snippet also works fine here).

Now (for scalability reasons) we're migrating to a new model. In this model DB is divided into several DBs (say DB1, DB2, DB3 ... DBn):
1. JBoss 1: Runs application A1 that fetches data from these DBs using remote datasources (RDS1, RDS2, RDS3 ... RDSn).
2. JBoss N: Runs application A2 that feeds data to DBn and hosts RDSn.

Therefore, it follows that for RDSn to be available to A1, JBossN has to be running, else the lookup fails. That summarizes the scheme we're after. Hope I'm clear.

The new scheme works fine under a normal load. But under stress, the resultsets abruptly close in the middle of a fetch operation (eg: in the code snippet above). There's another more serious issue I ran into yesterday. Connections spawned using remote datasource don't properly close and after a while they choke the machine with 100% CPU. Here is a thread dump:

"RMI TCP Connection(2334)-121.10.1.14" daemon prio=10 tid=0x00002aaad0009800 nid=0x570d runnable [0x000000004c394000]
   java.lang.Thread.State: RUNNABLE
        at java.util.HashMap.transfer(HashMap.java:499)
        at java.util.HashMap.resize(HashMap.java:478)
        at java.util.HashMap.addEntry(HashMap.java:768)
        at java.util.HashMap.put(HashMap.java:402)
        at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.createStatementProxy(WrapperDataSourceService.java:522)
        at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doConnectionMethod(WrapperDataSourceService.java:366)
        at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:211)
        at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
        at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
        at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
        at sun.rmi.transport.Transport$1.run(Transport.java:177)
        at sun.rmi.transport.Transport$1.run(Transport.java:174)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)


This continued even after manually killing the connections from MySQL. Goes only after stopping JBoss. Please note that this is JBoss alone and none of our applications have been deployed on it.

Thanks. Any help is greatly appreciated!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/772904#772904]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121030/47121fc5/attachment.html 


More information about the jboss-user mailing list