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 Paul Spencer <pa...@mikon.com> on 2001/06/27 09:52:27 UTC

Dynamic protlet configuration

I have been working with Jetspeed v1.3a1 and the current CVS.  I am
excited by the new features that I have see in the CVS! Great work!

I am building a portal to present production data.  The user of the
portal range from management to engineers and lab technicians.  Content
for the portlets is generated from a database.  The types of content
displayed in include graphs (JPEG/BMP/SVG), Lists (via RSS) and mini Web
pages (HTML).  I currently display the desired content using the CVS and
configuring portlets.xreg.

Requirements/Environment:
o Initially their will be 100+ portlets.

o New portlets will be created all of the time.  The portlet
configuration can easily be extracted from a database.

o The list of portlets available to a user will be limited based on
Jetspeed users and roles.

o Portlets will be organized into logical groups, i.e. "Production Area
1 Management".  The portlets should be presented to the user in logical
groups, see the example below.
    Production Area 1 Management
        Daily Report
        Production Summary by Shift

    Production Area 2 Management
        Daily Report
        Production Summary by Shift
   
    Mill Summaries
        Daily Report
        Production Summary by Shift

Questions:
1) Can portlets be added while jetspeed is running?

2) Can jetspeed get the portlet configuration from a database?

3) Can the list of available portlets be presented in the Customizer as
described above?

Paul

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


Re: Dynamic protlet configuration

Posted by Raphaël Luta <ra...@networks.groupvu.com>.
Paul Spencer wrote:

> I notices the following entry in JetspeedResources.properties.  Could it
> be that I am impatient and did not wait 100 milliseconds ;)
>    services.Registry.refreshRate=100
> 


Looking at the code, I don't accept refresh rate < one minute (SCAN_RATE
in RegistryWatcher.), only if the refresh rate is greater than 60000
does Jetspeed take it into account.


> The log file shows the refresh of the registry about a minute after I
> saved the file.  It also show the registry being refreshed ever minute
> after that!
> 

Yeah I noticed this as well, probably a stupid flag which is not reset
correctly, but I've not yet found the time to track it down...


--
Raphael Luta - raphael.luta@networks.groupvu.com
Vivendi Universal Networks - Paris


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


Re: Dynamic protlet configuration

Posted by Paul Spencer <pa...@mikon.com>.
I notices the following entry in JetspeedResources.properties.  Could it
be that I am impatient and did not wait 100 milliseconds ;)
   services.Registry.refreshRate=100

The log file shows the refresh of the registry about a minute after I
saved the file.  It also show the registry being refreshed ever minute
after that!

Paul


Raphaël Luta wrote:
> 
> Paul Spencer wrote:
> 
> > Raphaël,
> > I added a portlet by updating the local-portlets.xreg file.  That
> > portlet was not displayed in the Customizer until Jetspeed was
> > restarted.  Is their something that I should do to cause Jetspeed to
> > read the local-portlets.xreg file?
> >
> > Thank you for the tip about local-portlets.xreg.
> >
> 
> In theory no, but there may be a bug in the registry service that prevent
> the registry from picking up new files at runtime.
> Do you see something in the logfile in DEBUG mode ?
> 
> --
> Raphael Luta - raphael.luta@networks.groupvu.com
> Vivendi Universal Networks - Paris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org

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


Re: Dynamic protlet configuration

Posted by Raphaël Luta <ra...@networks.groupvu.com>.
Paul Spencer wrote:

> Raphaël,
> I added a portlet by updating the local-portlets.xreg file.  That
> portlet was not displayed in the Customizer until Jetspeed was
> restarted.  Is their something that I should do to cause Jetspeed to
> read the local-portlets.xreg file?
> 
> Thank you for the tip about local-portlets.xreg.
> 


In theory no, but there may be a bug in the registry service that prevent
the registry from picking up new files at runtime.
Do you see something in the logfile in DEBUG mode ?

--
Raphael Luta - raphael.luta@networks.groupvu.com
Vivendi Universal Networks - Paris


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


Re: Dynamic protlet configuration

Posted by Paul Spencer <pa...@mikon.com>.
Raphaël,
I added a portlet by updating the local-portlets.xreg file.  That
portlet was not displayed in the Customizer until Jetspeed was
restarted.  Is their something that I should do to cause Jetspeed to
read the local-portlets.xreg file?

Thank you for the tip about local-portlets.xreg.

Paul Spencer

Raphaël Luta wrote:
> 
> > Questions:
> > 1) Can portlets be added while jetspeed is running?
> >
> 
> Yes. Simply add their definition in the xreg file and drop the classes in
> /WEB-INF/classes
>

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


Re: Dynamic protlet configuration

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

> > The demo file is here:-
> > 
> > http://kimptoc.net/jetspeed/demo-portlets.xreg
> > 
> > The portlets.xreg diff is here:-
> > 
> > http://kimptoc.net/jetspeed/portlets.xreg.diffu
> 
> 
> Do you think it's still worthwhile to keep wml-examples.xreg
> separate ? Maybe it would be easier to merge the demo-portlets
> and the wml-example since the wml portlets are really just
> simple stubs.
> 
> What do you think ?
> 

Oops - didn't see that file.

I have not done anything with the wml stuff (which voids my opinion
anyway...) - aren't some of the html portlets usable via wml too - in
which case, it probably should be one file.

Chris

=====
Need somewhere to Live in London - http://freeflats.com

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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


Re: Dynamic protlet configuration

Posted by Raphaël Luta <ra...@networks.groupvu.com>.
Chris Kimpton wrote:

> 
> Here's a first go at it:
> 
> The demo file is here:-
> 
> http://kimptoc.net/jetspeed/demo-portlets.xreg
> 
> The portlets.xreg diff is here:-
> 
> http://kimptoc.net/jetspeed/portlets.xreg.diffu


Thanks,


Do you think it's still worthwhile to keep wml-examples.xreg
separate ? Maybe it would be easier to merge the demo-portlets
and the wml-example since the wml portlets are really just
simple stubs.

What do you think ?

--
Raphael Luta - raphael.luta@networks.groupvu.com
Vivendi Universal Networks - Paris


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


Re: Dynamic protlet configuration

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

> 
> > Is it worth splitting portlets.xreg into 2 files, one for common
> > stuff everyone will use and one for the demo/default
> installation? 
> > People can then remove/amend this file as needed?
> > 
> 
> 
> Yes, good idea. When I implmented the things I did not spend a lot
> of time
> wondering how to split the different definitions in xreg files.
> 
> Send diff -u patches !
> 

Here's a first go at it:

The demo file is here:-

http://kimptoc.net/jetspeed/demo-portlets.xreg

The portlets.xreg diff is here:-

http://kimptoc.net/jetspeed/portlets.xreg.diffu

HTH,
Chris

=====
Need somewhere to Live in London - http://freeflats.com

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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


Re: Dynamic protlet configuration

Posted by Raphaël Luta <ra...@networks.groupvu.com>.
Chris Kimpton wrote:

>>Jetspeed CVS should pick up any .xreg file defined in the
>>/WEB-INF/conf
>>directory and treat it as a registry definition file.
>>
>>It it doesn't work, try restarting Jetspeed (there may be a bug in
>>there)
>>if it still doesn't work: check the jetspeed.log and your xreg
>>file, you probably
>>have a syntax error.
>>
>>
> 
> The problem was that the portlet is called Welcome, which is ignored
> in favour of the standard one in portlets.xreg - so I just changed
> its name.
> 


That explains it then, when there are naming conflicts Jetspeed use only
the first entry encountered


> Is it worth splitting portlets.xreg into 2 files, one for common
> stuff everyone will use and one for the demo/default installation? 
> People can then remove/amend this file as needed?
> 


Yes, good idea. When I implmented the things I did not spend a lot of time
wondering how to split the different definitions in xreg files.

Send diff -u patches !

--
Raphael Luta - raphael.luta@networks.groupvu.com
Vivendi Universal Networks - Paris


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


Re: Dynamic protlet configuration

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

> > 
> >>Just a quick tip: don't use portlets.xreg but rather a local
> >>portlet registry
> >>like local-portlets.xreg. This way if/when you upgrade your
> >>jetspeed version,
> >>you'll only need to copy your local file to the new webapp and
> not
> >>try to merge
> >>any difference that may occur between the default Jetspeed
> >>portlets.xreg and
> >>your own version.
> >>
> >>
> > 
> > I am just trying to do this - but I can't seem to get my
> > local-portlets file read - I tried copying the portlets entry in
> the
> > registry.xml, but that caused some errors and didn't seem to
> work.
> > 
> 
> 
> Don't touch the registry.xml file unless you know exactly what
> you're
> doing !

Thats good - I didn't want realy to change it anyway  ;-)

> 
> Jetspeed CVS should pick up any .xreg file defined in the
> /WEB-INF/conf
> directory and treat it as a registry definition file.
> 
> It it doesn't work, try restarting Jetspeed (there may be a bug in
> there)
> if it still doesn't work: check the jetspeed.log and your xreg
> file, you probably
> have a syntax error.
> 

The problem was that the portlet is called Welcome, which is ignored
in favour of the standard one in portlets.xreg - so I just changed
its name.

Is it worth splitting portlets.xreg into 2 files, one for common
stuff everyone will use and one for the demo/default installation? 
People can then remove/amend this file as needed?

Thanks,
Chris

=====
Need somewhere to Live in London - http://freeflats.com

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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


Re: Dynamic protlet configuration

Posted by Raphaël Luta <ra...@networks.groupvu.com>.
Chris Kimpton wrote:

> Hi,
> 
> 
>>Just a quick tip: don't use portlets.xreg but rather a local
>>portlet registry
>>like local-portlets.xreg. This way if/when you upgrade your
>>jetspeed version,
>>you'll only need to copy your local file to the new webapp and not
>>try to merge
>>any difference that may occur between the default Jetspeed
>>portlets.xreg and
>>your own version.
>>
>>
> 
> I am just trying to do this - but I can't seem to get my
> local-portlets file read - I tried copying the portlets entry in the
> registry.xml, but that caused some errors and didn't seem to work.
> 


Don't touch the registry.xml file unless you know exactly what you're
doing !

Jetspeed CVS should pick up any .xreg file defined in the /WEB-INF/conf
directory and treat it as a registry definition file.

It it doesn't work, try restarting Jetspeed (there may be a bug in there)
if it still doesn't work: check the jetspeed.log and your xreg file, you probably
have a syntax error.


--
Raphael Luta - raphael.luta@networks.groupvu.com
Vivendi Universal Networks - Paris


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


Re: Dynamic protlet configuration

Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,

> 
> Just a quick tip: don't use portlets.xreg but rather a local
> portlet registry
> like local-portlets.xreg. This way if/when you upgrade your
> jetspeed version,
> you'll only need to copy your local file to the new webapp and not
> try to merge
> any difference that may occur between the default Jetspeed
> portlets.xreg and
> your own version.
> 

I am just trying to do this - but I can't seem to get my
local-portlets file read - I tried copying the portlets entry in the
registry.xml, but that caused some errors and didn't seem to work.

Any info on how to use this would be appreciated.

Thanks,
Chris

=====
Need somewhere to Live in London - http://freeflats.com

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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


Re: Dynamic protlet configuration

Posted by Raphaël Luta <ra...@networks.groupvu.com>.
Paul Spencer wrote:

> I have been working with Jetspeed v1.3a1 and the current CVS.  I am
> excited by the new features that I have see in the CVS! Great work!
> 
> I am building a portal to present production data.  The user of the
> portal range from management to engineers and lab technicians.  Content
> for the portlets is generated from a database.  The types of content
> displayed in include graphs (JPEG/BMP/SVG), Lists (via RSS) and mini Web
> pages (HTML).  I currently display the desired content using the CVS and
> configuring portlets.xreg.
> 


Just a quick tip: don't use portlets.xreg but rather a local portlet registry
like local-portlets.xreg. This way if/when you upgrade your jetspeed version,
you'll only need to copy your local file to the new webapp and not try to merge
any difference that may occur between the default Jetspeed portlets.xreg and
your own version.


> Requirements/Environment:
> o Initially their will be 100+ portlets.
> 
> o New portlets will be created all of the time.  The portlet
> configuration can easily be extracted from a database.
> 
> o The list of portlets available to a user will be limited based on
> Jetspeed users and roles.
> 
> o Portlets will be organized into logical groups, i.e. "Production Area
> 1 Management".  The portlets should be presented to the user in logical
> groups, see the example below.
>     Production Area 1 Management
>         Daily Report
>         Production Summary by Shift
> 
>     Production Area 2 Management
>         Daily Report
>         Production Summary by Shift
>    
>     Mill Summaries
>         Daily Report
>         Production Summary by Shift
> 
> Questions:
> 1) Can portlets be added while jetspeed is running?
> 


Yes. Simply add their definition in the xreg file and drop the classes in
/WEB-INF/classes


> 2) Can jetspeed get the portlet configuration from a database?
> 


Not as default, but it's just a matter of implementing a Registry service
backed by a DBMS instead of XML files. Using Castor JDO for thisq purpose
should be very easy.


> 3) Can the list of available portlets be presented in the Customizer as
> described above?
> 


Since your definitions are local, you'll probably have to modify a little
the browser code/template but this does not present major issues. You can
only play with this by customizing the default portlet-registry-browser
portlet. I've not yet linked the protlet browser with the customizer.

--
Raphael Luta - raphael.luta@networks.groupvu.com
Vivendi Universal Networks - Paris


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