[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1289) Conversation Propagation andTrinidad Dialogs
by Brian Smith (JIRA)
Conversation Propagation andTrinidad Dialogs
--------------------------------------------
Key: JBSEAM-1289
URL: http://jira.jboss.com/jira/browse/JBSEAM-1289
Project: JBoss Seam
Issue Type: Feature Request
Environment: JBoss 4.0.4GA
Reporter: Brian Smith
Seam does not automatically support Trinidad's dialog feature in terms of propagating long running conversations to the dialog window.
Forum User dajevtic has provided a custom phase listener and action listener to enable propagation but it requires a specific naming convention for the dialog page. It would be nice to enable support directly using standard Seam notation like the s:conversationPropagation tag or @Begin(join = true)
Here are the relevant phase listener and action listener
*Phase Listener*
private static final String CONVERSATION_ID_SESSION_PARAMETER = "conversationId";
private Map createParameterMapForConversationRestore(String conversationId) {
Map paramterMap = new Hashtable();
paramterMap.put(CONVERSATION_ID_SESSION_PARAMETER, conversationId);
return paramterMap;
}
private void restoreConversation(Context context) {
if (context.isSet(CONVERSATION_ID_SESSION_PARAMETER)) {
String convId = context.get(CONVERSATION_ID_SESSION_PARAMETER).toString();
Manager.instance().restoreConversation(createParameterMapForConversationRestore(convId));
context.remove(CONVERSATION_ID_SESSION_PARAMETER);
}
}
public void afterPhase(PhaseEvent event) {
try {
if (event.getPhaseId().equals(PhaseId.RESTORE_VIEW)) {
UIViewRoot root = event.getFacesContext().getViewRoot();
if (root != null) {
String viewId = root.getViewId();
if ((viewId != null) && viewId.endsWith("_dlg.jspx")) {
restoreConversation(Contexts.getSessionContext());
}
}
} else {
log.info("after " + event.getPhaseId());
}
} catch (Exception e) {
log.error("Could not restore Seam conversation", e);
}
}
*Action Listener*
public void processAction(ActionEvent actionEvent)
throws AbortProcessingException {
if (actionEvent.getComponent() instanceof CoreCommandLink) {
CoreCommandLink link = (CoreCommandLink)actionEvent.getComponent();
if (link.isUseWindow()) {
Contexts.getSessionContext().set("conversationId", Manager.instance().getCurrentConversationId());
}
}
super.processAction(actionEvent);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2143) Hotdeployed components can't be configured through components.xml
by Pete Muir (JIRA)
Hotdeployed components can't be configured through components.xml
-----------------------------------------------------------------
Key: JBSEAM-2143
URL: http://jira.jboss.com/jira/browse/JBSEAM-2143
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.CR2
Reporter: Pete Muir
Priority: Critical
Fix For: 2.0.1.GA
he hot deployment scanner is isolated, using a URLClassloader that is not available once that method comes to a close. The only way to make this work would be to keep that classloader alive during the rest of the startup process. I can direct you to the line of code that you need to look at if you are curious about it.
Check out lines 540 and 541 or org.jboss.seam.init.Initialiation. The scanForHotDeployableComponents uses the following logic to create a component scanner:
URL[] urls = { url };
classLoader = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader());
paths = new File[] { directory };
Once it processes the classes, that classloader is discarded and obviously, since it is a URLclassloader, the classes aren't going to be found later on.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 8 months