OpenPortal Portlet Container in Liferay

Recently OpenPortal Portlet Container was fully integrated in Liferay Portal.  The OpenPortal Portlet Container is a fully compliant implementation of the Portlet 2.0 (JSR286) specification. And it also implements many of the optional features like expiration and validation caching, support for alias in eventing and public render parameters, support for wild card in eventing.

The integration was done based on the steps documented in this article.

The WSRP 2.0 implementation provided by the WSRP Project works seamlessly with this Portlet Container. Thus the embedding of the Portlet Container in Liferay Portal  ensures that the WSRP 2.0 implementation can also be integrated.

Blogs
Does anyone have a estimate on when the next release will occurr?
Hi.I just want to ask three questions
1.Do the embedding of the Portlet Container in Liferay Portal not fully compiant implementation of JSR286,or just only support the JSR168.
2.Is there any problem that OpenPortal Portlet Conainer on
backforward?

Thinks very much.
1. The OpenPortal Portlet Container embedded in liferay supports both JSR286 and JSR168.
2. Any JSR168/286 compliant portlets will work.
Sorry,I missed the third one.
3.Did the WSRP 2.0 implementation provided in the 5.1.2 version?
I am interested in the JSR-286's "validation cache" features, which seems not implemented in Liferay 5.1.2.

What do I have to do to get this OpenPortal Portlet container implementation?
Which version of Liferay do I need ?
Thanks
You need set the property portlet.container.impl=sun in portal-ext.properties to get the implementation. The OpenPortal Portlet Container was integrated in 5.1.x. You can try it on 5.1.2. Note that some fixes that went in to trunk may not have been ported to 5.1.x branch. Liferay 5.2(to be released) will be better.
Thanks Deepak.
I have tried that but it seems that nothing changed. My tests on caching give the same wrong results as before. Here is what I have done:
- I looked in <tomcat-dir>/webapps/ROOT/WEB-INF/classes : there was no portal-ext.properties; then I created this file myself with the line you have provided.
- I restarted the Tomcat server.
- I re-deployed my portlets
The results are unchagend.
I have two questions:
1) Is there a quick way to check that the portal-ext.properties is found at server start-up (in the output trace for example) ?
2) If portal-ext.properties is OK, is there a quick way to check that the Sun implementation is chosen ?
Thanks.
1. Yes the messages during startup says portal-ext.properties is being read.
2.
a.First check whether the portlet web-app's web.xml has an entry for PortletAppEngineServlet.
b. Also change the log level to INFO in ROOT/WEB-INF/classes/logging.properties.
Thanks Deepak.

I made the checks and it seems OK. By seeing different changes in my portlet behaviour I can see that Open Portal porlet container implementation is chosen. The test on caching are OK now (previously, I was misinterpreting the results).

However, I have two annoying side effects with the Open Portal's implementation, compared to the Liferay's:

1) 'portletSession' variable is no longer defined in the JSP. As a workaround I added the following statement in all my JSPs:

<%@page import="javax.portlet.PortletSession"%>
<%PortletSession portletSession = renderRequest.getPortletSession();
%>

This is OK, except that I cannot switch easily between the two portlet container implementations : when I switch back to the Liferay implementation, I get a 'duplicate variable' error.


2) The emitting of event (in the JSR-286 sense) through setEvent call in my portlet Java code does not work. It throws an exception.

public void processAction(ActionRequest req, ActionResponse res)
throws IOException, PortletException {
...
res.setEvent(newResultsEventQName, result);
...
}
With the Liferay implementation, this was perfectly all right. I made the check several times with both implementation to be sure.

Do you have explanations on these two issues ?
Good to know that its working.
1. portletSession variable is defined by Portlet 2.0 spec. so you need to point the taglib URI to portlet_2_0. Then switching between impls should be fine. Check my blog - http://blogs.sun.com/deepakg/entry/jsr286_defineobjects_tag for details..

2. OpenPortal Portlet Container uses JAXB serialization for eventing. If you are using Tomcat, make sure that the JVM is JDK1.6.