This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am designing a portal site. I am using WebSphere Portal for this designing. In this portal, on every page I have minimum 4 portlets. I require to do inter-portlet communication.
I have following scenarioes - To pass some data from one portlet to another portlet on same page - To pass some data from one portlet to all remaing portlets on same page - To pass some data from one portlet to all remaing portlets of application
This site is open for user and there is no login/password here. Thats why every user becomes anonymous user to the site. So I can't use session for this communication.
As Portlet Messaging is not supported by JSR-168, I can't use that also for this communication as this will create a problem of scalability across different specification.
Does anybody suggest me another mechanisum for this communication, which will pass all my criterias as well as implementable.
Thanks in advance!
Just like you, struggeling to get the right solutions!<br /> <br />Sun Certified Java Programmer 1.5<br /> <br />Target - SCWCD
>>So I can't use session for this communication.<< Is this really a function of someone "logging in"?
Or, is it related to being able to have a cookie on their browser identifying the Session created when they accessed the site. I think it would be unique across users.
If you are able to use a Session object, then you can use the APPLICATION_SCOPE for portlets in the same Portal Application (WAR file).
If not, I can see why you are asking.
Does WebSphere provide some InterPortlet communication? Is it limited by the use of Session?
Are you trying to avoid a Websphere specific solution?
The JSR-168 specification does note InterPortlet Communication under the "Future" heading.
Are the portlets on the page all part of the same Portal Application (war file)?
We to are beginning the adventure known as JSR-168. And, considering the spec is Release 1.0, it will be an adventure indeed!
Joined: Jan 27, 2003
As I mentioned there is no loggin/password to the site, every user is treated as a anonymous user (User without userContext). IBM Api says that when there is anonymous user, session will not get bind to any userContext and in such scenario don't depend on Session for inter-portlet communication.
I hope things are more clear now.
Joined: Sep 25, 2001
Ok. I understand you definitely limited by the 'portlet' sandbox.
I know each portlet has a context. I am not sure if the portlets can see the Application Context for the Servlet Container. Probably not. Otherwise, this may be a way of sharing information. But, you will need to careful about synchronization issues.