commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [messenger] Adding Listener problem
Date Thu, 06 Mar 2003 07:49:23 GMT
Another thought. By default Messenger uses the asynchronous mode of
consuming JMS messages (i.e. the addMessageListener() approach in JMS). If
your J2EE container doesn't allow this behaviour from the Servlet tier then
you can use the synchronous mode of consuming JMS messages (the receive()
method approach in JMS).

To do this in Messenger right now you need to add a consumer thread to the
subscription which is used to receive JMS messages.

e.g.

<subscriptions>
    <subscription connection="connectionName" subject="destinationName">
        <listener className="theNameOfTheListenerClass"/>

        <!-- use synchronous subscription />
        <consumerThread/>
    </subscription>
</subscriptions>

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "James Strachan" <james_strachan@yahoo.co.uk>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Thursday, March 06, 2003 7:24 AM
Subject: Re: [messenger] Adding Listener problem


> Could you give me some more information for how you're connecting to JMS.
> e.g. the Messenger.xml file you're using & how the JMS provider is
> configured. I'm wondering if you're using an XA JMS connection? The stack
> trace seems to suggest that a transaction must be in place to use JMS
which
> seems to suggest you're in XA mode or something similar. Are you using MQ?
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
> From: "milli new" <millinew98@yahoo.com>
>
>
> > Hi, Im trying to implement Messenger in Websphere
> > server. After struggling thru a lot without proper
> > docs, im struck in setting up and using MDO /
> > Messagelisteners in my servlet . Basically i have
> > bunch of servlet that produces and also consume the
> > message. when ever i try to define a listener (from
> > inside code using addListener() or in the web.xml ) i
> > get the following exception. The websphere strictly
> > enforces not to allow
> > Listener classes within web container. What is the
> > right way to define, and refer to these Listener
> > classes?
> > thanks,
> > Sam
> >
> >
> >
> > [3/5/03 4:03:04:641 PST] 66555b63 ConnectionMan W
> > J2CA0075W: An active transaction should be present
> > while processing method initializeForUOW.
> > [3/5/03 4:03:05:234 PST] 66555b63 ServletInstan E
> > SRVE0100E: Did not realize  init() exception thrown by
> > servlet managerServlet:
> > javax.servlet.ServletException: Failed to initialize:
> > javax.jms.IllegalStateException: Method
> > setMessageListener not permitted
> > at
> >
org.apache.commons.messagelet.ManagerServlet.init(ManagerServlet.java:104)
> > at
> > javax.servlet.GenericServlet.init(GenericServlet.java:258)
> > at
> >
>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn
> stance.java:82)
> > at
> >
>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycle
> Servlet.java:147)
> > at
> >
>
com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecy
> cleServlet.java:270)
> > at
> >
>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleS
> ervlet.java:113)
> > at
> >
>
com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:17
> 5)
> > at
> > javax.servlet.GenericServlet.init(GenericServlet.java:258)
> > at
> >
>
com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServlet
> Manager.java:761)
> > at
> >
>
com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServle
> tManager.java:257)
> > at
> >
>
com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(Web
> AppServletManager.java:453)
> > at
> >
com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1233)
> > at
> > com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:273)
> > at
> > com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:317)
> > at
> > com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:194)
> > at
> >
>
com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:950
> )
> > at
> >
>
com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:
> 133)
> > at
> >
>
com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:36
> 0)
> > at
> >
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.jav
> a:401)
> > at
> >
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart
> (DeployedApplicationImpl.java:743)
> > at
> >
>
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.jav
> a:337)
> > at
> >
>
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicati
> onImpl.java:531)
> > at
> >
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Application
> MgrImpl.java:254)
> > at
> >
>
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.jav
> a:232)
> > at
> >
>
com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.jav
> a:343)
> > at
> > com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:234)
> >
> >
> >
> > Please share any idea that you might have on this
> > thanks,
> > Sam
> >
> >
> > ___________________________________________________________
> > Sent by ePrompter, the premier email notification
> > software.
> > Free download at http://www.ePrompter.com.
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Mime
View raw message