• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

portlet session

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi


Are there any things that we should keep in mind while developing JSR -168 portlets as regards the session? Is session optimization a concern? What all things should be kept in mind while placing an object in session? How big can the session be?

Appreciate your help
Dorothy
[ January 27, 2008: Message edited by: Dorothy Taylor ]
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The same rules that apply to HttpSessions apply to the PortletSession. In fact, under the cover, they are usually the same thing. Minimize session use when possible, but don't do it at the expense of the ease of development and maintainability.

Here are some JSR-168 Portlet Development Best Practices that I put together, which includes some discussion of the Portlet Session:

Portal & Portlet Development Best Practices

Kind regards,

-Cameron McKenzie
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am just starting to get some hold on the portlet session and was wondering (
pl pardon if this is totally incoherent and I am just jumping the learning gun..)

Lets say we have two different portlet apps (2 wars) - is it possible :
a) to have a single window which can display portlets across both these apps
b) if yes, how does the session behave ? I mean, since these are two different portlet apps, the portlet scopes would be different for the two which could mean that they dont share the same session id. Is this right ?

Thanks.
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many times the complexities of the portal can be alleviated by relying on your knowledge of plain old Servlets and JSPs.

With Servlet and JSP apps, the session can't cross a war file. The exact same thing can be said for a portlet war file - you can't share sessions across a war.

Why not put both of these portlets in the same war? If there's a compelling reason for them to communicate, then perhaps they should be packaged as part of the same app. Just add another entry to the portlet.xml file. So many portlet books (not mine of course) only ever show one portlet per war file. I can't think of too many J2EE applications with only one command object, so why would most portlet applications only have one portlet? (sorta equiavlent to a JSF or Struts command object).

Think about it.

-Cameron McKenzie
[ January 28, 2008: Message edited by: Cameron McKenzie ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Dorothy",
Please check your private messages.
 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dorthy,

I face the same problem, google IPC library

You will have to ejb side it with a db table to store the sessions and use the library to send sessions via message que
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic