Sergei,

Sergei O. Naumov wrote:

> Hi!
> I was wondering whether anyone wrote portlets that interact with databases. For 
>example,
> fetch some data from there and display them. Are there any examples of such things
> anywhere?

> 
I do not know of one, but I have not looked for one. 



Things to watch:
o  Portlet caching.  The class AbstractPortlet is cacheable.  So it has 
a definable lifetime, but I do know if the class knows when it is being 
destroyed.

o Database connections.  Database connection creation can be expensive, 
so pool them.

> Do I understand things correctly if I say that init() method for every portlet gets 
>called 
> when Jetspeed initializes? It means I can establish a connection there.


No! The portlet's init() is called every time the Jetspeed displays a 
page, as define by the PSML, and that portal is in the PSML.  This keep 
init() small and fast!


> 

> Thanks,
>               Sergei
> 


Paul Spencer


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to