Hi,

I have servicemix which is running on Jetty. And my MessageDrivenBean is on
JBoss. Now, I want to configure jboss queue on servicemix and send messages
to messagelistener on jboss. I tried to use JNDI configuration in xbean.xml.
It is as follows:

<jms:endpoint service="tutorial:jms" endpoint="myProvider"
                role="provider" destinationStyle="queue"
jmsProviderDestinationName="queue/myQueue"
                connectionFactory="#connectionFactory" />       

        <jms:endpoint service="tutorial:jms" endpoint="myConsumer"
                role="consumer" destinationStyle="queue"
jmsProviderDestinationName="queue/myQueue"
                connectionFactory="#connectionFactory" 
targetService="tutorial:jms"
                targetEndpoint="myConsumer" />

        <amq:connectionFactory id="connectionFactory" />
        
        <bean id="jbossJndiTemplate" 
class="org.springframework.jndi.JndiTemplate">
                <property name="environment">
                        <props>
                                <prop key="java.naming.factory.initial">
                                        org.jnp.interfaces.NamingContextFactory
                                </prop>
                                <prop key="java.naming.provider.url">
                                        jnp://localhost:1099
                                </prop>

                                <prop key="java.naming.factory.url.pkgs">
                                org.jnp.interfaces:org.jboss.naming
                                </prop>
                        </props>
                </property>
        </bean>

        <bean id="ConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiTemplate">
                        <ref bean="jbossJndiTemplate" />
                </property>
                <property name="jndiName">
                        <value>QueueConnectionFactory</value>
                </property>
        </bean>
</beans>

But, unfortunately Iam getting these errors

Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'ConnectionFactory'
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class:
org.jnp.interfaces.NamingContextFactory 
Caused by: java.lang.ClassNotFoundException:
org.jnp.interfaces.NamingContextFactory

Should I have to give brokerURL? If so, is this serverbindport of jboss? Iam
trying this for the past 3 days.
Please help.

Thanking you.

Regards,
Ajay

-- 
View this message in context: 
http://www.nabble.com/Having-problems-Configuring-beans-for-Remote-JBoss-Queue-tp21156812p21156812.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to