Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
fabio maggi
Refresh Layout post database update
April 20, 2007 3:17 AM
Answer

fabio maggi

Rank: New Member

Posts: 7

Join Date: August 18, 2006

Recent Posts

Hi All,

I execute this query in database:
update layout set typesettings=(select typesettings from layout where ownerid='PRI.1005') where ownerid='PRI.1007';
but changes are not load until I restart Tomcat.
I mean layout is set in cache.
Is possible refresh calche layout by call java method (runtime), or execute other database update?

Thanks for any suggestion.
fabio maggi
Alexey Egorov
RE: Refresh Layout post database update
May 4, 2007 4:49 AM
Answer

Alexey Egorov

Rank: New Member

Posts: 11

Join Date: February 6, 2007

Recent Posts

I have the similar problem. I want to make changes somewhere in Liferay's database, and see these changes without restarting Liferay. Though it's an open question for me. I don't know how Liferay is caching data, and how this could be controlled.
Any ideas?
Brian Scott Schupbach
RE: Refresh Layout post database update
November 20, 2008 8:33 AM
Answer

Brian Scott Schupbach

Rank: Expert

Posts: 329

Join Date: October 23, 2008

Recent Posts

any ideas on this???

I am having a similar issue. I need the page to reflect the changes made to the layout table after it is updated.

Thanks!
The Meurwinn Concept Concept
RE: Refresh Layout post database update
November 20, 2008 8:38 AM
Answer

The Meurwinn Concept Concept

Rank: Expert

Posts: 262

Join Date: April 9, 2006

Recent Posts

Hi, i think you shuld have a look at the portal-ext.properties or the system-ext.properties... perhaps there is a property to disable the cache. but you should keep the cache enable because of the performances...


Otherwise, you can update your layout with the API, services, web services... and Liferay will see the change without restrating the server.
atul patel
Re: [Liferay Forums][Liferay Legacy] RE: Refresh Layout post database updat
November 20, 2008 8:43 AM
Answer

atul patel

Rank: Regular Member

Posts: 190

Join Date: November 17, 2006

Recent Posts

Take a look at your liferay/ehcache folder.

Requires restart but you should be able to go to liferay/ehcache
folder and look for the cached' class. I would just delete the cached
entries

I don't have my IDE up, so can't confirm the location/class name, but
that would be an approach.

--Atul

On Nov 20, 2008, at 8:33 AM, Brian Scott Schupbach from liferay.com
wrote:

> any ideas on this???
>
> I am having a similar issue. I need the page to reflect the changes
> made to the layout table after it is updated.
>
> Thanks!
> --
> Liferay Message Boards
> http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1615633
> mb.35287.1615633@events.liferay.com
> http://www.liferay.com
Brian Scott Schupbach
RE: Refresh Layout post database update
November 20, 2008 9:44 AM
Answer

Brian Scott Schupbach

Rank: Expert

Posts: 329

Join Date: October 23, 2008

Recent Posts

Thanks for the quick responses.

The problem is that I do want caching enabled for performance reasons so I do not want to turn caching off completely.

I also do not want to have to restart tomcat every time an update to the database is made.


The scenario:

We have a site that we only would want site administrators to add/modify sub pages (child pages). In order to do this I created a separate portlet to manage the pages that blocks these users from changing parent pages (layout.getParentId > 0 is a child page. If the parentId is 0 then it is a parent). I am able to update the layout table and create chid pages with no problem. The issue is that the pages are not immediately reflected onto the site. I would like the chache to be refreshed when the database is updated just like how it is being done in liferay's "manage pages" portlet. Any ideas how this is being done? liferayportlet-ext.xml?

Thanks!
atul patel
Re: [Liferay Forums][Liferay Legacy] RE: Refresh Layout post database updat
November 20, 2008 9:52 AM
Answer

atul patel

Rank: Regular Member

Posts: 190

Join Date: November 17, 2006

Recent Posts

If you are doing updates through a portlet, then instead of doing the
updates directly to the database you should consider making the
updates through the service layer.

The other option is to use/get the ehcache manager object, find the
cached layouts, and remove them. All of this should be doable from
the code. If you trace LayoutLocalServiceUtil that should help you.

--Atul

On Nov 20, 2008, at 9:44 AM, Brian Scott Schupbach from liferay.com
wrote:

> Thanks for the quick responses.
>
> The problem is that I do want caching enabled for performance
> reasons so I do not want to turn caching off completely.
>
> I also do not want to have to restart tomcat every time an update to
> the database is made.
>
>
> The scenario:
>
> We have a site that we only would want site administrators to add/
> modify sub pages (child pages). In order to do this I created a
> separate portlet to manage the pages that blocks these users from
> changing parent pages (layout.getParentId > 0 is a child page. If
> the parentId is 0 then it is a parent). I am able to update the
> layout table and create chid pages with no problem. The issue is
> that the pages are not immediately reflected onto the site. I would
> like the chache to be refreshed when the database is updated just
> like how it is being done in liferay's "manage pages" portlet. Any
> ideas how this is being done? liferayportlet-ext.xml?
>
> Thanks!
> --
> Liferay Message Boards
> http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1616897
> mb.35287.1616897@events.liferay.com
> http://www.liferay.com