JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

View: New views
13 Messages — Rating Filter:   Alert me  

JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by muletester :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by ddossot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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




Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by muletester :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thx for your response dssotot.
The problem with first option is your subclass of Jms11Support needs to know about the jndi environ properties like initalcontext, provider url etc,. and Jms11Support doesn't define any of these. So the subclass should define these and accept them either in a constructor or via setters, to do a lookup.  Correct me if I'm wrong on this.

Can you please provide your spring interceptor config?


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
>
>
>

Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by Travis Carlson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mule 2.0 no longer handles JNDI lookups, the idea being that you use
Spring's <jee:jndi-lookup> for that and inject the resulting bean into
your Mule config:

http://static.springframework.org/spring/docs/2.0.x/reference/xsd-config.html

However, in the case of JMS Destinations, there's nowhere you can inject
that in the config, so I'm afraid you'll have to go with David's
workaround for now and we'll create a JIRA to expose that in the config
somehow.

Thanks,
Travis

On Fri, 2008-05-16 at 15:23 -0700, muletester wrote:

> Thx for your response dssotot.
> The problem with first option is your subclass of Jms11Support needs to know
> about the jndi environ properties like initalcontext, provider url etc,. and
> Jms11Support doesn't define any of these. So the subclass should define
> these and accept them either in a constructor or via setters, to do a
> lookup.  Correct me if I'm wrong on this.
>
> Can you please provide your spring interceptor config?
>
>
>
> 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@...> 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
> >>
> >>
> >>
> >
> >
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by muletester :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Travis,
I was able to get around this with David's workaround. Can you please post the JIRA here once you create it?

Travis Carlson-2 wrote:
Mule 2.0 no longer handles JNDI lookups, the idea being that you use
Spring's <jee:jndi-lookup> for that and inject the resulting bean into
your Mule config:

http://static.springframework.org/spring/docs/2.0.x/reference/xsd-config.html

However, in the case of JMS Destinations, there's nowhere you can inject
that in the config, so I'm afraid you'll have to go with David's
workaround for now and we'll create a JIRA to expose that in the config
somehow.

Thanks,
Travis

On Fri, 2008-05-16 at 15:23 -0700, muletester wrote:
> Thx for your response dssotot.
> The problem with first option is your subclass of Jms11Support needs to know
> about the jndi environ properties like initalcontext, provider url etc,. and
> Jms11Support doesn't define any of these. So the subclass should define
> these and accept them either in a constructor or via setters, to do a
> lookup.  Correct me if I'm wrong on this.
>
> Can you please provide your spring interceptor config?
>
>
>
> 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
> >>
> >>
> >>
> >
> >
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by Travis Carlson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://mule.mulesource.org/jira/browse/MULE-3384

On Mon, 2008-05-19 at 15:56 -0700, muletester wrote:

> Travis,
> I was able to get around this with David's workaround. Can you please post
> the JIRA here once you create it?
>
>
> Travis Carlson-2 wrote:
> >
> > Mule 2.0 no longer handles JNDI lookups, the idea being that you use
> > Spring's <jee:jndi-lookup> for that and inject the resulting bean into
> > your Mule config:
> >
> > http://static.springframework.org/spring/docs/2.0.x/reference/xsd-config.html
> >
> > However, in the case of JMS Destinations, there's nowhere you can inject
> > that in the config, so I'm afraid you'll have to go with David's
> > workaround for now and we'll create a JIRA to expose that in the config
> > somehow.
> >
> > Thanks,
> > Travis
> >
> > On Fri, 2008-05-16 at 15:23 -0700, muletester wrote:
> >> Thx for your response dssotot.
> >> The problem with first option is your subclass of Jms11Support needs to
> >> know
> >> about the jndi environ properties like initalcontext, provider url etc,.
> >> and
> >> Jms11Support doesn't define any of these. So the subclass should define
> >> these and accept them either in a constructor or via setters, to do a
> >> lookup.  Correct me if I'm wrong on this.
> >>
> >> Can you please provide your spring interceptor config?
> >>
> >>
> >>
> >> 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@...> 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
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> >
> >
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by rshah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
>
>
>

Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by ddossot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...> 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




Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by rshah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks a lot. It works.

- Raj

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.

Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by JackyMule :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, I need your help about openMQ & mule2.0. I posted couple of queries in mule forum about my problem but it seems no one has used openMQ with mule2 yet. I came across your post where you says setup working fine for you.
http://www.nabble.com/Interfacing-to-Open-MQ-tt15740772.html#a16731933

I would like to know your setup to make mule2.0 working with openMQ. I am using openMQ4.1 & Mule2.0. I am using configuration shown below.
       
        <jms:connector name="openMQConnector" connectionFactory-ref="openMQ" />
       
        <spring:bean name="openMQ" class="org.springframework.jndi.JndiObjectFactoryBean">
  <spring:property name="jndiName" value="TopicConnectionFactory" />
  <spring:property name="jndiEnvironment">
  <spring:props>
                        <spring:prop key="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</spring:prop>
                                <spring:prop key="java.naming.provider.url">file:///c:/TestMQ</spring:prop>
  </spring:props>
  </spring:property>
        </spring:bean>

I have configured OpenMQ using OpenMQ admin gui & created TopicConnectionFactory in OpenMQ. As soon as i start my Mule server it throws me IllegalArgumentException & says "In valid connection factory : sun.java....connectionfactory"

I debug & cross checked in mule jms code. OpenMQ creating object of ConnectionFactory rather then TopicConnectionFactory so finally throwing error due to this mismatch. Mule JmsConnector check for matching with QueueConnectionFactory & TopicConnectionFactory.  Though object was created was of type ConnectionFactory so finaly throws error.

I am not able to understand why openMQ is creating an Instance of ConnectionFactory rather then TopicConnectionFactory, as TopicConnectionFactory is configured.

Did you face this problem?
Can you suggest any solution for this problem?

Please share your views for the same.

Thanks & regards,
JackyMule


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
>
>
>

Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by ddossot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What you are talking about lies in the differences between JMS 1.0.2b and 1.1. Have you configured your JMS connector to use 1.1?

D.


On Thu, Jul 24, 2008 at 4:19 PM, JackyMule <angelscs2005@...> wrote:

Hi, I need your help about openMQ & mule2.0. I posted couple of queries in
mule forum about my problem but it seems no one has used openMQ with mule2
yet. I came across your post where you says setup working fine for you.
http://www.nabble.com/Interfacing-to-Open-MQ-tt15740772.html#a16731933

I would like to know your setup to make mule2.0 working with openMQ. I am
using openMQ4.1 & Mule2.0. I am using configuration shown below.

       <jms:connector name="openMQConnector" connectionFactory-ref="openMQ" />

       <spring:bean name="openMQ"
class="org.springframework.jndi.JndiObjectFactoryBean">
               <spring:property name="jndiName" value="TopicConnectionFactory" />
               <spring:property name="jndiEnvironment">
                       <spring:props>
                               <spring:prop
key="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</spring:prop>
                               <spring:prop
key="java.naming.provider.url">file:///c:/TestMQ</spring:prop>
                       </spring:props>
               </spring:property>
       </spring:bean>

I have configured OpenMQ using OpenMQ admin gui & created
TopicConnectionFactory in OpenMQ. As soon as i start my Mule server it
throws me IllegalArgumentException & says "In valid connection factory :
sun.java....connectionfactory"

I debug & cross checked in mule jms code. OpenMQ creating object of
ConnectionFactory rather then TopicConnectionFactory so finally throwing
error due to this mismatch. Mule JmsConnector check for matching with
QueueConnectionFactory & TopicConnectionFactory.  Though object was created
was of type ConnectionFactory so finaly throws error.

I am not able to understand why openMQ is creating an Instance of
ConnectionFactory rather then TopicConnectionFactory, as
TopicConnectionFactory is configured.

Did you face this problem?
Can you suggest any solution for this problem?

Please share your views for the same.

Thanks & regards,
JackyMule



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@...> 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@...> 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
>>
>>
>>
>
>

--
View this message in context: http://www.nabble.com/JMS11Support-in-Mule2.0-not-comaptible-with-that-in-Mule-1.4.x-tp17275750p18642437.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




Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by JackyMule :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello friend,

No i think i missed configuring my jms connector to 1.1. Earlier it was look like below

 <jms:connector name="jmsConnector" connectionFactory-ref="openMQ"
                createMultipleTransactedReceivers="false"
                numberOfConcurrentTransactedReceivers="1" >
                <spring:property name="jmsSupport" ref="jndiJmsSupport" />
</jms:connector>


Now i changed it to the following one

 <jms:connector name="jmsConnector" connectionFactory-ref="openMQ"
                createMultipleTransactedReceivers="false"
                numberOfConcurrentTransactedReceivers="1" specification="1.1">
                <spring:property name="jmsSupport" ref="jndiJmsSupport" />
</jms:connector>


But the same problem persist i.e  IllegalArgumentException. Does my configuration looks fine or still having some problem? Correct me if i misunderstood.

Here is my error log

Root Exception stack trace:
java.lang.IllegalArgumentException: Unsupported ConnectionFactory type: com.sun.messaging.ConnectionFactory
        at org.mule.transport.jms.Jms102bSupport.createConnection(Jms102bSupport.java:84)
        at org.mule.transport.jms.JmsConnector.createConnection(JmsConnector.java:211)
        at org.mule.transport.jms.JmsConnector.doConnect(JmsConnector.java:284)
        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1353)
        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)
        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:108)
        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1362)
        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)
        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:108)
        at org.mule.transport.AbstractConnector.start(AbstractConnector.java:392)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:272)
        at org.mule.lifecycle.DefaultLifecyclePhase.fireLifecycle(DefaultLifecyclePhase.java:143)
        at org.mule.lifecycle.GenericLifecycleManager.firePhase(GenericLifecycleManager.java:79)
        at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:147)
        at org.mule.MuleServer.run(MuleServer.java:254)
        at org.mule.MuleServer.start(MuleServer.java:239)
        at com.agilent.caaf.eventbridge.RunMuleServer.main(RunMuleServer.java:21)


Any help is appreciated. I am just hopeful of this forum.

Thanks in advance,

JackyMule



ddossot wrote:
What you are talking about lies in the differences between JMS 1.0.2b and
1.1. Have you configured your JMS connector to use 1.1?

D.


On Thu, Jul 24, 2008 at 4:19 PM, JackyMule <angelscs2005@gmail.com> wrote:

>
> Hi, I need your help about openMQ & mule2.0. I posted couple of queries in
> mule forum about my problem but it seems no one has used openMQ with mule2
> yet. I came across your post where you says setup working fine for you.
> http://www.nabble.com/Interfacing-to-Open-MQ-tt15740772.html#a16731933
>
> I would like to know your setup to make mule2.0 working with openMQ. I am
> using openMQ4.1 & Mule2.0. I am using configuration shown below.
>
>        <jms:connector name="openMQConnector" connectionFactory-ref="openMQ"
> />
>
>        <spring:bean name="openMQ"
> class="org.springframework.jndi.JndiObjectFactoryBean">
>                <spring:property name="jndiName"
> value="TopicConnectionFactory" />
>                <spring:property name="jndiEnvironment">
>                        <spring:props>
>                                <spring:prop
>
> key="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</spring:prop>
>                                <spring:prop
> key="java.naming.provider.url">file:///c:/TestMQ</spring:prop>
>                        </spring:props>
>                </spring:property>
>        </spring:bean>
>
> I have configured OpenMQ using OpenMQ admin gui & created
> TopicConnectionFactory in OpenMQ. As soon as i start my Mule server it
> throws me IllegalArgumentException & says "In valid connection factory :
> sun.java....connectionfactory"
>
> I debug & cross checked in mule jms code. OpenMQ creating object of
> ConnectionFactory rather then TopicConnectionFactory so finally throwing
> error due to this mismatch. Mule JmsConnector check for matching with
> QueueConnectionFactory & TopicConnectionFactory.  Though object was created
> was of type ConnectionFactory so finaly throws error.
>
> I am not able to understand why openMQ is creating an Instance of
> ConnectionFactory rather then TopicConnectionFactory, as
> TopicConnectionFactory is configured.
>
> Did you face this problem?
> Can you suggest any solution for this problem?
>
> Please share your views for the same.
>
> Thanks & regards,
> JackyMule
>
>
>
> 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
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/JMS11Support-in-Mule2.0-not-comaptible-with-that-in-Mule-1.4.x-tp17275750p18642437.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
>
>
>

Re: JMS11Support in Mule2.0 not comaptible with that in Mule 1.4.x

by JackyMule :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Friends,

Now Mule2.0 is working fine with OpenMQ4.1 broker. The setup is working fine for me. I am happy to post my configuration here. May be useful for one who wants to use OpenMQ with Mule2.

Remember your Mule client code remain unchanged. Only changes requires in Mule config file.
Before modifying mule config file, make sure you have configure OpenMQ properly. Use the following link to configure OpenMQ. This link is more then enough to configure OpenMQ.

http://docs.sun.com/app/docs/doc/819-7755/6n9m8u57v?a=view#aeoay


Following tages are needed to use openMQ as JMS broker in your mule config file.

         <jms:connector name="jmsConnector" connectionFactory-ref="openMQ"
                createMultipleTransactedReceivers="false"
                numberOfConcurrentTransactedReceivers="1" specification="1.1">
                <spring:property name="jmsSupport" ref="jndiJmsSupport" />
         </jms:connector>

         <spring:beans>
                <spring:bean name="jndiJmsSupport" class="org.mule.transport.jms.Jms102bSupport">
                        <spring:constructor-arg ref="jmsConnector" />
                </spring:bean>

                <spring:bean name="context" class="javax.naming.InitialContext">
                        <spring:constructor-arg type="java.util.Hashtable">
                                <spring:props>
                                        <spring:prop key="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</spring:prop>
                                        <spring:prop key="java.naming.provider.url">file:///C:/pawan/openMQ/mq</spring:prop>
                                </spring:props>
                        </spring:constructor-arg>
                </spring:bean>
                <spring:bean name="openMQ" class="org.springframework.jndi.JndiObjectFactoryBean">
                        <spring:property name="jndiName" value="MyTopicConnectionFactory" />                
                        <spring:property name="jndiEnvironment">
                                <spring:props>
                                        <spring:prop key="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</spring:prop>
                                        <spring:prop key="specifications">1.1</spring:prop>
                                        <spring:prop key="java.naming.provider.url">file:///C:/Temp</spring:prop>
                                </spring:props>
                        </spring:property>
                </spring:bean>                              
        </spring:beans>

        <endpoint name="MyEndPoint"
                address="jms://topic:my_topic" synchronous="false" connector-ref="jmsConnector"/>

If you have followed the steps given above then You are ready to run your setup with OpenMQ.

I hope this post is useful for the community.

With regards,
JackyMule

Note:- U should refer the steps for creating MyTopicConnectionFactory (XyzConnectionFactory) using above provided link for OpenMQ configuration. That is most critical steps of configuration.
Note:- U should refer the steps for creating destination point (my_topic) using above provided link for openMQ configuration. That is most critical steps of configuration.

Later you can use endpoint (MyEndPoint) as ur inbound / outbound endpoints.




Hello friend,

No i think i missed configuring my jms connector to 1.1. Earlier it was look like below

 <jms:connector name="jmsConnector" connectionFactory-ref="openMQ"
                createMultipleTransactedReceivers="false"
                numberOfConcurrentTransactedReceivers="1" >
                <spring:property name="jmsSupport" ref="jndiJmsSupport" />
</jms:connector>


Now i changed it to the following one

 <jms:connector name="jmsConnector" connectionFactory-ref="openMQ"
                createMultipleTransactedReceivers="false"
                numberOfConcurrentTransactedReceivers="1" specification="1.1">
                <spring:property name="jmsSupport" ref="jndiJmsSupport" />
</jms:connector>


But the same problem persist i.e  IllegalArgumentException. Does my configuration looks fine or still having some problem? Correct me if i misunderstood.

Here is my error log

Root Exception stack trace:
java.lang.IllegalArgumentException: Unsupported ConnectionFactory type: com.sun.messaging.ConnectionFactory
        at org.mule.transport.jms.Jms102bSupport.createConnection(Jms102bSupport.java:84)
        at org.mule.transport.jms.JmsConnector.createConnection(JmsConnector.java:211)
        at org.mule.transport.jms.JmsConnector.doConnect(JmsConnector.java:284)
        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1353)
        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)
        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:108)
        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1362)
        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)
        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:108)
        at org.mule.transport.AbstractConnector.start(AbstractConnector.java:392)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:272)
        at org.mule.lifecycle.DefaultLifecyclePhase.fireLifecycle(DefaultLifecyclePhase.java:143)
        at org.mule.lifecycle.GenericLifecycleManager.firePhase(GenericLifecycleManager.java:79)
        at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:147)
        at org.mule.MuleServer.run(MuleServer.java:254)
        at org.mule.MuleServer.start(MuleServer.java:239)
        at com.agilent.caaf.eventbridge.RunMuleServer.main(RunMuleServer.java:21)


Any help is appreciated. I am just hopeful of this forum.

Thanks in advance,

JackyMule



ddossot wrote:
What you are talking about lies in the differences between JMS 1.0.2b and
1.1. Have you configured your JMS connector to use 1.1?

D.


On Thu, Jul 24, 2008 at 4:19 PM, JackyMule <angelscs2005@gmail.com> wrote:

>
> Hi, I need your help about openMQ & mule2.0. I posted couple of queries in
> mule forum about my problem but it seems no one has used openMQ with mule2
> yet. I came across your post where you says setup working fine for you.
> http://www.nabble.com/Interfacing-to-Open-MQ-tt15740772.html#a16731933
>
> I would like to know your setup to make mule2.0 working with openMQ. I am
> using openMQ4.1 & Mule2.0. I am using configuration shown below.
>
>        <jms:connector name="openMQConnector" connectionFactory-ref="openMQ"
> />
>
>        <spring:bean name="openMQ"
> class="org.springframework.jndi.JndiObjectFactoryBean">
>                <spring:property name="jndiName"
> value="TopicConnectionFactory" />
>                <spring:property name="jndiEnvironment">
>                        <spring:props>
>                                <spring:prop
>
> key="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</spring:prop>
>                                <spring:prop
> key="java.naming.provider.url">file:///c:/TestMQ</spring:prop>
>                        </spring:props>
>                </spring:property>
>        </spring:bean>
>
> I have configured OpenMQ using OpenMQ admin gui & created
> TopicConnectionFactory in OpenMQ. As soon as i start my Mule server it
> throws me IllegalArgumentException & says "In valid connection factory :
> sun.java....connectionfactory"
>
> I debug & cross checked in mule jms code. OpenMQ creating object of
> ConnectionFactory rather then TopicConnectionFactory so finally throwing
> error due to this mismatch. Mule JmsConnector check for matching with
> QueueConnectionFactory & TopicConnectionFactory.  Though object was created
> was of type ConnectionFactory so finaly throws error.
>
> I am not able to understand why openMQ is creating an Instance of
> ConnectionFactory rather then TopicConnectionFactory, as
> TopicConnectionFactory is configured.
>
> Did you face this problem?
> Can you suggest any solution for this problem?
>
> Please share your views for the same.
>
> Thanks & regards,
> JackyMule
>
>
>
> 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
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/JMS11Support-in-Mule2.0-not-comaptible-with-that-in-Mule-1.4.x-tp17275750p18642437.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
>
>
>