geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Jain <ashja...@gmail.com>
Subject Re: How to get a ConnectionFactory into JNDI?
Date Thu, 30 Apr 2009 05:58:20 GMT
What ıs o here:: Is ıt a QueueConnectionFactory::


On Wed, Apr 29, 2009 at 8:07 PM, Juergen Weber <weberjn@gmail.com> wrote:

>
> 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