Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 41286 invoked from network); 4 May 2010 21:54:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 May 2010 21:54:07 -0000 Received: (qmail 46364 invoked by uid 500); 4 May 2010 21:54:06 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 46257 invoked by uid 500); 4 May 2010 21:54:06 -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 46250 invoked by uid 99); 4 May 2010 21:54:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 21:54:06 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Cristian.Botiza@endava.com designates 194.126.146.10 as permitted sender) Received: from [194.126.146.10] (HELO smtp.ro.endava.com) (194.126.146.10) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 21:53:58 +0000 Received: from rocjexm01.endava.net ([192.168.115.6]) by rocjexm01.endava.net ([192.168.115.6]) with mapi; Wed, 5 May 2010 00:53:37 +0300 From: Cristian Botiza To: "user@geronimo.apache.org" Date: Wed, 5 May 2010 00:51:26 +0300 Subject: RE: Question on @EJB and JNDI lookup Thread-Topic: Question on @EJB and JNDI lookup Thread-Index: Acrrqn3p1s3vl4gCRqWYJM970fnSVwAKXPOY Message-ID: <0669EB61C3BF9143AF3D7BE84DF29B5202D9770CEA@rocjexm01.endava.net> References: <0669EB61C3BF9143AF3D7BE84DF29B5202D9770CE9@rocjexm01.endava.net>,<431B420E-AF7C-4DC0-9D01-22F824C9C1F6@yahoo.com> In-Reply-To: <431B420E-AF7C-4DC0-9D01-22F824C9C1F6@yahoo.com> Accept-Language: en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_0669EB61C3BF9143AF3D7BE84DF29B5202D9770CEArocjexm01enda_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_0669EB61C3BF9143AF3D7BE84DF29B5202D9770CEArocjexm01enda_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Yes, local interfaces. Just that I'm using the interface name '...Local' when calling JNDI. By the way, CXF is deployed standalone, I added the JARs in the repository.= This may explain the issue. However, my question is about servlets (the plain old servlets) and @EJB an= notation. Could the injected EJB object (proxy) be undeployed? Many thanks ________________________________ From: David Jencks [david_jencks@yahoo.com] Sent: 04 May 2010 19:54 To: user@geronimo.apache.org Subject: Re: Question on @EJB and JNDI lookup I'd need more details to understand what might be going on here. If you ar= e using POJO web services under the cxf that is installed in geronimo and l= ooking the ejb up in java:comp/env.... then the two approaches should work = identically. I'm also assuming that the ejb is running in the same geronim= o instance and you are using local interfaces (although this should not aff= ect anything). david jencks On May 4, 2010, at 2:09 AM, Cristian Botiza wrote: Hi all. I had an issue with calling EJBs (stateless) from the web layer. In the web layer I was using CXF and doing an explicit JNDI lookup to retri= eve the stateless EJB instance (proxy, to be more precise). The issue was t= hat those EJB references were retrieved only once when CXF services were st= arted. After some heavy load on the server, at some point the EJB call fail= ed with message: Bean '...' was undeployed. I assumed this is as designed and didn't try to fix it. However, to avoid it I replaced CXF with plain old servlet and in the servl= et class I used @EJB to inject the EJB instances. Everything works fine so = far but I wanted to make sure I did the right thing. Is it possible that I = run in the same issue with this approach? As I understand it, Geronimo will= inject one instance in each servlet instance (and there will be only one s= ervlet instance by default) - this is by the specs. Does Geronimo (OpenEJB)= take care of circumstances when the EJB is 'undeployed'? Will it inject a = fresh instance? Thanks! Answers much appreciated. ________________________________ The information in this email is confidential and may be legally privileged= . It is intended solely for the addressee. Any opinions expressed are mine = and do not necessarily represent the opinions of the Company. Emails are su= sceptible to interference. If you are not the intended recipient, any discl= osure, copying, distribution or any action taken or omitted to be taken in = reliance on it, is strictly prohibited and may be unlawful. If you have rec= eived this message in error, do not open any attachments but please notify = the EndavaIT Service Desk on (+44 (0)870 423 0187), and delete this message= from your system. The sender accepts no responsibility for information, er= rors or omissions in this email, or for its use or misuse, or for any act c= ommitted or omitted in connection with this communication. If in doubt, ple= ase verify the authenticity of the contents with the sender. Please rely on= your own virus checkers as no responsibility is taken by the sender for an= y damage rising out of any bug or virus infection. Endava Limited is a company registered in England under company number 5722= 669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, U= nited Kingdom. Endava Limited is the Endava group holding company and does = not provide any services to clients. Each of Endava Limited and its subsidi= aries is a separate legal entity and has no liability for another such enti= ty's acts or omissions. Please refer to the =93Legal=94 section on our webs= ite for a list of legal entities. --_000_0669EB61C3BF9143AF3D7BE84DF29B5202D9770CEArocjexm01enda_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Yes, lo= cal interfaces.
Just that I'm using the i= nterface name '...Local' when calling JNDI.
By the way, CXF is deploy= ed standalone, I added the JARs in the repository. This may explain the iss= ue.
However, my question is a= bout servlets (the plain old servlets) and @EJB annotation. Could the injec= ted EJB object (proxy) be undeployed?
 
Many thanks

From: David Jencks [david_jencks@ya= hoo.com]
Sent: 04 May 2010 19:54
To: user@geronimo.apache.org
Subject: Re: Question on @EJB and JNDI lookup

I'd need more details to understand what might be going on here.  = ;If you are using POJO web services under the cxf that is installed in gero= nimo and looking the ejb up in java:comp/env.... then the two approaches sh= ould work identically.  I'm also assuming that the ejb is running in the same geronimo instance and you are using lo= cal interfaces (although this should not affect anything).

david jencks

On May 4, 2010, at 2:09 AM, Cristian Botiza wrote:

Hi all.=
 
I had an issue with calli= ng EJBs (stateless) from the web layer.
In the web layer I was us= ing CXF and doing an explicit JNDI lookup to retrieve the stateless EJB ins= tance (proxy, to be more precise). The issue was that those EJB references = were retrieved only once when CXF services were started. After some heavy load on the server, at some point the EJB c= all failed with message:
 
Bean '...' was undeployed= .
 
I assumed this is as desi= gned and didn't try to fix it.
 
However, to avoid it I re= placed CXF with plain old servlet and in the servlet class I used @EJB to i= nject the EJB instances. Everything works fine so far but I wanted to make = sure I did the right thing. Is it possible that I run in the same issue with this approach? As I understand it, Geron= imo will inject one instance in each servlet instance (and there will be on= ly one servlet instance by default) - this is by the specs. Does Geronimo (= OpenEJB) take care of circumstances when the EJB is 'undeployed'? Will it inject a fresh instance?
 
Thanks! Answers much appr= eciated.


The information in this e= mail is confidential and may be legally privileged. It is intended solely f= or the addressee. Any opinions expressed are mine and do not necessarily re= present the opinions of the Company. Emails are susceptible to interference. If you are not the intended recipient, an= y disclosure, copying, distribution or any action taken or omitted to be ta= ken in reliance on it, is strictly prohibited and may be unlawful. If you h= ave received this message in error, do not open any attachments but please notify the EndavaIT Service Desk on= (+44 (0)870 423 0187), and delete this message from your system. The s= ender accepts no responsibility for information, errors or omissions in thi= s email, or for its use or misuse, or for any act committed or omitted in connection with this communication. If= in doubt, please verify the authenticity of the contents with the sender. = Please rely on your own virus checkers as no responsibility is taken by the= sender for any damage rising out of any bug or virus infection.

Endava Limited is a company registered in England under company number 5722= 669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, U= nited Kingdom. Endava Limited is the Endava group holding company and does = not provide any services to clients. Each of Endava Limited and its subsidiaries is a separate legal entity and= has no liability for another such entity's acts or omissions. Please refer= to the =93Legal=94 section on our website for a list of legal entities.

--_000_0669EB61C3BF9143AF3D7BE84DF29B5202D9770CEArocjexm01enda_--