« Return to Thread: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x
ddossot wrote:Sure thing:
<spring:bean name="jndiDestinationAdvice"
class="mule.custom.JndiDestinationInterceptor" />
<spring:bean id="createDestinationAdvisor"
class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<spring:property name="advice" ref="jndiDestinationAdvice" />
<spring:property name="patterns">
<spring:list>
<spring:value>.*createDestination.*</spring:value>
</spring:list>
</spring:property>
</spring:bean>
<spring:bean name="proxyCreator"
class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<spring:property name="beanNames" value="jndiJmsSupport" />
<spring:property name="interceptorNames">
<spring:list>
<spring:value>createDestinationAdvisor</spring:value>
</spring:list>
</spring:property>
</spring:bean>
----
package mule.custom;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
public class JndiDestinationInterceptor implements MethodInterceptor {
public Object invoke(final MethodInvocation invocation) throws Throwable {
// destination name is in: invocation.getArguments()[1]
// do JNDI lookup here or invocation.proceed()
return yourDestination;
}
}
---
HTH
D.
On Thu, May 22, 2008 at 8:06 AM, rshah <raju_sh@hotmail.com> wrote:
>
> Hi,
>
> I have been struggling with this too. I use OpenMQ. The queue name I pass
> needs to be looked up in jndi but I can't find a way to do that. I was
> looking for jndiDestinations and forceJndiDestinations in Mule 2.0 and then
> I came across this forum which talks about exactly the same issue.
>
> Can you please provide your Spring interceptor config to work around this?
>
> Thanks,
> Raj
>
>
> ddossot wrote:
> >
> > An option, but maybe not "the right option" (Andrew?), consists in
> > sub-classing Jms11Support, override createDestination to perform the JNDI
> > lookup and inject this custom support in your connector like this:
> >
> > <jms:connector name="yourJmsConnector" specification="1.1"
> > connectionFactory-ref="yourConnectionFactory">
> > <spring:property name="jmsSupport" ref="jndiJmsSupport" />
> > </jms:connector>
> >
> > <spring:bean name="jndiJmsSupport" class="your.Jms11Support">
> > <spring:constructor-arg ref="yourJmsConnector" />
> > </spring:bean>
> >
> > If you do not like sub-classing, you can just add a Spring interceptor on
> > the createDestination method of the standard Jms11Support class (I have
> > done
> > this and can provide the config).
> >
> > HTH
> > D.
> >
> >
> > On Fri, May 16, 2008 at 7:15 AM, muletester <hemadrim@yahoo.com> wrote:
> >
> >>
> >> JMS11Support in Mule1.4 accepts jndiDestinations parameter and if this
> is
> >> set
> >> to true, it does a look up of queue/topic in JNDI tree. How can we
> >> achieve
> >> this similar functionality in Mule 2.0 in JMS11Support? If not, Is there
> >> any
> >> other way where we can look up queue/topic in JNDI Tree, since current
> >> version doesn't accept jndiDestinations or forceJndiDestinations.
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/JMS11Support-in-Mule2.0-not-comaptible-with-that-in-Mule-1.4.x-tp17275750p17275750.html
> >> Sent from the Mule - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >> http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/JMS11Support-in-Mule2.0-not-comaptible-with-that-in-Mule-1.4.x-tp17275750p17406331.html
> Sent from the Mule - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
« Return to Thread: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x
| Free embeddable forum powered by Nabble | Forum Help |