deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: Planning the migration from CODI to DeltaSpike
Date Tue, 02 Dec 2014 19:58:56 GMT
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?
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message