[jboss-user] [JBoss Portal] - Saving object in PortletSession

herveminko do-not-reply at jboss.com
Tue Jan 30 07:54:30 EST 2007


Hi guys,

I have a problem aving objects in a PortletSession. I want to save obejcts i nthe PortletSession of JBoss Portal 2.2.1 using the method setAttribute(key, Value, PortletSession.APPLICATION_SCOPE), because those attributes must be shared with other Portlers of the same Portlet Application. My java code looks like:

ArrayList myObjects = MYClass.getMyObjects();
 session.setAttribute("obj", myObjects, PortletSession.APPLICATION_SCOPE);

After doing this, i want to retrieve my saved objects with the statement:
ArrayList myObjects2 = session.get("obj");

Unfortunately i get "null" as return value, because the key "obj" is not present in the PortletSession object. After investigating the cause of this strange behaviour, i found out that my obects are not stored with my choses kex "obj", but with the key  "jbp19367721obj". 

jbp19367721 seems to be the window ID of my portlet window. Is there a possibility to store objects in the application scope without using this window ID? Is it a particularity of JBoss Portal 2.2.1? It is very important for me to find a way to sidestep this window ID for saving my attributes in the PortletSession.
Thanks in advance.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008264#4008264

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008264



More information about the jboss-user mailing list