You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Edilmar LISTAS <ed...@intersite.com.br> on 2014/12/02 19:38:13 UTC
Planning the migration from CODI to DeltaSpike
Hi,
I have a web/enterprise app running at this environment:
Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI 1.0.6 + JPA
2.0 + Hibernate 4.2.7.
Now, I have planned migrating from JEE6 to JEE7:
Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final version) + CDI +
DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
I use only ConversationScope from CODI like this:
=========
1) CODE 1:
=========
import
org.apache.myfaces.extensions.cdi.core.api.scope.conversation.ConversationScoped;
...
@ConversationScoped
public class Controller1 implements Serializable {
private @Inject Conversation conversation;
...
public void aPlaceToCloseConversation(ActionEvent event) {
if (conversation != null) {
conversation.close();
conversation = null;
}
}
}
=========
2) CODE 2:
=========
import
org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowContext;
...
@RequestScoped
public class Controller2 implements Serializable {
@Inject WindowContext windowContext;
...
public void aPlaceToCloseAllConversations(ActionEvent event) {
windowContext.closeConversations();
}
}
I didn't find a way to migrate my ConversationScoped to DeltaSpike, just
I found GroupConversations
and ViewScoped. What have I to change in my code for this migration?
Re: Planning the migration from CODI to DeltaSpike
Posted by Gerhard Petracek <ge...@gmail.com>.
in that case yes, however, if you write "full features" it's a bit
ambiguous.
(as you know) it's about the most complete (and provided)
window-detection-mode which allows to use features based on the
window-handling even in edge-cases.
regards,
gerhard
http://www.irian.at
Your JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German
Professional Support for Apache
MyFaces, DeltaSpike and OpenWebBeans
2014-12-28 18:48 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> That's why I wrote 'if you wanted the full features' - means lazy windowId
> dropping, etc.
>
> LieGrue,
> strub
>
>
>
>
>
> > On Saturday, 27 December 2014, 12:51, Gerhard Petracek <
> gerhard.petracek@gmail.com> wrote:
> > > @mark:
> > not with the default mode (which is using DefaultWindowHandler)...
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache
> > MyFaces, DeltaSpike and OpenWebBeans
> >
> >
> >
> >
> > 2014-12-27 0:08 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> >
> >> Well, even with CODI you had to add the javascript lib yourself if you
> >> wanted the full features.
> >>
> >> We now wrapped all the handling into a nice little component which
> takes
> >> care of all things.
> >>
> >> LieGrue,
> >> strub
> >>
> >>
> >>
> >>
> >>
> >> > On Friday, 26 December 2014, 18:06, Gerhard Petracek <
> >> gerhard.petracek@gmail.com> wrote:
> >> > > hi edilmar,
> >> >
> >> > codi did that for you (automatically).
> >> > with deltaspike you need to do it manually (see e.g. [1]).
> >> >
> >> > regards,
> >> > gerhard
> >> >
> >> > [1]
> >> >
> >>
> >
> https://github.com/os890/ee6-ds-demo/blob/master/src/main/webapp/templates/main-template.xhtml#L94
> >> >
> >> > http://www.irian.at
> >> >
> >> > Your JavaEE powerhouse -
> >> > JavaEE Consulting, Development and
> >> > Courses in English and German
> >> >
> >> > Professional Support for Apache
> >> > MyFaces, DeltaSpike and OpenWebBeans
> >> >
> >> >
> >> >
> >> >
> >> > 2014-12-26 17:57 GMT+01:00 Edilmar LISTAS
> > <ed...@intersite.com.br>:
> >> >
> >> >> Hi again,
> >> >>
> >> >> I am migrating to DeltaSpike GroupConversationScoped now but I
> > didn't
> >> >> undertand this part:
> >> >>
> >> >> Therefore, do not forget to add the ds:windowId (xmlns:ds="
> >> >> http://deltaspike.apache.org/jsf") component in case of
> >> >> ClientWindowConfig#CLIENTWINDOW to your page(/template) and
> > ensure that
> >> >> the window-handling works properly (otherwise conversations will
> > not
> >> work
> >> >> correctly). The base principle is similar to CODI-Conversations.
> > CODI
> >> users
> >> >> just have to ensure that they have to add ds:windowId and the
> > names are
> >> >> slightly different.
> >> >>
> >> >> When using CODI I never configured ds:windowId in any place and
> >> >> I really don't know what about this.
> >> >>
> >> >>
> >> >> On 08-12-2014 14:33, Thomas Andraschko wrote:
> >> >>
> >> >>> Hey,
> >> >>>
> >> >>> DeltaSpike is compatible with JEE6 and JEE7 :)
> >> >>>
> >> >>>
> >> >>>
> >> >>> 2014-12-08 18:04 GMT+01:00 Edilmar LISTAS
> >> > <ed...@intersite.com.br>:
> >> >>>
> >> >>> Hi,
> >> >>>>
> >> >>>> Just one more question... is it possible to migrate from
> > CODI to
> >> >>>> DeltaSpike conversations
> >> >>>> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1
> > and CDI/Weld
> >> >>>> 2.1.6?
> >> >>>> Because this
> >> >>>> would be great, because I could change all the
> > controllers to new
> >> > class
> >> >>>> and imports before
> >> >>>> a bigger upgrade to JEE7 and many new libraries that I
> > need to
> >> >>>> test/checkout.
> >> >>>>
> >> >>>>
> >> >>>> On 02-12-2014 16:58, Gerhard Petracek wrote:
> >> >>>>
> >> >>>> hi edilmar,
> >> >>>>>
> >> >>>>> @GroupedConversationScoped is just a new name, but
> > you get the
> >> > same
> >> >>>>> concept
> >> >>>>> as with codi.
> >> >>>>> you can inject GroupedConversation as well as
> >> > GroupedConversationManager
> >> >>>>> to
> >> >>>>> manage conversations (see [1] and e.g. [2]).
> >> >>>>>
> >> >>>>> just fyi:
> >> >>>>> the reset to null isn't needed. with that you
> > just drop the
> >> > injected
> >> >>>>> proxy
> >> >>>>> and not the conversation itself -> #close is
> > enough.
> >> >>>>>
> >> >>>>> regards,
> >> >>>>> gerhard
> >> >>>>>
> >> >>>>> [1]
> >> >>>>>
> > http://deltaspike.apache.org/documentation/jsf.html#__
> >> >>>>> grouped_conversations
> >> >>>>> [2]
> > https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>> http://www.irian.at
> >> >>>>>
> >> >>>>> Your JavaEE powerhouse -
> >> >>>>> JavaEE Consulting, Development and
> >> >>>>> Courses in English and German
> >> >>>>>
> >> >>>>> Professional Support for Apache
> >> >>>>> MyFaces, DeltaSpike and OpenWebBeans
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS
> >> > <ed...@intersite.com.br>:
> >> >>>>>
> >> >>>>> Hi,
> >> >>>>>
> >> >>>>>>
> >> >>>>>> I have a web/enterprise app running at this
> > environment:
> >> >>>>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 +
> > CDI + CODI
> >> > 1.0.6 + JPA
> >> >>>>>> 2.0
> >> >>>>>> + Hibernate 4.2.7.
> >> >>>>>>
> >> >>>>>> Now, I have planned migrating from JEE6 to JEE7:
> >> >>>>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting
> > final
> >> > version) + CDI +
> >> >>>>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
> >> >>>>>>
> >> >>>>>> I use only ConversationScope from CODI like this:
> >> >>>>>>
> >> >>>>>> =========
> >> >>>>>> 1) CODE 1:
> >> >>>>>> =========
> >> >>>>>> import
> >> > org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
> >> >>>>>> ConversationScoped;
> >> >>>>>> ...
> >> >>>>>> @ConversationScoped
> >> >>>>>> public class Controller1 implements Serializable
> > {
> >> >>>>>> private @Inject Conversation conversation;
> >> >>>>>> ...
> >> >>>>>> public void
> > aPlaceToCloseConversation(ActionEvent
> >> > event) {
> >> >>>>>> if (conversation != null) {
> >> >>>>>> conversation.close();
> >> >>>>>> conversation = null;
> >> >>>>>> }
> >> >>>>>> }
> >> >>>>>> }
> >> >>>>>>
> >> >>>>>> =========
> >> >>>>>> 2) CODE 2:
> >> >>>>>> =========
> >> >>>>>> import
> > org.apache.myfaces.extensions.cdi.core.api.scope.
> >> >>>>>> conversation.WindowContext;
> >> >>>>>> ...
> >> >>>>>> @RequestScoped
> >> >>>>>> public class Controller2 implements Serializable
> > {
> >> >>>>>> @Inject WindowContext windowContext;
> >> >>>>>> ...
> >> >>>>>> public void
> > aPlaceToCloseAllConversations(ActionEvent
> >> > event) {
> >> >>>>>> windowContext.closeConversations();
> >> >>>>>> }
> >> >>>>>> }
> >> >>>>>>
> >> >>>>>> I didn't find a way to migrate my
> > ConversationScoped to
> >> > DeltaSpike,
> >> >>>>>> just
> >> >>>>>> I
> >> >>>>>> found GroupConversations
> >> >>>>>> and ViewScoped. What have I to change in my code
> > for this
> >> > migration?
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>
> >> >>>
> >> >>
> >> >
> >>
> >
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Mark Struberg <st...@yahoo.de>.
That's why I wrote 'if you wanted the full features' - means lazy windowId dropping, etc.
LieGrue,
strub
> On Saturday, 27 December 2014, 12:51, Gerhard Petracek <ge...@gmail.com> wrote:
> > @mark:
> not with the default mode (which is using DefaultWindowHandler)...
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
>
>
>
> 2014-12-27 0:08 GMT+01:00 Mark Struberg <st...@yahoo.de>:
>
>> Well, even with CODI you had to add the javascript lib yourself if you
>> wanted the full features.
>>
>> We now wrapped all the handling into a nice little component which takes
>> care of all things.
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>>
>> > On Friday, 26 December 2014, 18:06, Gerhard Petracek <
>> gerhard.petracek@gmail.com> wrote:
>> > > hi edilmar,
>> >
>> > codi did that for you (automatically).
>> > with deltaspike you need to do it manually (see e.g. [1]).
>> >
>> > regards,
>> > gerhard
>> >
>> > [1]
>> >
>>
> https://github.com/os890/ee6-ds-demo/blob/master/src/main/webapp/templates/main-template.xhtml#L94
>> >
>> > http://www.irian.at
>> >
>> > Your JavaEE powerhouse -
>> > JavaEE Consulting, Development and
>> > Courses in English and German
>> >
>> > Professional Support for Apache
>> > MyFaces, DeltaSpike and OpenWebBeans
>> >
>> >
>> >
>> >
>> > 2014-12-26 17:57 GMT+01:00 Edilmar LISTAS
> <ed...@intersite.com.br>:
>> >
>> >> Hi again,
>> >>
>> >> I am migrating to DeltaSpike GroupConversationScoped now but I
> didn't
>> >> undertand this part:
>> >>
>> >> Therefore, do not forget to add the ds:windowId (xmlns:ds="
>> >> http://deltaspike.apache.org/jsf") component in case of
>> >> ClientWindowConfig#CLIENTWINDOW to your page(/template) and
> ensure that
>> >> the window-handling works properly (otherwise conversations will
> not
>> work
>> >> correctly). The base principle is similar to CODI-Conversations.
> CODI
>> users
>> >> just have to ensure that they have to add ds:windowId and the
> names are
>> >> slightly different.
>> >>
>> >> When using CODI I never configured ds:windowId in any place and
>> >> I really don't know what about this.
>> >>
>> >>
>> >> On 08-12-2014 14:33, Thomas Andraschko wrote:
>> >>
>> >>> Hey,
>> >>>
>> >>> DeltaSpike is compatible with JEE6 and JEE7 :)
>> >>>
>> >>>
>> >>>
>> >>> 2014-12-08 18:04 GMT+01:00 Edilmar LISTAS
>> > <ed...@intersite.com.br>:
>> >>>
>> >>> Hi,
>> >>>>
>> >>>> Just one more question... is it possible to migrate from
> CODI to
>> >>>> DeltaSpike conversations
>> >>>> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1
> and CDI/Weld
>> >>>> 2.1.6?
>> >>>> Because this
>> >>>> would be great, because I could change all the
> controllers to new
>> > class
>> >>>> and imports before
>> >>>> a bigger upgrade to JEE7 and many new libraries that I
> need to
>> >>>> test/checkout.
>> >>>>
>> >>>>
>> >>>> On 02-12-2014 16:58, Gerhard Petracek wrote:
>> >>>>
>> >>>> hi edilmar,
>> >>>>>
>> >>>>> @GroupedConversationScoped is just a new name, but
> you get the
>> > same
>> >>>>> concept
>> >>>>> as with codi.
>> >>>>> you can inject GroupedConversation as well as
>> > GroupedConversationManager
>> >>>>> to
>> >>>>> manage conversations (see [1] and e.g. [2]).
>> >>>>>
>> >>>>> just fyi:
>> >>>>> the reset to null isn't needed. with that you
> just drop the
>> > injected
>> >>>>> proxy
>> >>>>> and not the conversation itself -> #close is
> enough.
>> >>>>>
>> >>>>> regards,
>> >>>>> gerhard
>> >>>>>
>> >>>>> [1]
>> >>>>>
> http://deltaspike.apache.org/documentation/jsf.html#__
>> >>>>> grouped_conversations
>> >>>>> [2]
> https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> http://www.irian.at
>> >>>>>
>> >>>>> Your JavaEE powerhouse -
>> >>>>> JavaEE Consulting, Development and
>> >>>>> Courses in English and German
>> >>>>>
>> >>>>> Professional Support for Apache
>> >>>>> MyFaces, DeltaSpike and OpenWebBeans
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS
>> > <ed...@intersite.com.br>:
>> >>>>>
>> >>>>> Hi,
>> >>>>>
>> >>>>>>
>> >>>>>> I have a web/enterprise app running at this
> environment:
>> >>>>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 +
> CDI + CODI
>> > 1.0.6 + JPA
>> >>>>>> 2.0
>> >>>>>> + Hibernate 4.2.7.
>> >>>>>>
>> >>>>>> Now, I have planned migrating from JEE6 to JEE7:
>> >>>>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting
> final
>> > version) + CDI +
>> >>>>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>> >>>>>>
>> >>>>>> I use only ConversationScope from CODI like this:
>> >>>>>>
>> >>>>>> =========
>> >>>>>> 1) CODE 1:
>> >>>>>> =========
>> >>>>>> import
>> > org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
>> >>>>>> ConversationScoped;
>> >>>>>> ...
>> >>>>>> @ConversationScoped
>> >>>>>> public class Controller1 implements Serializable
> {
>> >>>>>> private @Inject Conversation conversation;
>> >>>>>> ...
>> >>>>>> public void
> aPlaceToCloseConversation(ActionEvent
>> > event) {
>> >>>>>> if (conversation != null) {
>> >>>>>> conversation.close();
>> >>>>>> conversation = null;
>> >>>>>> }
>> >>>>>> }
>> >>>>>> }
>> >>>>>>
>> >>>>>> =========
>> >>>>>> 2) CODE 2:
>> >>>>>> =========
>> >>>>>> import
> org.apache.myfaces.extensions.cdi.core.api.scope.
>> >>>>>> conversation.WindowContext;
>> >>>>>> ...
>> >>>>>> @RequestScoped
>> >>>>>> public class Controller2 implements Serializable
> {
>> >>>>>> @Inject WindowContext windowContext;
>> >>>>>> ...
>> >>>>>> public void
> aPlaceToCloseAllConversations(ActionEvent
>> > event) {
>> >>>>>> windowContext.closeConversations();
>> >>>>>> }
>> >>>>>> }
>> >>>>>>
>> >>>>>> I didn't find a way to migrate my
> ConversationScoped to
>> > DeltaSpike,
>> >>>>>> just
>> >>>>>> I
>> >>>>>> found GroupConversations
>> >>>>>> and ViewScoped. What have I to change in my code
> for this
>> > migration?
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>
>> >>>
>> >>
>> >
>>
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Gerhard Petracek <ge...@gmail.com>.
@mark:
not with the default mode (which is using DefaultWindowHandler)...
regards,
gerhard
http://www.irian.at
Your JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German
Professional Support for Apache
MyFaces, DeltaSpike and OpenWebBeans
2014-12-27 0:08 GMT+01:00 Mark Struberg <st...@yahoo.de>:
> Well, even with CODI you had to add the javascript lib yourself if you
> wanted the full features.
>
> We now wrapped all the handling into a nice little component which takes
> care of all things.
>
> LieGrue,
> strub
>
>
>
>
>
> > On Friday, 26 December 2014, 18:06, Gerhard Petracek <
> gerhard.petracek@gmail.com> wrote:
> > > hi edilmar,
> >
> > codi did that for you (automatically).
> > with deltaspike you need to do it manually (see e.g. [1]).
> >
> > regards,
> > gerhard
> >
> > [1]
> >
> https://github.com/os890/ee6-ds-demo/blob/master/src/main/webapp/templates/main-template.xhtml#L94
> >
> > http://www.irian.at
> >
> > Your JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache
> > MyFaces, DeltaSpike and OpenWebBeans
> >
> >
> >
> >
> > 2014-12-26 17:57 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
> >
> >> Hi again,
> >>
> >> I am migrating to DeltaSpike GroupConversationScoped now but I didn't
> >> undertand this part:
> >>
> >> Therefore, do not forget to add the ds:windowId (xmlns:ds="
> >> http://deltaspike.apache.org/jsf") component in case of
> >> ClientWindowConfig#CLIENTWINDOW to your page(/template) and ensure that
> >> the window-handling works properly (otherwise conversations will not
> work
> >> correctly). The base principle is similar to CODI-Conversations. CODI
> users
> >> just have to ensure that they have to add ds:windowId and the names are
> >> slightly different.
> >>
> >> When using CODI I never configured ds:windowId in any place and
> >> I really don't know what about this.
> >>
> >>
> >> On 08-12-2014 14:33, Thomas Andraschko wrote:
> >>
> >>> Hey,
> >>>
> >>> DeltaSpike is compatible with JEE6 and JEE7 :)
> >>>
> >>>
> >>>
> >>> 2014-12-08 18:04 GMT+01:00 Edilmar LISTAS
> > <ed...@intersite.com.br>:
> >>>
> >>> Hi,
> >>>>
> >>>> Just one more question... is it possible to migrate from CODI to
> >>>> DeltaSpike conversations
> >>>> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1 and CDI/Weld
> >>>> 2.1.6?
> >>>> Because this
> >>>> would be great, because I could change all the controllers to new
> > class
> >>>> and imports before
> >>>> a bigger upgrade to JEE7 and many new libraries that I need to
> >>>> test/checkout.
> >>>>
> >>>>
> >>>> On 02-12-2014 16:58, Gerhard Petracek wrote:
> >>>>
> >>>> hi edilmar,
> >>>>>
> >>>>> @GroupedConversationScoped is just a new name, but you get the
> > same
> >>>>> concept
> >>>>> as with codi.
> >>>>> you can inject GroupedConversation as well as
> > GroupedConversationManager
> >>>>> to
> >>>>> manage conversations (see [1] and e.g. [2]).
> >>>>>
> >>>>> just fyi:
> >>>>> the reset to null isn't needed. with that you just drop the
> > injected
> >>>>> proxy
> >>>>> and not the conversation itself -> #close is enough.
> >>>>>
> >>>>> regards,
> >>>>> gerhard
> >>>>>
> >>>>> [1]
> >>>>> http://deltaspike.apache.org/documentation/jsf.html#__
> >>>>> grouped_conversations
> >>>>> [2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
> >>>>>
> >>>>>
> >>>>>
> >>>>> http://www.irian.at
> >>>>>
> >>>>> Your JavaEE powerhouse -
> >>>>> JavaEE Consulting, Development and
> >>>>> Courses in English and German
> >>>>>
> >>>>> Professional Support for Apache
> >>>>> MyFaces, DeltaSpike and OpenWebBeans
> >>>>>
> >>>>>
> >>>>>
> >>>>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS
> > <ed...@intersite.com.br>:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>>>
> >>>>>> I have a web/enterprise app running at this environment:
> >>>>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI
> > 1.0.6 + JPA
> >>>>>> 2.0
> >>>>>> + Hibernate 4.2.7.
> >>>>>>
> >>>>>> Now, I have planned migrating from JEE6 to JEE7:
> >>>>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final
> > version) + CDI +
> >>>>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
> >>>>>>
> >>>>>> I use only ConversationScope from CODI like this:
> >>>>>>
> >>>>>> =========
> >>>>>> 1) CODE 1:
> >>>>>> =========
> >>>>>> import
> > org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
> >>>>>> ConversationScoped;
> >>>>>> ...
> >>>>>> @ConversationScoped
> >>>>>> public class Controller1 implements Serializable {
> >>>>>> private @Inject Conversation conversation;
> >>>>>> ...
> >>>>>> public void aPlaceToCloseConversation(ActionEvent
> > event) {
> >>>>>> if (conversation != null) {
> >>>>>> conversation.close();
> >>>>>> conversation = null;
> >>>>>> }
> >>>>>> }
> >>>>>> }
> >>>>>>
> >>>>>> =========
> >>>>>> 2) CODE 2:
> >>>>>> =========
> >>>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.
> >>>>>> conversation.WindowContext;
> >>>>>> ...
> >>>>>> @RequestScoped
> >>>>>> public class Controller2 implements Serializable {
> >>>>>> @Inject WindowContext windowContext;
> >>>>>> ...
> >>>>>> public void aPlaceToCloseAllConversations(ActionEvent
> > event) {
> >>>>>> windowContext.closeConversations();
> >>>>>> }
> >>>>>> }
> >>>>>>
> >>>>>> I didn't find a way to migrate my ConversationScoped to
> > DeltaSpike,
> >>>>>> just
> >>>>>> I
> >>>>>> found GroupConversations
> >>>>>> and ViewScoped. What have I to change in my code for this
> > migration?
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>
> >>
> >
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Mark Struberg <st...@yahoo.de>.
Well, even with CODI you had to add the javascript lib yourself if you wanted the full features.
We now wrapped all the handling into a nice little component which takes care of all things.
LieGrue,
strub
> On Friday, 26 December 2014, 18:06, Gerhard Petracek <ge...@gmail.com> wrote:
> > hi edilmar,
>
> codi did that for you (automatically).
> with deltaspike you need to do it manually (see e.g. [1]).
>
> regards,
> gerhard
>
> [1]
> https://github.com/os890/ee6-ds-demo/blob/master/src/main/webapp/templates/main-template.xhtml#L94
>
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
>
>
>
> 2014-12-26 17:57 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>
>> Hi again,
>>
>> I am migrating to DeltaSpike GroupConversationScoped now but I didn't
>> undertand this part:
>>
>> Therefore, do not forget to add the ds:windowId (xmlns:ds="
>> http://deltaspike.apache.org/jsf") component in case of
>> ClientWindowConfig#CLIENTWINDOW to your page(/template) and ensure that
>> the window-handling works properly (otherwise conversations will not work
>> correctly). The base principle is similar to CODI-Conversations. CODI users
>> just have to ensure that they have to add ds:windowId and the names are
>> slightly different.
>>
>> When using CODI I never configured ds:windowId in any place and
>> I really don't know what about this.
>>
>>
>> On 08-12-2014 14:33, Thomas Andraschko wrote:
>>
>>> Hey,
>>>
>>> DeltaSpike is compatible with JEE6 and JEE7 :)
>>>
>>>
>>>
>>> 2014-12-08 18:04 GMT+01:00 Edilmar LISTAS
> <ed...@intersite.com.br>:
>>>
>>> Hi,
>>>>
>>>> Just one more question... is it possible to migrate from CODI to
>>>> DeltaSpike conversations
>>>> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1 and CDI/Weld
>>>> 2.1.6?
>>>> Because this
>>>> would be great, because I could change all the controllers to new
> class
>>>> and imports before
>>>> a bigger upgrade to JEE7 and many new libraries that I need to
>>>> test/checkout.
>>>>
>>>>
>>>> On 02-12-2014 16:58, Gerhard Petracek wrote:
>>>>
>>>> hi edilmar,
>>>>>
>>>>> @GroupedConversationScoped is just a new name, but you get the
> same
>>>>> concept
>>>>> as with codi.
>>>>> you can inject GroupedConversation as well as
> GroupedConversationManager
>>>>> to
>>>>> manage conversations (see [1] and e.g. [2]).
>>>>>
>>>>> just fyi:
>>>>> the reset to null isn't needed. with that you just drop the
> injected
>>>>> proxy
>>>>> and not the conversation itself -> #close is enough.
>>>>>
>>>>> regards,
>>>>> gerhard
>>>>>
>>>>> [1]
>>>>> http://deltaspike.apache.org/documentation/jsf.html#__
>>>>> grouped_conversations
>>>>> [2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
>>>>>
>>>>>
>>>>>
>>>>> http://www.irian.at
>>>>>
>>>>> Your JavaEE powerhouse -
>>>>> JavaEE Consulting, Development and
>>>>> Courses in English and German
>>>>>
>>>>> Professional Support for Apache
>>>>> MyFaces, DeltaSpike and OpenWebBeans
>>>>>
>>>>>
>>>>>
>>>>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS
> <ed...@intersite.com.br>:
>>>>>
>>>>> Hi,
>>>>>
>>>>>>
>>>>>> I have a web/enterprise app running at this environment:
>>>>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI
> 1.0.6 + JPA
>>>>>> 2.0
>>>>>> + Hibernate 4.2.7.
>>>>>>
>>>>>> Now, I have planned migrating from JEE6 to JEE7:
>>>>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final
> version) + CDI +
>>>>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>>>>>>
>>>>>> I use only ConversationScope from CODI like this:
>>>>>>
>>>>>> =========
>>>>>> 1) CODE 1:
>>>>>> =========
>>>>>> import
> org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
>>>>>> ConversationScoped;
>>>>>> ...
>>>>>> @ConversationScoped
>>>>>> public class Controller1 implements Serializable {
>>>>>> private @Inject Conversation conversation;
>>>>>> ...
>>>>>> public void aPlaceToCloseConversation(ActionEvent
> event) {
>>>>>> if (conversation != null) {
>>>>>> conversation.close();
>>>>>> conversation = null;
>>>>>> }
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> =========
>>>>>> 2) CODE 2:
>>>>>> =========
>>>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.
>>>>>> conversation.WindowContext;
>>>>>> ...
>>>>>> @RequestScoped
>>>>>> public class Controller2 implements Serializable {
>>>>>> @Inject WindowContext windowContext;
>>>>>> ...
>>>>>> public void aPlaceToCloseAllConversations(ActionEvent
> event) {
>>>>>> windowContext.closeConversations();
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> I didn't find a way to migrate my ConversationScoped to
> DeltaSpike,
>>>>>> just
>>>>>> I
>>>>>> found GroupConversations
>>>>>> and ViewScoped. What have I to change in my code for this
> migration?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Gerhard Petracek <ge...@gmail.com>.
hi edilmar,
@#1:
you can log it on your own in a @javax.annotation.PreDestroy callback (e.g.
based on the project-stage).
@#2:
that depends on your usage of the exception-handling api
(see BridgeExceptionHandlerWrapper).
@#3:
if you don't like it, you can configure it via the std. java util logging
config.
e.g. change the level in your logging.properties - in that case
e.g.: org.apache.deltaspike.core.util.ClassDeactivationUtils.level=WARNING
regards,
gerhard
http://www.irian.at
Your JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German
Professional Support for Apache
MyFaces, DeltaSpike and OpenWebBeans
2014-12-29 12:44 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
> Three new doubts...
>
> 1) Is there some way to print messages in server.log to guarantee that the
> conversation is destroyed at a time, in development time? Some config in
> logging.properties...
>
> 2) I configured my web.xml to redirect this kind of exception to a default
> html file. Does this work ?
>
> <error-page>
>
> <exception-type>javax.enterprise.context.NonexistentConversationExcepti
> on</exception-type>
> <location>/expired.html</location>
> </error-page>
> <error-page>
>
> <exception-type>org.jboss.weld.context.NonexistentConversationExcepti
> on</exception-type>
> <location>/expired.html</location>
> </error-page>
> <error-page>
>
> <exception-type>javax.faces.application.ViewExpiredException</
> exception-type>
> <location>/expired.html</location>
> </error-page>
>
>
> 3) Is it possible to disable the logs below in a production environment?
>
> Informações: class: org.apache.deltaspike.jsf.impl.listener.request.
> DeltaSpikeExternalContextWrapper activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.listener.request.JsfRequestBroadcaster
> activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.exception.control.BridgeExceptionHandlerWrapper
> activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.security.SecurityAwareViewHandler
> activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.navigation.
> NavigationHandlerAwareApplication activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.token.DoubleSubmitAwarePhaseListener
> activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.scope.window.JsfWindowContextQuotaHandler
> activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.view.DeltaSpikeViewHandler
> activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.config.view.ViewControllerActionListener
> activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.navigation.DeltaSpikeNavigationHandler
> activated=true
> Informações: class: org.apache.deltaspike.jsf.impl.scope.viewaccess.
> ViewAccessScopedAwareNavigationHandler activated=true
>
>
> On 26-12-2014 14:05, Gerhard Petracek wrote:
>
>> hi edilmar,
>>
>> codi did that for you (automatically).
>> with deltaspike you need to do it manually (see e.g. [1]).
>>
>> regards,
>> gerhard
>>
>> [1]
>> https://github.com/os890/ee6-ds-demo/blob/master/src/main/
>> webapp/templates/main-template.xhtml#L94
>>
>> http://www.irian.at
>>
>> Your JavaEE powerhouse -
>> JavaEE Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache
>> MyFaces, DeltaSpike and OpenWebBeans
>>
>>
>>
>> 2014-12-26 17:57 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>>
>> Hi again,
>>>
>>> I am migrating to DeltaSpike GroupConversationScoped now but I didn't
>>> undertand this part:
>>>
>>> Therefore, do not forget to add the ds:windowId (xmlns:ds="
>>> http://deltaspike.apache.org/jsf") component in case of
>>> ClientWindowConfig#CLIENTWINDOW to your page(/template) and ensure that
>>> the window-handling works properly (otherwise conversations will not work
>>> correctly). The base principle is similar to CODI-Conversations. CODI
>>> users
>>> just have to ensure that they have to add ds:windowId and the names are
>>> slightly different.
>>>
>>> When using CODI I never configured ds:windowId in any place and
>>> I really don't know what about this.
>>>
>>>
>>> On 08-12-2014 14:33, Thomas Andraschko wrote:
>>>
>>> Hey,
>>>>
>>>> DeltaSpike is compatible with JEE6 and JEE7 :)
>>>>
>>>>
>>>>
>>>> 2014-12-08 18:04 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>>>>
>>>> Hi,
>>>>
>>>>>
>>>>> Just one more question... is it possible to migrate from CODI to
>>>>> DeltaSpike conversations
>>>>> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1 and CDI/Weld
>>>>> 2.1.6?
>>>>> Because this
>>>>> would be great, because I could change all the controllers to new class
>>>>> and imports before
>>>>> a bigger upgrade to JEE7 and many new libraries that I need to
>>>>> test/checkout.
>>>>>
>>>>>
>>>>> On 02-12-2014 16:58, Gerhard Petracek wrote:
>>>>>
>>>>> hi edilmar,
>>>>>
>>>>>>
>>>>>> @GroupedConversationScoped is just a new name, but you get the same
>>>>>> concept
>>>>>> as with codi.
>>>>>> you can inject GroupedConversation as well as
>>>>>> GroupedConversationManager
>>>>>> to
>>>>>> manage conversations (see [1] and e.g. [2]).
>>>>>>
>>>>>> just fyi:
>>>>>> the reset to null isn't needed. with that you just drop the injected
>>>>>> proxy
>>>>>> and not the conversation itself -> #close is enough.
>>>>>>
>>>>>> regards,
>>>>>> gerhard
>>>>>>
>>>>>> [1]
>>>>>> http://deltaspike.apache.org/documentation/jsf.html#__
>>>>>> grouped_conversations
>>>>>> [2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://www.irian.at
>>>>>>
>>>>>> Your JavaEE powerhouse -
>>>>>> JavaEE Consulting, Development and
>>>>>> Courses in English and German
>>>>>>
>>>>>> Professional Support for Apache
>>>>>> MyFaces, DeltaSpike and OpenWebBeans
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS <edilista@intersite.com.br
>>>>>> >:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>>> I have a web/enterprise app running at this environment:
>>>>>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI 1.0.6 +
>>>>>>> JPA
>>>>>>> 2.0
>>>>>>> + Hibernate 4.2.7.
>>>>>>>
>>>>>>> Now, I have planned migrating from JEE6 to JEE7:
>>>>>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final version) +
>>>>>>> CDI +
>>>>>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>>>>>>>
>>>>>>> I use only ConversationScope from CODI like this:
>>>>>>>
>>>>>>> =========
>>>>>>> 1) CODE 1:
>>>>>>> =========
>>>>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.
>>>>>>> conversation.
>>>>>>> ConversationScoped;
>>>>>>> ...
>>>>>>> @ConversationScoped
>>>>>>> public class Controller1 implements Serializable {
>>>>>>> private @Inject Conversation conversation;
>>>>>>> ...
>>>>>>> public void aPlaceToCloseConversation(ActionEvent event) {
>>>>>>> if (conversation != null) {
>>>>>>> conversation.close();
>>>>>>> conversation = null;
>>>>>>> }
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> =========
>>>>>>> 2) CODE 2:
>>>>>>> =========
>>>>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.
>>>>>>> conversation.WindowContext;
>>>>>>> ...
>>>>>>> @RequestScoped
>>>>>>> public class Controller2 implements Serializable {
>>>>>>> @Inject WindowContext windowContext;
>>>>>>> ...
>>>>>>> public void aPlaceToCloseAllConversations(ActionEvent event) {
>>>>>>> windowContext.closeConversations();
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> I didn't find a way to migrate my ConversationScoped to DeltaSpike,
>>>>>>> just
>>>>>>> I
>>>>>>> found GroupConversations
>>>>>>> and ViewScoped. What have I to change in my code for this migration?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>
>>>
>>
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Edilmar LISTAS <ed...@intersite.com.br>.
Three new doubts...
1) Is there some way to print messages in server.log to guarantee that
the conversation is destroyed at a time, in development time? Some
config in logging.properties...
2) I configured my web.xml to redirect this kind of exception to a
default html file. Does this work ?
<error-page>
<exception-type>javax.enterprise.context.NonexistentConversationException</exception-type>
<location>/expired.html</location>
</error-page>
<error-page>
<exception-type>org.jboss.weld.context.NonexistentConversationException</exception-type>
<location>/expired.html</location>
</error-page>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/expired.html</location>
</error-page>
3) Is it possible to disable the logs below in a production environment?
Informações: class:
org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeExternalContextWrapper
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.listener.request.JsfRequestBroadcaster
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.exception.control.BridgeExceptionHandlerWrapper
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.security.SecurityAwareViewHandler
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.navigation.NavigationHandlerAwareApplication
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.token.DoubleSubmitAwarePhaseListener
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.scope.window.JsfWindowContextQuotaHandler
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.view.DeltaSpikeViewHandler activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.config.view.ViewControllerActionListener
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.navigation.DeltaSpikeNavigationHandler
activated=true
Informações: class:
org.apache.deltaspike.jsf.impl.scope.viewaccess.ViewAccessScopedAwareNavigationHandler
activated=true
On 26-12-2014 14:05, Gerhard Petracek wrote:
> hi edilmar,
>
> codi did that for you (automatically).
> with deltaspike you need to do it manually (see e.g. [1]).
>
> regards,
> gerhard
>
> [1]
> https://github.com/os890/ee6-ds-demo/blob/master/src/main/webapp/templates/main-template.xhtml#L94
>
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
>
>
> 2014-12-26 17:57 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>
>> Hi again,
>>
>> I am migrating to DeltaSpike GroupConversationScoped now but I didn't
>> undertand this part:
>>
>> Therefore, do not forget to add the ds:windowId (xmlns:ds="
>> http://deltaspike.apache.org/jsf") component in case of
>> ClientWindowConfig#CLIENTWINDOW to your page(/template) and ensure that
>> the window-handling works properly (otherwise conversations will not work
>> correctly). The base principle is similar to CODI-Conversations. CODI users
>> just have to ensure that they have to add ds:windowId and the names are
>> slightly different.
>>
>> When using CODI I never configured ds:windowId in any place and
>> I really don't know what about this.
>>
>>
>> On 08-12-2014 14:33, Thomas Andraschko wrote:
>>
>>> Hey,
>>>
>>> DeltaSpike is compatible with JEE6 and JEE7 :)
>>>
>>>
>>>
>>> 2014-12-08 18:04 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>>>
>>> Hi,
>>>>
>>>> Just one more question... is it possible to migrate from CODI to
>>>> DeltaSpike conversations
>>>> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1 and CDI/Weld
>>>> 2.1.6?
>>>> Because this
>>>> would be great, because I could change all the controllers to new class
>>>> and imports before
>>>> a bigger upgrade to JEE7 and many new libraries that I need to
>>>> test/checkout.
>>>>
>>>>
>>>> On 02-12-2014 16:58, Gerhard Petracek wrote:
>>>>
>>>> hi edilmar,
>>>>>
>>>>> @GroupedConversationScoped is just a new name, but you get the same
>>>>> concept
>>>>> as with codi.
>>>>> you can inject GroupedConversation as well as GroupedConversationManager
>>>>> to
>>>>> manage conversations (see [1] and e.g. [2]).
>>>>>
>>>>> just fyi:
>>>>> the reset to null isn't needed. with that you just drop the injected
>>>>> proxy
>>>>> and not the conversation itself -> #close is enough.
>>>>>
>>>>> regards,
>>>>> gerhard
>>>>>
>>>>> [1]
>>>>> http://deltaspike.apache.org/documentation/jsf.html#__
>>>>> grouped_conversations
>>>>> [2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
>>>>>
>>>>>
>>>>>
>>>>> http://www.irian.at
>>>>>
>>>>> Your JavaEE powerhouse -
>>>>> JavaEE Consulting, Development and
>>>>> Courses in English and German
>>>>>
>>>>> Professional Support for Apache
>>>>> MyFaces, DeltaSpike and OpenWebBeans
>>>>>
>>>>>
>>>>>
>>>>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>>>>>
>>>>> Hi,
>>>>>
>>>>>>
>>>>>> I have a web/enterprise app running at this environment:
>>>>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI 1.0.6 + JPA
>>>>>> 2.0
>>>>>> + Hibernate 4.2.7.
>>>>>>
>>>>>> Now, I have planned migrating from JEE6 to JEE7:
>>>>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final version) + CDI +
>>>>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>>>>>>
>>>>>> I use only ConversationScope from CODI like this:
>>>>>>
>>>>>> =========
>>>>>> 1) CODE 1:
>>>>>> =========
>>>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
>>>>>> ConversationScoped;
>>>>>> ...
>>>>>> @ConversationScoped
>>>>>> public class Controller1 implements Serializable {
>>>>>> private @Inject Conversation conversation;
>>>>>> ...
>>>>>> public void aPlaceToCloseConversation(ActionEvent event) {
>>>>>> if (conversation != null) {
>>>>>> conversation.close();
>>>>>> conversation = null;
>>>>>> }
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> =========
>>>>>> 2) CODE 2:
>>>>>> =========
>>>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.
>>>>>> conversation.WindowContext;
>>>>>> ...
>>>>>> @RequestScoped
>>>>>> public class Controller2 implements Serializable {
>>>>>> @Inject WindowContext windowContext;
>>>>>> ...
>>>>>> public void aPlaceToCloseAllConversations(ActionEvent event) {
>>>>>> windowContext.closeConversations();
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> I didn't find a way to migrate my ConversationScoped to DeltaSpike,
>>>>>> just
>>>>>> I
>>>>>> found GroupConversations
>>>>>> and ViewScoped. What have I to change in my code for this migration?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Gerhard Petracek <ge...@gmail.com>.
hi edilmar,
codi did that for you (automatically).
with deltaspike you need to do it manually (see e.g. [1]).
regards,
gerhard
[1]
https://github.com/os890/ee6-ds-demo/blob/master/src/main/webapp/templates/main-template.xhtml#L94
http://www.irian.at
Your JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German
Professional Support for Apache
MyFaces, DeltaSpike and OpenWebBeans
2014-12-26 17:57 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
> Hi again,
>
> I am migrating to DeltaSpike GroupConversationScoped now but I didn't
> undertand this part:
>
> Therefore, do not forget to add the ds:windowId (xmlns:ds="
> http://deltaspike.apache.org/jsf") component in case of
> ClientWindowConfig#CLIENTWINDOW to your page(/template) and ensure that
> the window-handling works properly (otherwise conversations will not work
> correctly). The base principle is similar to CODI-Conversations. CODI users
> just have to ensure that they have to add ds:windowId and the names are
> slightly different.
>
> When using CODI I never configured ds:windowId in any place and
> I really don't know what about this.
>
>
> On 08-12-2014 14:33, Thomas Andraschko wrote:
>
>> Hey,
>>
>> DeltaSpike is compatible with JEE6 and JEE7 :)
>>
>>
>>
>> 2014-12-08 18:04 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>>
>> Hi,
>>>
>>> Just one more question... is it possible to migrate from CODI to
>>> DeltaSpike conversations
>>> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1 and CDI/Weld
>>> 2.1.6?
>>> Because this
>>> would be great, because I could change all the controllers to new class
>>> and imports before
>>> a bigger upgrade to JEE7 and many new libraries that I need to
>>> test/checkout.
>>>
>>>
>>> On 02-12-2014 16:58, Gerhard Petracek wrote:
>>>
>>> hi edilmar,
>>>>
>>>> @GroupedConversationScoped is just a new name, but you get the same
>>>> concept
>>>> as with codi.
>>>> you can inject GroupedConversation as well as GroupedConversationManager
>>>> to
>>>> manage conversations (see [1] and e.g. [2]).
>>>>
>>>> just fyi:
>>>> the reset to null isn't needed. with that you just drop the injected
>>>> proxy
>>>> and not the conversation itself -> #close is enough.
>>>>
>>>> regards,
>>>> gerhard
>>>>
>>>> [1]
>>>> http://deltaspike.apache.org/documentation/jsf.html#__
>>>> grouped_conversations
>>>> [2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
>>>>
>>>>
>>>>
>>>> http://www.irian.at
>>>>
>>>> Your JavaEE powerhouse -
>>>> JavaEE Consulting, Development and
>>>> Courses in English and German
>>>>
>>>> Professional Support for Apache
>>>> MyFaces, DeltaSpike and OpenWebBeans
>>>>
>>>>
>>>>
>>>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>>>>
>>>> Hi,
>>>>
>>>>>
>>>>> I have a web/enterprise app running at this environment:
>>>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI 1.0.6 + JPA
>>>>> 2.0
>>>>> + Hibernate 4.2.7.
>>>>>
>>>>> Now, I have planned migrating from JEE6 to JEE7:
>>>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final version) + CDI +
>>>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>>>>>
>>>>> I use only ConversationScope from CODI like this:
>>>>>
>>>>> =========
>>>>> 1) CODE 1:
>>>>> =========
>>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
>>>>> ConversationScoped;
>>>>> ...
>>>>> @ConversationScoped
>>>>> public class Controller1 implements Serializable {
>>>>> private @Inject Conversation conversation;
>>>>> ...
>>>>> public void aPlaceToCloseConversation(ActionEvent event) {
>>>>> if (conversation != null) {
>>>>> conversation.close();
>>>>> conversation = null;
>>>>> }
>>>>> }
>>>>> }
>>>>>
>>>>> =========
>>>>> 2) CODE 2:
>>>>> =========
>>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.
>>>>> conversation.WindowContext;
>>>>> ...
>>>>> @RequestScoped
>>>>> public class Controller2 implements Serializable {
>>>>> @Inject WindowContext windowContext;
>>>>> ...
>>>>> public void aPlaceToCloseAllConversations(ActionEvent event) {
>>>>> windowContext.closeConversations();
>>>>> }
>>>>> }
>>>>>
>>>>> I didn't find a way to migrate my ConversationScoped to DeltaSpike,
>>>>> just
>>>>> I
>>>>> found GroupConversations
>>>>> and ViewScoped. What have I to change in my code for this migration?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Edilmar LISTAS <ed...@intersite.com.br>.
Hi again,
I am migrating to DeltaSpike GroupConversationScoped now but I didn't
undertand this part:
Therefore, do not forget to add the ds:windowId
(xmlns:ds="http://deltaspike.apache.org/jsf") component in case of
ClientWindowConfig#CLIENTWINDOW to your page(/template) and ensure that
the window-handling works properly (otherwise conversations will not
work correctly). The base principle is similar to CODI-Conversations.
CODI users just have to ensure that they have to add ds:windowId and the
names are slightly different.
When using CODI I never configured ds:windowId in any place and
I really don't know what about this.
On 08-12-2014 14:33, Thomas Andraschko wrote:
> Hey,
>
> DeltaSpike is compatible with JEE6 and JEE7 :)
>
>
>
> 2014-12-08 18:04 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>
>> Hi,
>>
>> Just one more question... is it possible to migrate from CODI to
>> DeltaSpike conversations
>> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1 and CDI/Weld 2.1.6?
>> Because this
>> would be great, because I could change all the controllers to new class
>> and imports before
>> a bigger upgrade to JEE7 and many new libraries that I need to
>> test/checkout.
>>
>>
>> On 02-12-2014 16:58, Gerhard Petracek wrote:
>>
>>> hi edilmar,
>>>
>>> @GroupedConversationScoped is just a new name, but you get the same
>>> concept
>>> as with codi.
>>> you can inject GroupedConversation as well as GroupedConversationManager
>>> to
>>> manage conversations (see [1] and e.g. [2]).
>>>
>>> just fyi:
>>> the reset to null isn't needed. with that you just drop the injected proxy
>>> and not the conversation itself -> #close is enough.
>>>
>>> regards,
>>> gerhard
>>>
>>> [1]
>>> http://deltaspike.apache.org/documentation/jsf.html#__
>>> grouped_conversations
>>> [2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
>>>
>>>
>>>
>>> http://www.irian.at
>>>
>>> Your JavaEE powerhouse -
>>> JavaEE Consulting, Development and
>>> Courses in English and German
>>>
>>> Professional Support for Apache
>>> MyFaces, DeltaSpike and OpenWebBeans
>>>
>>>
>>>
>>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>>>
>>> Hi,
>>>>
>>>> I have a web/enterprise app running at this environment:
>>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI 1.0.6 + JPA
>>>> 2.0
>>>> + Hibernate 4.2.7.
>>>>
>>>> Now, I have planned migrating from JEE6 to JEE7:
>>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final version) + CDI +
>>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>>>>
>>>> I use only ConversationScope from CODI like this:
>>>>
>>>> =========
>>>> 1) CODE 1:
>>>> =========
>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
>>>> ConversationScoped;
>>>> ...
>>>> @ConversationScoped
>>>> public class Controller1 implements Serializable {
>>>> private @Inject Conversation conversation;
>>>> ...
>>>> public void aPlaceToCloseConversation(ActionEvent event) {
>>>> if (conversation != null) {
>>>> conversation.close();
>>>> conversation = null;
>>>> }
>>>> }
>>>> }
>>>>
>>>> =========
>>>> 2) CODE 2:
>>>> =========
>>>> import org.apache.myfaces.extensions.cdi.core.api.scope.
>>>> conversation.WindowContext;
>>>> ...
>>>> @RequestScoped
>>>> public class Controller2 implements Serializable {
>>>> @Inject WindowContext windowContext;
>>>> ...
>>>> public void aPlaceToCloseAllConversations(ActionEvent event) {
>>>> windowContext.closeConversations();
>>>> }
>>>> }
>>>>
>>>> I didn't find a way to migrate my ConversationScoped to DeltaSpike, just
>>>> I
>>>> found GroupConversations
>>>> and ViewScoped. What have I to change in my code for this migration?
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Thomas Andraschko <an...@gmail.com>.
Hey,
DeltaSpike is compatible with JEE6 and JEE7 :)
2014-12-08 18:04 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
> Hi,
>
> Just one more question... is it possible to migrate from CODI to
> DeltaSpike conversations
> but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1 and CDI/Weld 2.1.6?
> Because this
> would be great, because I could change all the controllers to new class
> and imports before
> a bigger upgrade to JEE7 and many new libraries that I need to
> test/checkout.
>
>
> On 02-12-2014 16:58, Gerhard Petracek wrote:
>
>> hi edilmar,
>>
>> @GroupedConversationScoped is just a new name, but you get the same
>> concept
>> as with codi.
>> you can inject GroupedConversation as well as GroupedConversationManager
>> to
>> manage conversations (see [1] and e.g. [2]).
>>
>> just fyi:
>> the reset to null isn't needed. with that you just drop the injected proxy
>> and not the conversation itself -> #close is enough.
>>
>> regards,
>> gerhard
>>
>> [1]
>> http://deltaspike.apache.org/documentation/jsf.html#__
>> grouped_conversations
>> [2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
>>
>>
>>
>> http://www.irian.at
>>
>> Your JavaEE powerhouse -
>> JavaEE Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache
>> MyFaces, DeltaSpike and OpenWebBeans
>>
>>
>>
>> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>>
>> Hi,
>>>
>>> I have a web/enterprise app running at this environment:
>>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI 1.0.6 + JPA
>>> 2.0
>>> + Hibernate 4.2.7.
>>>
>>> Now, I have planned migrating from JEE6 to JEE7:
>>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final version) + CDI +
>>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>>>
>>> I use only ConversationScope from CODI like this:
>>>
>>> =========
>>> 1) CODE 1:
>>> =========
>>> import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
>>> ConversationScoped;
>>> ...
>>> @ConversationScoped
>>> public class Controller1 implements Serializable {
>>> private @Inject Conversation conversation;
>>> ...
>>> public void aPlaceToCloseConversation(ActionEvent event) {
>>> if (conversation != null) {
>>> conversation.close();
>>> conversation = null;
>>> }
>>> }
>>> }
>>>
>>> =========
>>> 2) CODE 2:
>>> =========
>>> import org.apache.myfaces.extensions.cdi.core.api.scope.
>>> conversation.WindowContext;
>>> ...
>>> @RequestScoped
>>> public class Controller2 implements Serializable {
>>> @Inject WindowContext windowContext;
>>> ...
>>> public void aPlaceToCloseAllConversations(ActionEvent event) {
>>> windowContext.closeConversations();
>>> }
>>> }
>>>
>>> I didn't find a way to migrate my ConversationScoped to DeltaSpike, just
>>> I
>>> found GroupConversations
>>> and ViewScoped. What have I to change in my code for this migration?
>>>
>>>
>>>
>>>
>>>
>
Re: Planning the migration from CODI to DeltaSpike
Posted by Edilmar LISTAS <ed...@intersite.com.br>.
Hi,
Just one more question... is it possible to migrate from CODI to
DeltaSpike conversations
but to continue using JEE6, Glassfish 3.1.2.2, JSF 2.1 and CDI/Weld
2.1.6? Because this
would be great, because I could change all the controllers to new class
and imports before
a bigger upgrade to JEE7 and many new libraries that I need to
test/checkout.
On 02-12-2014 16:58, Gerhard Petracek wrote:
> hi edilmar,
>
> @GroupedConversationScoped is just a new name, but you get the same concept
> as with codi.
> you can inject GroupedConversation as well as GroupedConversationManager to
> manage conversations (see [1] and e.g. [2]).
>
> just fyi:
> the reset to null isn't needed. with that you just drop the injected proxy
> and not the conversation itself -> #close is enough.
>
> regards,
> gerhard
>
> [1]
> http://deltaspike.apache.org/documentation/jsf.html#__grouped_conversations
> [2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
>
>
>
> http://www.irian.at
>
> Your JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache
> MyFaces, DeltaSpike and OpenWebBeans
>
>
>
> 2014-12-02 19:38 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
>
>> Hi,
>>
>> I have a web/enterprise app running at this environment:
>> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI 1.0.6 + JPA 2.0
>> + Hibernate 4.2.7.
>>
>> Now, I have planned migrating from JEE6 to JEE7:
>> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final version) + CDI +
>> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>>
>> I use only ConversationScope from CODI like this:
>>
>> =========
>> 1) CODE 1:
>> =========
>> import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
>> ConversationScoped;
>> ...
>> @ConversationScoped
>> public class Controller1 implements Serializable {
>> private @Inject Conversation conversation;
>> ...
>> public void aPlaceToCloseConversation(ActionEvent event) {
>> if (conversation != null) {
>> conversation.close();
>> conversation = null;
>> }
>> }
>> }
>>
>> =========
>> 2) CODE 2:
>> =========
>> import org.apache.myfaces.extensions.cdi.core.api.scope.
>> conversation.WindowContext;
>> ...
>> @RequestScoped
>> public class Controller2 implements Serializable {
>> @Inject WindowContext windowContext;
>> ...
>> public void aPlaceToCloseAllConversations(ActionEvent event) {
>> windowContext.closeConversations();
>> }
>> }
>>
>> I didn't find a way to migrate my ConversationScoped to DeltaSpike, just I
>> found GroupConversations
>> and ViewScoped. What have I to change in my code for this migration?
>>
>>
>>
>>
Re: Planning the migration from CODI to DeltaSpike
Posted by Gerhard Petracek <ge...@gmail.com>.
hi edilmar,
@GroupedConversationScoped is just a new name, but you get the same concept
as with codi.
you can inject GroupedConversation as well as GroupedConversationManager to
manage conversations (see [1] and e.g. [2]).
just fyi:
the reset to null isn't needed. with that you just drop the injected proxy
and not the conversation itself -> #close is enough.
regards,
gerhard
[1]
http://deltaspike.apache.org/documentation/jsf.html#__grouped_conversations
[2] https://github.com/os890/tomee_mf_stack_001/tree/codi2ds
http://www.irian.at
Your JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German
Professional Support for Apache
MyFaces, DeltaSpike and OpenWebBeans
2014-12-02 19:38 GMT+01:00 Edilmar LISTAS <ed...@intersite.com.br>:
> Hi,
>
> I have a web/enterprise app running at this environment:
> Glassfish 3.1.2.2 + JSF 2.1 + Richfaces 4.3.7 + CDI + CODI 1.0.6 + JPA 2.0
> + Hibernate 4.2.7.
>
> Now, I have planned migrating from JEE6 to JEE7:
> Glassfish 4.1 + JSF 2.2 + Richfaces 4.5 (waiting final version) + CDI +
> DeltaSpike 1.1.0 + JPA 2.1 + Hibernate 4.3.x.
>
> I use only ConversationScope from CODI like this:
>
> =========
> 1) CODE 1:
> =========
> import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.
> ConversationScoped;
> ...
> @ConversationScoped
> public class Controller1 implements Serializable {
> private @Inject Conversation conversation;
> ...
> public void aPlaceToCloseConversation(ActionEvent event) {
> if (conversation != null) {
> conversation.close();
> conversation = null;
> }
> }
> }
>
> =========
> 2) CODE 2:
> =========
> import org.apache.myfaces.extensions.cdi.core.api.scope.
> conversation.WindowContext;
> ...
> @RequestScoped
> public class Controller2 implements Serializable {
> @Inject WindowContext windowContext;
> ...
> public void aPlaceToCloseAllConversations(ActionEvent event) {
> windowContext.closeConversations();
> }
> }
>
> I didn't find a way to migrate my ConversationScoped to DeltaSpike, just I
> found GroupConversations
> and ViewScoped. What have I to change in my code for this migration?
>
>
>
>