dev@glassfish.java.net

Re: com.sun.messaging.jms.JMSException: MQRA:CA:Unsupported-setClientID()

From: Dianne Jiao - Javasoft East <Dianne.Jiao_at_Sun.COM>
Date: Mon, 26 Mar 2007 10:32:26 -0500

Hi, Dyego,

Setting the client ID is only allowed in appclient container.

I couldn't tell from your source code, where it is located.


Dianne

Dyego Souza Dantas Leal wrote:
> am using Netbeans5.5 with Sun Application Server 9.1 to develop a
> sample jms application with EJB. I am just following the sample
> example found in a website. However, when receiving the message and
> setting the client ID I always receive the following exception.
>
> [#|2007-03-26T11:16:08.090+0000|INFO|sun-appserver9.1|com.sun.xml.ws.server.sei.EndpointMethodHandler|_ThreadID=31;_ThreadName=httpSSLWorkerThread-8080-5;|MQRA:CA:Unsupported-setClientID()
>
> com.sun.messaging.jms.JMSException: MQRA:CA:Unsupported-setClientID()
> at
> com.sun.messaging.jms.ra.ConnectionAdapter.setClientID(ConnectionAdapter.java:142)
>
> at teste.ws.NewWebService.getPongResponse(NewWebService.java:73)
> 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:597)
> at
> com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1051)
>
> at
> com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
> at
> com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2846)
>
> at
> com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3930)
> at
> com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:176)
>
> at $Proxy160.getPongResponse(Unknown Source)
> 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:597)
> at
> com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:68)
> at
> com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:75)
>
> at
> com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:132)
> at
> com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:241)
>
> at
> com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:75)
>
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
> at
> com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:70)
>
> at
> com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:133)
>
> at
> com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
>
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
> at
> com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:70)
>
> at
> com.sun.xml.ws.mex.server.MetadataServerPipe.process(MetadataServerPipe.java:97)
>
> at
> com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:191)
>
> at
> com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:113)
>
> at
> com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:79)
>
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
> at
> com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:208)
> at
> com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:374)
>
> at
> com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)
> at
> com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
>
> at
> com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:100)
>
> at
> com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:74)
>
> at
> com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:187)
>
> at
> com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:116)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:101)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
>
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:74)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
>
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
>
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
>
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
>
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
>
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
>
> at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
>
> |#]
>
>
>
> Any help? I have attached my source
>
>
> initialize ---------------------------------
> connection = topicMessageFactory.createConnection();
> connection.setClientID("111");
> s = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
>
> TopicSubscriber ts = s.createDurableSubscriber(topicMessage,"mySub");
>
> connection.close();
>
> send a message ----------------------------------------------------------
>
> connection = topicMessageFactory.createConnection();
>
> session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
>
> MessageProducer messageProducer = session.createProducer(topicMessage);
>
> ObjectMessage message = session.createObjectMessage();
> message.setObject("Hi there!");
>
> messageProducer.send(message);
> messageProducer.close();
> connection.close();
>
> Receive the message --------------------------------------------------
> connection = topicMessageFactory.createConnection();
> connection.setClientID("111");
> session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
> TopicSubscriber ts =
> session.createDurableSubscriber(topicMessage,"mySub");
> connection.start();
> Message msg = ts.receive();
> connection.close();
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>