Author: julien(a)jboss.com
Date: 2007-03-16 09:20:08 -0400 (Fri, 16 Mar 2007)
New Revision: 6712
Modified:
trunk/cms/src/main/org/jboss/portal/cms/impl/interceptors/ACLInterceptor.java
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/PortalSessionSynchronizationInterceptor.java
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ProducerCacheInterceptor.java
trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletApplicationRegistryImpl.java
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeploymentFactory.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/security/JBossPortletSecurityService.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/StateConverterV0.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/StateManagementPolicyService.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/producer/PortletStatePersistenceManagerService.java
trunk/portlet/src/main/org/jboss/portal/portlet/invocation/PortletInterceptor.java
trunk/portlet/src/main/org/jboss/portal/portlet/state/producer/ProducerPortletInvoker.java
trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java
trunk/portlet/src/main/org/jboss/portal/portlet/test/TestPortletInvoker.java
trunk/portlet/src/main/org/jboss/portal/portlet/test/support/PortletInvokerSupport.java
trunk/server/src/main/org/jboss/portal/server/ServerInterceptor.java
trunk/server/src/main/org/jboss/portal/server/config/ServerConfigService.java
trunk/server/src/main/org/jboss/portal/server/deployment/jboss/AbstractDeploymentFactory.java
trunk/server/src/main/org/jboss/portal/server/impl/ServerImpl.java
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptor.java
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStackFactory.java
Log:
started to pojoize the services in server and portlet modules
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/interceptors/ACLInterceptor.java
===================================================================
---
trunk/cms/src/main/org/jboss/portal/cms/impl/interceptors/ACLInterceptor.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/cms/src/main/org/jboss/portal/cms/impl/interceptors/ACLInterceptor.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -23,6 +23,7 @@
package org.jboss.portal.cms.impl.interceptors;
import org.w3c.dom.*;
+
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.InputStream;
@@ -59,451 +60,445 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.RoleModule;
+import org.apache.log4j.Logger;
/**
* ACLInterceptor is plugged into the CMS system to enforce fine grained security access
control
- * on resources stored in the CMS system.
- *
- * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 27, 2006
+ * on resources stored in the CMS system.
*
+ * @author Sohil Shah - sohil.shah(a)jboss.com - Nov 27, 2006
*/
public class ACLInterceptor extends CMSInterceptor
-{
- /**
- * default security policy that the cms service should be booted with
- */
- private String defaultPolicy = null;
-
- /**
- *
- */
- private RoleModule roleModule = null;
-
- /**
- *
- */
- private String jndiName = null;
-
- /**
- *
- */
- private AuthorizationManager authorizationManager = null;
-
-
-
- /**
- *
- * @return
- */
- public AuthorizationManager getAuthorizationManager()
- {
- return this.authorizationManager;
- }
-
- /**
- *
- * @param authorizationManager
- */
- public void setAuthorizationManager(AuthorizationManager authorizationManager)
- {
- this.authorizationManager = authorizationManager;
- }
-
- /**
- *
- * @return
- */
- public String getDefaultPolicy()
- {
- return this.defaultPolicy;
- }
-
- /**
- *
- * @param defaultPolicy
- */
- public void setDefaultPolicy(String defaultPolicy)
- {
- this.defaultPolicy = defaultPolicy;
- }
-
- /**
- *
- * @return
- */
- public RoleModule getRoleModule()
- {
- return this.roleModule;
- }
-
- /**
- *
- * @param roleModule
- */
- public void setRoleModule(RoleModule roleModule)
- {
- this.roleModule = roleModule;
- }
-
- /**
- *
- * @return
- */
- public String getJNDIName()
- {
- return this.jndiName;
- }
-
- /**
- *
- * @param jndiName
- */
- public void setJNDIName(String jndiName)
- {
- this.jndiName = jndiName;
- }
-
- /**
- *
- */
- protected Object invoke(JCRCommand invocation) throws Exception, InvocationException
- {
- if(ACLInterceptor.turnOff.get()==null )
- {
- //make the acl check before this command is executed
-
- // Get the user executing the command
- User user = (User)JCRCMS.getUserInfo().get();
-
- //setup the security context with enough information for the authorization
provider
- //to be able to make an enforcement decision
- PortalCMSSecurityContext securityContext = new PortalCMSSecurityContext(user);
- securityContext.setAttribute("command",invocation);
-
- //perform access check
- PortalPermission cmsPermission = new CMSPermission(securityContext);
- Session session = Tools.getOpenSession();
- Transaction tx = session.beginTransaction();
- boolean allowAccess = this.authorizationManager.checkPermission(cmsPermission);
- tx.commit();
- Tools.closeSession(session);
-
- if(allowAccess)
- {
- Object response = invocation.invokeNext();
-
- //also filter lists of files and folders based on access allowed on these
resources
- response = this.applyFilter(response,securityContext);
-
- return response;
- }
- else
- {
- throw new CMSException("Access to this resource is denied");
- }
- }
- else
- {
- //this is turned off for this thread that is trying to integrate with the CMS
- return invocation.invokeNext();
- }
- }
-
- /**
- * Filters any files/folders based on the user's access. The filter is applied to
folders/files
- * returned by invoking a CMS command
- *
- * @param response
- * @return
- */
- private Object applyFilter(Object response,PortalCMSSecurityContext securityContext)
- {
- Session session = Tools.getOpenSession();
- Transaction tx = session.beginTransaction();
- Object filteredResponse = response;
-
- JCRCommand command =
(JCRCommand)securityContext.getAttribute("command");
-
- try
- {
-
-
- if(filteredResponse instanceof Folder)
- {
+{
+
+ private static Logger log = Logger.getLogger(ACLInterceptor.class);
+
+ /**
+ * default security policy that the cms service should be booted with
+ */
+ private String defaultPolicy = null;
+
+ /**
+ *
+ */
+ private RoleModule roleModule = null;
+
+ /**
+ *
+ */
+ private String jndiName = null;
+
+ /**
+ *
+ */
+ private AuthorizationManager authorizationManager = null;
+
+
+ /**
+ * @return
+ */
+ public AuthorizationManager getAuthorizationManager()
+ {
+ return this.authorizationManager;
+ }
+
+ /**
+ * @param authorizationManager
+ */
+ public void setAuthorizationManager(AuthorizationManager authorizationManager)
+ {
+ this.authorizationManager = authorizationManager;
+ }
+
+ /**
+ * @return
+ */
+ public String getDefaultPolicy()
+ {
+ return this.defaultPolicy;
+ }
+
+ /**
+ * @param defaultPolicy
+ */
+ public void setDefaultPolicy(String defaultPolicy)
+ {
+ this.defaultPolicy = defaultPolicy;
+ }
+
+ /**
+ * @return
+ */
+ public RoleModule getRoleModule()
+ {
+ return this.roleModule;
+ }
+
+ /**
+ * @param roleModule
+ */
+ public void setRoleModule(RoleModule roleModule)
+ {
+ this.roleModule = roleModule;
+ }
+
+ /**
+ * @return
+ */
+ public String getJNDIName()
+ {
+ return this.jndiName;
+ }
+
+ /**
+ * @param jndiName
+ */
+ public void setJNDIName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ /**
+ *
+ */
+ protected Object invoke(JCRCommand invocation) throws Exception, InvocationException
+ {
+ if (ACLInterceptor.turnOff.get() == null)
+ {
+ //make the acl check before this command is executed
+
+ // Get the user executing the command
+ User user = (User)JCRCMS.getUserInfo().get();
+
+ //setup the security context with enough information for the authorization
provider
+ //to be able to make an enforcement decision
+ PortalCMSSecurityContext securityContext = new PortalCMSSecurityContext(user);
+ securityContext.setAttribute("command", invocation);
+
+ //perform access check
+ PortalPermission cmsPermission = new CMSPermission(securityContext);
+ Session session = Tools.getOpenSession();
+ Transaction tx = session.beginTransaction();
+ boolean allowAccess = this.authorizationManager.checkPermission(cmsPermission);
+ tx.commit();
+ Tools.closeSession(session);
+
+ if (allowAccess)
+ {
+ Object response = invocation.invokeNext();
+
+ //also filter lists of files and folders based on access allowed on these
resources
+ response = this.applyFilter(response, securityContext);
+
+ return response;
+ }
+ else
+ {
+ throw new CMSException("Access to this resource is denied");
+ }
+ }
+ else
+ {
+ //this is turned off for this thread that is trying to integrate with the CMS
+ return invocation.invokeNext();
+ }
+ }
+
+ /**
+ * Filters any files/folders based on the user's access. The filter is applied to
folders/files
+ * returned by invoking a CMS command
+ *
+ * @param response
+ * @return
+ */
+ private Object applyFilter(Object response, PortalCMSSecurityContext securityContext)
+ {
+ Session session = Tools.getOpenSession();
+ Transaction tx = session.beginTransaction();
+ Object filteredResponse = response;
+
+ JCRCommand command =
(JCRCommand)securityContext.getAttribute("command");
+
+ try
+ {
+
+
+ if (filteredResponse instanceof Folder)
+ {
Folder folder = (Folder)filteredResponse;
List filteredFolders = new ArrayList();
- List filteredFiles = new ArrayList();
+ List filteredFiles = new ArrayList();
securityContext.removeAttribute("command");
- for(Iterator itr=folder.getFolders().iterator();itr.hasNext();)
+ for (Iterator itr = folder.getFolders().iterator(); itr.hasNext();)
{
- Folder cour = (Folder)itr.next();
- securityContext.setAttribute("applyFilter",cour.getBasePath());
- PortalPermission cmsPermission = new CMSPermission(securityContext);
- boolean allow =
this.authorizationManager.checkPermission(cmsPermission);
- if(allow)
- {
- filteredFolders.add(cour);
- }
+ Folder cour = (Folder)itr.next();
+ securityContext.setAttribute("applyFilter",
cour.getBasePath());
+ PortalPermission cmsPermission = new CMSPermission(securityContext);
+ boolean allow = this.authorizationManager.checkPermission(cmsPermission);
+ if (allow)
+ {
+ filteredFolders.add(cour);
+ }
}
- for(Iterator itr=folder.getFiles().iterator();itr.hasNext();)
+ for (Iterator itr = folder.getFiles().iterator(); itr.hasNext();)
{
- File cour = (File)itr.next();
-
securityContext.setAttribute("applyFilter",cour.getBasePath());
- PortalPermission cmsPermission = new CMSPermission(securityContext);
- boolean allow =
this.authorizationManager.checkPermission(cmsPermission);
- if(allow)
- {
- filteredFiles.add(cour);
- }
+ File cour = (File)itr.next();
+ securityContext.setAttribute("applyFilter",
cour.getBasePath());
+ PortalPermission cmsPermission = new CMSPermission(securityContext);
+ boolean allow = this.authorizationManager.checkPermission(cmsPermission);
+ if (allow)
+ {
+ filteredFiles.add(cour);
+ }
}
folder.setFolders(filteredFolders);
folder.setFiles(filteredFiles);
- }
- else if ((filteredResponse instanceof List) && (command instanceof
SearchCommand))
- {
- List list = (List)filteredResponse;
- List filteredFiles = new ArrayList();
- for(Iterator itr=list.iterator();itr.hasNext();)
- {
+ }
+ else if ((filteredResponse instanceof List) && (command instanceof
SearchCommand))
+ {
+ List list = (List)filteredResponse;
+ List filteredFiles = new ArrayList();
+ for (Iterator itr = list.iterator(); itr.hasNext();)
+ {
File cour = (File)itr.next();
- securityContext.setAttribute("path",cour.getBasePath());
+ securityContext.setAttribute("path", cour.getBasePath());
PortalPermission cmsPermission = new CMSPermission(securityContext);
boolean allow = this.authorizationManager.checkPermission(cmsPermission);
- if(allow)
+ if (allow)
{
- filteredFiles.add(cour);
+ filteredFiles.add(cour);
}
- }
- filteredResponse = filteredFiles;
- }
- }
- catch(Exception e)
- {
- tx.rollback();
- }
- finally
- {
- tx.commit();
- Tools.closeSession(session);
- }
-
- return filteredResponse;
- }
-
- /**
- *
- */
- public void startService() throws Exception
- {
- super.startService();
-
- log.info("AuthorizationManager
initialized="+this.authorizationManager);
-
- Tools.init(this.jndiName);
+ }
+ filteredResponse = filteredFiles;
+ }
+ }
+ catch (Exception e)
+ {
+ tx.rollback();
+ }
+ finally
+ {
+ tx.commit();
+ Tools.closeSession(session);
+ }
- try
- {
- roleModule = (RoleModule)new
InitialContext().lookup("java:portal/RoleModule");
- }
- catch (NamingException e)
- {
- log.error("Cannot obtain RoleModule from JNDI: ", e);
- throw e;
- }
-
- //check and see if cms permissions exist...if not, boot it with the default
policy
- //specified in the configuration
- if(!this.isBootRequired())
- {
- return;
- }
-
- //go ahead and boot the cms access policy with default policy specified in the
configuration
- InputStream is = null;
- try
- {
- //process the specified defaultPolicy
- is = new ByteArrayInputStream(this.defaultPolicy.getBytes());
- Document document =
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(is);
-
- NodeList criteria = document.getElementsByTagName("criteria");
- if(criteria!=null)
+ return filteredResponse;
+ }
+
+ /**
+ *
+ */
+ public void start() throws Exception
+ {
+ log.info("AuthorizationManager initialized=" +
this.authorizationManager);
+
+ Tools.init(this.jndiName);
+
+ try
+ {
+ roleModule = (RoleModule)new
InitialContext().lookup("java:portal/RoleModule");
+ }
+ catch (NamingException e)
+ {
+ log.error("Cannot obtain RoleModule from JNDI: ", e);
+ throw e;
+ }
+
+ //check and see if cms permissions exist...if not, boot it with the default policy
+ //specified in the configuration
+ if (!this.isBootRequired())
+ {
+ return;
+ }
+
+ //go ahead and boot the cms access policy with default policy specified in the
configuration
+ InputStream is = null;
+ try
+ {
+ //process the specified defaultPolicy
+ is = new ByteArrayInputStream(this.defaultPolicy.getBytes());
+ Document document =
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(is);
+
+ NodeList criteria = document.getElementsByTagName("criteria");
+ if (criteria != null)
+ {
+ for (int i = 0; i < criteria.getLength(); i++)
{
- for(int i=0;i<criteria.getLength();i++)
- {
- Element criteriaElem = (Element)criteria.item(i);
- String name = criteriaElem.getAttribute("name");
- String value = criteriaElem.getAttribute("value");
-
- //permission setup
- NodeList permissions =
criteriaElem.getElementsByTagName("permission");
- if(permissions!=null)
- {
- Session session = null;
- Transaction tx = null;
- Collection parsedPermissions =
this.parseDefaultPermissions(permissions);
- try
- {
- session = Tools.getOpenSession();
- tx = session.beginTransaction();
- for(Iterator
itr=parsedPermissions.iterator();itr.hasNext();)
- {
- Permission permission = (Permission)itr.next();
- permission.addCriteria(new Criteria(name,value));
- Set securityBinding = new HashSet();
- securityBinding.add(permission);
-
this.authorizationManager.getProvider().setSecurityBindings(null,securityBinding);
- }
- tx.commit();
- }
- catch(Exception e)
- {
- tx.rollback();
- }
- finally
- {
- Tools.closeSession(session);
- }
- }
- }
+ Element criteriaElem = (Element)criteria.item(i);
+ String name = criteriaElem.getAttribute("name");
+ String value = criteriaElem.getAttribute("value");
+
+ //permission setup
+ NodeList permissions =
criteriaElem.getElementsByTagName("permission");
+ if (permissions != null)
+ {
+ Session session = null;
+ Transaction tx = null;
+ Collection parsedPermissions =
this.parseDefaultPermissions(permissions);
+ try
+ {
+ session = Tools.getOpenSession();
+ tx = session.beginTransaction();
+ for (Iterator itr = parsedPermissions.iterator(); itr.hasNext();)
+ {
+ Permission permission = (Permission)itr.next();
+ permission.addCriteria(new Criteria(name, value));
+ Set securityBinding = new HashSet();
+ securityBinding.add(permission);
+ this.authorizationManager.getProvider().setSecurityBindings(null,
securityBinding);
+ }
+ tx.commit();
+ }
+ catch (Exception e)
+ {
+ tx.rollback();
+ }
+ finally
+ {
+ Tools.closeSession(session);
+ }
+ }
}
- }
- finally
- {
- if(is!=null)
+ }
+ }
+ finally
+ {
+ if (is != null)
+ {
+ is.close();
+ }
+ }
+ }
+
+ /**
+ * Parses and produces Permission objects for the default policy
+ *
+ * @param permissions
+ * @return
+ */
+ private Collection parseDefaultPermissions(NodeList permissions) throws Exception
+ {
+ Collection parsedPermissions = new ArrayList();
+ for (int i = 0; i < permissions.getLength(); i++)
+ {
+ Element permissionElement = (Element)permissions.item(i);
+ String name = permissionElement.getAttribute("name");
+ String action = permissionElement.getAttribute("action");
+ Permission permission = new Permission(name, action);
+
+ //parse the roles listed under this permission element
+ NodeList roles = permissionElement.getElementsByTagName("role");
+ for (int j = 0; j < roles.getLength(); j++)
+ {
+ Element roleElement = (Element)roles.item(j);
+ String roleName = roleElement.getAttribute("name");
+ Role role = this.getRole(roleName);
+ PermRoleAssoc roleAssoc = new PermRoleAssoc();
+ if (role != null)
{
- is.close();
+ //makes sure this is not Anonymous
+ roleAssoc.setRoleId(roleName);
}
- }
- }
-
- /**
- * Parses and produces Permission objects for the default policy
- *
- * @param permissions
- * @return
- */
- private Collection parseDefaultPermissions(NodeList permissions) throws Exception
- {
- Collection parsedPermissions = new ArrayList();
- for(int i=0;i<permissions.getLength();i++)
- {
- Element permissionElement = (Element)permissions.item(i);
- String name = permissionElement.getAttribute("name");
- String action = permissionElement.getAttribute("action");
- Permission permission = new Permission(name,action);
-
- //parse the roles listed under this permission element
- NodeList roles = permissionElement.getElementsByTagName("role");
- for(int j=0;j<roles.getLength();j++)
+ else
{
- Element roleElement = (Element)roles.item(j);
- String roleName = roleElement.getAttribute("name");
- Role role = this.getRole(roleName);
- PermRoleAssoc roleAssoc = new PermRoleAssoc();
- if(role != null)
- {
- //makes sure this is not Anonymous
- roleAssoc.setRoleId(roleName);
- }
- else
- {
- roleAssoc.setRoleId(AuthorizationManager.Anonymous);
- }
- permission.addRoleAssoc(roleAssoc);
+ roleAssoc.setRoleId(AuthorizationManager.Anonymous);
}
-
- parsedPermissions.add(permission);
- }
- return parsedPermissions;
- }
-
- /**
- * Returns the Role object specified in the default policy
- *
- * @param name
- * @return
- */
- private Role getRole(String name) throws Exception
- {
- Role role = null;
-
- //since this is at app start up and not on user thread...need to create a
transaction context.
- InitialContext context = new InitialContext();
- SessionFactory sessionFactory =
(SessionFactory)context.lookup("java:/portal/IdentitySessionFactory");
- Session session = sessionFactory.openSession();
- Transaction tx = session.beginTransaction();
- try
- {
- role = this.roleModule.findRoleByName(name);
- }
- catch(Exception e)
- {
- role = null;
- }
- finally
- {
- if(tx!=null)
- {
- tx.rollback();
- }
- if(session!=null)
- {
- session.close();
- }
- }
-
- return role;
- }
-
- /**
- * Returns if cms permissions need to be booted with the default policy from
configuration
- *
- * @return
- */
- private boolean isBootRequired()
- {
- boolean bootRequired = false;
-
- String hsqlQuery = "select count(permission) from
org.jboss.portal.cms.security.Permission as permission";
- Session session = Tools.getOpenSession();
- Transaction tx = session.beginTransaction();
- try
- {
- Query query = session.createQuery(hsqlQuery);
- long count = ((Long)query.list().get(0)).longValue();
- if(count<=0)
- {
- bootRequired = true;
- }
- }
- finally
- {
- if(tx!=null)
- {
- tx.rollback();
- }
- Tools.closeSession(session);
- }
-
- return bootRequired;
- }
+ permission.addRoleAssoc(roleAssoc);
+ }
- /**
- * This turns off acl security only for a particular thread.
- * This is used by system level operations that need to integrate with the CMS
- *
- * Example is: the workflow daemon that publishes a content as live when a manager
- * approves it. Without turning this off, the daemon thread is running in Anonymous
mode
- * which obviously does not have the rights to publish the content
- */
- private static ThreadLocal turnOff = new ThreadLocal();
- public static void turnOff()
- {
- ACLInterceptor.turnOff.set(new Boolean(true));
- }
- public static void turnOn()
- {
- ACLInterceptor.turnOff.set(null);
- }
+ parsedPermissions.add(permission);
+ }
+ return parsedPermissions;
+ }
+
+ /**
+ * Returns the Role object specified in the default policy
+ *
+ * @param name
+ * @return
+ */
+ private Role getRole(String name) throws Exception
+ {
+ Role role = null;
+
+ //since this is at app start up and not on user thread...need to create a
transaction context.
+ InitialContext context = new InitialContext();
+ SessionFactory sessionFactory =
(SessionFactory)context.lookup("java:/portal/IdentitySessionFactory");
+ Session session = sessionFactory.openSession();
+ Transaction tx = session.beginTransaction();
+ try
+ {
+ role = this.roleModule.findRoleByName(name);
+ }
+ catch (Exception e)
+ {
+ role = null;
+ }
+ finally
+ {
+ if (tx != null)
+ {
+ tx.rollback();
+ }
+ if (session != null)
+ {
+ session.close();
+ }
+ }
+
+ return role;
+ }
+
+ /**
+ * Returns if cms permissions need to be booted with the default policy from
configuration
+ *
+ * @return
+ */
+ private boolean isBootRequired()
+ {
+ boolean bootRequired = false;
+
+ String hsqlQuery = "select count(permission) from
org.jboss.portal.cms.security.Permission as permission";
+ Session session = Tools.getOpenSession();
+ Transaction tx = session.beginTransaction();
+ try
+ {
+ Query query = session.createQuery(hsqlQuery);
+ long count = ((Long)query.list().get(0)).longValue();
+ if (count <= 0)
+ {
+ bootRequired = true;
+ }
+ }
+ finally
+ {
+ if (tx != null)
+ {
+ tx.rollback();
+ }
+ Tools.closeSession(session);
+ }
+
+ return bootRequired;
+ }
+
+ /**
+ * This turns off acl security only for a particular thread.
+ * This is used by system level operations that need to integrate with the CMS
+ * <p/>
+ * Example is: the workflow daemon that publishes a content as live when a manager
+ * approves it. Without turning this off, the daemon thread is running in Anonymous
mode
+ * which obviously does not have the rights to publish the content
+ */
+ private static ThreadLocal turnOff = new ThreadLocal();
+
+ public static void turnOff()
+ {
+ ACLInterceptor.turnOff.set(new Boolean(true));
+ }
+
+ public static void turnOn()
+ {
+ ACLInterceptor.turnOff.set(null);
+ }
}
Modified:
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -53,6 +53,7 @@
import org.jboss.portal.theme.page.Region;
import org.jboss.portal.theme.page.WindowContext;
import org.jboss.portal.theme.page.WindowResult;
+import org.apache.log4j.Logger;
import java.util.ArrayList;
import java.util.Collection;
@@ -74,6 +75,9 @@
{
/** . */
+ private static Logger log = Logger.getLogger(PageCustomizerInterceptor.class);
+
+ /** . */
private static final String RESOURCE_PREFIX = "PAGENAME_";
/** . */
Modified:
trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -129,7 +129,7 @@
{
Class proxyClass = pwa.getClassLoader().loadClass(serviceClass);
ObjectName objectName = ObjectName.getInstance(serviceRef);
- Object proxy = MBeanProxyExt.create(proxyClass, objectName,
factory.getServer(), true);
+ Object proxy = MBeanProxyExt.create(proxyClass, objectName, mbeanServer,
true);
pwa.getServletContext().setAttribute(serviceName, proxy);
}
catch (Exception e)
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/PortalSessionSynchronizationInterceptor.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/PortalSessionSynchronizationInterceptor.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/PortalSessionSynchronizationInterceptor.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -28,6 +28,7 @@
import org.jboss.portal.portlet.session.SubSession;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
import org.jboss.portal.server.ServerInvocation;
+import org.apache.log4j.Logger;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@@ -40,6 +41,10 @@
*/
public class PortalSessionSynchronizationInterceptor extends PortletInterceptor
{
+
+ /** . */
+ private final Logger log =
Logger.getLogger(PortalSessionSynchronizationInterceptor.class);
+
protected Object invoke(PortletInvocation invocation) throws Exception,
InvocationException
{
HttpServletRequest req = null;
@@ -55,9 +60,9 @@
}
catch (Exception ignore)
{
- if (log.isTraceEnabled())
+ if (log.isDebugEnabled())
{
- log.trace("Was no able to access the client request from request
context");
+ log.debug("Was no able to access the client request from request
context");
}
}
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ProducerCacheInterceptor.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ProducerCacheInterceptor.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ProducerCacheInterceptor.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -31,6 +31,7 @@
import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
+import org.apache.log4j.Logger;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -38,6 +39,10 @@
*/
public class ProducerCacheInterceptor extends PortletInterceptor
{
+
+ /** . */
+ private final Logger log = Logger.getLogger(ProducerCacheInterceptor.class);
+
protected Object invoke(PortletInvocation invocation) throws Exception,
InvocationException
{
if (invocation instanceof ActionInvocation)
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletApplicationRegistryImpl.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletApplicationRegistryImpl.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletApplicationRegistryImpl.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -37,7 +37,7 @@
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
* @version $Revision$
*/
-public class PortletApplicationRegistryImpl extends AbstractJBossService implements
PortletApplicationRegistry
+public class PortletApplicationRegistryImpl implements PortletApplicationRegistry
{
/** . */
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeploymentFactory.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeploymentFactory.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/deployment/jboss/PortletAppDeploymentFactory.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -152,7 +152,7 @@
return new PortletAppDeployment(url, pwa, mbeanServer, this);
}
- public void startService() throws Exception
+ public void start() throws Exception
{
//
try
@@ -175,7 +175,7 @@
loadStandardJBossApplicationMetaData();
//
- super.startService();
+ super.start();
}
public void loadStandardJBossApplicationMetaData()
@@ -204,9 +204,9 @@
}
}
- public void stopService()
+ public void stop()
{
- super.stopService();
+ super.stop();
//
apiFactory = null;
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/security/JBossPortletSecurityService.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/security/JBossPortletSecurityService.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/security/JBossPortletSecurityService.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -20,17 +20,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
******************************************************************************/
-
-/*
- * JBoss, the OpenSource J2EE webOS
- *
- * Distributable under LGPL license.
- * See terms of license at
gnu.org.
- */
package org.jboss.portal.portlet.impl.security;
import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.portlet.security.PortletPermission;
import org.jboss.portal.portlet.security.PortletSecurityService;
import org.jboss.portal.security.PortalPermission;
@@ -51,14 +43,13 @@
import java.util.Set;
/**
- * Service that configures security for portlets
+ * Service that configures security for portlets.
*
* @author <a href="mailto:Anil.Saldhana@jboss.org">Anil
Saldhana</a>
* @version $Revision$
* @since Mar 17, 2006
*/
-public class JBossPortletSecurityService extends AbstractJBossService
- implements PortletSecurityService,
+public class JBossPortletSecurityService implements PortletSecurityService,
AuthorizationDomain, DomainConfigurator, PermissionRepository, PermissionFactory
{
@@ -148,31 +139,25 @@
return new PortletPermission(uri, actions);
}
- protected void createService() throws Exception
+ public void create() throws Exception
{
- super.createService();
this.securityConstraintsMap = new ConcurrentReaderHashMap();
}
- protected void destroyService() throws Exception
+ public void start() throws Exception
{
- super.destroyService();
- }
-
- protected void startService() throws Exception
- {
- super.startService();
-
// Add ourself as the authorization domain
authorizationDomainRegistry.addDomain(this);
}
- protected void stopService() throws Exception
+ public void stop() throws Exception
{
authorizationDomainRegistry.removeDomain(this);
+ }
- //
- super.stopService();
+ public void destroy()
+ {
+ securityConstraintsMap = null;
}
public JBossAuthorizationDomainRegistry getAuthorizationDomainRegistry()
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/StateConverterV0.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/StateConverterV0.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/StateConverterV0.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -23,7 +23,6 @@
package org.jboss.portal.portlet.impl.state;
import org.jboss.portal.common.value.StringValue;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.portlet.state.PropertyMap;
import org.jboss.portal.portlet.state.SimplePropertyMap;
import org.jboss.portal.portlet.state.StateConversionException;
@@ -49,7 +48,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class StateConverterV0 extends AbstractJBossService implements StateConverter
+public class StateConverterV0 implements StateConverter
{
/** . */
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/StateManagementPolicyService.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/StateManagementPolicyService.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/StateManagementPolicyService.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -22,14 +22,13 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.state;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.portlet.state.StateManagementPolicy;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class StateManagementPolicyService extends AbstractJBossService implements
StateManagementPolicy
+public class StateManagementPolicyService implements StateManagementPolicy
{
/** . */
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/producer/PortletStatePersistenceManagerService.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/producer/PortletStatePersistenceManagerService.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/state/producer/PortletStatePersistenceManagerService.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.state.producer;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.portlet.state.InvalidStateIdException;
import org.jboss.portal.portlet.state.NoSuchStateException;
import org.jboss.portal.portlet.state.PropertyMap;
@@ -38,7 +37,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class PortletStatePersistenceManagerService extends AbstractJBossService
implements PortletStatePersistenceManager
+public class PortletStatePersistenceManagerService implements
PortletStatePersistenceManager
{
/** . */
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/invocation/PortletInterceptor.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/invocation/PortletInterceptor.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/invocation/PortletInterceptor.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -24,13 +24,13 @@
import org.jboss.portal.common.invocation.Invocation;
import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.server.impl.invocation.JBossInterceptor;
+import org.jboss.portal.common.invocation.Interceptor;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public abstract class PortletInterceptor extends JBossInterceptor
+public abstract class PortletInterceptor implements Interceptor
{
public Object invoke(Invocation invocation) throws Exception, InvocationException
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/state/producer/ProducerPortletInvoker.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/state/producer/ProducerPortletInvoker.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/state/producer/ProducerPortletInvoker.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -52,6 +52,7 @@
import org.jboss.portal.portlet.state.StateConverter;
import org.jboss.portal.portlet.state.StateManagementPolicy;
import org.jboss.portal.portlet.state.PropertyContext;
+import org.apache.log4j.Logger;
import java.util.ArrayList;
import java.util.Iterator;
@@ -64,7 +65,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class ProducerPortletInvoker extends AbstractJBossService implements
PortletInvoker
+public class ProducerPortletInvoker implements PortletInvoker
{
/** . */
@@ -85,6 +86,9 @@
/** . */
private StateConverter stateConverter;
+ /** . */
+ private Logger log = Logger.getLogger(ProducerPortletInvoker.class);
+
public PortletInvoker getPortletInvoker()
{
return portletInvoker;
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-03-16
12:14:24 UTC (rev 6711)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -29,7 +29,6 @@
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.common.util.URLTools;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.portlet.ActionURL;
import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.PortletParametersStateString;
@@ -70,6 +69,7 @@
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.impl.MapAttributeResolver;
import org.jboss.portal.server.request.URLFormat;
+import org.jboss.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -89,7 +89,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class PortletController extends AbstractJBossService implements RequestController
+public class PortletController implements RequestController
{
/** . */
@@ -98,6 +98,9 @@
/** . */
protected PortletInvoker portletInvoker;
+ /** . */
+ protected Logger log = Logger.getLogger(getClass());
+
public PortletInvoker getPortletInvoker()
{
return portletInvoker;
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/test/TestPortletInvoker.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/test/TestPortletInvoker.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/test/TestPortletInvoker.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -26,7 +26,6 @@
import org.jboss.portal.common.invocation.Invocation;
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.common.invocation.InvocationHandler;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvoker;
@@ -45,7 +44,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class TestPortletInvoker extends AbstractJBossService implements PortletInvoker
+public class TestPortletInvoker implements PortletInvoker
{
/** . */
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/test/support/PortletInvokerSupport.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/test/support/PortletInvokerSupport.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/test/support/PortletInvokerSupport.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.portlet.test.support;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.portlet.InvalidPortletIdException;
import org.jboss.portal.portlet.NoSuchPortletException;
import org.jboss.portal.portlet.Portlet;
@@ -49,7 +48,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class PortletInvokerSupport extends AbstractJBossService implements
PortletInvoker
+public class PortletInvokerSupport implements PortletInvoker
{
/** . */
Modified: trunk/server/src/main/org/jboss/portal/server/ServerInterceptor.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/ServerInterceptor.java 2007-03-16
12:14:24 UTC (rev 6711)
+++ trunk/server/src/main/org/jboss/portal/server/ServerInterceptor.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -24,13 +24,13 @@
import org.jboss.portal.common.invocation.Invocation;
import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.server.impl.invocation.JBossInterceptor;
+import org.jboss.portal.common.invocation.Interceptor;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public abstract class ServerInterceptor extends JBossInterceptor
+public abstract class ServerInterceptor implements Interceptor
{
public Object invoke(Invocation invocation) throws Exception, InvocationException
Modified: trunk/server/src/main/org/jboss/portal/server/config/ServerConfigService.java
===================================================================
---
trunk/server/src/main/org/jboss/portal/server/config/ServerConfigService.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/server/src/main/org/jboss/portal/server/config/ServerConfigService.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -24,7 +24,6 @@
import org.jboss.portal.common.util.CLResourceLoader;
import org.jboss.portal.common.util.LoaderResource;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import java.util.HashMap;
import java.util.Iterator;
@@ -35,12 +34,19 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class ServerConfigService extends AbstractJBossService implements ServerConfig
+public class ServerConfigService implements ServerConfig
{
- private String domain;
+ /** . */
+ private final String domain = "portal";
+
+ /** . */
private String configLocation;
+
+ /** . */
private LoaderResource configResource;
+
+ /** . */
private Map properties;
public String getDomain()
@@ -124,8 +130,7 @@
entry.setValue(value);
}
- // Add the domain
- domain = serviceName.getDomain();
+ // Add the domain for now portal value
properties.put(DOMAIN_KEY, domain);
}
Modified:
trunk/server/src/main/org/jboss/portal/server/deployment/jboss/AbstractDeploymentFactory.java
===================================================================
---
trunk/server/src/main/org/jboss/portal/server/deployment/jboss/AbstractDeploymentFactory.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/server/src/main/org/jboss/portal/server/deployment/jboss/AbstractDeploymentFactory.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -24,7 +24,7 @@
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.common.net.URLFilter;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.apache.log4j.Logger;
import java.net.URL;
@@ -32,7 +32,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public abstract class AbstractDeploymentFactory extends AbstractJBossService implements
DeploymentFactory, URLFilter
+public abstract class AbstractDeploymentFactory implements DeploymentFactory, URLFilter
{
/** The server deployer. */
@@ -50,6 +50,9 @@
/** The short name. */
protected final String name;
+ /** The logger. */
+ protected final Logger log = Logger.getLogger(getClass());
+
/** The default constructor initialize the service with the registration controlled by
the service. */
protected AbstractDeploymentFactory()
{
@@ -133,7 +136,7 @@
* Set the setup url with the resource obtained from the thread context class loader
using the value of setup
* location if this one is not null.
*/
- protected void createService() throws Exception
+ public void create() throws Exception
{
if (setupLocation != null)
{
@@ -142,7 +145,7 @@
}
/** Register the factory only if it is controlled by the service lifecycle. */
- public void startService() throws Exception
+ public void start() throws Exception
{
if (registrationControlledByService)
{
@@ -151,7 +154,7 @@
}
/** Unregister the factory only if it is controlled by the service lifecycle. */
- public void stopService()
+ public void stop()
{
if (registrationControlledByService)
{
@@ -160,7 +163,7 @@
}
/** Set to null the setup url. */
- protected void destroyService() throws Exception
+ public void destroy() throws Exception
{
setupURL = null;
}
Modified: trunk/server/src/main/org/jboss/portal/server/impl/ServerImpl.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/impl/ServerImpl.java 2007-03-16 12:14:24
UTC (rev 6711)
+++ trunk/server/src/main/org/jboss/portal/server/impl/ServerImpl.java 2007-03-16 13:20:08
UTC (rev 6712)
@@ -23,7 +23,6 @@
package org.jboss.portal.server.impl;
import org.jboss.portal.common.util.Version;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.server.PortalConstants;
import org.jboss.portal.server.Server;
import org.jboss.portal.server.config.ServerConfig;
@@ -34,7 +33,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class ServerImpl extends AbstractJBossService implements Server
+public class ServerImpl implements Server
{
/** The global server config. */
private ServerConfig config;
Modified:
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptor.java
===================================================================
---
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptor.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptor.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -25,19 +25,12 @@
import org.jboss.portal.common.invocation.Interceptor;
import org.jboss.portal.common.invocation.Invocation;
import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.jems.as.system.AbstractJBossService;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public abstract class JBossInterceptor extends AbstractJBossService implements
Interceptor
+public abstract class JBossInterceptor implements Interceptor
{
- /** Return the implemented interceptor. */
- public Interceptor getInterceptor()
- {
- return this;
- }
-
public abstract Object invoke(Invocation invocation) throws Exception,
InvocationException;
}
Modified:
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStackFactory.java
===================================================================
---
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStackFactory.java 2007-03-16
12:14:24 UTC (rev 6711)
+++
trunk/server/src/main/org/jboss/portal/server/impl/invocation/JBossInterceptorStackFactory.java 2007-03-16
13:20:08 UTC (rev 6712)
@@ -124,7 +124,7 @@
{
ObjectName name = (ObjectName)names.get(i);
log.debug("Adding interceptor " + name + " to the stack");
- interceptors[i] = (Interceptor)server.getAttribute(name,
"Interceptor");
+ interceptors[i] = (Interceptor)server.getAttribute(name,
"ManagedResource");
}
//