PortletContainer container = (PortletContainer)invocation.getAttribute(ContainerPortletInvoker.PORTLET_CONTAINER);
ContainerPortletInfo containerInfo = (ContainerPortletInfo)container.getInfo();
//
Map<String, ContainerOptionInfo> options = containerInfo.getOptions();
ContainerOptionInfo scopingOption = options.get("javax.portlet.actionScopedRequestAttributes");
//
int maxScope = 0;
if (scopingOption != null && "true".equals(scopingOption.getValues().get(0)))
{
maxScope = 10;
//
List<String> values = scopingOption.getValues();
if (values.size() >= 3 && "numberOfCachedScopes".equals(values.get(1)))
{
try
{
maxScope = Integer.parseInt(values.get(2));