You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Chris Custine (JIRA)" <ji...@apache.org> on 2009/10/19 20:15:53 UTC
[jira] Commented: (SMX4-396) Problems using JbossMessaging JMS
provider (jndi problem)
[ https://issues.apache.org/activemq/browse/SMX4-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54830#action_54830 ]
Chris Custine commented on SMX4-396:
------------------------------------
Should be fixed along with SMX4NMR-164
> Problems using JbossMessaging JMS provider (jndi problem)
> ---------------------------------------------------------
>
> Key: SMX4-396
> URL: https://issues.apache.org/activemq/browse/SMX4-396
> Project: ServiceMix 4
> Issue Type: Bug
> Components: Bundles
> Affects Versions: 4.0.0
> Environment: ServiceMix 4.0.0
> jBossMessaging 2.0.0BETA4 or jBossMessaging 1.4.3GA (inside jBoss AS 5.1)
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)
> Reporter: javier escriva
> Assignee: Chris Custine
> Fix For: 4.1.0
>
> Attachments: servicemix.log
>
>
> I'm using an alternate JMS provider (not ActiveMQ). The jms provider is jBossMessaging, this provider works with Hermes, java client and openESB whithout problems. So I think the problem isnĀ“t JBossMessaging.
> To start I get a conflict with port 1099 (also used by jboss), I change org.apache.servicemix.management.cfg following:
> rmiRegistryPort = 1011
> serviceUrl = service:jmx:rmi:///jndi/rmi://localhost:1011/jmxrmi
> I'm using Spring's JEE JNDI lookup to create the Connection Factory with jndi environment, but 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.
> Initially Maven before packaging verifies that the connection to the JMS provider, and it works:
> [INFO] [jbi:generate-jbi-service-unit-descriptor {execution: default-generate-jbi-service-unit-descriptor}]
> [INFO] Generating jbi.xml
> [INFO] Created Service Unit Analyzer org.apache.servicemix.jms.packaging.JmsServiceUnitAnalyzer@15cd9a
> 2009-10-07 17:29:59,627 [main ] INFO ileSystemXmlApplicationContext - Refreshing org.apache.xbean.spring.cont
> ext.FileSystemXmlApplicationContext@17644c8: display name [org.apache.xbean.spring.context.FileSystemXmlApplicationConte
> xt@17644c8]; startup date [Wed Oct 07 17:29:59 CEST 2009]; root of context hierarchy
> 2009-10-07 17:29:59,798 [main ] INFO XBeanXmlBeanDefinitionReader - Loading XML bean definitions from URL [
> file:/C:/testEnv/esb/apache-servicemix-4.0.0/examples/cosimaJira/cosi-su-jms/src/main/resources/xbean.xml]
> 2009-10-07 17:30:00,423 [main ] INFO ileSystemXmlApplicationContext - Bean factory for application context [o
> rg.apache.xbean.spring.context.FileSystemXmlApplicationContext@17644c8]: org.springframework.beans.factory.support.Defau
> ltListableBeanFactory@101da9
> 2009-10-07 17:30:00,455 [main ] INFO DefaultListableBeanFactory - Pre-instantiating singletons in org.spr
> ingframework.beans.factory.support.DefaultListableBeanFactory@101da9: defining beans [org.apache.servicemix.jms.JmsEndpo
> int#0,jbossJndiTemplate,connFactory]; root of factory hierarchy
> [INFO] generated : consumes [org.apache.servicemix.common.packaging.Consumes@161401f] provides []
> Forum related Link:
> http://cwiki.apache.org/SM/discussion-forums.html#nabble-td25777722%7Ca25785075
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.