Update: The session ID accross both portlets is identical. They are in separate war files - does that make a difference? Any answers appreciated, I'm stuck here.
In case anyone had the same issue, It was because both portlets were in different wars. Putting them in the same war fixed it. Whats wierd though is that when they were in separate wars, the session ID across both was identical. However niether portlet could read eachothers attributes.
The J2EE spec requires different sessions for different WAR files , even if the sesison id is the same. That's why you see what you see.
However: JBossPortal has a configuration option where all portlet WARs can be configured to use the Portal's session (I don't remember where it is though ;) . In other words: you can configure the portal to use only one session across all WAR files. This was done to allow for clustered session support.
Think you could help me hunt that setting down? I have a new problem where i have a non portal webapp that has to be deoployed as a different war. It has to read both my portlets session vars and visa versa.
Im reading TONS of contradictory posts saying that it can be done with the servlet container descriptor within jboss by setting the emptySessionPath="true" but that doesnt work. Any ideas? really appreciate it.