Return-Path: X-Original-To: apmail-openwebbeans-user-archive@www.apache.org Delivered-To: apmail-openwebbeans-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BBD9B112F6 for ; Fri, 15 Aug 2014 16:59:56 +0000 (UTC) Received: (qmail 15508 invoked by uid 500); 15 Aug 2014 16:59:56 -0000 Delivered-To: apmail-openwebbeans-user-archive@openwebbeans.apache.org Received: (qmail 15481 invoked by uid 500); 15 Aug 2014 16:59:56 -0000 Mailing-List: contact user-help@openwebbeans.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@openwebbeans.apache.org Delivered-To: mailing list user@openwebbeans.apache.org Received: (qmail 15471 invoked by uid 99); 15 Aug 2014 16:59:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2014 16:59:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of itsmeden@gmail.com designates 209.85.216.49 as permitted sender) Received: from [209.85.216.49] (HELO mail-qa0-f49.google.com) (209.85.216.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2014 16:59:51 +0000 Received: by mail-qa0-f49.google.com with SMTP id dc16so2191951qab.8 for ; Fri, 15 Aug 2014 09:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=cUlED8XJdO8wvdHQ4KVnJmaSanO6w8tz1zwgAthl9qY=; b=nbHmcmqRsR0MurWrWWVNAUJHb4DqFaFJtj9hLBUCm3ami4ppHAy1XmFHthXZSqWDmT DaN/5GJIxYzkGd5kZ2/YTXMtlVrchFIeZC053U5u7Th8DLPUMnyFyCLj2O551SafNyd8 ROXNsn3bQNg4UjZQdM9yC07Enitgx3v2+T2GzCW7bNRLVQEFUm2sjWCmOQE5SOxYKePK /GPg/WhTHjHejm5X9hB7JcnwblpDIDOliI4edX/NxSHes1B/+qNYayz7++arnrXLXGC5 Cu0uM1AX3SUjH75h3/6ldXM9EnE9qbdBuf4q47SpoWg7dtlstu7AiQBpK4rAmydRJ1C4 kEAw== X-Received: by 10.224.88.3 with SMTP id y3mr29798156qal.65.1408121967813; Fri, 15 Aug 2014 09:59:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.83.138 with HTTP; Fri, 15 Aug 2014 09:59:07 -0700 (PDT) In-Reply-To: References: From: Lars-Fredrik Smedberg Date: Fri, 15 Aug 2014 18:59:07 +0200 Message-ID: Subject: Re: Questions on sevice implementation bean and handler life cycle To: "user@openwebbeans.apache.org" Content-Type: multipart/alternative; boundary=001a11c3dbbcb1b6e60500adf1db X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3dbbcb1b6e60500adf1db Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks Joseph, will take a look at the link. Also JSR109 also states that a JAX WS WebService can be either a Java class, a stateless EJB or a singleton EJB (I missed that before when looking) so please ignore the questions asked about a statefull JAX-WS WebService I asked before today :) Regards Lars-Fredrik On Fri, Aug 15, 2014 at 5:19 PM, Joseph Bergmark wrote= : > Unfortunately I can only provide some educated guesses. I would guess > that there would be different pooling mechanisms used for EJB vs. non-EJB > web services, as I would guess that the EJB based ones would be handled b= y > the EJB container's pooling mechanism. > > For question about configuring JAX-WS and the EJB container in WebSphere = I > would suggest asking on the wasdev forums. That said a quick search lead > me to: > > http://www-01.ibm.com/support/knowledgecenter/api/content/SSEQTP_8.5.5/co= m.ibm.websphere.base.iseries.doc/ae/rejb_ecnt.html#rejbecnt__rejb_ecnt1 > > > > On Fri, Aug 15, 2014 at 10:03 AM, Lars-Fredrik Smedberg < > itsmeden@gmail.com> wrote: > >> Hi Joseph >> >> Thanks for your answer. >> >> Do you know if the pooling of service implementation bean instances are >> different between web service that is not EJBs (not annotated with >> @Stateless) and those who are? That is if the pooling done by CXF for >> service implementation beans differ from the stateless bean pooling in >> WebSphere? >> >> Do you have any references to configure the pools CXF creates and/or the >> ones WebSphere uses for pooling of stateless EJBs? >> >> Thanks >> Lars-Fredrik >> >> >> On Fri, Aug 15, 2014 at 3:39 PM, Joseph Bergmark >> wrote: >> >>> I don't know much about the details of JSR 109 and JSR 224. >>> >>> That said I would not expect annotating a stateful EJB with >>> @RequestScoped is not going to change how non-contexual references to t= hat >>> bean are managed from a lifecycle perspective. Unless the JAX-WS >>> implementation is obtaining a reference from the CDI container I would = not >>> expect any lifecycle changes. >>> >>> >>> On Fri, Aug 15, 2014 at 9:16 AM, Lars-Fredrik Smedberg < >>> itsmeden@gmail.com> wrote: >>> >>>> *Hi* >>>> >>>> I'm not sure if this is the right group for the following questions...= . >>>> I also posted it to the CXF user group. Any ideas/answers to any of th= e >>>> following questions would be greatly appreciated! >>>> >>>> >>>> >>>> I find nothing about the* life cycle of a service implementation bean*= in >>>> JSR181 and JSR224, the only reference there is to the lifecycle callba= ck >>>> methods (@PostConstruct and @PreDestroy). >>>> >>>> I can find information on the life cycle in* JSR109 in chapter "5.3.4 >>>> Service Implementation Bean Life Cycle".* >>>> >>>> *I have a few questions on 5.3.4* >>>> >>>> - Is it correct that the container / CXF can create any number (a pool= ) >>>> of service implementation bean instances? The spec say "A container ma= y >>>> pool method ready instances of a Service Implementation Bean and dispa= tch a >>>> method >>>> request on any instance in a method ready state." >>>> - Is it correct that any given instance in the pool only can receive >>>> one request at a time (why would it otherwise need the pool?) >>>> - What is the min/max/other characteristics of this pool in CXF? Can i= t >>>> be configured? >>>> >>>> For *JSR109 in 6.2.2.2 Handler Life Cycle with JAX-WS *I also have a >>>> few questions >>>> >>>> - The spec say "Pooling of Handler instances is allowed, but is not >>>> required.". Does CXF pool handler instances? >>>> - The spec say "If Handler instances are pooled, they must be pooled b= y >>>> Port component.". If CXF pool handler instances I assume they are pool= ed >>>> per SEI? >>>> - Can a given Handler instance receive multiple concurrent calls? I >>>> assume that it cannot if its pooled and can if its not pooled? However= the >>>> spec is not very clear here so any input would be apreciated. >>>> >>>> Questions on the lifecycle* if the service implementations bean is a >>>> stateless EJB* (annotated with @Stateless): >>>> >>>> - I assume that the life cycle now follows the life cycle of a >>>> stateless EJB and that any pooling follows the pool setup for that spe= cific >>>> EJB? >>>> - Will the life cycle of the Handlers still follow JSR109 6.2.2.2? >>>> >>>> Questions on the lifecycle if the *service implementation bean is a >>>> stateful EJB* (annotated with @Stateful) *and is annotated so that the >>>> lifecycle is managed by the CDI container, e.g. @RequestScoped.* >>>> >>>> - I assume that the life cycle now is managed according to the CDI >>>> container life cycle rules? >>>> - Will the life cycle of the Handlers still follow JSR109 6.2.2.2? >>>> >>>> We use WebSphere 8.5.5 and as far as we know it uses CXF 2.6.2. Has >>>> anything changed from 2.6.2. with respect to the above questions? Does >>>> anyone know if IBM has done any WebSphere specific changes to the CXF >>>> bundled? >>>> >>>> Regards >>>> Lars-Fredrik >>>> >>>> -- >>>> Med v=C3=A4nlig h=C3=A4lsning / Best regards >>>> >>>> Lars-Fredrik Smedberg >>>> >>>> STATEMENT OF CONFIDENTIALITY: >>>> The information contained in this electronic message and any >>>> attachments to this message are intended for the exclusive use of the >>>> address(es) and may contain confidential or privileged information. If >>>> you are not the intended recipient, please notify Lars-Fredrik Smedber= g >>>> immediately at itsmeden@gmail.com, and destroy all copies of this >>>> message and any attachments. >>>> >>> >>> >> >> >> -- >> Med v=C3=A4nlig h=C3=A4lsning / Best regards >> >> Lars-Fredrik Smedberg >> >> STATEMENT OF CONFIDENTIALITY: >> The information contained in this electronic message and any >> attachments to this message are intended for the exclusive use of the >> address(es) and may contain confidential or privileged information. If >> you are not the intended recipient, please notify Lars-Fredrik Smedberg >> immediately at itsmeden@gmail.com, and destroy all copies of this >> message and any attachments. >> > > --=20 Med v=C3=A4nlig h=C3=A4lsning / Best regards Lars-Fredrik Smedberg STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the address(es) and may contain confidential or privileged information. If you are not the intended recipient, please notify Lars-Fredrik Smedberg immediately at itsmeden@gmail.com, and destroy all copies of this message and any attachments. --001a11c3dbbcb1b6e60500adf1db Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Joseph, will take a look at the link.

Also JSR109 also states that a JAX WS WebService can be either a Java= class, a stateless EJB or a singleton EJB (I missed that before when looki= ng) so please ignore the questions asked about a statefull JAX-WS WebServic= e I asked before today :)

Regards
Lars-Fredrik


On Fri, Aug 15, 2014 at 5:= 19 PM, Joseph Bergmark <bergmark@gmail.com> wrote:
Unfortunately I can only pr= ovide some educated guesses. =C2=A0I would guess that there would be differ= ent pooling mechanisms used for EJB vs. non-EJB web services, as I would gu= ess that the EJB based ones would be handled by the EJB container's poo= ling mechanism.

For question about configuring JAX-WS and the EJB container = in WebSphere I would suggest asking on the wasdev forums. =C2=A0That said a= quick search lead me to:



On Fri, Aug 15, 2014 = at 10:03 AM, Lars-Fredrik Smedberg <itsmeden@gmail.com> wro= te:
Hi Joseph

Thanks for your answer.=C2=A0

Do you know if the= pooling of service implementation bean instances are different between web= service that is not EJBs (not annotated with @Stateless) and those who are= ? That is if the pooling done by CXF for service implementation beans diffe= r from the stateless bean pooling in WebSphere?

Do you have any references to configure the pools CXF c= reates and/or the ones WebSphere uses for pooling of stateless EJBs?
<= div>
Thanks
Lars-Fredrik


On Fri, Aug 15, 2014 at 3:39 PM, Joseph = Bergmark <bergmark@gmail.com> wrote:
I don't know much about the details of JSR 109 and JSR= 224.

That said I would not expect annotating a stateful= EJB with @RequestScoped is not going to change how non-contexual reference= s to that bean are managed from a lifecycle perspective. =C2=A0Unless the J= AX-WS implementation is obtaining a reference from the CDI container I woul= d not expect any lifecycle changes.


On Fri, Aug 15, 2014 at 9:16 AM, Lars-Fredrik Smedberg <itsmeden@gmail= .com> wrote:
Hi

I'= m not sure if this is the right group for the following questions.... I als= o posted it to the CXF user group. Any ideas/answers to any of the followin= g questions would be greatly appreciated!



I find nothing about the=C2=A0life cycle of a service implementation bea= n=C2=A0in JSR181 and JSR224, the only reference there is to the lifecyc= le callback methods (@PostConstruct and @PreDestroy).

I can = find information on the life cycle in=C2=A0JSR109 in chapter "5.3.4= Service Implementation Bean Life Cycle".=C2=A0

I h= ave a few questions on 5.3.4

- Is it correct that the container / CXF can create any number (a pool) of = service implementation bean instances? The spec say "A container may p= ool method ready instances of a Service Implementation Bean and dispatch a = method
request on any i= nstance in a method ready state."
- Is it correct that any given instance in the = pool only can receive one request at a time (why would it otherwise need th= e pool?)=C2=A0
- What is the mi= n/max/other characteristics of this pool in CXF? Can it be configured?

For=C2=A0JSR109 in 6.2.2.2 Handler Life Cycle with JAX-WS=C2=A0I als= o have a few questions

- The spec say "Pooling of Handler instances is allowed, but is = not required.". Does CXF pool handler instances?
- The spec say &= quot;If Handler instances are pooled, they must be pooled by Port component= .". If CXF pool handler instances I assume they are pooled per SEI?
- Can a given Ha= ndler instance receive multiple concurrent calls? I assume that it cannot i= f its pooled and can if its not pooled? However the spec is not very clear = here so any input would be apreciated.

Questions on the lifec= ycle=C2=A0if the service implementations bean is a stateless EJB=C2= =A0(annotated with @Stateless):

- I assume that the li= fe cycle now follows the life cycle of a stateless EJB and that any pooling= follows the pool setup for that specific EJB?
- Will the life = cycle of the Handlers still follow JSR109 6.2.2.2?

Questions on the lifecycle if the=C2=A0service implementation bean is a = stateful EJB=C2=A0(annotated with @Stateful)=C2=A0and is annotated s= o that the lifecycle is managed by the CDI container, e.g. @RequestScoped.<= /b>

- I as= sume that the life cycle now is managed according to the CDI container life= cycle rules?
- Will the life cycle of the Handlers still follow JSR109 6.2.2.2?

We use WebSphere 8.5.= 5 and as far as we know it uses CXF 2.6.2. Has anything changed from 2.6.2.= with respect to the above questions? Does anyone know if IBM has done any = WebSphere specific changes to the CXF bundled?

Regards=C2=A0
Lars-Fredrik

--
Med v=C3=A4nlig h=C3=A4lsning / Best regards

Lars-Fredr= ik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contain= ed in this electronic message and any
attachments to this message are in= tended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
y= ou are not the intended recipient, please notify Lars-Fredrik Smedberg
i= mmediately at itsme= den@gmail.com, and destroy all copies of this
message and any attachments.=20




--
= Med v=C3=A4nlig h=C3=A4lsning / Best regards

Lars-Fredrik Smedberg
STATEMENT OF CONFIDENTIALITY:
The information contained in this el= ectronic message and any
attachments to this message are intended for the exclusive use of the
ad= dress(es) and may contain confidential or privileged information. If
you= are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsm= eden@gmail.com, and destroy all copies of this
message and any atta= chments.=20




--
= Med v=C3=A4nlig h=C3=A4lsning / Best regards

Lars-Fredrik Smedberg
STATEMENT OF CONFIDENTIALITY:
The information contained in this el= ectronic message and any
attachments to this message are intended for the exclusive use of the
ad= dress(es) and may contain confidential or privileged information. If
you= are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsm= eden@gmail.com, and destroy all copies of this
message and any atta= chments.=20 --001a11c3dbbcb1b6e60500adf1db--