You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Brad Hannah <ha...@post.queensu.ca> on 2006/06/14 15:07:38 UTC

Sharing publications

Hello All,

I am currently working on a few Solaris multi-cpu boxes. Because of 
this, I have been working on optimizations for our static exporter 
procedure. My hope is to run two Tomcat servers (so each CPU is used), 
the question is, does anyone know if they can both point to the same 
occurrence of Lenya? Only one would be writing (or authoring), while the 
other would be dedicated to exporting (just reading).

I have considered putting behind a load balancer, but I am still plagued 
with the same question, can they run the same copy of Lenya. My thought 
is, there may be a problem with sharing the /{pub}/work/cache 
directories. Anyone have experience in this?

Thanks,
Brad Hannah
Systems Programmer
Queen's University


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Sharing publications

Posted by Jann Forrer <ja...@id.unizh.ch>.
Jim Douglas wrote:
>> From: Jann Forrer <ja...@id.unizh.ch>
>> Reply-To: user@lenya.apache.org
>> To: user@lenya.apache.org
>> Subject: Re: Sharing publications
>> Date: Wed, 14 Jun 2006 16:39:00 +0200
>>
>> Jim Douglas wrote:
>>>> From: Jann Forrer <ja...@id.unizh.ch>
>>>> Reply-To: user@lenya.apache.org
>>>> To: user@lenya.apache.org
>>>> Subject: Re: Sharing publications
>>>> Date: Wed, 14 Jun 2006 15:46:52 +0200
>>>>
>>>> Brad Hannah wrote:
>>>>> Hello All,
>> [ ... ]
>>
>>>>>
>>>
>>>
>>> Is it possible to modify Lenya so that when a page is 'Published', 
>>> Lenya can kick off a batch job to copy the page to a different webapp 
>>> directory?
>>>
>> That should be possible if you did not use a security manger which 
>> prohibit the execution of "external" scripts.
>>
>> You can also try to modify the publish task:
>>
>> org.apache.lenya.defaultpub.cms.task.Publish.java
>>
>> if you use lenya-1.2.
>>
>> Jann
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>>
> 
> Is the security manger you're referring to withing Lenya or on my Linux 
> Server?  How would I tell Lenya to kick off an external script?
> 

No, the security manager is not within lenya and in a standard 
installation there is no security manager. However you can attach a 
security manger to every java process. I did no use it with lenya but 
with other applications.

As far as i know you can not tell lenya to kick off an external script 
without changing the source code. An external command can be executed 
from within a java class as follows:

Runtime.getRuntime().exec("/bin/df -h -P");

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Sharing publications

Posted by Jim Douglas <jd...@hotmail.com>.
>From: Jann Forrer <ja...@id.unizh.ch>
>Reply-To: user@lenya.apache.org
>To: user@lenya.apache.org
>Subject: Re: Sharing publications
>Date: Wed, 14 Jun 2006 16:39:00 +0200
>
>Jim Douglas wrote:
>>>From: Jann Forrer <ja...@id.unizh.ch>
>>>Reply-To: user@lenya.apache.org
>>>To: user@lenya.apache.org
>>>Subject: Re: Sharing publications
>>>Date: Wed, 14 Jun 2006 15:46:52 +0200
>>>
>>>Brad Hannah wrote:
>>>>Hello All,
>[ ... ]
>
>>>>
>>
>>
>>Is it possible to modify Lenya so that when a page is 'Published', Lenya 
>>can kick off a batch job to copy the page to a different webapp directory?
>>
>That should be possible if you did not use a security manger which prohibit 
>the execution of "external" scripts.
>
>You can also try to modify the publish task:
>
>org.apache.lenya.defaultpub.cms.task.Publish.java
>
>if you use lenya-1.2.
>
>Jann
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>

Is the security manger you're referring to withing Lenya or on my Linux 
Server?  How would I tell Lenya to kick off an external script?

Jim



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Sharing publications

Posted by Jann Forrer <ja...@id.unizh.ch>.
Jim Douglas wrote:
>> From: Jann Forrer <ja...@id.unizh.ch>
>> Reply-To: user@lenya.apache.org
>> To: user@lenya.apache.org
>> Subject: Re: Sharing publications
>> Date: Wed, 14 Jun 2006 15:46:52 +0200
>>
>> Brad Hannah wrote:
>>> Hello All,
[ ... ]

>>>
> 
> 
> Is it possible to modify Lenya so that when a page is 'Published', Lenya 
> can kick off a batch job to copy the page to a different webapp directory?
> 
That should be possible if you did not use a security manger which 
prohibit the execution of "external" scripts.

You can also try to modify the publish task:

org.apache.lenya.defaultpub.cms.task.Publish.java

if you use lenya-1.2.

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Sharing publications

Posted by Jim Douglas <jd...@hotmail.com>.
>From: Jann Forrer <ja...@id.unizh.ch>
>Reply-To: user@lenya.apache.org
>To: user@lenya.apache.org
>Subject: Re: Sharing publications
>Date: Wed, 14 Jun 2006 15:46:52 +0200
>
>Brad Hannah wrote:
>>Hello All,
>>
>>I am currently working on a few Solaris multi-cpu boxes. Because of this, 
>>I have been working on optimizations for our static exporter procedure. My 
>>hope is to run two Tomcat servers (so each CPU is used), the question is, 
>>does anyone know if they can both point to the same occurrence of Lenya? 
>>Only one would be writing (or authoring), while the other would be 
>>dedicated to exporting (just reading).
>>
>We have two tomcat running on different (linux) servers accessing sharing 
>the pub directory. Our live Server can only read whereas the authoring 
>server can read/write.
>We achieved this by using nfs i.e. we mount the pubs directory of the one 
>server (authoring) readonly on the pubs diretory of the live server. The 
>entry in the /etc/fstab looks like:
>
>host:/authoring/home/lenya/build/webapps/lenya/lenya/pubs 
>/live/home/lenya/build/webapps/ROOT/lenya/pubs  nfs ,tcp,ro 0 0
>
>Additionally we have a shared directory which both server can access 
>read/write for the cache.
>
>
>>I have considered putting behind a load balancer, but I am still plagued 
>>with the same question, can they run the same copy of Lenya. My thought 
>>is, there may be a problem with sharing the /{pub}/work/cache directories. 
>>Anyone have experience in this?
>>
>
>Jann
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>For additional commands, e-mail: user-help@lenya.apache.org
>


Is it possible to modify Lenya so that when a page is 'Published', Lenya can 
kick off a batch job to copy the page to a different webapp directory?

Jim



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Sharing publications

Posted by Jann Forrer <ja...@id.unizh.ch>.
Brad Hannah wrote:
> Hello All,
> 
> I am currently working on a few Solaris multi-cpu boxes. Because of 
> this, I have been working on optimizations for our static exporter 
> procedure. My hope is to run two Tomcat servers (so each CPU is used), 
> the question is, does anyone know if they can both point to the same 
> occurrence of Lenya? Only one would be writing (or authoring), while the 
> other would be dedicated to exporting (just reading).
>
We have two tomcat running on different (linux) servers accessing 
sharing the pub directory. Our live Server can only read whereas the 
authoring server can read/write.
We achieved this by using nfs i.e. we mount the pubs directory of the 
one server (authoring) readonly on the pubs diretory of the live server. 
The entry in the /etc/fstab looks like:

host:/authoring/home/lenya/build/webapps/lenya/lenya/pubs 
/live/home/lenya/build/webapps/ROOT/lenya/pubs  nfs ,tcp,ro 0 0

Additionally we have a shared directory which both server can access 
read/write for the cache.


> I have considered putting behind a load balancer, but I am still plagued 
> with the same question, can they run the same copy of Lenya. My thought 
> is, there may be a problem with sharing the /{pub}/work/cache 
> directories. Anyone have experience in this?
> 

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org