Hi,
I'm using an alternate JMS provider (not ActiveMQ) with ServiceMix 4. The
jms provider is jBossMessaging 2.0.0BETA4, this provider works with Hermes
and java client whithout problems.
I'm using Spring's JEE JNDI lookup to create the Connection Factory.
I'm getting an error when I start the JBI service assembly that contains
the JMS service unit.
jBossMessaging configuration jbm-jms.xml
<connection-factory name="ConnectionFactory">
<connector-ref connector-name="netty"/>
<entries>
<entry name="cosimaFactory"/>
<entry name="java:/cosimaFactory"/>
</entries>
</connection-factory>
<queue name="cosimaJira">
<entry name="/CosimaJira"/>
</queue>
JMS SU xbean.xml
<jms:endpoint service="cosi:jmsCosimaJira" endpoint="jmsCosimaJira"
targetService="cosi:router"
role="consumer"
destinationStyle="queue"
jmsProviderDestinationName="CosimaJira"
connectionFactory="#connFactory"/>
<bean id="jbossJndiTemplate"
class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop
key="java.naming.factory.initial">org.jboss.naming.NamingContextFactory</prop>
<prop
key="java.naming.provider.url">jnp://localhost:1099</prop>
<prop
key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
</props>
</property>
</bean>
<bean id="connFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="jbossJndiTemplate" />
</property>
<property name="jndiName">
<value>cosimaFactory</value>
</property>
<property name="resourceRef" value="true"/>
</bean>
The result is:
Cannot resolve reference to bean 'connFactory' while setting bean property
'connectionFactory'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'connFactory'. Invocation of init method failed; nested exception
is javax.naming.NameNotFoundException: cosimaFactory
Note, I've also tried:
<value>/cosimaFactory</value>
and
<value>java:/cosimaFactory</value>
with the same result.
With this other JMS SU xbean.xml
<jms:endpoint service="cosi:jmsCosimaJira" endpoint="jmsCosimaJira"
targetService="cosi:router"
role="consumer"
destinationStyle="queue"
jndiDestinationName="CosimaJira"
jndiConnectionFactoryName="cosimaFactory"
initialContextFactory="org.jboss.naming.NamingContextFactory"
jndiProviderURL="jnp://localhost:1099"
defaultMep="http://www.w3.org/2004/08/wsdl/in-only" />
The result is:
Caused by: javax.jbi.management.DeploymentException: <component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message">
<component-name>servicemix-jms</component-name>
<component-task-result-details>
<task-result-details>
<task-id>init</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg><msg-loc-info><loc-token/><loc-message>Unable to init
service unit</loc-message></msg-loc-info></task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token />
<loc-message>null</loc-message>
<stack-trace><![CDATA[java.lang.NullPointerException
In my opinion the problem is the servicemix can´t find the jndi service
jboss.
Any suggestions, ideas or alternative?
Thanks,
javier
--
View this message in context:
http://www.nabble.com/Problems-using-JbossMessaging-JMS-queue-tp25777722p25777722.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.