tracker issue : CF-3085329

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 87252:-(Watson Migration Closure)Race condition between portlets and onServerStart() when CF runs as a WAR in Liferay

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/LowImpact

Reporter/Name(from Bugbase): Jochem van Dieten / Jochem van Dieten (Jochem van Dieten)

Created: 12/23/2011

Components: JEE Deployment, Portlet Support

Versions: 9.0.1

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win All

Vote Count: 0

Problem:

Race condition between portlets and onServerStart() when CF runs as a WAR in Liferay.

When CF is run as a WAR in Liferay it registers its portlets with the server. These portlets can receive requests from the portal server before the onServerStart() has finished running since these requests are passed from the portal server to CF through direct invocation instead of a HTTP / JRPP layer.
Method:

1. Create a portlet in CF that uses (but does not create) a variable #server.foo#.
2.. Create an onServerStart() with the following code:
component  {
  public Void function onServerStart() {
    sleep(10000);
    server.foo = "bar";
  }
}
3. Configure and deploy everything on a Liferay server.
4. Redeploy the ColdFusion WAR and while doing so refresh the page every second. Initially it will  show "Portlet has been undeployed", at some point that will change to an error that "server.foo doesn't exist" and when onServerStart has completed the portlet will work correctly.
Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3085329

External Customer Info:
External Company:  
External Customer Name: Jochem van Dieten
External Customer Email: 14B70C2D446042B59920157F
External Test Config: 12/23/2011

Attachments:

Comments: