Identify which Application is currently active in portal

Hi,

I have a situation where I have a couple of TK Applications running as portlets in JBoss Portal. Not all portlets are viewed at the same time, but only one at a time and inited when opened/viewed the first time. I’d like to somehow know which one of the portlet applications is running and showed ATM, is this possible?

I need this because I want to grab switching between applications in my transactionStart() implementation. The only thing is that every open application’s transactionStart() is called when switching the view, so I don’t know from which portlet I’m navigating away and into which other portlet I’m heading.

I guess I could grab a part of the URL and compare it to the Application parameter of transactionStart(), but is there some more sophisticated and “clean” way of doing this?

// Jonas

You can listen for portlet renderrequest which fires for all portlets in page when url is loaded.

PortletApplicationContext.addPortletListener(PortletListener p);