[
https://issues.apache.org/jira/browse/PORTLETBRIDGE-127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840971#action_12840971
]
DK commented on PORTLETBRIDGE-127:
----------------------------------
The managed bean is instantiated by JSF, I don't explicitly do it anywhere, I
just remove it explicitly when user exits from the app. There was a logic in
the code that checks for presence or absence of a managed bean.
Here is the dump that you asked for:
[3/3/10 19:25:06:343 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject After removing managed
bean: app
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session map entry:
javax.portlet.faces.viewIdHistory.view
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session map entry:
javax.faces.request.charset
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session map entry:
org.apache.myfaces.portlet.faces.requestScopeWatch
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session attribute in
application scope:
javax.portlet.p.7_8000CB1A00FGD0ICSS6DRJ00G5?javax.portlet.faces.viewIdHistory.view
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session attribute in
application scope: key
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session attribute in
application scope:
javax.portlet.p.7_8000CB1A00FGD0ICSS6DRJ00G5?javax.faces.request.charset
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session attribute in
application scope:
javax.portlet.p.7_8000CB1A00FGD0ICSS6DRJ00G5?org.apache.myfaces.portlet.faces.requestScopeWatch
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session attribute in
application scope: app
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session attribute in
portlet scope: javax.portlet.faces.viewIdHistory.view
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session attribute in
portlet scope: javax.faces.request.charset
[3/3/10 19:25:06:374 EST] 0000003f DomainObject 1
gov.ed.fsa.riatpoc.DomainObject discardManagedObject session attribute in
portlet scope: org.apache.myfaces.portlet.faces.requestScopeWatch
The code that produced it is:
public static void discardManagedObject(String objName) {
//TBD WARNING: This does not work in a portlet with MyFaces Bridge
1.0.0.beta2
ExternalContext context =
FacesContext.getCurrentInstance().getExternalContext();
context.getSessionMap().remove(objName);
if (logger.isDebugEnabled()) {
PortletSession session = (PortletSession) context.getSession(false);
logger.debug("After removing managed bean: " + objName);
for (String key : context.getSessionMap().keySet()) {
logger.debug("session map entry: " + key);
}
for (Enumeration<String> e =
session.getAttributeNames(PortletSession.APPLICATION_SCOPE);
e.hasMoreElements();) {
logger.debug("session attribute in application scope: " +
e.nextElement());
}
for (Enumeration<String> e =
session.getAttributeNames(PortletSession.PORTLET_SCOPE); e.hasMoreElements();) {
logger.debug("session attribute in application scope: " +
e.nextElement());
}
}
}
>
> FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove()
> does not seem to work wth the bridge
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: PORTLETBRIDGE-127
> URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-127
> Project: MyFaces Portlet Bridge
> Issue Type: Bug
> Affects Versions: 1.0.0-beta
> Environment: WebSphere Portal 6.1.5 running on Windows XP Pro
> MyFaces Portal Bridge 1.0.0.beta2
> Reporter: DK
>
> I've been working on a POC application with PrimeFaces, deploying as a web
> app first, and then portalizing it and deploying to WebSphere Portal.
> When deployed as a web app, the following method removing JSF managed bean
> worked fine:
> public static void discardManagedObject(String objName) {
>
> FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove(objName);
> }
> It also seemed to work on the previous iteration of this app with IBM JWL
> Portlet Bridge 3.1.3.
> When deployed as a portlet with MyFaces Bridge 1.0.0.beta2, this does not
> seem to work anymore and the logic in code had to be changed as a workaround.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.