Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 44992 invoked from network); 2 May 2009 06:29:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 May 2009 06:29:33 -0000 Received: (qmail 89601 invoked by uid 500); 2 May 2009 06:29:33 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 89535 invoked by uid 500); 2 May 2009 06:29:32 -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 89527 invoked by uid 99); 2 May 2009 06:29:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 May 2009 06:29:32 +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 xhhsld@gmail.com designates 74.125.92.25 as permitted sender) Received: from [74.125.92.25] (HELO qw-out-2122.google.com) (74.125.92.25) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 May 2009 06:29:24 +0000 Received: by qw-out-2122.google.com with SMTP id 8so2128828qwh.25 for ; Fri, 01 May 2009 23:29:03 -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=yXdSZbfV2S+EVHmmj1z7VQS2n3Ri0G3IvTeHnR8KARQ=; b=H3zfXPqz33WwIXelza2OJ3cI8eGbMAP3nf5NIsnRpCjx/OrebsrYResvFAi3WoNZIb SdzZwBTjXZw02LBignfcUa+Yy9oI+MIqOyBpyXLJlHz0hXzC6sT8/lnP4BNORPHPWztW sqFyORsyppYctRSpLamHHGkME7vDnDHlvsqZA= 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=ORQYzGR2XBsudgF2j1th1jUEK+VxNP8Z+YGWSodK2HpqMMRZjyv/PsrMU6tSpOygPy KC+9o709W2055ni2HzMneJKLSrA/DH7zyb9vjGpGyQ6SKGPeJcn2ZnvgnHuPvi2AS+iC Y88W/W2zy3Pu+iwry+N5fHEfgGEZq+mC49shE= MIME-Version: 1.0 Received: by 10.220.75.199 with SMTP id z7mr6177753vcj.112.1241245743063; Fri, 01 May 2009 23:29:03 -0700 (PDT) In-Reply-To: <14af40510904302252k2a6df5e9we1011a7e94b66554@mail.gmail.com> References: <23296092.post@talk.nabble.com> <14af40510904292258w21568f06k6c06371905e71e70@mail.gmail.com> <23311291.post@talk.nabble.com> <14af40510904302252k2a6df5e9we1011a7e94b66554@mail.gmail.com> Date: Sat, 2 May 2009 14:29:03 +0800 Message-ID: <45f744e40905012329o42df333dn51f2434e6b81641e@mail.gmail.com> Subject: Re: How to get a ConnectionFactory into JNDI? From: Ivan To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=0016e6476e729822c10468e80b06 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6476e729822c10468e80b06 Content-Type: text/plain; charset=ISO-8859-9 Content-Transfer-Encoding: quoted-printable I just tried it with 2.2 snaphost of 4/14, it works, which version of Geronimo do you use ? 2009/5/1 Ashish Jain > In my opinion your Object o should be QueueConnectionFactory. can you tr= y > the following > Context initctx =3D new InitialContext(); > QueueConnectionFactory o=3D (QueueConnectionFactory) > initctx.lookup("java:comp/env/wmq/ConnectionFactory"); > > Thanks > Ashish > > > On Thu, Apr 30, 2009 at 1:26 PM, Juergen Weber wrote: > >> >> It's Object o; >> >> >> Ashish Jain-5 wrote: >> > >> > 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 ge= t >> 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.j= ava:171) >> >> at >> >> >> >> >> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.j= ava:625) >> >> at >> >> >> >> >> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.j= ava:162) >> >> at >> >> >> >> >> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.j= ava:625) >> >> at >> >> >> >> >> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.j= ava:162) >> >> at >> >> >> >> >> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.j= ava:611) >> >> at javax.naming.InitialContext.lookup(InitialContext.java:392) >> >> at >> >> >> 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: >> >> >> >> >> >> 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--tp232960= 92s134p23296092.html >> >> Sent from the Apache Geronimo - Users mailing list archive at >> Nabble.com. >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/How-to-get-a-ConnectionFactory-into-JNDI--tp232960= 92s134p23311291.html >> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com= . >> >> > --=20 Ivan --0016e6476e729822c10468e80b06 Content-Type: text/html; charset=ISO-8859-9 Content-Transfer-Encoding: quoted-printable I just tried it with 2.2 snaphost of 4/14, it works, which version of Geron= imo do you use ?

2009/5/1 Ashish Jain <ashjain2@gmail.com= >
In my opinion your Object o should be Queue= ConnectionFactory. can you=A0 try the following
Context initctx =3D new = InitialContext();
=A0=A0=A0 =A0=A0=A0 QueueConnectionFactory o=3D (QueueConnectionFactory) in= itctx.lookup("java:comp/env/wmq/ConnectionFactory");

Thanks
Ashish


On Thu, Apr 30, 2009 at 1:26 P= M, Juergen Weber <weberjn@gmail.com> wrote:

It's Object o;


Ashish Jain-5 wrote:
>
> 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?<= br> >>
>> Thanks,
>> Juergen
>>
>>
>> Caused by: javax.naming.NotContextException: wmq/ConnectionFactory=
>> =A0 =A0 =A0 =A0at
>>
>> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractCon= text.java:171)
>> =A0 =A0 =A0 =A0at
>>
>> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractCon= text.java:625)
>> =A0 =A0 =A0 =A0at
>>
>> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractCon= text.java:162)
>> =A0 =A0 =A0 =A0at
>>
>> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractCon= text.java:625)
>> =A0 =A0 =A0 =A0at
>>
>> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractCon= text.java:162)
>> =A0 =A0 =A0 =A0at
>>
>> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractCon= text.java:611)
>> =A0 =A0 =A0 =A0at javax.naming.InitialContext.lookup(InitialContex= t.java:392)
>> =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&quo= t;);
>>
>> 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/ConnectionFacto= ry</ref-name>
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<resource-link>wmqConnectionF= actory</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.QueueConnectionF= actory</conn:connectionfactory-interface>
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<conn:connectiondefinition-insta= nce>
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<conn:name>wm= qConnectionFactory</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<= /a>
>> Sent from the Apache Geronimo - Users mailing list archive at Nabb= le.com.
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/How-to-get-a-ConnectionFactory-into-JNDI--tp232960= 92s134p23311291.html
Sent from the Apache Geronimo - Users mailing l= ist archive at Nabble.com.





--
Ivan
--0016e6476e729822c10468e80b06--