You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2012/07/19 08:52:30 UTC

Owb jsf?

Hi,

Anyone tried to replace our openejb-openwebbeans-jsf and openejb-jsf by
openwebbeans-jsf recently?

Wonder if we still need it.

Could be nice to avoid it.

- Romain

Re: Owb jsf?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
another difference is we are providing the webbeanscontext since
webbeanscontext.currentinstance() was not always working but since i hacked
on it i don't know if it is still true (we don't use the classloader only
for several reason)

- Romain


2012/7/19 Romain Manni-Bucau <rm...@gmail.com>

> i was thinking to something like that but was expecting some feedback
>
> i'll have a look
>
> - Romain
>
>
>
> 2012/7/19 Mark Struberg <st...@yahoo.de>
>
>> I now looked at OpenEJBs CustomApplicationFactory and the only thing it
>> does different to the OWB impl is to check in the AppContext if CDI should
>> be used at all.
>>
>> The same functionality could be provided much easier by simply skipping
>> all the CDI initialisation and startup if it should not be used in the
>> OpenEJBLifecycle.
>>
>> That way you would not need to tweak anything for JSF integration at all.
>>
>>
>> LieGrue,
>> strub
>>
>>
>>
>> ----- Original Message -----
>> > From: Mark Struberg <st...@yahoo.de>
>> > To: "dev@openejb.apache.org" <de...@openejb.apache.org>
>> > Cc:
>> > Sent: Thursday, July 19, 2012 3:04 PM
>> > Subject: Re: Owb jsf?
>> >
>> > Hi!
>> >
>> > Please let me first explain what we do in webbeans-jsf.
>> >
>> >
>> > First, it obviously contains all the JSF-2 functionality as we like to
>> keep the
>> > OWB core (webbeans-impl) independent of any other spec. OWB core only
>> contains
>> > core EE APIs like cdi, atinject and interceptors. No JSF, no JPA, no
>> EJB, etc.
>> >
>> >
>> > The are two functions we need to integrate within the JSF container,
>> both of are
>> > enabled via a faces-config.xml in the webbeans-jsf module:
>> >
>> > 1.) the Conversation handling is done via a PhaseListener + ViewHandler.
>> > That's pretty straight forward and I don't think that it has anything to
>> > do with EJB. So I see no need that this functionality gets touched by
>> OpenEJB.
>> >
>> > 2.) the CDI spec defines in " 11.3.16. Wrapping a Unified EL
>> > ExpressionFactory" + " 6.4.3. Dependent pseudo-scope and Unified
>> > EL" that @Dependent beans used in EL expressions are valid for all the
>> > expression and only get destroyed after the expression got evaluated.
>> We provide
>> > this via Wrapping the JSF Application which registers the wrapped
>> > ExpressionFactory and we also add our own WebBeansELResolver.
>> >
>> > I'm not sure which parts of the tricks above you need to avoid.
>> Providing
>> > additional mechanism on top should rather be provided by simply
>> registering an
>> > own Wrapper for those parts imo.
>> >
>> > LieGrue,
>> > strub
>> >
>> > ----- Original Message -----
>> >>  From: Romain Manni-Bucau <rm...@gmail.com>
>> >>  To: "dev@openejb.apache.org" <de...@openejb.apache.org>
>> >>  Cc:
>> >>  Sent: Thursday, July 19, 2012 8:52 AM
>> >>  Subject: Owb jsf?
>> >>
>> >>  Hi,
>> >>
>> >>  Anyone tried to replace our openejb-openwebbeans-jsf and openejb-jsf
>> by
>> >>  openwebbeans-jsf recently?
>> >>
>> >>  Wonder if we still need it.
>> >>
>> >>  Could be nice to avoid it.
>> >>
>> >>  - Romain
>> >>
>> >
>>
>
>

Re: Owb jsf?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
i was thinking to something like that but was expecting some feedback

i'll have a look

- Romain


2012/7/19 Mark Struberg <st...@yahoo.de>

> I now looked at OpenEJBs CustomApplicationFactory and the only thing it
> does different to the OWB impl is to check in the AppContext if CDI should
> be used at all.
>
> The same functionality could be provided much easier by simply skipping
> all the CDI initialisation and startup if it should not be used in the
> OpenEJBLifecycle.
>
> That way you would not need to tweak anything for JSF integration at all.
>
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
> > From: Mark Struberg <st...@yahoo.de>
> > To: "dev@openejb.apache.org" <de...@openejb.apache.org>
> > Cc:
> > Sent: Thursday, July 19, 2012 3:04 PM
> > Subject: Re: Owb jsf?
> >
> > Hi!
> >
> > Please let me first explain what we do in webbeans-jsf.
> >
> >
> > First, it obviously contains all the JSF-2 functionality as we like to
> keep the
> > OWB core (webbeans-impl) independent of any other spec. OWB core only
> contains
> > core EE APIs like cdi, atinject and interceptors. No JSF, no JPA, no
> EJB, etc.
> >
> >
> > The are two functions we need to integrate within the JSF container,
> both of are
> > enabled via a faces-config.xml in the webbeans-jsf module:
> >
> > 1.) the Conversation handling is done via a PhaseListener + ViewHandler.
> > That's pretty straight forward and I don't think that it has anything to
> > do with EJB. So I see no need that this functionality gets touched by
> OpenEJB.
> >
> > 2.) the CDI spec defines in " 11.3.16. Wrapping a Unified EL
> > ExpressionFactory" + " 6.4.3. Dependent pseudo-scope and Unified
> > EL" that @Dependent beans used in EL expressions are valid for all the
> > expression and only get destroyed after the expression got evaluated. We
> provide
> > this via Wrapping the JSF Application which registers the wrapped
> > ExpressionFactory and we also add our own WebBeansELResolver.
> >
> > I'm not sure which parts of the tricks above you need to avoid. Providing
> > additional mechanism on top should rather be provided by simply
> registering an
> > own Wrapper for those parts imo.
> >
> > LieGrue,
> > strub
> >
> > ----- Original Message -----
> >>  From: Romain Manni-Bucau <rm...@gmail.com>
> >>  To: "dev@openejb.apache.org" <de...@openejb.apache.org>
> >>  Cc:
> >>  Sent: Thursday, July 19, 2012 8:52 AM
> >>  Subject: Owb jsf?
> >>
> >>  Hi,
> >>
> >>  Anyone tried to replace our openejb-openwebbeans-jsf and openejb-jsf by
> >>  openwebbeans-jsf recently?
> >>
> >>  Wonder if we still need it.
> >>
> >>  Could be nice to avoid it.
> >>
> >>  - Romain
> >>
> >
>

Re: Owb jsf?

Posted by Mark Struberg <st...@yahoo.de>.
I now looked at OpenEJBs CustomApplicationFactory and the only thing it does different to the OWB impl is to check in the AppContext if CDI should be used at all.

The same functionality could be provided much easier by simply skipping all the CDI initialisation and startup if it should not be used in the OpenEJBLifecycle. 

That way you would not need to tweak anything for JSF integration at all.


LieGrue,
strub



----- Original Message -----
> From: Mark Struberg <st...@yahoo.de>
> To: "dev@openejb.apache.org" <de...@openejb.apache.org>
> Cc: 
> Sent: Thursday, July 19, 2012 3:04 PM
> Subject: Re: Owb jsf?
> 
> Hi!
> 
> Please let me first explain what we do in webbeans-jsf. 
> 
> 
> First, it obviously contains all the JSF-2 functionality as we like to keep the 
> OWB core (webbeans-impl) independent of any other spec. OWB core only contains 
> core EE APIs like cdi, atinject and interceptors. No JSF, no JPA, no EJB, etc. 
> 
> 
> The are two functions we need to integrate within the JSF container, both of are 
> enabled via a faces-config.xml in the webbeans-jsf module:
> 
> 1.) the Conversation handling is done via a PhaseListener + ViewHandler. 
> That's pretty straight forward and I don't think that it has anything to 
> do with EJB. So I see no need that this functionality gets touched by OpenEJB.
> 
> 2.) the CDI spec defines in " 11.3.16. Wrapping a Unified EL 
> ExpressionFactory" + " 6.4.3. Dependent pseudo-scope and Unified 
> EL" that @Dependent beans used in EL expressions are valid for all the 
> expression and only get destroyed after the expression got evaluated. We provide 
> this via Wrapping the JSF Application which registers the wrapped 
> ExpressionFactory and we also add our own WebBeansELResolver.
> 
> I'm not sure which parts of the tricks above you need to avoid. Providing 
> additional mechanism on top should rather be provided by simply registering an 
> own Wrapper for those parts imo.
> 
> LieGrue,
> strub
> 
> ----- Original Message -----
>>  From: Romain Manni-Bucau <rm...@gmail.com>
>>  To: "dev@openejb.apache.org" <de...@openejb.apache.org>
>>  Cc: 
>>  Sent: Thursday, July 19, 2012 8:52 AM
>>  Subject: Owb jsf?
>> 
>>  Hi,
>> 
>>  Anyone tried to replace our openejb-openwebbeans-jsf and openejb-jsf by
>>  openwebbeans-jsf recently?
>> 
>>  Wonder if we still need it.
>> 
>>  Could be nice to avoid it.
>> 
>>  - Romain
>> 
> 

Re: Owb jsf?

Posted by Mark Struberg <st...@yahoo.de>.
Hi!

Please let me first explain what we do in webbeans-jsf. 


First, it obviously contains all the JSF-2 functionality as we like to keep the OWB core (webbeans-impl) independent of any other spec. OWB core only contains core EE APIs like cdi, atinject and interceptors. No JSF, no JPA, no EJB, etc. 


The are two functions we need to integrate within the JSF container, both of are enabled via a faces-config.xml in the webbeans-jsf module:

1.) the Conversation handling is done via a PhaseListener + ViewHandler. That's pretty straight forward and I don't think that it has anything to do with EJB. So I see no need that this functionality gets touched by OpenEJB.

2.) the CDI spec defines in " 11.3.16. Wrapping a Unified EL ExpressionFactory" + " 6.4.3. Dependent pseudo-scope and Unified EL" that @Dependent beans used in EL expressions are valid for all the expression and only get destroyed after the expression got evaluated. We provide this via Wrapping the JSF Application which registers the wrapped ExpressionFactory and we also add our own WebBeansELResolver.

I'm not sure which parts of the tricks above you need to avoid. Providing additional mechanism on top should rather be provided by simply registering an own Wrapper for those parts imo.

LieGrue,
strub

----- Original Message -----
> From: Romain Manni-Bucau <rm...@gmail.com>
> To: "dev@openejb.apache.org" <de...@openejb.apache.org>
> Cc: 
> Sent: Thursday, July 19, 2012 8:52 AM
> Subject: Owb jsf?
> 
> Hi,
> 
> Anyone tried to replace our openejb-openwebbeans-jsf and openejb-jsf by
> openwebbeans-jsf recently?
> 
> Wonder if we still need it.
> 
> Could be nice to avoid it.
> 
> - Romain
>