[cdi-dev] Yan:: Re: About ProcessSessionBean<X> Container Lifecycle Event Class

Gurkan Erdogdu gurkanerdogdu at yahoo.com
Tue Jun 14 02:00:28 EDT 2011


This is not so logical. Because, main reason of using the ProcessSessionBean 
event is to observe "Session Bean Class" registration, not the observe for the 
local interfaces. 


Moreover, other methods in the interface hierarchy of "ProcessSessionBean" gets 
<X> into the account, for example 


  AnnotatedType<X> getAnnotatedBeanClass() 
          Returns the AnnotatedType representing  the bean class.

Therefore, it is more convenient to change "ProcessManagedBean getBean"  method  
decleration as

public <T> Bean<T> getBean(); where T is the local/local view interface of the 
session bean.


--Gurkan


________________________________
From: Pete Muir <pmuir at redhat.com>
To: Gurkan Erdogdu <gurkanerdogdu at yahoo.com>
Cc: cdi-dev at lists.jboss.org; marina.vatkina at sun.com; david.blevins at gmail.com; 
cdewolf at redhat.com; jpai at redhat.com
Sent: Tue, June 14, 2011 12:56:01 AM
Subject: Re: Yan:: Re: [cdi-dev] About ProcessSessionBean<X> Container Lifecycle 
Event Class

I talked to Carlo on IRC and we worked out the issue:

ProcessBean<X> offers a method getBean() which returns Bean<X>. Bean<X> has a 
method of type create() which returns an X. If we were to have 
ProcessSessionBean<X> extend ProcessManagedBean<X> then this would imply that 
you can create something of type, which in the case of a session bean is the 
bean class (which can't be created for EJBs with local or remote business 
interfaces). So ProcessSessionBean is correct as is.

Carlo suggested we might want a "ProcessView" event for EJBs which fired for 
each EJB view that was registered.

On 13 Jun 2011, at 19:30, Gurkan Erdogdu wrote:

> Pete i think that this is not related with the local interfaces. 
>ProcessSessionBean event is fired for every X where X is a session bean class
> 
> Pzt, 13 Haz 2011 14:23 EEST tarihinde Pete Muir şöyle yazdı:
> 
>> I'm not actually sure, as X always refers to the bean class, rather than 
>>anything to do with the local interfaces. Any EJB expert (cc'ing Marina, David, 
>>Carlo, Jaikiran :-) able to shed light?
>> 
>> On 13 Jun 2011, at 11:46, Gurkan Erdogdu wrote:
>> 
>>> Hello,
>>> 
>>> In the 1.0 specification, Chapter 11.5.8, ProcessSessionBean<X> container event 
>>>class was defined as
>>> 
>>> public interface ProcessSessionBean<X> extends ProcessManagedBean<Object> {
>>>  public String getEjbName();
>>>   public SessionBeanType getSessionBeanType();
>>> }
>>> 
>>> As I commented in https://issues.jboss.org/browse/CDITCK-215, it  is more 
>>>accurate to define this interface as
>>> 
>>> public interface ProcessSessionBean<X> extends ProcessManagedBean<X>{
>>> ....
>>> }
>>> 
>>> WDYT?
>>> 
>>> --Gurkan Erdogdu
>>> Founder and PMC Chair, Apache OpenWebBeans
>>> _______________________________________________
>>> cdi-dev mailing list
>>> cdi-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/cdi-dev
>> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20110613/51c160c9/attachment.html 


More information about the cdi-dev mailing list