1. The definition below in the SessionBean is an extendsion of OpenEJB, you
might also find that @XmlTransisent is used in that field.  In current EJB
3.1 spec, the callback methods are not applied to afterBegin/.../..., but
those methods are of lifecyclecallback for transaction, it will allow the
users to use those annotations in the intercept classes.
   @XmlTransient
    private List<LifecycleCallback> afterBegin;
2. If the stateful session could NOT use SessionSynchronization interface
and session annotation at the same time, you could find it in the Spec 4.3.7
3. For how to do when afterBegin/../... are configured in the deployment
descriptor and session bean also implements SessionSynchronization
interface, current codes do NOT allow it. I also do not find any word in the
spec. But from the descrption of Timeout method, if they are used both,
those methods in the interface must be used in the deployment descriptor.
So, I think that current way is reasonable, or we might check if the same
methods are configured, let it pass :-)

2010/7/28 Karan Malhi <[email protected]>

> Another question, if a Stateful Session bean implements the SessionBean
> interface, is it  allowed to use the session synchronization annotations?
> As
> of now I am assuming yes because i could not see anywhere in the spec where
> this was prohibited.
>
> Also, is the usage of @PostConstruct valid on the ejbCreate() method of a
> Stateless session bean which implements the SessionBean interface?
>
> On Mon, Jul 26, 2010 at 2:05 PM, Karan Malhi <[email protected]>
> wrote:
>
> > Also, regarding StatefulBean implementing SessionSynchronization, the
> spec
> > says "A stateful session bean class may use either the
> > javax.ejb.SessionSynchronization interface OR the
> > session synchronization annotations, but not both". It also states that
> > "The deployment descriptor may also be used to declare the individual
> > session synchronization methods".
> >
> > What if I have a Stateful bean which implements SessionSynchronization
> AND
> > also configure synchronization methods in deployment descriptor. The spec
> is
> > not clear in this part.
> >
> >
> >
> > On Mon, Jul 26, 2010 at 1:51 PM, Karan Malhi <[email protected]
> >wrote:
> >
> >> In org.apache.openejb.jee.SessionBean, what is the difference between
> teh
> >> getAfterBegin() and getAfterBeginMethod() methods. According to the
> schema,
> >> the getAfterBeginMethod() makes sense, not sure what the getAfterBegin()
> is
> >> for. Same is the case with beforeCompletion and afterCompletion.
> >>
> >> --
> >> Karan Singh Malhi
> >>
> >
> >
> >
> > --
> > Karan Singh Malhi
> >
>
>
>
> --
> Karan Singh Malhi
>



-- 
Ivan

Reply via email to