[webbeans-dev] Spec Conflicts Between JSR-299, JSR-318
pmuir at redhat.com
pmuir at redhat.com
Wed Mar 18 08:42:37 EDT 2009
I talked to andrew about this, and my understanding of his argument is
around
--
Pete Muir
http://in.relation.to/Bloggers/Pete
On 18 Mar 2009, at 05:11, Andrew Lee Rubinger <alr at jboss.org> wrote:
> Hi guys.
>
> In discussing WebBeans/EJB integration with Pete this week we came
> across a few issues I'd like to hash out.
>
> *Guiding Principles*
>
> The points below are based on my view of the following bullets; please
> correct if they're inaccurate.
>
> * JSR-299 implementations are treated the same as any client of EJB;
> they use/consume EJB as one of the target component models.
> * A mechanism EJB makes available to JSR-299 should be available to
> everyone.
>
> ----
>
> 1) EJB does not define an endpoint for SFSB removal outside
> business/component method @Remove/remove() and timeout
>
> JSR-299 PR2 6.5 - "When the destroy() method is called, the container
> removes the stateful session bean. The @PreDestroy callback must be
> invoked by the container."
>
> JSR-318 PFD2 4.6 - "When the client calls a business method of the
> bean that has been designated as a Remove method, or a remove method
> on the home or component interface, the container invokes PreDestroy
> lifecycle callback interceptor method(s) (if any) for the bean
> instance after the
> Remove method completes."
>
> JSR-299 is declaring that "destroy" on a contextual object will
> invoke a removeal path not defined by EJB.
>
> ----
>
> 2) JSR-299 defines activity in the middle of EJB Lifecycle
>
> JSR-299 PR2 6.11 - "When the EJB container creates a new instance of
> an EJB, the container must perform the following steps after Java EE
> injection has been performed and before the @PostConstruct callback
> occurs..."
>
> EJB defines no callback mechanism for a hypothetical
> @PostInstanciated before @PostConstruct. Thus there's no hook
> defined for WB to do its magic.
>
> ----
>
> I'd like to open up discussion on either adding these points to EJB
> 3.1 (a bit late in the game) or revising the JSR-299 spec such that
> it doesn't impose upon EJB.
>
> Either way, as I've committed to Pete, I'll be taking on the EJB/WB
> integration bits. But I do want to ensure the lines are properly
> drawn. If properly scoped, we should have to alter no code under
> the EJB3 components to support WB.
>
> S,
> ALR
>
> --
> Andrew Lee Rubinger
> Sr. Software Engineer
> JBoss, a division of Red Hat, Inc.
> http://exitcondition.alrubinger.com
>
> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev
More information about the weld-dev
mailing list