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?