[EJB/JBoss] - MDB Pooling
by jbosspatni
Hi,
I have 5 MDB's which are listening to WSMQ for messages.I have created the configurations as per the jboss wiki on WSMQ.When I start the server I can see a total of about 35 connections being created. I find this from usign netstat on the port
In standard-jboss.xml the invoker binding created has a min size of 1 and max size of 5
In wsmq-ds.xml the minsize for pool is 1 and max is 100.
If I change the invokerproxy binding setting then number of connections created is dropping.
I am not getting as to why so many connections are being created when I have about 5 mdb and 1 mnimum thread pool.
I am also unable to see the connections being created from JMX console.
How do I see how many connections to WSMQ are actually created on server startup,how many are free in teh pool at runtime.
Thanks & Regards,
Ajeet Phansalkar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130971#4130971
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130971
18 years, 2 months
[Messaging, JMS & JBossMQ] - Jboss server configuration for JMS, JBOSS MQ
by pc762012
Hello,
I need help on configuring jboss and our server for our situation.
We have a java backend application on a Jboss 4.2.0.GA App server. There are 8 clients dynamically located elsewhere.
We have a JbossMQ jms implementation with three queues and three topics defined.There is a module on the backend which sits on Jboss which communicates via JMS with these clients.
For each new client added I see from the netstat that a new client is connected to port 8093. We are planning to increase the clients from 8 to 20 , then to 50 and then to 500 maybe. I was wondering how many client connections can port 8093 handle simultaneously without problems?
These multiple clients subscribe to the topics and have jms listeners implemented. SO any updates to the topics would cause concurrent consuming and acknowledging of the topics. Parallely they also publish reports to the queues which then are received by the backend module and are persisted in the database.
How would I configure jboss in this situation?
How much memory should I allocate for cache?
How many concurrent connections can the jvm handle and how many can the windows server overall handle?
Jboss sits on a windows 2000 sp4 server.
Your expert opinions and guidance are very much appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130963#4130963
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130963
18 years, 2 months
[JBoss Messaging] - Re: Message Pulling
by sams
Thanks for the tip about trying things outside of an MDB. The simple consumer test worked and proved that the queues would pull messages around as needed to get the jobs done as quick as possible. When doing the same type of test with an MDB it would never do this. I spent hours tweaking little config files and I was about to give up and go to bed but finally a long shot hit me, and it worked...
It seems that even though I'm adding messages using the ClusteredConnectionFactory, this only works with a standard consumer. When you start using an MDB, it seems to step in the middle of things and redirect it all to the old ConnectionFactory instead of the clustered one. I even have the @Clustered annotation in my MDB and that doesn't make it work correctly.
The solution was to simply add the following attributes to the standard ConnectionFactory in the connections-factory-service.xml file:
| <attribute name="SupportsFailover">true</attribute>
| <attribute name="SupportsLoadBalancing">true</attribute>
| <attribute name="PrefetchSize">5</attribute>
|
Had to lower the PrefetchSize down to a small number instead of the large 150 or else they will fetch 150 at a time and not let them go. I'm considering setting this to 1 to ensure even distribution of messages. I have no idea what sort of penalty will be applied for having such a low prefetch, but I cant imagine it would be too bad. If someone knows, please enlighten us.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130961#4130961
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130961
18 years, 2 months
[Persistence, JBoss/CMP, Hibernate, Database] - Help needed with JBoss and openJPA
by shibug
I am using JBoss 4.2.2 and openJPA as the persistence provider. My bean gets deployed but with the following exception:
I am not sure if the problem is with JBoss or openJPA. The tables are not created in mySQL.
20:34:05,156 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=eSwaad.ear,jar=eSwaadEJB.jar,unitName=eSwaadEJB
20:34:05,172 WARN [Runtime] An error occurred while registering a ClassTransformer with org.jboss.ejb3.entity.PersistenceUnitInfoImpl@1f7dab1. The error is logged along with this warning. Load-time class transformation will not be available.
<openjpa-1.0.1-r420667:592145 nonfatal general error> org.apache.openjpa.util.GeneralException: Invalid use of destroyed classloader, UCL destroyed at:
at org.apache.openjpa.meta.AbstractCFMetaDataFactory.getPersistentTypeNames(AbstractCFMetaDataFactory.java:618)
at org.apache.openjpa.meta.MetaDataRepository.getPersistentTypeNames(MetaDataRepository.java:1214)
at org.apache.openjpa.enhance.PCClassFileTransformer.(PCClassFileTransformer.java:101)
at org.apache.openjpa.enhance.PCClassFileTransformer.(PCClassFileTransformer.java:65)
at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.(PersistenceProviderImpl.java:169)
at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.(PersistenceProviderImpl.java:142)
at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:103)
at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:52)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
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:585)
at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
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:585)
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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy73.start(Unknown Source)
at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:627)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:351)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
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:585)
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.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy33.start(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: java.io.IOException: Invalid use of destroyed classloader, UCL destroyed at:
at org.jboss.mx.loading.RepositoryClassLoader.findResources(RepositoryClassLoader.java:595)
at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
at org.apache.openjpa.lib.util.J2DoPrivHelper$14.run(J2DoPrivHelper.java:395)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.openjpa.lib.meta.ResourceMetaDataIterator.(ResourceMetaDataIterator.java:69)
at org.apache.openjpa.meta.AbstractCFMetaDataFactory.parsePersistentTypeNames(AbstractCFMetaDataFactory.java:749)
at org.apache.openjpa.meta.AbstractCFMetaDataFactory.getPersistentTypeNames(AbstractCFMetaDataFactory.java:606)
... 107 more
20:34:05,187 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
20:34:05,187 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=eSwaad.ear,jar=eSwaadEJB.jar,name=UserMaintenanceBean,service=EJB3 with dependencies:
20:34:05,187 INFO [JmxKernelAbstraction] persistence.units:ear=eSwaad.ear,jar=eSwaadEJB.jar,unitName=eSwaadEJB
Persistence.xml:
<persistence-unit name="eSwaadEJB" transaction-type="JTA">
org.apache.openjpa.persistence.PersistenceProviderImpl
<jta-data-source>java:/EswaadAppDS</jta-data-source>
com.eswaad.business.customers.Customers
com.eswaad.business.UserProfile.entity.UserEntity
<exclude-unlisted-classes>false</exclude-unlisted-classes>
</persistence-unit>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130956#4130956
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130956
18 years, 2 months
[Management, JMX/JBoss] - MBean operation works only after invoking operation from jmx
by gtjonesy
Hi,
Using 4.2.2
I am having what looks like a strange problem but hopping that is something simple. I have look in many different places to find an answer but I am not sure if I am looking for the right thing.
I have an MBean that was created using this approach
@Service (objectName="platform:service=foo")
| @Management (foo.class)
That stores some information that is updated periodically.
I have a class in a struts2 action that does this to access the data
MBeanServer server = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
| ObjectName name = new ObjectName("platform:service=foo");
|
| return (Collection) server.invoke(name, "fooMethod", null, null);
The problem that I have is that this code does not work. I get this error:
Caused by: java.lang.NullPointerException
| at org.jboss.ejb3.service.ServiceMBeanDelegate.getOperation(ServiceMBeanDelegate.java:380)
| at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:214)
| ... 151 more
But if I invoke the operation from jmx-console the method works like it should.
Any help on what I am missing would be greatly appreciated.
Thanks in advanced,
Greg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130955#4130955
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130955
18 years, 2 months