geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juergen Weber <webe...@gmail.com>
Subject How to get a ConnectionFactory into JNDI?
Date Wed, 29 Apr 2009 14:37:25 GMT

Hi,

I try to access a MQ ConnectionFactory using the code below, but I get an
Exception. The resource adapter is in sys:dependencies.

How do I get the ConnectionFactory into JNDI so the lookup works?

Thanks,
Juergen


Caused by: javax.naming.NotContextException: wmq/ConnectionFactory
        at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:171)
        at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:625)
        at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:162)
        at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:625)
        at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:162)
        at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:611)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at
de.kreditwerk.ldapupdate.ejb.QSenderBean.postConstruct(QSenderBean.java:58)


Context initctx = new InitialContext();
o = initctx.lookup("java:comp/env/wmq/ConnectionFactory");
			
openejb-jar.xml:
<session>

	<ejb-name>QSenderBean</ejb-name>

	<resource-ref>
		<ref-name>wmq/ConnectionFactory</ref-name>
		<resource-link>wmqConnectionFactory</resource-link>
	</resource-ref>
</session>

geronimo-ra.xml:			
<conn:outbound-resourceadapter>
	<conn:connection-definition>
	
<conn:connectionfactory-interface>javax.jms.QueueConnectionFactory</conn:connectionfactory-interface>
		<conn:connectiondefinition-instance>
			<conn:name>wmqConnectionFactory</conn:name>
		
<conn:implemented-interface>javax.jms.QueueConnectionFactory</conn:implemented-interface>
			
			
-- 
View this message in context: http://www.nabble.com/How-to-get-a-ConnectionFactory-into-JNDI--tp23296092s134p23296092.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message