0

Dear pluto portlet container,

I try to extend pluto portlet container, and make my own portal (please do not ask why), and after 2 weeks, I managed to extend it.

First, I just wanna ask: Does pluto container cached its portlet instance (extended from GenericPortlet) into container, as Singleton?

Because I found that every new session created, are actually served by the same portlet instance, and I found this because I put a custom state (a field in a class) on my portlet, and when I changed that custom state in one session, I got the same state on the other session.

Second question: How to extend the pluto portlet container, so it will spawn a new portlet (instead of using cached portlet) every time there is a new session?

Or am I doing a wrong approached?

Thanks for your advice

Bromo Programmer
  • 670
  • 2
  • 13
  • 37

1 Answers1

0

1) I don't know specifically about Pluto but, as far as I know, other portlet containers do keep a single instance of the portlet for all users. This could be part of the JSR-286 spec. If you're extending Pluto that's probably worth a read anyways.

2) I would imagine changing this basic functionality will be a lot of work, or at least a lot of regression testing. Creating a portlet instance per user also has performance implications that using a single instance eliminates. It would be simpler to just make your portlet work with the current model.

Nick Roth
  • 3,057
  • 2
  • 15
  • 15