You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Patrick McCabe <pa...@gmail.com> on 2006/11/17 16:55:47 UTC

Multiple Jetspeed front end, same database

Hi Guys;

We have 2 front end jetspeed deployments up and running, and they share the
same database.  Everything is the same on both machines, including the psml
files. However, it is not working as I would expect.

We are running into issues with Jetspeed-Layouts not available exceptions on
one of the machines, our secondary box that we are only using for testing.
Almost every single portlet has this error when we try to view it.

I have run into this exact same problem before when we had different psml
files, that had fragments with identical id's..one fragment was pointing to
VelocityThreeColumns layout, and the other was pointing to
VelocityOneColum.  This caused all of the VelocityOneColumn layouts to not
function.  This is one of the reasons why we are supposed to use unique id's
I guess.

So back to my original question, Is it not a good idea to have the same psml
files, with same fragment id's on 2 seperate machines sharing the same
database.  Is there a way to make this work without changing all of the
fragment id's on the second box, or would that be the recomended solution ?

Thanks

Pat M

Re: Multiple Jetspeed front end, same database

Posted by David Sean Taylor <da...@bluesunrise.com>.
Patrick McCabe wrote:
> On another note, how would I use the database page manager ?  How is it 
> that
> I can get a psml file into the database easily ?
> 
You need the source to run impor.
 From the Maven-1 build, you can run:

maven import

or

maven export

Recommend reviewing the maven.xml, specifically the import and export 
goals to see how to set up properties

With Maven-2, you just run the "dbpsml" profile, for example:

mvn -P tomcat,dbpsml

See docs on maven-2 build:

http://wiki.apache.org/portals/Jetspeed2/Maven2BuildSupport


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


Re: Multiple Jetspeed front end, same database

Posted by Patrick McCabe <pa...@gmail.com>.
On another note, how would I use the database page manager ?  How is it that
I can get a psml file into the database easily ?

On 11/20/06, Patrick McCabe <pa...@gmail.com> wrote:
>
> What do you mean when you say "treating them as a resource in the
> WEB-INF/pages".  Is there something special that I have to do to make this
> happen ?
>
> On 11/20/06, David Sean Taylor <da...@bluesunrise.com> wrote:
> >
> > Patrick McCabe wrote:
> > > Hi Guys;
> > >
> > > We have 2 front end jetspeed deployments up and running, and they
> > share the
> > > same database.  Everything is the same on both machines, including the
> > psml
> > > files. However, it is not working as I would expect.
> > >
> > > We are running into issues with Jetspeed-Layouts not available
> > > exceptions on
> > > one of the machines, our secondary box that we are only using for
> > testing.
> > > Almost every single portlet has this error when we try to view it.
> > >
> > > I have run into this exact same problem before when we had different
> > psml
> > > files, that had fragments with identical id's..one fragment was
> > pointing to
> > > VelocityThreeColumns layout, and the other was pointing to
> > > VelocityOneColum.  This caused all of the VelocityOneColumn layouts to
> > not
> > > function.  This is one of the reasons why we are supposed to use
> > unique
> > > id's
> > > I guess.
> > >
> > > So back to my original question, Is it not a good idea to have the
> > same
> > > psml
> > > files, with same fragment id's on 2 seperate machines sharing the same
> > > database.  Is there a way to make this work without changing all of
> > the
> > > fragment id's on the second box, or would that be the recomended
> > solution ?
> > >
> > Recommend using the Database Page Manager if you are clustering and if
> > users can update their PSML files. If your PSML files are read only,
> > then you can get away with treating them as a resource in the
> > WEB-INF/pages directory.
> >
> > In the second case, use the same fragment IDS on both machines. If you
> > are going to change the portlet (even layout portlet) associated with a
> > fragment, its best to create a new fragment ID and do this for all pages
> >
> > in the cluster.
> >
> > I have seen problems with redeploying portlet applications, and the
> > fragment ids getting out of sync on a cluster. Im working on a proposal
> > for safely deploying portlet applications in clusters.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
>

Re: Multiple Jetspeed front end, same database

Posted by Frank Stalherm <ma...@goodgulf.net>.
Thanks. I will start with that.


David Sean Taylor wrote:
> Frank Stalherm wrote:
>> How do I deploy/undeploy the page information into the database? Is 
>> there a tool?
>
> Yes, but you will need to either setup a custom build or run from source
> Either way, you need Maven since there are no command line tools or UI 
> tools for importing and exporting to the database (yet)
>
> From the Maven-1 build, you can run:
>
> maven import
>
> or
>
> maven export
>
> Recommend reviewing the maven.xml, specifically the import and export 
> goals to see how to set up properties
>
> With Maven-2, you just run the "dbpsml" profile, for example:
>
> mvn -P tomcat,dbpsml
>
> See docs on maven-2 build:
>
> http://wiki.apache.org/portals/Jetspeed2/Maven2BuildSupport
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>


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


Re: Multiple Jetspeed front end, same database

Posted by David Sean Taylor <da...@bluesunrise.com>.
Frank Stalherm wrote:
> How do I deploy/undeploy the page information into the database? Is 
> there a tool?

Yes, but you will need to either setup a custom build or run from source
Either way, you need Maven since there are no command line tools or UI 
tools for importing and exporting to the database (yet)

 From the Maven-1 build, you can run:

maven import

or

maven export

Recommend reviewing the maven.xml, specifically the import and export 
goals to see how to set up properties

With Maven-2, you just run the "dbpsml" profile, for example:

mvn -P tomcat,dbpsml

See docs on maven-2 build:

http://wiki.apache.org/portals/Jetspeed2/Maven2BuildSupport


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


Re: Multiple Jetspeed front end, same database

Posted by Frank Stalherm <ma...@goodgulf.net>.
How do I deploy/undeploy the page information into the database? Is 
there a tool?

Thanks.
Frank


David Sean Taylor wrote:
> b.v.weert@valbosoft.com wrote:
>> Hello,
>>
>> could you give some advise about best practice on placing changeable 
>> files under a web root? I guess in any webapp you'd like to place 
>> files in a subdirectory of your webapp (maybe even in WEB-INF), like 
>> uploaded files. But when you work with WAR files this is impossible, 
>> or at least not a good idea, as you state. So where do you generally 
>> place these files?
>>
> Its a bad practice of placing modifiable files in the WAR for several 
> reasons:
>
> 1. it really makes it difficult to treat a WAR file as a simple 
> deployable unit. If you change a Java class, and want to simply drop 
> in the new war file following your application servers deployment 
> process, it makes a royal pain of dealing with modifiable files
>
> 2. This solution plain doesnt work on clustered app servers
>
> With PSML files, first and foremost, place the files somewhere where 
> they will be backed up. You can use a full file system path in the 
> Spring configuration in the page-manager.xml. Please beware that you 
> have to change this location for ALL 5 handlers. Something like:
>
> <constructor-arg index="3">
>    <value>${applicationRoot}/WEB-INF/pages</value>
> </constructor-arg>
>
> to
>
> <constructor-arg index="3">
>    <value>/usr/local/portal-data/pages</value>
> </constructor-arg>
>
>
> Also recommend looking into the DB PSML option
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>


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


Re: Multiple Jetspeed front end, same database

Posted by b....@valbosoft.com.
Hello,

moving the psml files out of the war works just fine.
I'd like to do the same for some .vm templates, but it seems that jetspeed 
1.5 doesn't like it when you add a path that's outside the webapp. I 
changed services.TemplateLocator.templateRoot in JS.properties and 
services.VelocityService.file.resource.loader.path in TR.properties, but 
then errors occurr.. I tried paths like c:/test/WEB-INF/templates and 
c:/test/WEB-INF/templates/vm, and also ${webappRoot}/../directory
Could it be that turbine doesn't allow paths outside the application? Any 
tips on how to achieve this?

Cheers,

Bo van Weert




David Sean Taylor <da...@bluesunrise.com> 
21/11/2006 19:59
Por favor, responda a
"Jetspeed Users List" <je...@portals.apache.org>


Para
Jetspeed Users List <je...@portals.apache.org>
cc

Asunto
Re: Multiple Jetspeed front end, same database






b.v.weert@valbosoft.com wrote:
> Hello,
> 
> Could this also somehow be accomplished for jetspeed 1.6? (I guess not 
> with Spring)

With 1.6, its the same concept
Just edit your JR.p :

And change:

services.PsmlManager.root=/WEB-INF/psml

to something like:

services.PsmlManager.root=/usr/locale/portal-data/psml

Note that in 1.6, we first try to locate file on the file system, and if 
we fail to find it, we then look for the same path  as a webapp relative 
path

1.6 also has a Database PSML Manager


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



Re: Multiple Jetspeed front end, same database

Posted by David Sean Taylor <da...@bluesunrise.com>.
b.v.weert@valbosoft.com wrote:
> Hello,
> 
> Could this also somehow be accomplished for jetspeed 1.6? (I guess not 
> with Spring)

With 1.6, its the same concept
Just edit your JR.p :

And change:

services.PsmlManager.root=/WEB-INF/psml

to something like:

services.PsmlManager.root=/usr/locale/portal-data/psml

Note that in 1.6, we first try to locate file on the file system, and if 
we fail to find it, we then look for the same path  as a webapp relative 
path

1.6 also has a Database PSML Manager


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


Re: Multiple Jetspeed front end, same database

Posted by b....@valbosoft.com.
Hello,

Could this also somehow be accomplished for jetspeed 1.6? (I guess not 
with Spring)

Regards,

Bo van Weert
tel. 902 014 180
(00 34) 96 393 19 77
fax. 96 360 69 13
http://www.valbosoft.com




David Sean Taylor <da...@bluesunrise.com> 
21/11/2006 19:23
Por favor, responda a
"Jetspeed Users List" <je...@portals.apache.org>


Para
Jetspeed Users List <je...@portals.apache.org>
cc

Asunto
Re: Multiple Jetspeed front end, same database






b.v.weert@valbosoft.com wrote:
> Hello,
> 
> could you give some advise about best practice on placing changeable 
files 
> under a web root? I guess in any webapp you'd like to place files in a 
> subdirectory of your webapp (maybe even in WEB-INF), like uploaded 
files. 
> But when you work with WAR files this is impossible, or at least not a 
> good idea, as you state. So where do you generally place these files?
> 
Its a bad practice of placing modifiable files in the WAR for several 
reasons:

1. it really makes it difficult to treat a WAR file as a simple 
deployable unit. If you change a Java class, and want to simply drop in 
the new war file following your application servers deployment process, 
it makes a royal pain of dealing with modifiable files

2. This solution plain doesnt work on clustered app servers

With PSML files, first and foremost, place the files somewhere where 
they will be backed up. You can use a full file system path in the 
Spring configuration in the page-manager.xml. Please beware that you 
have to change this location for ALL 5 handlers. Something like:

<constructor-arg index="3">
    <value>${applicationRoot}/WEB-INF/pages</value>
</constructor-arg>

to

<constructor-arg index="3">
    <value>/usr/local/portal-data/pages</value>
</constructor-arg>


Also recommend looking into the DB PSML option

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



Re: Multiple Jetspeed front end, same database

Posted by David Sean Taylor <da...@bluesunrise.com>.
b.v.weert@valbosoft.com wrote:
> Hello,
> 
> could you give some advise about best practice on placing changeable files 
> under a web root? I guess in any webapp you'd like to place files in a 
> subdirectory of your webapp (maybe even in WEB-INF), like uploaded files. 
> But when you work with WAR files this is impossible, or at least not a 
> good idea, as you state. So where do you generally place these files?
> 
Its a bad practice of placing modifiable files in the WAR for several 
reasons:

1. it really makes it difficult to treat a WAR file as a simple 
deployable unit. If you change a Java class, and want to simply drop in 
the new war file following your application servers deployment process, 
it makes a royal pain of dealing with modifiable files

2. This solution plain doesnt work on clustered app servers

With PSML files, first and foremost, place the files somewhere where 
they will be backed up. You can use a full file system path in the 
Spring configuration in the page-manager.xml. Please beware that you 
have to change this location for ALL 5 handlers. Something like:

<constructor-arg index="3">
    <value>${applicationRoot}/WEB-INF/pages</value>
</constructor-arg>

to

<constructor-arg index="3">
    <value>/usr/local/portal-data/pages</value>
</constructor-arg>


Also recommend looking into the DB PSML option

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


Re: Multiple Jetspeed front end, same database

Posted by b....@valbosoft.com.
Hello,

could you give some advise about best practice on placing changeable files 
under a web root? I guess in any webapp you'd like to place files in a 
subdirectory of your webapp (maybe even in WEB-INF), like uploaded files. 
But when you work with WAR files this is impossible, or at least not a 
good idea, as you state. So where do you generally place these files?

Cheers,

Bo van Weert
tel. 902 014 180
(00 34) 96 393 19 77
fax. 96 360 69 13
http://www.valbosoft.com





David Sean Taylor <da...@bluesunrise.com> 
21/11/2006 19:07
Por favor, responda a
"Jetspeed Users List" <je...@portals.apache.org>


Para
Jetspeed Users List <je...@portals.apache.org>
cc

Asunto
Re: Multiple Jetspeed front end, same database






Patrick McCabe wrote:
> What do you mean when you say "treating them as a resource in the
> WEB-INF/pages".  Is there something special that I have to do to make 
this
> happen ?
> 
Sorry, when I say "resource" I mean a read only file that is a part of 
your WAR file distribution. Placing files that can be modified in your 
war file is not really a good idea (although Jetspeed does this to make 
it easier to get a demo system up and running)

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



Re: Multiple Jetspeed front end, same database

Posted by David Sean Taylor <da...@bluesunrise.com>.
Patrick McCabe wrote:
> What do you mean when you say "treating them as a resource in the
> WEB-INF/pages".  Is there something special that I have to do to make this
> happen ?
> 
Sorry, when I say "resource" I mean a read only file that is a part of 
your WAR file distribution. Placing files that can be modified in your 
war file is not really a good idea (although Jetspeed does this to make 
it easier to get a demo system up and running)

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


Re: Multiple Jetspeed front end, same database

Posted by Patrick McCabe <pa...@gmail.com>.
What do you mean when you say "treating them as a resource in the
WEB-INF/pages".  Is there something special that I have to do to make this
happen ?

On 11/20/06, David Sean Taylor <da...@bluesunrise.com> wrote:
>
> Patrick McCabe wrote:
> > Hi Guys;
> >
> > We have 2 front end jetspeed deployments up and running, and they share
> the
> > same database.  Everything is the same on both machines, including the
> psml
> > files. However, it is not working as I would expect.
> >
> > We are running into issues with Jetspeed-Layouts not available
> > exceptions on
> > one of the machines, our secondary box that we are only using for
> testing.
> > Almost every single portlet has this error when we try to view it.
> >
> > I have run into this exact same problem before when we had different
> psml
> > files, that had fragments with identical id's..one fragment was pointing
> to
> > VelocityThreeColumns layout, and the other was pointing to
> > VelocityOneColum.  This caused all of the VelocityOneColumn layouts to
> not
> > function.  This is one of the reasons why we are supposed to use unique
> > id's
> > I guess.
> >
> > So back to my original question, Is it not a good idea to have the same
> > psml
> > files, with same fragment id's on 2 seperate machines sharing the same
> > database.  Is there a way to make this work without changing all of the
> > fragment id's on the second box, or would that be the recomended
> solution ?
> >
> Recommend using the Database Page Manager if you are clustering and if
> users can update their PSML files. If your PSML files are read only,
> then you can get away with treating them as a resource in the
> WEB-INF/pages directory.
>
> In the second case, use the same fragment IDS on both machines. If you
> are going to change the portlet (even layout portlet) associated with a
> fragment, its best to create a new fragment ID and do this for all pages
> in the cluster.
>
> I have seen problems with redeploying portlet applications, and the
> fragment ids getting out of sync on a cluster. Im working on a proposal
> for safely deploying portlet applications in clusters.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: Multiple Jetspeed front end, same database

Posted by David Sean Taylor <da...@bluesunrise.com>.
Patrick McCabe wrote:
> Hi Guys;
> 
> We have 2 front end jetspeed deployments up and running, and they share the
> same database.  Everything is the same on both machines, including the psml
> files. However, it is not working as I would expect.
> 
> We are running into issues with Jetspeed-Layouts not available 
> exceptions on
> one of the machines, our secondary box that we are only using for testing.
> Almost every single portlet has this error when we try to view it.
> 
> I have run into this exact same problem before when we had different psml
> files, that had fragments with identical id's..one fragment was pointing to
> VelocityThreeColumns layout, and the other was pointing to
> VelocityOneColum.  This caused all of the VelocityOneColumn layouts to not
> function.  This is one of the reasons why we are supposed to use unique 
> id's
> I guess.
> 
> So back to my original question, Is it not a good idea to have the same 
> psml
> files, with same fragment id's on 2 seperate machines sharing the same
> database.  Is there a way to make this work without changing all of the
> fragment id's on the second box, or would that be the recomended solution ?
> 
Recommend using the Database Page Manager if you are clustering and if 
users can update their PSML files. If your PSML files are read only, 
then you can get away with treating them as a resource in the 
WEB-INF/pages directory.

In the second case, use the same fragment IDS on both machines. If you 
are going to change the portlet (even layout portlet) associated with a 
fragment, its best to create a new fragment ID and do this for all pages 
in the cluster.

I have seen problems with redeploying portlet applications, and the 
fragment ids getting out of sync on a cluster. Im working on a proposal 
for safely deploying portlet applications in clusters.

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