[
https://issues.jboss.org/browse/GTNPORTAL-1939?page=com.atlassian.jira.pl...
]
Michael Hauer commented on GTNPORTAL-1939:
------------------------------------------
In the meantime we got it all working and we are now also aware of all the methods which
provide the PortalContainer in one or the other way, so from my point of view, no further
investigation/adjustment is necessary. Thank's for your help!
PortalContainer#getInstance() must not set the
DEFAULT_PORTAL_CONTAINER_NAME "portal"
-------------------------------------------------------------------------------------
Key: GTNPORTAL-1939
URL:
https://issues.jboss.org/browse/GTNPORTAL-1939
Project: GateIn Portal
Issue Type: Quality Risk
Security Level: Public(Everyone can see)
Components: Common integration
Affects Versions: 3.1.0-GA
Environment: Doesn't matter
Reporter: Michael Hauer
Assignee: Minh Hoang TO
Labels: portal-s56, review_julien
Original Estimate: 2 hours
Remaining Estimate: 2 hours
The problem we were facing is very curious:
While porting our app from jboss 4.3 (plus portal) to jboss 5.1 epp (GateIn), I was
facing a problem with the login.jsp which showed the following behaviour:
The first request (localhost/myportal/private/myportal) for login (InitiateLoginServlet)
displayed the correct login.jsp we have in our extension.
But after trying to login with invalid credentials I kept beeing redirected to the
login.jsp from the default portal.
I used at least 3 hours to debug the whole bunch of eXo classes (very hard, facing the
fact, that not all sources are shipped with the source zip file).
Then I realized the problem:
I implemented a custom Authenticator which extends OrganizationAuthenticatorImpl. There I
tried to put some Attributes to the current PortalContainer using
PortalContainer.getInstance().setAttribute("bla", "bla").
What I didn't know is, that this GETInstance sets the default portal if the current
container is null.
In general a getter is not intended to modify anything. Even considering situations where
this might make sense, I think this could cause lots of trouble.
I would expect an exception if there is no current container.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira