Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Han Nguyen
Problem: hot deploy new portlets for the second portal instance
November 14, 2012 12:29 AM
Answer

Han Nguyen

Rank: New Member

Posts: 9

Join Date: October 5, 2012

Recent Posts

Hi all,
I have 2 portal instances per a Liferay installation. That's OK with the first instance. But the second portal instance, I have a problem such as:
- I deploy my new portlet successfully.
- I login the second portal instance, go to Control Panel --> Plugins Configuration, find my portlet and inactive it.
- I restart Tomcat, login this portal again. Now my portlet is active.
It seems that my portlet is re-deployed whenever Tomcat is started. So my configuration of the portlet (inactive status) is overwritten by the default configuration (active status). Please give me any suggestions to fix this. I'm using Tomcat 6.0.35 and Liferay CE 6.1.1. Thanks a lot!
Vilmos Papp
RE: Problem: hot deploy new portlets for the second portal instance
November 14, 2012 12:53 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Expert

Posts: 406

Join Date: October 21, 2010

Recent Posts

Juan Gonzalez
RE: Problem: hot deploy new portlets for the second portal instance
November 14, 2012 1:05 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1752

Join Date: October 28, 2008

Recent Posts

I guess hot deploy wasn't created for clusters.

Deploying in nodes of a custer is a matter of application server, not Liferay.

So in your case I would create an script that copy the WAR into different deploy folders so each node can "hot deploy" it.
Han Nguyen
RE: Problem: hot deploy new portlets for the second portal instance
November 14, 2012 1:24 AM
Answer

Han Nguyen

Rank: New Member

Posts: 9

Join Date: October 5, 2012

Recent Posts

Thanks Juan. But my case is no cluster. I create multiple portal instances per one Liferay installation per one machine. This is the same as multi-tenancy.
Vilmos Papp
RE: Problem: hot deploy new portlets for the second portal instance
November 14, 2012 1:33 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Expert

Posts: 406

Join Date: October 21, 2010

Recent Posts

Actually, your basic problem is that you don't want to make your portlet accessible on one instance only, but you want to use it on the other one or you want to inactivate your portlet for both?
Han Nguyen
RE: Problem: hot deploy new portlets for the second portal instance
November 14, 2012 1:39 AM
Answer

Han Nguyen

Rank: New Member

Posts: 9

Join Date: October 5, 2012

Recent Posts

Hi Vilmos,
It seems to be applied for portlets bundled with Liferay. In my case, I'm deploying my new portlet. The problem is that by using Plugins Configuration GUI to active/deactive my portlet, I checked that 'portlet' table in DB was updated with correct data, but it will be overwrite when I restart Tomcat.
Juan Gonzalez
RE: Problem: hot deploy new portlets for the second portal instance
November 14, 2012 1:45 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1752

Join Date: October 28, 2008

Recent Posts

Ups, sorry.

Totally misunderstood.
Han Nguyen
RE: Problem: hot deploy new portlets for the second portal instance
November 14, 2012 1:48 AM
Answer

Han Nguyen

Rank: New Member

Posts: 9

Join Date: October 5, 2012

Recent Posts

Hi Vilmos,
That's right. I want deploy my portlet in inactive status and if any instances want to use it then can active it.
Vilmos Papp
RE: Problem: hot deploy new portlets for the second portal instance
November 14, 2012 4:22 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Expert

Posts: 406

Join Date: October 21, 2010

Recent Posts

Please test it by adding <active>false</active> to your liferay-portlet.xml and redeploy it. I think it should be inactive after deploy based on. If not, just open a ticket in JIRA as this case it could be a bug, but it needs further analysis.

Based on the DTD it should work:

1<!--
2Set the active value to true if the portlet is active and available to users.
3If set to false, the portlet will not be active or available to users. The
4default value is true.
5
6This value can be changed at runtime via the Admin portlet.
7-->
8<!ELEMENT active (#PCDATA)>