I've tried and still not working. I specifically made the following change:
        <property name="jndiName">      
            <value>java:/cosimaFactory</value>  
         </property>

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.NotContextException: java:/cosimaFactory

I do not think the problem is JBoss Messaging because I can connect from
other clients, including Maven before packaging verifies that the connection
to the JMS provider:

[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.jmsserviceunitanaly...@15cd9a
2009-10-07 17:29:59,627 [main           ] INFO 
ileSystemXmlApplicationContext - Refreshing org.apache.xbean.spring.cont
ext.filesystemxmlapplicationcont...@17644c8: display name
[org.apache.xbean.spring.context.FileSystemXmlApplicationConte
x...@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.filesystemxmlapplicationcont...@17644c8]:
org.springframework.beans.factory.support.Defau
ltlistablebeanfact...@101da9
2009-10-07 17:30:00,455 [main           ] INFO  DefaultListableBeanFactory    
- Pre-instantiating singletons in org.spr
ingframework.beans.factory.support.defaultlistablebeanfact...@101da9:
defining beans [org.apache.servicemix.jms.JmsEndpo
int#0,jbossJndiTemplate,connFactory]; root of factory hierarchy
[INFO] generated : consumes
[org.apache.servicemix.common.packaging.consu...@161401f] provides []


Hermes also has no problem connecting and easily inspect the queues:

http://www.nabble.com/file/p25789533/hermes.png 


Thank you




Hi,

The issue seems to be linked to the JNDI lookup.

I think that the issue is due to a limitation of JBoss about on which 
context the name is bound.
In JBoss, a JNDI name is bound on the local context by default: 
java:comp/env) and you need to make the JNDI lookup on this context.
In your case, as you're remote from JBoss, you need to use the global 
context.
So you need to map the JNDI local name to the JNDI global name.
To do it in JBoss, you have to add a naming alias (for example in 
deploy/properties-service.xml):

<mbean code="org.jboss.naming.NamingAlias"
        name="jboss.mq:service=..."">
   <attribute name="FromName">java:comp/env/ConnectionFactory</attribute>
   <attribute name="ToName">ConnectionFactory</attribute>
</mbean>

Could you try this ?

Thanks
Regards
JB

-- 
View this message in context: 
http://www.nabble.com/Problems-using-JbossMessaging-JMS-queue-tp25777722p25789533.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to