[Management, JMX/JBoss] - StopDelivery() in JBoss works with 1 message delay
by matrixpooh
Hi,
I'm trying to programmatically stop delivery of messages in MDB deployed on Jboss 4.0.2. The call to JMSContanerInvoker::stopDelivery() works with a delay. For ex: if there are 4 messages in the queue and I issue stopDelivery() after consuming the very first message, the MDB would still consume the second message and stop only then leaving remaining 2 messages in the queue.
I saw a similar behavior in Jboss's JMX Console, where in order to stop delivery immediately one has to first click 'Invoke' in stopDelivery() section then navigate back and click 'Apply Changes' in a 'List of MBean Attributes' section.
Your help in resolving '1 message delay' in a call to stopDelivery() would be greatly appreciated.
--
AN
Here's the test class:
| import java.util.Hashtable;
| import java.util.List;
|
| import javax.management.ObjectInstance;
| import javax.management.ObjectName;
|
| import junit.framework.Assert;
|
| import org.apache.log4j.Logger;
| import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
|
| public class JmxManagerForMdbTest extends AbstractTest {
|
| private static final Logger log = Logger.getLogger(QueueListenerTest.class);
|
| public void test() throws Exception{
|
| RMIAdaptor server = (RMIAdaptor) super.initialContext.lookup("jmx/rmi/RMIAdaptor");
|
|
| Hashtable<String, String> ht = new Hashtable<String, String>();
| ht.put("binding", "message-driven-bean");
| ht.put("jndiName", "queue.listener");
| ht.put("plugin", "invoker");
| ht.put("service", "EJB");
| ObjectName name = new ObjectName("jboss.j2ee", ht);
|
|
| server.invoke(name, "stopDelivery", new Object[] {}, null);
|
| }
|
| @Override
| public List<? extends AbstractTest> getProcessQueueTests() {
| return null;
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128451#4128451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128451
18 years, 2 months
[JBossWS] - Web Service Client Exception
by scitmon
Using Jboss 4.2.2GA to host my webservice and the wsconsume tool in the server bin folder, I've been getting the following Exception:
Exception in thread "Main Thread" java.lang.NoSuchMethodError: newInstance
at com.sun.xml.ws.api.SOAPVersion.(SOAPVersion.java:163)
at com.sun.xml.ws.api.SOAPVersion.(SOAPVersion.java:68)
at com.sun.xml.ws.api.BindingID.(BindingID.java:304)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseBinding(RuntimeWSDLParser.java:398)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:295)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:124)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:226)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:189)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:159)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:81)
at javax.xml.ws.Service.(Service.java:56)
at javax.xml.ws.Service.create(Service.java:680)
at com.lbsltd.webservice.WSClient.main(WSClient.java:34)
when running the following code:
| try
| {
| URL wsdlLocation = new URL("http://localhost:8080/DummyWS/DummyWS?wsdl");
| QName serviceName = new QName("http://localhost:8080/DummyWS/DummyWS", "DummyWSService");
| service = Service.create(wsdlLocation, serviceName);
| }
| catch (MalformedURLException e)
| {
| e.printStackTrace();
| }
|
the exception is thrown at the "Service.create" line
i also tried the wsconsume generated service which produced the same result when i came to create an instance of the service.
can somebody enlighten me as to what this exception is about?
many thanks
Scotty
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128449#4128449
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128449
18 years, 2 months