Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 31078 invoked from network); 30 Apr 2009 05:58:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Apr 2009 05:58:50 -0000 Received: (qmail 14014 invoked by uid 500); 30 Apr 2009 05:58:49 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 13955 invoked by uid 500); 30 Apr 2009 05:58:49 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 13929 invoked by uid 99); 30 Apr 2009 05:58:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2009 05:58:49 +0000 X-ASF-Spam-Status: No, hits=2.7 required=10.0 tests=FUZZY_CREDIT,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ashjain2@gmail.com designates 209.85.221.110 as permitted sender) Received: from [209.85.221.110] (HELO mail-qy0-f110.google.com) (209.85.221.110) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2009 05:58:41 +0000 Received: by qyk8 with SMTP id 8so3506413qyk.27 for ; Wed, 29 Apr 2009 22:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=TbVozqvnVp4w6+9BTp0fqCh4ciaPNmu+L/+uhSzoStg=; b=vWRaZ2YWR6bAeT3nAA2llRdQ2ouXuf0WRWic3xvxQToJ4hvioUK7sO//gG9xhFCeu/ rviQrQ5+6daSbHLxUSDFd+p28VvoWaDKyEif6+ZrSxcUnEDCsWrbqNu3Q5WK1QNEUfcK /UpzaeADOFKX49U7ZSS1UYLJctkm7jJK1fdFs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=c6RVzNlDfP9v4CKbSR0xhctgT931F5AkzBL60LJlSYgwahK78MOxOQbZCPZY1ifRVC gClB/eD/rzzq3uJLswpnt1CxaxFqaVaHDH+hMvukdYD2UEFc5rrKptoLj8ixpTWM8dVi JDxwKfsvBmfK/hGwM2O5lklVsSb3GBxhFLc4U= MIME-Version: 1.0 Received: by 10.220.73.198 with SMTP id r6mr2524440vcj.29.1241071100175; Wed, 29 Apr 2009 22:58:20 -0700 (PDT) In-Reply-To: <23296092.post@talk.nabble.com> References: <23296092.post@talk.nabble.com> Date: Thu, 30 Apr 2009 11:28:20 +0530 Message-ID: <14af40510904292258w21568f06k6c06371905e71e70@mail.gmail.com> Subject: Re: How to get a ConnectionFactory into JNDI? From: Ashish Jain To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=00163628513c1129ff0468bf6288 X-Virus-Checked: Checked by ClamAV on apache.org --00163628513c1129ff0468bf6288 Content-Type: text/plain; charset=ISO-8859-9 Content-Transfer-Encoding: quoted-printable What =FDs o here:: Is =FDt a QueueConnectionFactory:: On Wed, Apr 29, 2009 at 8:07 PM, Juergen Weber 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.ja= va:171) > at > > org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.ja= va:625) > at > > org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.ja= va:162) > at > > org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.ja= va:625) > at > > org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.ja= va:162) > at > > org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.ja= va:611) > at javax.naming.InitialContext.lookup(InitialContext.java:392) > at > de.kreditwerk.ldapupdate.ejb.QSenderBean.postConstruct(QSenderBean.java:5= 8) > > > Context initctx =3D new InitialContext(); > o =3D initctx.lookup("java:comp/env/wmq/ConnectionFactory"); > > openejb-jar.xml: > > > QSenderBean > > > wmq/ConnectionFactory > wmqConnectionFactory > > > > geronimo-ra.xml: > > > > > javax.jms.QueueConnectionFactory > > wmqConnectionFactory > > > javax.jms.QueueConnectionFactory > > > -- > View this message in context: > http://www.nabble.com/How-to-get-a-ConnectionFactory-into-JNDI--tp2329609= 2s134p23296092.html > Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. > > --00163628513c1129ff0468bf6288 Content-Type: text/html; charset=ISO-8859-9 Content-Transfer-Encoding: quoted-printable What =FDs o here:: Is =FDt 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
=A0 =A0 =A0 =A0at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java= :171)
=A0 =A0 =A0 =A0at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java= :625)
=A0 =A0 =A0 =A0at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java= :162)
=A0 =A0 =A0 =A0at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java= :625)
=A0 =A0 =A0 =A0at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java= :162)
=A0 =A0 =A0 =A0at
org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java= :611)
=A0 =A0 =A0 =A0at javax.naming.InitialContext.lookup(InitialContext.java:3= 92)
=A0 =A0 =A0 =A0at
de.kreditwerk.ldapupdate.ejb.QSenderBean.postConstruct(QSenderBean.java:58)=


Context initctx =3D new InitialContext();
o =3D initctx.lookup("java:comp/env/wmq/ConnectionFactory");

openejb-jar.xml:
<session>

=A0 =A0 =A0 =A0<ejb-name>QSenderBean</ejb-name>

=A0 =A0 =A0 =A0<resource-ref>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<ref-name>wmq/ConnectionFactory</r= ef-name>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<resource-link>wmqConnectionFactory&l= t;/resource-link>
=A0 =A0 =A0 =A0</resource-ref>
</session>

geronimo-ra.xml:
<conn:outbound-resourceadapter>
=A0 =A0 =A0 =A0<conn:connection-definition>

<conn:connectionfactory-interface>javax.jms.QueueConnectionFactory<= ;/conn:connectionfactory-interface>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<conn:connectiondefinition-instance><= br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<conn:name>wmqConnect= ionFactory</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--tp232960= 92s134p23296092.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

--00163628513c1129ff0468bf6288--