[seam-dev] [weld-dev] startup beans

Denis Forveille denis.forveille at gmail.com
Wed Oct 20 12:41:53 EDT 2010


  The main difference between EJB 3.1 singleton and servlet listener is that the EJB 3.1 solution starts only one component in one 
member of the cluster.. Not the latter.

So there is a difference between "application scope" and "application-as-deployed-in-cluster" scope.
Most of the so-called "ApplicationScope" components are not well named IMHO as there is one component per member in a cluster, not 1 
per application as deployed in a cluster...

We have a complex custom in-house solution for this with seam 2 and jEE5/WebSphere 7 (based on distributed map in WAS)  and we are 
waiting for EJB3.1 and WAS v8 to have an elegant solution for this and we hope that seam 3 will have a solution also

Denis

On 10/20/2010 11:04 AM, Dan Allen wrote:
> On Wed, Oct 20, 2010 at 5:49 AM, Pete Muir <pmuir at redhat.com <mailto:pmuir at redhat.com>> wrote:
>
>     Doing it in the CDI container startup callbacks is not correct as the container is not fully initialised. For Seam 3.0 you
>     will need to use an EJB 3.1 singleton (which provides an application startup callback), or listen to servlet callbacks (we may
>     need to fix the ordering of the Seam servlet listeners outside of JBoss AS/GF). Doing this through events also addresses your
>     "transient startup scope" as you can simply declare your bean dependent, meaning it will be destroyed after the observer
>     invocation is complete.
>
>
> Duh Dan ;) I realized after thinking about this a bit more that that's exactly the purpose of a dependent-scoped observer :) My 
> mind wasn't all there on that one.
> -Dan
>
> -- 
> Dan Allen
> Principal Software Engineer, Red Hat | Author of Seam in Action
> Registered Linux User #231597
>
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
> http://www.google.com/profiles/dan.j.allen
>
>
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev


More information about the seam-dev mailing list