[JBoss Messaging] - Re: Queue MessageCount - JMX Help
by timfox
There is no incompatibility and this is nothing to with your descriptors.
You are asking a basic JMX question - this is nothing to do with JBoss Messaging.
I suggest what you really need to do is buy a book on JMX - this will tell you how to invoke methods and query attributes on an MBean.
There are plenty of books on Amazon that will tell you how to do this
[hint]
You cannot just call qmbean.getMessageCount() to get the message count from an MBean - it is *not* a normal Java object.
[/hint]
To invoke an operation on an MBean you do something like
| server.invoke(new ObjectName("MyDomain:key=property"), "doSomething", new Object[0], new String[0]);
|
There are similar operations to query attributes and do various other things.
This was explained in the wiki page that I told you about in the last post.
As I say, this is not the forum for me to explain the basics of JMX to you.
Please buy a JMX book or as in the JMX forum.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048496#4048496
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048496
18 years, 11 months
[JBoss Seam] - Re: Seam and maven2 running tests
by Lightguard
Gavin (or anyone else that may know), I have done that, and the embedded ejb container is starting (finally :) ) Now I'm getting this beast:
java.lang.RuntimeException: java.lang.IllegalArgumentException: Null name
| at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:391)
| at org.jboss.seam.core.Ejb.startup(Ejb.java:42)
| 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.seam.util.Reflections.invoke(Reflections.java:20)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
| at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
| at org.jboss.seam.Component.newInstance(Component.java:1746)
| at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
| at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:145)
| at org.jboss.seam.init.Initialization.init(Initialization.java:504)
| at org.jboss.seam.mock.SeamTest.init(SeamTest.java:701)
| 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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
| at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:318)
| at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:152)
| at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:88)
| at org.testng.TestRunner.privateRun(TestRunner.java:682)
| at org.testng.TestRunner.run(TestRunner.java:566)
| at org.testng.SuiteRunner.privateRun(SuiteRunner.java:220)
| at org.testng.SuiteRunner.run(SuiteRunner.java:146)
| at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:713)
| at org.testng.TestNG.runSuitesLocally(TestNG.java:676)
| at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeTestNG(TestNGDirectoryTestSuite.java:286)
| at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:224)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
| 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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
| Caused by: java.lang.IllegalArgumentException: Null name
| at org.jboss.dependency.plugins.AbstractController.getContext(AbstractController.java:101)
| at org.jboss.kernel.plugins.dependency.AbstractKernelController.getContext(AbstractKernelController.java:94)
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:229)
| at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:161)
| at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:381)
| ... 37 more
|
Any ideas on what's going wrong here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048494#4048494
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048494
18 years, 11 months
[JBossWS] - how to set http header properties
by jcstaff
Is there a way for a client to set the properties used in the HTTP client header? I am using jboss 1.0.4 as well as testing with 1.2.1GA.
We are having a problem with jbossws hanging in between calls to a .NET web service. The problem occurs on or after the second call and clears/completes after a lengthy timeout (and then re-occurs on a subsequent call). The actual call takes ~28secs of processing to complete. The timeouts/re-tries automatically happen (and complete) in about ~90-120secs.
The.NET server sees no activity during the hang, we have no problems calling other jbossws services and we have no trouble calling the same .NET service from Axis.
Our deployed code runs in a JBoss 4.0.5 MDB, but we are able to re-create the problem with a stripped down Java SE JUnit environment.
We'd like to try a work-around by eliminating the "Connection: keep-alive" property from being automatically added in the SOAP call. We are hoping that this will successfully reset the connection between client/server calls. I cannot locate a way to specify HTTP Header properties.
thanks,
jim
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048490#4048490
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048490
18 years, 11 months
[JBoss Messaging] - Re: Queue MessageCount - JMX Help
by kemplin
Thanks for your response. I searched the forums prior to sending in my message, but didn't find the articles you pointed me to. I think I'm making progress, but am still coming up short.
My applications are external to JBoss. I'm able to send/receive messages without any problem. However, my sender app wants to monitor the number of messages in the queue via JMX. From the links you pointed me to, I think my problem was mostly descriptor related. I now have:
<mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=MyQueue"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.message:service=PostOffice</depends>
| ...snip security part guest read write
| </mbean>
|
| <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
| name="jboss.jmx:type=adaptor,name=MyQueueTarget,protocol=jrmp,service=proxyFactory">
| <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
| <depends optional-attribute-name="TargetName">
| jboss.messaging.destination:service=Queue,name=MyQueue
| </depends>
| <attribute name="JndiName">MyQueueMBean</attribute>
| <attribute name="InvokeTargetMethod">true</attribute>
| <attribute name="ExportedInterfaces">org.jboss.jms.server.destination.QueueMBean</attribute>
| <attribute name="ClientInterceptors">
| <interceptors>
| <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
| <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
| <interceptor>org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor</interceptor>
| <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
| </interceptors>
| </attribute>
| </mbean>
|
Inside my code, Its really simple:
| mBeanServer = (MBeanServerConnection) ctx.lookup("jmx/rmi/RMIAdaptor");
| org.jboss.jms.serer.destination.QueueMBean qmbean = (org.jboss.jms.server.destination.QueueMBean) ctx.lookup("MyQueueMBean");
System.out.println(qmbean) --> JRMPInvokerProxy
When I attempt to do a qmbean.getMessageCount() I get an IllegalStateException: Failed to find method for hash:..... and it then prints the methods available on a QueueMBean.
I *have* searched the forum and this error seems to imply a jar related problem. I have ensured that my version of jboss-messaging-client.jar is one provided in messaging 1.2.0sp1. I have looked at the dates on the QueueMBean class within that jar, and they match the dates/size of the QueueMBean located in the jboss/server/messaging/deploy/jboss-messaging.sar/jboss-messaging.jar.
One post I read at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=92737 says that there was a problem with old JMX classes bundled in the jboss-messaging-client.jar. I removed those and it still doesn't work.
The jboss-messaging-client.jar is the first jar in my classpath.
At this point, I'm not sure where the incompatibility is. Any ideas?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048486#4048486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048486
18 years, 11 months