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