On Tuesday, October 18, 2011 6:00:59 PM Jared S Warren wrote:
> Spring JMS definitely allows it (I'm actually doing this on some other
> queues that aren't served by CXF in the exact same process).
> 
> Any quick pointers for how I wire in a different
> MessageListenerContainer?  (All of my others are using
> DefaultMessageListenerContainer and it meets all my needs in those
> cases).

I honestly have no idea if you can configure this via spring.   Haven't really 
looked at it till now.   However, it doesn't look easy from the code.  :-(   
You would need to add a publish="false" to the bean definition to NOT have it 
publish by default.   Then add some code that would grab the Endpoint from the 
context, grab the Server from it, grab the Destination from that and cast to 
JMSDestintation, then grab the JmsConfiguration object from there and set the 
DefaultMessageListenerContainer into it.   Then manually call publish(). 

I just added a call to 
getProperty("org.springframework.jms.listener.AbstractMessageListenerContainer")
 
on the endpoint at startup to grab it if it exists.   Thus, you will be able 
to just do:

<jaxws:endpoint ...>
   <jaxws:properties>
        <entry 
key=""org.springframework.jms.listener.AbstractMessageListenerContainer" 
ref="myListneer"/
....


if you could test that out with tomorrows 2.5.0 snapshots, that would be 
great.  :-)


Dan



> 
> Thanks!
> jared
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:[email protected]]
> Sent: Tuesday, October 18, 2011 1:41 PM
> To: [email protected]
> Cc: Jared S Warren
> Subject: Re: Dynamic Concurrency changes on JMS
> 
> On Tuesday, October 18, 2011 9:43:26 AM Jared S Warren wrote:
> > I would like to be able to change the concurrency settings of my JMS
> > endpoint at runtime (concurrentConsumers, maxConcurrentConsumers,
> > maxConcurrentTasks).  Will changing the properties on the
> > JMSConfiguration object effect its changes successfully at runtime?
> 
> Or
> 
> > must these be changed only at startup time?
> 
> I think they are "first request" settings and thus not changeable after
> that.
> You COULD configure your own AbstractMessageListenerContainer and set
> that
> into the configuration.   You could then change values on that and they
> may
> (if spring jms allows it) take affect dynamically.
> 
> Dan
> 
> > Thanks!
> > 
> > jared
> > 
> > 
> > 
> > Jared Warren
> > 
> > 
> > 
> > <font face="monospace"size="-3"><br>The information transmitted is
> 
> intended
> 
> > only for the person or entity to which it is addressed and <br>may
> 
> contain
> 
> > confidential and/or privileged material. If the reader of this message
> 
> is
> 
> > not the intended<br>recipient, you are hereby notified that your
> 
> access is
> 
> > unauthorized, and any review, dissemination,<br>distribution or
> 
> copying of
> 
> > this message including any attachments is strictly prohibited. If you
> 
> are
> 
> > not<br>the intended recipient, please contact the sender and delete
> 
> the
> 
> > material from any computer.<br>
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to