[Installation, Configuration & DEPLOYMENT] - Persisting needs threads to be synchronized?
by zour
I'm using a simple client/server application for persisting data into a database. Server, Client and database run on the same machine.
In a for() loop of my client a bean class method is called to persist entities.
On jBoss 4.2.2 this all works fine, but on 4.2.3 after several thousand .persist()
calls, it ends with this exception on the client:
|
| ERROR - Can not get connection to server. Problem establishing socket connection for InvokerLocator
| [socket://127.0.0.1:3873/]
| org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing so
| cket connection for InvokerLocator [socket://127.0.0.1:3873/]
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.
| java:579)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:6
| 7)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
| at $Proxy0.insert(Unknown Source)
| at com.qualitype.qualitrail.tools.katmigration.listener.ImportEventListener.insertRow(ImportEventLi
| stener.java:391)
| at com.qualitype.qualitrail.tools.katmigration.listener.ImportEventListener.onRowEnd(ImportEventLis
| tener.java:184)
| at com.qualitype.qualitrail.tools.katmigration.parser.ImportXmlParser.handleElementEnd(ImportXmlPar
| ser.java:116)
| at com.qualitype.qualitrail.tools.katmigration.parser.ImportXmlParser.parse(ImportXmlParser.java:76
| )
| at com.qualitype.qualitrail.tools.katmigration.KatClient.importXmlFile(KatClient.java:784)
| at com.qualitype.qualitrail.tools.katmigration.KatClient.start(KatClient.java:137)
| at com.qualitype.qualitrail.tools.katmigration.KatClient.main(KatClient.java:66)
| Caused by: java.net.BindException: Address already in use: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(Unknown Source)
| at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
| at java.net.PlainSocketImpl.connect(Unknown Source)
| at java.net.SocksSocketImpl.connect(Unknown Source)
| at java.net.Socket.connect(Unknown Source)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:19
| 2)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvo
| ker.java:827)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.
| java:569)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:6
| 7)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
| at $Proxy0.insert(Unknown Source)
| at com.qualitype.qualitrail.tools.katmigration.listener.ImportEventListener.insertRow(ImportEventLi
| stener.java:391)
| at com.qualitype.qualitrail.tools.katmigration.listener.ImportEventListener.onRowEnd(ImportEventLis
| tener.java:184)
| at com.qualitype.qualitrail.tools.katmigration.parser.ImportXmlParser.handleElementEnd(ImportXmlPar
| ser.java:116)
| at com.qualitype.qualitrail.tools.katmigration.parser.ImportXmlParser.parse(ImportXmlParser.java:76
| )
| at com.qualitype.qualitrail.tools.katmigration.KatClient.importXmlFile(KatClient.java:784)
| at com.qualitype.qualitrail.tools.katmigration.KatClient.start(KatClient.java:137)
| at com.qualitype.qualitrail.tools.katmigration.KatClient.main(KatClient.java:66)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
| ... 16 more
| Time elapsed: 68 seconds
|
|
Waiting a second or two after this happens, persisting of entities is working again.
It seems, as if there is a queue getting full. This behaviour is new to me, since
I thought I don't have to take care on the time, the database needs for it's
workload. Shouldn't calls on the bean stall my client thread until the bean
finished it's work?
Switching back to jBoss 4.2.2 (and Java 1.5) it works as expected.
Can somebody please help? I'm new to the whole thing.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176701#4176701
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176701
17 years, 10 months
[Microcontainer] - Re: Management questions
by alesj
"jmesnil" wrote :
| - Which MBeanServer is used by the MC to register its annotated resources (the platform one or another)? Is it configurable?
|
Dunno what exactly you mean?
Where, when, ...
Which annotated resources?
Configurable how?
I'll try to answer in AS5 notion.
We use our own config of MBeanServer - see JMXKernel bean in jmx.xml.
In order to use @JMX or our custom -service.xml,
underlying MBeanServer needs to be JBoss impl,
since we use some custom hooks / impl details.
I learned that the hard way :-),
when using this features outside AS,
in my MC demos:
- http://anonsvn.jboss.org/repos/jbossas/projects/demos/trunk/jmx/src/main/...
But as you can see - see the rest of demo code -
not a lot of code is required to use this.
Hence I can say it's very configurable.
"jmesnil" wrote :
| - How can I inject this MBeanServer to be also used as the MBeanServer for our own managed resources?
|
I guess there is a 1M ways to do that. :-)
Once JMXKernel bean is setup - mbean server is fully functional,
you can do what ever you want with this bean.
If you give me more exact question,
I can then give you more exact answer. ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176700#4176700
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176700
17 years, 10 months
[Microcontainer] - Management questions
by jmesnil
Hi,
I'm currently writing the management code for JBoss Messaging and I want to be sure we integrate well with JBoss MC for our next release.
Due to our requirements (e.g. being embeddable in another application), we do not use MC to manage our resources.
Instead our managed resources (Queues, Topics, etc.) are created dynamically and registered in a MBeanServer.
However, when we run in standalone (using JBoss MC), the MBeanServer we use is injected by the MC (currently, the platform MBeanServer is injected).
I'd like to be sure we play nice with JBoss MC but I did not found in the documentation or the wiki some answers to my questions.
- Which MBeanServer is used by the MC to register its annotated resources (the platform one or another)? Is it configurable?
- How can I inject this MBeanServer to be also used as the MBeanServer for our own managed resources?
Thanks for the help,
jeff
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176692#4176692
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176692
17 years, 10 months