Anil Saldhana
- * @author Scott.Stark@jboss.org
- * @version $Revision$
- */
-public class AuthorizationInterceptor extends AbstractInterceptor
-{
- private Object authenticator = null;
- private Method authorize;
-
- public AuthorizationInterceptor()
- {
- super();
- // Install the default
- try
- {
- setAuthorizingClass(RolesAuthorization.class);
- }
- catch(Exception e)
- {
- // Can't happen
- }
- }
-
- /**
- * The Authorizing class must have a method called
- * public Boolean authorize( Principal caller, String mbean,String opname )
- *
- * @param clazz
- */
- public void setAuthorizingClass(Class clazz)
- throws Exception
- {
- authenticator = clazz.newInstance();
- log.debug("Loaded authenticator: "+authenticator);
- Class[] sig = {Principal.class, Subject.class, String.class, String.class};
- authorize = clazz.getMethod("authorize", sig);
- log.debug("Found authorize(Principal, Subject, String, String)");
- }
-
- /**
- * Intercept the invoke(Invocation) operations
- * @param invocation
- * @return
- * @throws Throwable
- */
- public Object invoke(Invocation invocation) throws Throwable
- {
- String type = invocation.getType();
- if (type == Invocation.OP_INVOKE)
- {
- String opName = invocation.getName();
- if (opName.equals("invoke"))
- {
- Object[] args = invocation.getArgs();
- org.jboss.invocation.Invocation inv = (org.jboss.invocation.Invocation) args[0];
- // Authenticate the caller based on the security association
- Principal caller = inv.getPrincipal();
- //Get the Method Name
- Object[] obj = inv.getArguments();
- //Ignore calls like MBeanCount or getMBeanInfo
- if(obj != null && obj.length > 1)
- {
- ObjectName objname = (ObjectName) obj[0];
- String opname = (String) obj[1];
-
- try
- {
- checkAuthorization(caller, objname.getCanonicalName(), opname);
- }
- catch(SecurityException e)
- {
- throw e;
- }
- catch(Exception e)
- {
- String msg = "Failed to authorize principal=" + caller
- + ",MBean=" + objname + ", Operation=" + opname;
- SecurityException ex = new SecurityException(msg);
- ex.initCause(e);
- throw ex;
- }
- }
- }
- }
-
- Interceptor i = invocation.nextInterceptor();
- return i.invoke(invocation);
- }
-
- /**
- * Method that delegates authorization to the custom class
- *
- * @param caller
- * @param objname
- * @param opname
- * @throws Exception - A SecurityException on authorization failure
- */
- private void checkAuthorization(Principal caller, String objname, String opname)
- throws Exception
- {
- // Get the active Subject
- Subject subject = SecurityActions.getActiveSubject();
- if( subject == null )
- throw new SecurityException("No active Subject found, add th AuthenticationInterceptor");
-
- //We will try to use the authorizing class
- try
- {
- Object[] args = {caller, subject, objname, opname};
- authorize.invoke(authenticator, args);
- }
- catch(InvocationTargetException e)
- {
- Throwable t = e.getTargetException();
- if( t instanceof Exception )
- throw (Exception) t;
- else
- throw new UndeclaredThrowableException(t);
- }
- }
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/ExternalizableRolesAuthorization.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/ExternalizableRolesAuthorization.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/ExternalizableRolesAuthorization.java (working copy)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.jboss.logging.Logger;
-import org.jboss.security.SimplePrincipal;
-
-//$Id$
-
-/**
- * JBAS-3203: Delegate for Authorization Interceptor for RMIAdaptor should have roles configurable
- * Authorization Delegate used by the AuthorizationInterceptor
- * that gets its predefined roles from a properties file
- * @see org.jboss.jmx.connector.invoker.AuthorizationInterceptor
- * @author Anil Saldhana
- * @since May 10, 2006
- * @version $Revision$
- */
-public class ExternalizableRolesAuthorization extends RolesAuthorization
-{
- private static Logger log = Logger.getLogger(ExternalizableRolesAuthorization.class);
- private boolean trace = log.isTraceEnabled();
-
- public ExternalizableRolesAuthorization()
- {
- //Load the roles from a properties file
- Properties props = new Properties();
- try
- {
- props.load(getTCL().getResourceAsStream("jmxinvoker-roles.properties"));
- this.setRequiredRoles(getSetOfRoles(props.getProperty("roles")));
- }
- catch (Exception e)
- {
- log.error("Error reading roles from jmxinvoker-roles.properties:",e);
- }
- }
-
- /**
- * Get a HashSet of roles as SimplePrincipal
- *
- * @param assignedRoles a comma seperated list of roles
- * @return
- */
- private HashSet getSetOfRoles(String assignedRoles)
- {
- if(trace)
- log.trace("AssignedRolesString="+assignedRoles);
- HashSet set = new HashSet();
- StringTokenizer st = new StringTokenizer(assignedRoles,",");
- while(st.hasMoreTokens())
- {
- String aRole = st.nextToken();
- set.add(new SimplePrincipal(aRole));
- }
- if(trace)
- log.trace("roles set="+set);
- return set;
- }
-
- private ClassLoader getTCL()
- {
- return Thread.currentThread().getContextClassLoader();
- }
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/MBeanProxyRemote.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/MBeanProxyRemote.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/MBeanProxyRemote.java (working copy)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.system.ServiceMBeanSupport;
-
-/**
- * MBeanProxyRemote.
- *
- * @author Adrian Brock
- * @version $Revision$
- */
-public class MBeanProxyRemote extends ServiceMBeanSupport implements MBeanProxyRemoteMBean
-{
- /** The mbeanServer connection */
- private ObjectName mbeanServerConnection;
-
- /**
- * Get the mbeanServerConnection.
- *
- * @return the mbeanServerConnection.
- */
- public ObjectName getMBeanServerConnection()
- {
- return mbeanServerConnection;
- }
-
- /**
- * Set the mbeanServerConnection.
- *
- * @param mbeanServerConnection the mbeanServerConnection.
- */
- public void setMBeanServerConnection(ObjectName mbeanServerConnection)
- {
- this.mbeanServerConnection = mbeanServerConnection;
- }
-
- protected void startService() throws Exception
- {
- if (MBeanProxyExt.remote != null)
- throw new IllegalStateException("Remote MBeanServerConnection is already set " + MBeanProxyExt.remote);
-
- Object o = server.getAttribute(mbeanServerConnection, "Proxy");
- if (o instanceof MBeanServerConnection == false)
- throw new DeploymentException(mbeanServerConnection + " does not define an MBeanServerConnection");
- MBeanProxyExt.remote = (MBeanServerConnection) o;
- }
-
- protected void stopService() throws Exception
- {
- MBeanProxyExt.remote = null;
- }
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/MBeanProxyRemoteMBean.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/MBeanProxyRemoteMBean.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/MBeanProxyRemoteMBean.java (working copy)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import javax.management.ObjectName;
-
-import org.jboss.system.ServiceMBean;
-
-/**
- * MBeanProxyRemoteMBean.
- *
- * @author Adrian Brock
- * @version $Revision$
- */
-public interface MBeanProxyRemoteMBean extends ServiceMBean
-{
- /**
- * Get the mbeanServerConnection.
- *
- * @return the mbeanServerConnection.
- */
- ObjectName getMBeanServerConnection();
-
- /**
- * Set the mbeanServerConnection.
- *
- * @param mbeanServerConnection the mbeanServerConnection.
- */
- void setMBeanServerConnection(ObjectName mbeanServerConnection);
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/RolesAuthorization.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/RolesAuthorization.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/RolesAuthorization.java (working copy)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Iterator;
-import java.security.Principal;
-import java.security.acl.Group;
-
-import javax.security.auth.Subject;
-
-import org.jboss.security.SimplePrincipal;
-
-/** A default authorization delegate used by the AuthorizationInterceptor. This
- * looks for a hard coded JBossAdmin role in the current authenticated Subject.
- *
- * @author Scott.Stark@jboss.org
- * @version $Revision$
- */
-public class RolesAuthorization
-{
- private HashSet requiredRoles = new HashSet();
-
- public RolesAuthorization()
- {
- requiredRoles.add(new SimplePrincipal("JBossAdmin"));
- }
- public void setRequiredRoles(HashSet requiredRoles)
- {
- this.requiredRoles = requiredRoles;
- }
- public void authorize(Principal caller, Subject subject,
- String objectname, String opname)
- {
- Set groups = subject.getPrincipals(Group.class);
- Group roles = null;
- Iterator iter = groups.iterator();
- while( iter.hasNext() )
- {
- Group grp = (Group) iter.next();
- if( grp.getName().equals("Roles") )
- {
- roles = grp;
- break;
- }
- }
- if( roles == null )
- {
- throw new SecurityException("Subject has no Roles");
- }
-
- iter = requiredRoles.iterator();
- boolean hasRole = false;
- while( iter.hasNext() && hasRole == false )
- {
- Principal p = (Principal) iter.next();
- hasRole = roles.isMember(p);
- }
- if( hasRole == false )
- {
- throw new SecurityException("Authorization failure, requiredRoles="+requiredRoles
- +", callerRoles="+roles);
- }
- }
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/SerializableInterceptor.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/SerializableInterceptor.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/SerializableInterceptor.java (working copy)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import org.jboss.invocation.MarshalledInvocation;
-import org.jboss.mx.interceptor.AbstractInterceptor;
-import org.jboss.mx.server.Invocation;
-
-/**
- * An interceptor that validates the Serializability of responses,
- * using plugable policies.
- *
- * @author Dimitris Andreadis
- * @author Fabiano C. de Oliveira
- * @version $Revision$
- */
-public class SerializableInterceptor extends AbstractInterceptor
-{
- /** The plugable policy to use */
- private SerializablePolicy policy = new NoopPolicy();
-
- /**
- * Configure a SerializablePolicy class
- */
- public void setPolicyClass(String policyClass) throws Exception
- {
- try
- {
- // try to load the policy Class
- Class clazz = Thread.currentThread().getContextClassLoader().loadClass(policyClass);
- policy = (SerializablePolicy)clazz.newInstance();
- }
- catch (Exception e) // ClassNotFoundException, IllegalAccessException, InstantiationException
- {
- // policy class not found. Make a second try using
- // the 'org.jboss.jmx.connector.invoker.serializablepolicy.' package prefix
- // for the "standard" reponse policies provided with jboss.
- // If that fails, too, rethrow the original exception.
- try
- {
- policyClass = "org.jboss.jmx.connector.invoker.serializablepolicy." + policyClass;
- Class clazz = Thread.currentThread().getContextClassLoader().loadClass(policyClass);
- policy = (SerializablePolicy)clazz.newInstance();
- }
- catch (Exception inner)
- {
- throw e;
- }
- }
- }
-
- public Object invoke(Invocation invocation) throws Throwable
- {
- // Invoke the next in the sequence
- Object result = invocation.nextInterceptor().invoke(invocation);
-
- // If the invocation was an 'invoke(MarshalledInvocation)'
- // filter the result using the plugable policy
- if ("invoke".equals(invocation.getName()))
- {
- Object[] args = invocation.getArgs();
- if ((args.length == 1) && (args[0] instanceof MarshalledInvocation))
- {
- MarshalledInvocation mi = (MarshalledInvocation) args[0];
- result = policy.filter(mi, result);
- }
- }
- return result;
- }
-
- /**
- * A noop serializable policy
- */
- public class NoopPolicy implements SerializablePolicy
- {
- public Object filter(MarshalledInvocation input, Object result) throws Throwable
- {
- return result;
- }
- }
-}
\ No newline at end of file
Index: server/src/main/java/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/serializablepolicy/StripModelMBeanInfoPolicy.java (working copy)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker.serializablepolicy;
-
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanInfo;
-import javax.management.modelmbean.ModelMBeanInfo;
-
-import org.jboss.invocation.MarshalledInvocation;
-import org.jboss.jmx.connector.invoker.SerializablePolicy;
-
-/**
- * A policy that converts ModelMBeanInfo to MBeanInfo.
- *
- * @author Dimitris Andreadis
- * @author Fabiano C. de Oliveira
- * @version $Revision$
- */
-public class StripModelMBeanInfoPolicy implements SerializablePolicy
-{
- public Object filter(MarshalledInvocation input, Object result) throws Throwable
- {
- if ("getMBeanInfo".equals(input.getMethod().getName()) && (result instanceof ModelMBeanInfo))
- {
- MBeanInfo info = (MBeanInfo)result;
-
- result = new MBeanInfo(
- info.getClassName(),
- info.getDescription(),
- deepCopy(info.getAttributes()), // Strip the Descriptors
- info.getConstructors(),
- info.getOperations(),
- info.getNotifications());
- }
- return result;
- }
-
- private MBeanAttributeInfo[] deepCopy(MBeanAttributeInfo[] attrs)
- {
- MBeanAttributeInfo[] copy = new MBeanAttributeInfo[attrs.length];
- for (int i = 0; i < attrs.length; i++)
- {
- MBeanAttributeInfo attr = attrs[i];
- copy[i] = new MBeanAttributeInfo(
- attr.getName(),
- attr.getType(),
- attr.getDescription(),
- attr.isReadable(),
- attr.isWritable(),
- attr.isIs());
- }
- return copy;
- }
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/SerializablePolicy.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/SerializablePolicy.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/SerializablePolicy.java (working copy)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import org.jboss.invocation.MarshalledInvocation;
-
-/**
- * A serializable policy that filters results to avoid Serialization problems.
- *
- * @author Dimitris Andreadis
- * @author Fabiano C. de Oliveira
- * @version $Revision$
- */
-public interface SerializablePolicy
-{
- public Object filter(MarshalledInvocation input, Object result) throws Throwable;
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/SecurityActions.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/SecurityActions.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/SecurityActions.java (working copy)
@@ -1,234 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import java.security.AccessController;
-import java.security.Principal;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-import javax.security.auth.Subject;
-
-import org.jboss.security.SecurityAssociation;
-import org.jboss.security.SecurityContext;
-import org.jboss.security.SecurityContextFactory;
-import org.jboss.security.SecurityContextAssociation;
-
-/** Common PrivilegedAction used by classes in this package.
- *
- * @author Scott.Stark@jboss.org
- * @author Anil.Saldhana@redhat.com
- * @version $Revison:$
- */
-class SecurityActions
-{
- private static class GetSubjectAction implements PrivilegedAction
- {
- static PrivilegedAction ACTION = new GetSubjectAction();
- public Object run()
- {
- Subject subject = SecurityAssociation.getSubject();
- return subject;
- }
- }
- private static class GetTCLAction implements PrivilegedAction
- {
- static PrivilegedAction ACTION = new GetTCLAction();
- public Object run()
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- return loader;
- }
- }
- private static class SetTCLAction implements PrivilegedAction
- {
- ClassLoader loader;
- SetTCLAction(ClassLoader loader)
- {
- this.loader = loader;
- }
- public Object run()
- {
- Thread.currentThread().setContextClassLoader(loader);
- loader = null;
- return null;
- }
- }
- interface PrincipalInfoAction
- {
- PrincipalInfoAction PRIVILEGED = new PrincipalInfoAction()
- {
- public void push(final Principal principal, final Object credential,
- final Subject subject)
- {
- AccessController.doPrivileged(
- new PrivilegedAction()
- {
- public Object run()
- {
- //SecurityAssociation.pushSubjectContext(subject, principal, credential);
- getSecurityContext().getUtil().createSubjectInfo(principal, credential, subject);
- return null;
- }
- }
- );
- }
- public void pop()
- {
- AccessController.doPrivileged(
- new PrivilegedAction()
- {
- public Object run()
- {
- //SecurityAssociation.popSubjectContext();
- SecurityContext sc = getSecurityContext();
- if(sc != null)
- {
- sc.getUtil().createSubjectInfo(null, null, null);
- }
- return null;
- }
- }
- );
- }
- };
-
- PrincipalInfoAction NON_PRIVILEGED = new PrincipalInfoAction()
- {
- public void push(Principal principal, Object credential, Subject subject)
- {
- //SecurityAssociation.pushSubjectContext(subject, principal, credential);
- getSecurityContext().getUtil().createSubjectInfo(principal, credential, subject);
- }
- public void pop()
- {
- //SecurityAssociation.popSubjectContext();
- SecurityContext sc = getSecurityContext();
- if(sc != null)
- {
- sc.getUtil().createSubjectInfo(null, null, null);
- }
- }
- };
-
- void push(Principal principal, Object credential, Subject subject);
- void pop();
- }
-
- static class SetSecurityContextAction implements PrivilegedAction
- {
- private SecurityContext securityContext;
-
- SetSecurityContextAction(SecurityContext sc)
- {
- this.securityContext = sc;
- }
-
- public Object run()
- {
- SecurityContextAssociation.setSecurityContext(securityContext);
- return null;
- }
- }
-
- static Subject getActiveSubject()
- {
- Subject subject = (Subject) AccessController.doPrivileged(GetSubjectAction.ACTION);
- return subject;
- }
- static ClassLoader getContextClassLoader()
- {
- ClassLoader loader = (ClassLoader) AccessController.doPrivileged(GetTCLAction.ACTION);
- return loader;
- }
- static void setContextClassLoader(ClassLoader loader)
- {
- PrivilegedAction action = new SetTCLAction(loader);
- AccessController.doPrivileged(action);
- }
-
- static void pushSubjectContext(Principal principal, Object credential,
- Subject subject)
- {
- if(System.getSecurityManager() == null)
- {
- PrincipalInfoAction.NON_PRIVILEGED.push(principal, credential, subject);
- }
- else
- {
- PrincipalInfoAction.PRIVILEGED.push(principal, credential, subject);
- }
- }
- static void popSubjectContext()
- {
- if(System.getSecurityManager() == null)
- {
- PrincipalInfoAction.NON_PRIVILEGED.pop();
- }
- else
- {
- PrincipalInfoAction.PRIVILEGED.pop();
- }
- }
-
- static SecurityContext createSecurityContext(final String domain)
- throws PrivilegedActionException
- {
- return (SecurityContext)AccessController.doPrivileged( new PrivilegedExceptionAction()
- {
-
- public Object run() throws Exception
- {
- return SecurityContextFactory.createSecurityContext(domain);
- }});
- }
-
- static SecurityContext getSecurityContext()
- {
- return (SecurityContext)AccessController.doPrivileged( new PrivilegedAction()
- {
-
- public Object run()
- {
- return SecurityContextAssociation.getSecurityContext();
- }});
- }
-
-
- static void clearSecurityContext()
- {
- AccessController.doPrivileged(new PrivilegedAction(){
-
- public Object run()
- {
- SecurityContextAssociation.clearSecurityContext();
- return null;
- }});
- }
-
- static void setSecurityContext(SecurityContext sc)
- {
- SetSecurityContextAction action = new SetSecurityContextAction(sc);
- AccessController.doPrivileged(action);
- }
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/InvokerAdaptorService.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/InvokerAdaptorService.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/InvokerAdaptorService.java (working copy)
@@ -1,365 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.rmi.RemoteException;
-import java.security.Principal;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.ListenerNotFoundException;
-import javax.management.MBeanServer;
-import javax.management.Notification;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-
-import org.jboss.invocation.Invocation;
-import org.jboss.invocation.MarshalledInvocation;
-import org.jboss.jmx.adaptor.rmi.RMINotificationListener;
-import org.jboss.jmx.connector.invoker.client.InvokerAdaptorException;
-import org.jboss.security.SecurityConstants;
-import org.jboss.security.SecurityContext;
-import org.jboss.system.Registry;
-import org.jboss.system.ServiceMBeanSupport;
-
-/**
- * A JBoss service exposes an invoke(Invocation) operation that maps
- * calls to the ExposedInterface onto the MBeanServer this service
- * is registered with. It is used in conjunction with a proxy factory
- * to expose the MBeanServer to remote clients through arbitrary
- * protocols.
- *
- * It sets up the correct classloader before unmarshalling the
- * arguments, this relies on the ObjectName being seperate from
- * from the other method arguments to avoid unmarshalling them
- * before the classloader is determined from the ObjectName.
- *
- * The interface is configurable, it must be similar to MBeanServer,
- * though not necessarily derived from it
- *
- * The invoker is configurable and must be specified
- *
- * @author Adrian Brock
- * @author Scott.Stark@jboss.org
- * @version $Revision$
- *
- * @jmx:mbean name="jboss.jmx:type=adaptor,protocol=INVOKER"
- * extends="org.jboss.system.ServiceMBean"
- **/
-public class InvokerAdaptorService
- extends ServiceMBeanSupport
- implements InvokerAdaptorServiceMBean
-{
- /** */
- private Map marshalledInvocationMapping = new HashMap();
- /** */
- private Class[] exportedInterfaces;
- /** A HashSet addNotificationListener methods */
- private HashSet addNotificationListeners = new HashSet();
- /** A HashSet removeNotificationListener methods */
- private HashSet removeNotificationListeners = new HashSet();
- /** A HashSet for the
- registered listeners */
- protected HashMap remoteListeners = new HashMap();
-
- public InvokerAdaptorService()
- {
- }
-
- /**
- * @jmx:managed-attribute
- */
- public Class[] getExportedInterfaces()
- {
- return exportedInterfaces;
- }
- /**
- * @jmx:managed-attribute
- */
- public void setExportedInterfaces(Class[] exportedInterfaces)
- {
- this.exportedInterfaces = exportedInterfaces;
- }
-
- protected void startService()
- throws Exception
- {
- // Build the interface method map
- HashMap tmpMap = new HashMap(61);
- for(int n = 0; n < exportedInterfaces.length; n ++)
- {
- Class iface = exportedInterfaces[n];
- Method[] methods = iface.getMethods();
- for(int m = 0; m < methods.length; m ++)
- {
- Method method = methods[m];
- Long hash = new Long(MarshalledInvocation.calculateHash(method));
- tmpMap.put(hash, method);
- }
- /* Look for a void addNotificationListener(ObjectName name,
- RMINotificationListener listener, NotificationFilter filter,
- Object handback)
- */
- try
- {
- Class[] sig = {ObjectName.class, RMINotificationListener.class,
- NotificationFilter.class, Object.class};
- Method addNotificationListener = iface.getMethod(
- "addNotificationListener", sig);
- addNotificationListeners.add(addNotificationListener);
- }
- catch(Exception e)
- {
- log.debug(iface+"No addNotificationListener(ObjectName, RMINotificationListener)");
- }
-
- /* Look for a void removeNotificationListener(ObjectName,
- RMINotificationListener)
- */
- try
- {
- Class[] sig = {ObjectName.class, RMINotificationListener.class};
- Method removeNotificationListener = iface.getMethod(
- "removeNotificationListener", sig);
- removeNotificationListeners.add(removeNotificationListener);
- }
- catch(Exception e)
- {
- log.debug(iface+"No removeNotificationListener(ObjectName, RMINotificationListener)");
- }
- }
- marshalledInvocationMapping = Collections.unmodifiableMap(tmpMap);
-
- // Place our ObjectName hash into the Registry so invokers can resolve it
- Registry.bind(new Integer(serviceName.hashCode()), serviceName);
- }
-
- protected void stopService()
- throws Exception
- {
- // Remove the method hashses
- if( exportedInterfaces != null )
- {
- for(int n = 0; n < exportedInterfaces.length; n ++)
- MarshalledInvocation.removeHashes(exportedInterfaces[n]);
- }
- marshalledInvocationMapping = null;
- remoteListeners.clear();
- Registry.unbind(new Integer(serviceName.hashCode()));
- }
-
- /**
- * Expose the service interface mapping as a read-only attribute
- *
- * @jmx:managed-attribute
- *
- * @return A Map of the MBeanServer
- */
- public Map getMethodMap()
- {
- return marshalledInvocationMapping;
- }
-
- /**
- * Expose the MBeanServer service via JMX to invokers.
- *
- * @jmx:managed-operation
- *
- * @param invocation A pointer to the invocation object
- * @return Return value of method invocation.
- *
- * @throws Exception Failed to invoke method.
- */
- public Object invoke(Invocation invocation)
- throws Exception
- {
- try
- {
- // Make sure we have the correct classloader before unmarshalling
- ClassLoader oldCL = SecurityActions.getContextClassLoader();
-
- ClassLoader newCL = null;
- // Get the MBean this operation applies to
- ObjectName objectName = (ObjectName) invocation.getValue("JMX_OBJECT_NAME");
- if (objectName != null)
- {
- newCL = server.getClassLoaderFor(objectName);
- }
-
- if (newCL != null && newCL != oldCL)
- SecurityActions.setContextClassLoader(newCL);
-
- //JBAS-6449: Cache the incoming security context to be retained on exit
- SecurityContext previousSecurityContext = SecurityActions.getSecurityContext();
-
- try
- {
- // Set the method hash to Method mapping
- if (invocation instanceof MarshalledInvocation)
- {
- MarshalledInvocation mi = (MarshalledInvocation) invocation;
- mi.setMethodMap(marshalledInvocationMapping);
- }
- // Invoke the MBeanServer method via reflection
- Method method = invocation.getMethod();
- Object[] args = invocation.getArguments();
- Principal principal = invocation.getPrincipal();
- Object credential = invocation.getCredential();
- Object value = null;
- SecurityContext sc = SecurityActions.createSecurityContext(SecurityConstants.DEFAULT_APPLICATION_POLICY);
- SecurityActions.setSecurityContext(sc);
- // Associate the method
- SecurityActions.pushSubjectContext(principal, credential, null);
-
- try
- {
- if( addNotificationListeners.contains(method) )
- {
- ObjectName name = (ObjectName) args[0];
- RMINotificationListener listener = (RMINotificationListener)
- args[1];
- NotificationFilter filter = (NotificationFilter) args[2];
- Object handback = args[3];
- addNotificationListener(name, listener, filter, handback);
- }
- else if( removeNotificationListeners.contains(method) )
- {
- ObjectName name = (ObjectName) args[0];
- RMINotificationListener listener = (RMINotificationListener)
- args[1];
- removeNotificationListener(name, listener);
- }
- else
- {
- String name = method.getName();
- Class[] paramTypes = method.getParameterTypes();
- Method mbeanServerMethod = MBeanServer.class.getMethod(name,
- paramTypes);
- value = mbeanServerMethod.invoke(server, args);
- }
- }
- catch(InvocationTargetException e)
- {
- Throwable t = e.getTargetException();
- if( t instanceof Exception )
- throw (Exception) t;
- else
- throw new UndeclaredThrowableException(t, method.toString());
- }
-
- return value;
- }
- finally
- {
- // Restore the input security context
- SecurityActions.popSubjectContext();
- if(previousSecurityContext != null)
- SecurityActions.setSecurityContext(previousSecurityContext);
- else
- SecurityActions.clearSecurityContext();
- // Restore the input class loader
- if (newCL != null && newCL != oldCL)
- SecurityActions.setContextClassLoader(oldCL);
- }
- }
- catch (Throwable t)
- {
- throw new InvokerAdaptorException(t);
- }
- }
-
- public void addNotificationListener(ObjectName name,
- RMINotificationListener listener, NotificationFilter filter,
- Object handback)
- throws InstanceNotFoundException, RemoteException
- {
- if( log.isTraceEnabled() )
- log.trace("addNotificationListener, name="+name+", listener="+listener);
- NotificationListenerDelegate delegate =
- new NotificationListenerDelegate(listener, name);
- remoteListeners.put(listener, delegate);
- getServer().addNotificationListener(name, delegate, filter, handback);
- }
-
- public void removeNotificationListener(ObjectName name,
- RMINotificationListener listener)
- throws InstanceNotFoundException, ListenerNotFoundException,
- RemoteException
- {
- if( log.isTraceEnabled() )
- log.trace("removeNotificationListener, name="+name+", listener="+listener);
- NotificationListenerDelegate delegate = (NotificationListenerDelegate)
- remoteListeners.remove(listener);
- if( delegate == null )
- throw new ListenerNotFoundException("No listener matches: "+listener);
- getServer().removeNotificationListener(name, delegate);
- }
-
- private class NotificationListenerDelegate
- implements NotificationListener
- {
- /** The remote client */
- private RMINotificationListener client;
- /** The mbean the client is monitoring */
- private ObjectName targetName;
-
- public NotificationListenerDelegate(RMINotificationListener client,
- ObjectName targetName)
- {
- this.client = client;
- this.targetName = targetName;
- }
-
- public void handleNotification(Notification notification,
- Object handback)
- {
- try
- {
- if( log.isTraceEnabled() )
- {
- log.trace("Sending notification to client, event:"+notification);
- }
- client.handleNotification(notification, handback);
- }
- catch(Throwable t)
- {
- log.debug("Failed to notify client, unregistering listener", t);
- try
- {
- removeNotificationListener(targetName, client);
- }
- catch(Exception e)
- {
- log.debug("Failed to unregister listener", e);
- }
- }
- }
- }
-
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/InvokerAdaptorServiceMBean.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/InvokerAdaptorServiceMBean.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/InvokerAdaptorServiceMBean.java (working copy)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-/**
- * MBean interface.
- */
-public interface InvokerAdaptorServiceMBean extends org.jboss.system.ServiceMBean {
-
- //default object name
- public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory.create("jboss.jmx:type=adaptor,protocol=INVOKER");
-
- java.lang.Class[] getExportedInterfaces() ;
-
- void setExportedInterfaces(java.lang.Class[] exportedInterfaces) ;
-
- /**
- * Expose the service interface mapping as a read-only attribute
- * @return A Map of the MBeanServer */
- java.util.Map getMethodMap() ;
-
- /**
- * Expose the MBeanServer service via JMX to invokers.
- * @param invocation A pointer to the invocation object
- * @return Return value of method invocation.
- * @throws Exception Failed to invoke method. */
- java.lang.Object invoke(org.jboss.invocation.Invocation invocation) throws java.lang.Exception;
-
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/client/InvokerAdaptorClientInterceptor.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/client/InvokerAdaptorClientInterceptor.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/client/InvokerAdaptorClientInterceptor.java (working copy)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker.client;
-
-import org.jboss.invocation.Invocation;
-import org.jboss.invocation.PayloadKey;
-import org.jboss.proxy.Interceptor;
-
-import javax.management.ObjectName;
-
-/**
-* An Interceptor that plucks the object name out of the arguments
-* into an unmarshalled part of the payload.
-*
-* @author Adrian Brock
-* @version $Revision$
-*/
-public class InvokerAdaptorClientInterceptor
- extends Interceptor
-{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- public InvokerAdaptorClientInterceptor()
- {
- // For externalization to work
- }
-
- // Public --------------------------------------------------------
-
- /**
- * Invoke using the invoker for remote invocations
- */
- public Object invoke(Invocation invocation)
- throws Throwable
- {
- // Retrieve any relevent object name for this invocation
- ObjectName objectName = getObjectNameFromArguments(invocation);
- if (objectName != null)
- invocation.setValue("JMX_OBJECT_NAME", objectName, PayloadKey.AS_IS);
-
- try
- {
- return getNext().invoke(invocation);
- }
- catch (InvokerAdaptorException e)
- {
- throw e.getWrapped();
- }
- }
-
- /**
- * Return any target object name relevent for this invocation.
- *
- * Methods that don't pass arguments that could be custom classes are ignored.
- *
- * Classloading and registerMBean are ignored,
- * they shouldn't be available remotely
- */
- public ObjectName getObjectNameFromArguments(Invocation invocation)
- {
- String method = invocation.getMethod().getName();
- if (method.equals("invoke") ||
- method.equals("setAttribute") ||
- method.equals("setAttributes") ||
- method.equals("addNotificationListener") ||
- method.equals("removeNotificationListener"))
- {
- return (ObjectName) invocation.getArguments()[0];
- }
-
- return null;
- }
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/client/InvokerAdaptorException.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/client/InvokerAdaptorException.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/client/InvokerAdaptorException.java (working copy)
@@ -1,66 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker.client;
-
-import java.io.Serializable;
-
-/**
- * An exception for holding jmx exception so the invokers
- * don't unwrap them.
- *
- * @author Adrian Brock
- * @version $Revision$
- */
-public class InvokerAdaptorException extends Exception implements Serializable
-{
- // Constants -----------------------------------------------------
-
- private static final long serialVersionUID = 24842201105890823L;
-
- // Attributes ----------------------------------------------------
-
- /** The wrapped exception */
- private Throwable wrapped;
-
- // Constructors --------------------------------------------------
-
- public InvokerAdaptorException()
- {
- // For serialization
- }
-
- public InvokerAdaptorException(Throwable wrapped)
- {
- this.wrapped = wrapped;
- }
-
- // Public --------------------------------------------------------
-
- public Throwable getWrapped()
- {
- return wrapped;
- }
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
Index: server/src/main/java/org/jboss/jmx/connector/invoker/AuthenticationInterceptor.java
===================================================================
--- server/src/main/java/org/jboss/jmx/connector/invoker/AuthenticationInterceptor.java (revision 104473)
+++ server/src/main/java/org/jboss/jmx/connector/invoker/AuthenticationInterceptor.java (working copy)
@@ -1,133 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jmx.connector.invoker;
-
-import java.security.Principal;
-
-import javax.naming.InitialContext;
-import javax.security.auth.Subject;
-
-import org.jboss.mx.interceptor.AbstractInterceptor;
-import org.jboss.mx.interceptor.Interceptor;
-import org.jboss.mx.server.Invocation;
-import org.jboss.security.SecurityConstants;
-import org.jboss.security.SecurityContext;
-import org.jboss.security.SubjectSecurityManager;
-
-/** A security interceptor that requires an authorized user for invoke(Invocation)
- * operation calls when the SecurityDomain and SecurityMgr attributes are
- * specified. Access to attributes and the MBeanInfo are not intercepted.
- *
- * @see Interceptor
- *
- * @author Juha Lindfors.
- * @author Scott.Stark@jboss.org
- * @version $Revision$
- *
- */
-public final class AuthenticationInterceptor extends AbstractInterceptor
-{
- private SubjectSecurityManager securityMgr;
-
- private String securityDomain;
-
- private boolean initialized = false;
-
- public void setSecurityDomain(String securityDomain) throws Exception
- {
- this.securityDomain = securityDomain;
- }
-
- /**
- *
- * @param invocation
- * @return
- * @throws Throwable
- */
- public Object invoke(Invocation invocation) throws Throwable
- {
- SecurityContext previousSC = null;
- String type = invocation.getType();
- Subject subject = null;
- if (!initialized)
- initialize();
- if (type == Invocation.OP_INVOKE && securityMgr != null)
- {
- String opName = invocation.getName();
- if (opName.equals("invoke"))
- {
- Object[] args = invocation.getArgs();
- org.jboss.invocation.Invocation inv = (org.jboss.invocation.Invocation) args[0];
- // Authenticate the caller based on the security association
- Principal caller = inv.getPrincipal();
- Object credential = inv.getCredential();
- subject = new Subject();
- boolean isValid = securityMgr.isValid(caller, credential, subject);
- if (isValid == false)
- {
- String msg = "Failed to authenticate principal=" + caller + ", securityDomain="
- + securityMgr.getSecurityDomain();
- throw new SecurityException(msg);
-
- }
- String securityDomain = SecurityConstants.DEFAULT_APPLICATION_POLICY;
- if (securityMgr != null)
- securityDomain = securityMgr.getSecurityDomain();
- // store current security context
- previousSC = SecurityActions.getSecurityContext();
- SecurityContext sc = SecurityActions.createSecurityContext(securityDomain);
- SecurityActions.setSecurityContext(sc);
- // Push the caller security context
- SecurityActions.pushSubjectContext(caller, credential, subject);
- }
- }
-
- try
- {
- Interceptor i = invocation.nextInterceptor();
- return i.invoke(invocation);
- }
- finally
- {
- // restore previous security context
- if (subject != null)
- SecurityActions.setSecurityContext(previousSC);
- }
- }
-
- private void initialize()
- {
- try
- {
- InitialContext ctx = new InitialContext();
- securityMgr = (SubjectSecurityManager) ctx.lookup(securityDomain);
- }
- catch (Exception e)
- {
-
- }
- if (securityMgr == null)
- log.warn("Unable to locate security domain " + securityDomain
- + ". The AuthenticationInterceptor will have no effect");
- initialized = true;
- }
-}
Index: server/src/main/java/org/jboss/jmx/package.html
===================================================================
--- server/src/main/java/org/jboss/jmx/package.html (revision 104473)
+++ server/src/main/java/org/jboss/jmx/package.html (working copy)
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
- Package description goes here.
-
-
Package Specification
-
-
- Related Documentation
-
-
- Package Status
-
-
-
-
-
-
-
Index: server/src/main/java/org/jboss/invocation/jrmp/interfaces/JRMPInvokerProxy.java
===================================================================
--- server/src/main/java/org/jboss/invocation/jrmp/interfaces/JRMPInvokerProxy.java (revision 104473)
+++ server/src/main/java/org/jboss/invocation/jrmp/interfaces/JRMPInvokerProxy.java (working copy)
@@ -1,199 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.invocation.jrmp.interfaces;
-
-import java.io.IOException;
-import java.io.Externalizable;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.rmi.ConnectException;
-import java.rmi.MarshalledObject;
-import java.rmi.NoSuchObjectException;
-import java.rmi.RemoteException;
-import java.rmi.ServerException;
-import java.rmi.server.RemoteObject;
-import java.rmi.server.RemoteStub;
-import javax.transaction.TransactionRolledbackException;
-import javax.transaction.SystemException;
-
-import org.jboss.invocation.Invocation;
-import org.jboss.invocation.Invoker;
-import org.jboss.invocation.MarshalledInvocation;
-import org.jboss.tm.TransactionPropagationContextFactory;
-import org.jboss.tm.TransactionPropagationContextUtil;
-
-/**
- * JRMPInvokerProxy, local to the proxy and is capable of delegating to
- * the JRMP implementations
- *
- * @author Marc Fleury
- * @author Scott Stark
- * @version $Revision$
- */
-public class JRMPInvokerProxy
- implements Invoker, Externalizable
-{
- /** Serial Version Identifier. @since 1.7.2.4 */
- private static final long serialVersionUID = -3713605626489646730L;
- // Attributes ----------------------------------------------------
-
- // Invoker to the remote JMX node
- protected Invoker remoteInvoker;
-
- /**
- * max retries on a ConnectException.
- */
- public static int MAX_RETRIES = 10;
-
- /**
- * Exposed for externalization.
- */
- public JRMPInvokerProxy()
- {
- super();
- }
-
- /**
- * Create a new Proxy.
- *
- * @param container The remote interface of the container invoker of the
- * container we proxy for.
- */
- public JRMPInvokerProxy(final Invoker remoteInvoker)
- {
- this.remoteInvoker = remoteInvoker;
- }
-
- /**
- * The name of of the server.
- */
- public String getServerHostName() throws Exception
- {
- return remoteInvoker.getServerHostName();
- }
-
- /**
- * ???
- *
- * @todo: MOVE TO TRANSACTION
- *
- * @return the transaction propagation context of the transaction
- * associated with the current thread.
- * Returns null
if the transaction manager was never
- * set, or if no transaction is associated with the current thread.
- */
- public Object getTransactionPropagationContext()
- throws SystemException
- {
- TransactionPropagationContextFactory tpcFactory = TransactionPropagationContextUtil.getTPCFactoryClientSide();
- return (tpcFactory == null) ? null : tpcFactory.getTransactionPropagationContext();
- }
-
- /**
- * The invocation on the delegate, calls the right invoker. Remote if we are remote,
- * local if we are local.
- * @todo Shouldn't we unwrap _ALL_ RemoteExceptions?
- */
- public Object invoke(Invocation invocation)
- throws Exception
- {
- // We are going to go through a Remote invocation, switch to a Marshalled Invocation
- MarshalledInvocation mi = new MarshalledInvocation(invocation);
-
- // Set the transaction propagation context
- // @todo: MOVE TO TRANSACTION
- mi.setTransactionPropagationContext(getTransactionPropagationContext());
-
- // RMI seems to make a connection per invocation.
- // If too many clients are making an invocation
- // at same time, ConnectionExceptions happen
- for (int i = 0; i < MAX_RETRIES; i++)
- {
- try
- {
- MarshalledObject result = (MarshalledObject) remoteInvoker.invoke(mi);
- return result.get();
- }
- catch (ConnectException ce)
- {
- if (i + 1 < MAX_RETRIES)
- {
- Thread.sleep(1);
- continue;
- }
- throw ce;
- }
- catch (ServerException ex)
- {
- // Suns RMI implementation wraps NoSuchObjectException in
- // a ServerException. We cannot have that if we want
- // to comply with the spec, so we unwrap here.
- if (ex.detail instanceof NoSuchObjectException)
- {
- throw (NoSuchObjectException) ex.detail;
- }
- if (ex.detail instanceof TransactionRolledbackException)
- {
- throw (TransactionRolledbackException) ex.detail;
- }
- if (ex.detail instanceof RemoteException)
- {
- throw (RemoteException) ex.detail;
- }
- throw ex;
- }
- }
- throw new Exception("Unreachable statement");
- }
-
- /**
- * Externalize this instance and handle obtaining the remoteInvoker stub
- */
- public void writeExternal(final ObjectOutput out)
- throws IOException
- {
- /** We need to handle obtaining the RemoteStub for the remoteInvoker
- * since this proxy may be serialized in contexts that are not JRMP
- * aware.
- */
- if( remoteInvoker instanceof RemoteStub )
- {
- out.writeObject(remoteInvoker);
- }
- else
- {
- Object replacement = RemoteObject.toStub(remoteInvoker);
- out.writeObject(replacement);
- }
- }
-
- /**
- * Un-externalize this instance.
- *
- */
- public void readExternal(final ObjectInput in)
- throws IOException, ClassNotFoundException
- {
- remoteInvoker = (Invoker) in.readObject();
- }
-}
-
Index: server/src/main/java/org/jboss/invocation/jrmp/server/JRMPProxyFactory.java
===================================================================
--- server/src/main/java/org/jboss/invocation/jrmp/server/JRMPProxyFactory.java (revision 104473)
+++ server/src/main/java/org/jboss/invocation/jrmp/server/JRMPProxyFactory.java (working copy)
@@ -40,11 +40,13 @@
import org.jboss.metadata.MetaData;
import org.w3c.dom.Element;
-/** Create an interface proxy that uses RMI/JRMP to communicate with the server
+/** Create an interface proxy that communicates with the server
* side object that exposes the corresponding JMX invoke operation. Requests
- * make through the proxy are sent to the JRMPInvoker instance the proxy
- * is bound to.
+ * make through the proxy are sent to the Invoker instance the proxy
+ * is bound to.
*
+ * TODO: Remove JRMP from name of JRMPProxyFactory class as this is no longer tied to JRMP
+ *
* @author Scott.Stark@jboss.org
* @author Galder Zamarreno
* @version $Revision$
@@ -52,7 +54,7 @@
public class JRMPProxyFactory extends ServiceMBeanSupport
implements JRMPProxyFactoryMBean
{
- /** The server side JRMPInvoker mbean that will handle RMI/JRMP transport */
+ /** The server side mbean */
private ObjectName invokerName;
/** The server side mbean that exposes the invoke operation for the
exported interface */
@@ -188,7 +190,7 @@
protected void startService() throws Exception
{
/* Create a binding between the invoker name hash and the jmx name
- This is used by the JRMPInvoker to map from the Invocation ObjectName
+ This is used by the Invoker to map from the Invocation ObjectName
hash value to the target JMX ObjectName.
*/
Integer nameHash = new Integer(getServiceName().hashCode());
Index: server/src/main/java/org/jboss/invocation/jrmp/server/JRMPProxyFactoryMBean.java
===================================================================
--- server/src/main/java/org/jboss/invocation/jrmp/server/JRMPProxyFactoryMBean.java (revision 104473)
+++ server/src/main/java/org/jboss/invocation/jrmp/server/JRMPProxyFactoryMBean.java (working copy)
@@ -58,14 +58,14 @@
/** Set the JNDI name under which the HttpInvokerProxy will be bound */
public void setJndiName(String jndiName);
- /** Get the RMI compatible interface that the JRMPInvokerProxy implements */
+ /** Get the RMI compatible interface that the InvokerProxy implements */
public Class getExportedInterface();
- /** Set the RMI compatible interface that the JRMPInvokerProxy implements */
+ /** Set the RMI compatible interface that the InvokerProxy implements */
public void setExportedInterface(Class exportedInterface);
- /** Get the RMI compatible interface that the JRMPInvokerProxy implements */
+ /** Get the RMI compatible interface that the InvokerProxy implements */
public Class[] getExportedInterfaces();
- /** Set the RMI compatible interface that the JRMPInvokerProxy implements */
+ /** Set the RMI compatible interface that the InvokerProxy implements */
public void setExportedInterfaces(Class[] exportedInterface);
/** Get the proxy client side interceptor configuration
Index: server/src/main/java/org/jboss/invocation/jrmp/server/JRMPInvoker.java
===================================================================
--- server/src/main/java/org/jboss/invocation/jrmp/server/JRMPInvoker.java (revision 104473)
+++ server/src/main/java/org/jboss/invocation/jrmp/server/JRMPInvoker.java (working copy)
@@ -1,873 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.invocation.jrmp.server;
-
-import java.lang.reflect.Method;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.io.Serializable;
-import java.rmi.server.RemoteServer;
-import java.rmi.server.UnicastRemoteObject;
-import java.rmi.server.RMIServerSocketFactory;
-import java.rmi.server.RMIClientSocketFactory;
-import java.rmi.server.RemoteStub;
-import java.rmi.MarshalledObject;
-import java.security.PrivilegedAction;
-import java.security.AccessController;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-
-import javax.management.ObjectName;
-import javax.management.MBeanRegistration;
-import javax.management.MBeanServer;
-import javax.naming.Name;
-import javax.naming.InitialContext;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.NameNotFoundException;
-import javax.transaction.Transaction;
-
-import org.jboss.beans.metadata.api.annotations.Create;
-import org.jboss.beans.metadata.api.annotations.Destroy;
-import org.jboss.beans.metadata.api.annotations.Start;
-import org.jboss.beans.metadata.api.annotations.Stop;
-import org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy;
-import org.jboss.invocation.Invocation;
-import org.jboss.invocation.Invoker;
-import org.jboss.invocation.MarshalledInvocation;
-import org.jboss.invocation.MarshalledValueInputStream;
-import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.kernel.spi.dependency.KernelControllerContextAware;
-import org.jboss.logging.Logger;
-import org.jboss.mx.util.JMXExceptionDecoder;
-import org.jboss.net.sockets.DefaultSocketFactory;
-import org.jboss.security.SecurityDomain;
-import org.jboss.system.Registry;
-import org.jboss.system.ServiceMBeanSupport;
-import org.jboss.tm.TransactionPropagationContextUtil;
-
-/**
- * The JRMPInvoker is an RMI implementation that can generate Invocations
- * from RMI/JRMP into the JMX base.
- *
- * @author Scott Stark
- * @version $Revision$
- * @jmx.mbean extends="org.jboss.system.ServiceMBean"
- */
-public class JRMPInvoker
- extends RemoteServer
- implements Invoker, JRMPInvokerMBean, MBeanRegistration, KernelControllerContextAware
-{
- /** @since 4.2.0 */
- static final long serialVersionUID = 3110972460891691492L;
-
- /**
- * Identifer to instruct the usage of an anonymous port.
- */
- public static final int ANONYMOUS_PORT = 0;
-
- /**
- * Instance logger.
- */
- protected Logger log;
-
- /**
- * Service MBean support delegate.
- */
- protected ServiceMBeanSupport support;
-
- /**
- * The port the container will be exported on
- */
- protected int rmiPort = ANONYMOUS_PORT;
-
- /**
- * An optional custom client socket factory
- */
- protected RMIClientSocketFactory clientSocketFactory;
-
- /**
- * An optional custom server socket factory
- */
- protected RMIServerSocketFactory serverSocketFactory;
-
- /**
- * The class name of the optional custom client socket factory
- */
- protected String clientSocketFactoryName;
-
- /**
- * The class name of the optional custom server socket factory
- */
- protected String serverSocketFactoryName;
-
- /**
- * The address to bind the rmi port on
- */
- protected String serverAddress;
- /**
- * The name of the security domain to use with server sockets that support SSL
- */
- protected String sslDomain;
-
- protected RemoteStub invokerStub;
- /**
- * The socket accept backlog
- */
- protected int backlog = 200;
- /**
- * A flag to enable caching of classes in the MarshalledValueInputStream
- */
- protected boolean enableClassCaching = false;
- /**
- * A priviledged actions for MBeanServer.invoke when running with sec mgr
- */
- private MBeanServerAction serverAction = new MBeanServerAction();
-
- public JRMPInvoker()
- {
- final JRMPInvoker delegate = this;
-
- // adapt the support delegate to invoke our state methods
- support = new ServiceMBeanSupport(getClass())
- {
- protected void startService() throws Exception
- {
- delegate.startService();
- }
- protected void stopService() throws Exception
- {
- delegate.stopService();
- }
- protected void destroyService() throws Exception
- {
- delegate.destroyService();
- }
- };
-
- // Setup logging from delegate
- log = support.getLog();
- }
-
- /**
- * @jmx.managed-attribute
- */
- public int getBacklog()
- {
- return backlog;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setBacklog(int back)
- {
- backlog = back;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public boolean getEnableClassCaching()
- {
- return enableClassCaching;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setEnableClassCaching(boolean flag)
- {
- enableClassCaching = flag;
- MarshalledValueInputStream.useClassCache(enableClassCaching);
- }
-
- /**
- * @return The localhost name or null.
- */
- public String getServerHostName()
- {
- try
- {
- return InetAddress.getLocalHost().getHostName();
- }
- catch (Exception ignored)
- {
- return null;
- }
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setRMIObjectPort(final int rmiPort)
- {
- this.rmiPort = rmiPort;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public int getRMIObjectPort()
- {
- return rmiPort;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setRMIClientSocketFactory(final String name)
- {
- clientSocketFactoryName = name;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public String getRMIClientSocketFactory()
- {
- return clientSocketFactoryName;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setRMIClientSocketFactoryBean(final RMIClientSocketFactory bean)
- {
- clientSocketFactory = bean;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public RMIClientSocketFactory getRMIClientSocketFactoryBean()
- {
- return clientSocketFactory;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setRMIServerSocketFactory(final String name)
- {
- serverSocketFactoryName = name;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public String getRMIServerSocketFactory()
- {
- return serverSocketFactoryName;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setRMIServerSocketFactoryBean(final RMIServerSocketFactory bean)
- {
- serverSocketFactory = bean;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public RMIServerSocketFactory getRMIServerSocketFactoryBean()
- {
- return serverSocketFactory;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setServerAddress(final String address)
- {
- serverAddress = address;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public String getServerAddress()
- {
- return serverAddress;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public void setSecurityDomain(String domainName)
- {
- this.sslDomain = domainName;
- }
-
- /**
- * @jmx.managed-attribute
- */
- public String getSecurityDomain()
- {
- return sslDomain;
- }
-
- public Serializable getStub()
- {
- return this.invokerStub;
- }
-
- protected void startService() throws Exception
- {
- loadCustomSocketFactories();
-
- log.debug("RMI Port='" +
- (rmiPort == ANONYMOUS_PORT ? "Anonymous" :
- Integer.toString(rmiPort)) + "'");
-
- log.debug("Client SocketFactory='" +
- (clientSocketFactory == null ? "Default" :
- clientSocketFactory.toString()) + "'");
-
- log.debug("Server SocketFactory='" +
- (serverSocketFactory == null ? "Default" :
- serverSocketFactory.toString()) + "'");
-
- log.debug("Server SocketAddr='" +
- (serverAddress == null ? "Default" :
- serverAddress) + "'");
- log.debug("SecurityDomain='" +
- (sslDomain == null ? "Default" :
- sslDomain) + "'");
-
- InitialContext ctx = new InitialContext();
-
- // Validate that there is a TransactionPropagationContextImporter
- // bound in JNDI
- TransactionPropagationContextUtil.getTPCImporter();
-
- // Set the transaction manager and transaction propagation
- // context factory of the GenericProxy class
-
- Invoker delegateInvoker = createDelegateInvoker();
-
- // Make the remote invoker proxy available for use by the proxy factory
- Registry.bind(support.getServiceName(), delegateInvoker);
-
- // Export CI
- exportCI();
-
- log.debug("Bound JRMP invoker for JMX node");
-
- ctx.close();
- }
-
- protected void stopService() throws Exception
- {
- InitialContext ctx = new InitialContext();
-
- try
- {
- unexportCI();
- }
- finally
- {
- ctx.close();
- }
- this.clientSocketFactory = null;
- this.serverSocketFactory = null;
- this.invokerStub = null;
- }
-
- protected void destroyService() throws Exception
- {
- // Export references to the bean
- Registry.unbind(support.getServiceName());
- }
-
- /**
- * Invoke a Remote interface method.
- */
- public Object invoke(Invocation invocation)
- throws Exception
- {
- ClassLoader oldCl = TCLAction.UTIL.getContextClassLoader();
- ObjectName mbean = null;
- try
- {
- // Deserialize the transaction if it is there
- MarshalledInvocation mi = (MarshalledInvocation) invocation;
- invocation.setTransaction(importTPC(mi.getTransactionPropagationContext()));
-
- mbean = (ObjectName) Registry.lookup(invocation.getObjectName());
-
- // The cl on the thread should be set in another interceptor
- Object obj = serverAction.invoke(mbean,
- "invoke",
- new Object[]{invocation},
- Invocation.INVOKE_SIGNATURE);
- return new MarshalledObject(obj);
- }
- catch (Exception e)
- {
- Throwable th = JMXExceptionDecoder.decode(e);
- if (log.isTraceEnabled())
- log.trace("Failed to invoke on mbean: " + mbean, th);
-
- if (th instanceof Exception)
- e = (Exception) th;
-
- throw e;
- }
- finally
- {
- TCLAction.UTIL.setContextClassLoader(oldCl);
- }
- }
-
- protected Invoker createDelegateInvoker()
- {
- return new JRMPInvokerProxy(this);
- }
-
- protected void exportCI() throws Exception
- {
- this.invokerStub = (RemoteStub) UnicastRemoteObject.exportObject
- (this, rmiPort, clientSocketFactory, serverSocketFactory);
- }
-
- protected void unexportCI() throws Exception
- {
- UnicastRemoteObject.unexportObject(this, true);
- }
-
- protected void rebind(Context ctx, String name, Object val)
- throws NamingException
- {
- // Bind val to name in ctx, and make sure that all
- // intermediate contexts exist
-
- Name n = ctx.getNameParser("").parse(name);
- while (n.size() > 1)
- {
- String ctxName = n.get(0);
- try
- {
- ctx = (Context) ctx.lookup(ctxName);
- }
- catch (NameNotFoundException e)
- {
- ctx = ctx.createSubcontext(ctxName);
- }
- n = n.getSuffix(1);
- }
-
- ctx.rebind(n.get(0), val);
- }
-
- /**
- * Load and instantiate the clientSocketFactory, serverSocketFactory using
- * the TCL and set the bind address and SSL domain if the serverSocketFactory
- * supports it.
- */
- protected void loadCustomSocketFactories()
- {
- ClassLoader loader = TCLAction.UTIL.getContextClassLoader();
-
- if( clientSocketFactory == null )
- {
- try
- {
- if (clientSocketFactoryName != null)
- {
- Class csfClass = loader.loadClass(clientSocketFactoryName);
- clientSocketFactory = (RMIClientSocketFactory) csfClass.newInstance();
- }
- }
- catch (Exception e)
- {
- log.error("Failed to load client socket factory", e);
- clientSocketFactory = null;
- }
- }
-
- if( serverSocketFactory == null )
- {
- try
- {
- if (serverSocketFactoryName != null)
- {
- Class ssfClass = loader.loadClass(serverSocketFactoryName);
- serverSocketFactory = (RMIServerSocketFactory) ssfClass.newInstance();
- if (serverAddress != null)
- {
- // See if the server socket supports setBindAddress(String)
- try
- {
- Class[] parameterTypes = {String.class};
- Method m = ssfClass.getMethod("setBindAddress", parameterTypes);
- Object[] args = {serverAddress};
- m.invoke(serverSocketFactory, args);
- }
- catch (NoSuchMethodException e)
- {
- log.warn("Socket factory does not support setBindAddress(String)");
- // Go with default address
- }
- catch (Exception e)
- {
- log.warn("Failed to setBindAddress=" + serverAddress + " on socket factory", e);
- // Go with default address
- }
- }
- /* See if the server socket supports setSecurityDomain(SecurityDomain)
- if an sslDomain was specified
- */
- if (sslDomain != null)
- {
- try
- {
- InitialContext ctx = new InitialContext();
- SecurityDomain domain = (SecurityDomain) ctx.lookup(sslDomain);
- Class[] parameterTypes = {SecurityDomain.class};
- Method m = ssfClass.getMethod("setSecurityDomain", parameterTypes);
- Object[] args = {domain};
- m.invoke(serverSocketFactory, args);
- }
- catch (NoSuchMethodException e)
- {
- log.error("Socket factory does not support setSecurityDomain(SecurityDomain)");
- }
- catch (Exception e)
- {
- log.error("Failed to setSecurityDomain=" + sslDomain + " on socket factory", e);
- }
- }
- }
- // If a bind address was specified create a DefaultSocketFactory
- else if (serverAddress != null)
- {
- DefaultSocketFactory defaultFactory = new DefaultSocketFactory(backlog);
- serverSocketFactory = defaultFactory;
- try
- {
- defaultFactory.setBindAddress(serverAddress);
- }
- catch (UnknownHostException e)
- {
- log.error("Failed to setBindAddress=" + serverAddress + " on socket factory", e);
- }
- }
- }
- catch (Exception e)
- {
- log.error("operation failed", e);
- serverSocketFactory = null;
- }
- }
- }
-
- /**
- * Import a transaction propagation context into the local VM, and
- * return the corresponding Transaction
.
- *
- * @return A transaction or null if no tpc.
- */
- protected Transaction importTPC(Object tpc)
- {
- if (tpc != null)
- return TransactionPropagationContextUtil.importTPC(tpc);
- return null;
- }
-
- //
- // Delegate the ServiceMBean details to our support delegate
- //
-
- public String getName()
- {
- return support.getName();
- }
-
- public MBeanServer getServer()
- {
- return support.getServer();
- }
-
- public int getState()
- {
- return support.getState();
- }
-
- public String getStateString()
- {
- return support.getStateString();
- }
-
- public void create() throws Exception
- {
- support.create();
- }
-
- public void start() throws Exception
- {
- support.start();
- }
-
- public void stop()
- {
- support.stop();
- }
-
- public void destroy()
- {
- support.destroy();
- }
-
- public void jbossInternalLifecycle(String method) throws Exception
- {
- support.jbossInternalLifecycle(method);
- }
-
- public ObjectName preRegister(MBeanServer server, ObjectName name)
- throws Exception
- {
- return support.preRegister(server, name);
- }
-
- public void postRegister(Boolean registrationDone)
- {
- support.postRegister(registrationDone);
- }
-
- public void preDeregister() throws Exception
- {
- support.preDeregister();
- }
-
- public void postDeregister()
- {
- support.postDeregister();
- }
-
- public void setKernelControllerContext(KernelControllerContext context) throws Exception
- {
- support.setKernelControllerContext(context);
- }
-
- public void unsetKernelControllerContext(KernelControllerContext context) throws Exception
- {
- support.unsetKernelControllerContext(context);
- }
-
- @Create
- public void pojoCreate() throws Exception
- {
- support.pojoCreate();
- }
-
- @Start
- public void pojoStart() throws Exception
- {
- support.pojoStart();
- }
-
- @Stop
- public void pojoStop() throws Exception
- {
- support.pojoStop();
- }
-
- @Destroy
- public void pojoDestroy() throws Exception
- {
- support.pojoDestroy();
- }
-
- interface TCLAction
- {
- class UTIL
- {
- static TCLAction getTCLAction()
- {
- return System.getSecurityManager() == null ? NON_PRIVILEGED : PRIVILEGED;
- }
-
- static ClassLoader getContextClassLoader()
- {
- return getTCLAction().getContextClassLoader();
- }
-
- static ClassLoader getContextClassLoader(Thread thread)
- {
- return getTCLAction().getContextClassLoader(thread);
- }
-
- static void setContextClassLoader(ClassLoader cl)
- {
- getTCLAction().setContextClassLoader(cl);
- }
-
- static void setContextClassLoader(Thread thread, ClassLoader cl)
- {
- getTCLAction().setContextClassLoader(thread, cl);
- }
- }
-
- TCLAction NON_PRIVILEGED = new TCLAction()
- {
- public ClassLoader getContextClassLoader()
- {
- return Thread.currentThread().getContextClassLoader();
- }
-
- public ClassLoader getContextClassLoader(Thread thread)
- {
- return thread.getContextClassLoader();
- }
-
- public void setContextClassLoader(ClassLoader cl)
- {
- Thread.currentThread().setContextClassLoader(cl);
- }
-
- public void setContextClassLoader(Thread thread, ClassLoader cl)
- {
- thread.setContextClassLoader(cl);
- }
- };
-
- TCLAction PRIVILEGED = new TCLAction()
- {
- private final PrivilegedAction getTCLPrivilegedAction = new PrivilegedAction()
- {
- public Object run()
- {
- return Thread.currentThread().getContextClassLoader();
- }
- };
-
- public ClassLoader getContextClassLoader()
- {
- return (ClassLoader) AccessController.doPrivileged(getTCLPrivilegedAction);
- }
-
- public ClassLoader getContextClassLoader(final Thread thread)
- {
- return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
- {
- return thread.getContextClassLoader();
- }
- });
- }
-
- public void setContextClassLoader(final ClassLoader cl)
- {
- AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
- {
- Thread.currentThread().setContextClassLoader(cl);
- return null;
- }
- });
- }
-
- public void setContextClassLoader(final Thread thread, final ClassLoader cl)
- {
- AccessController.doPrivileged(new PrivilegedAction()
- {
- public Object run()
- {
- thread.setContextClassLoader(cl);
- return null;
- }
- });
- }
- };
-
- ClassLoader getContextClassLoader();
-
- ClassLoader getContextClassLoader(Thread thread);
-
- void setContextClassLoader(ClassLoader cl);
-
- void setContextClassLoader(Thread thread, ClassLoader cl);
- }
-
- /**
- * Perform the MBeanServer.invoke op in a PrivilegedExceptionAction if
- * running with a security manager.
- */
- class MBeanServerAction implements PrivilegedExceptionAction
- {
- private ObjectName target;
- String method;
- Object[] args;
- String[] sig;
-
- MBeanServerAction()
- {
- }
-
- MBeanServerAction(ObjectName target, String method, Object[] args, String[] sig)
- {
- this.target = target;
- this.method = method;
- this.args = args;
- this.sig = sig;
- }
-
- public Object run() throws Exception
- {
- Object rtnValue = support.getServer().invoke(target, method, args, sig);
- return rtnValue;
- }
-
- Object invoke(ObjectName target, String method, Object[] args, String[] sig)
- throws Exception
- {
- SecurityManager sm = System.getSecurityManager();
- Object rtnValue = null;
- if (sm == null)
- {
- // Direct invocation on MBeanServer
- rtnValue = support.getServer().invoke(target, method, args, sig);
- }
- else
- {
- try
- {
- // Encapsulate the invocation in a PrivilegedExceptionAction
- MBeanServerAction action = new MBeanServerAction(target, method, args, sig);
- rtnValue = AccessController.doPrivileged(action);
- }
- catch (PrivilegedActionException e)
- {
- Exception ex = e.getException();
- throw ex;
- }
- }
- return rtnValue;
- }
- }
-}
Index: server/src/resources/jmx-invoker-adaptor/META-INF/jboss-service.xml
===================================================================
--- server/src/resources/jmx-invoker-adaptor/META-INF/jboss-service.xml (revision 104473)
+++ server/src/resources/jmx-invoker-adaptor/META-INF/jboss-service.xml (working copy)
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
- jboss:service=invoker,type=jrmp
-
- jboss.jmx:type=adaptor,name=Invoker
-
- jmx/invoker/RMIAdaptor
-
- org.jboss.jmx.adaptor.rmi.RMIAdaptor,
- org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
-
-
-
- org.jboss.proxy.ClientMethodInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor
- org.jboss.invocation.InvokerInterceptor
-
-
- jboss:service=Naming
-
-
-
-
- jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
-
-
-
-
-
- The JMX Detached Invoker Service
- org.jboss.jmx.connector.invoker.InvokerAdaptorService
-
-
-
- The class name of the MBean
- Name
- java.lang.String
-
-
- The status of the MBean
- State
- int
-
-
- The status of the MBean in text form
- StateString
- java.lang.String
-
-
- The interfaces the invoker proxy supports
- ExportedInterfaces
- [Ljava.lang.Class;
-
-
- Map(Long hash, Method) of the proxy interface methods
- MethodMap
- java.util.Map
-
-
-
- The start lifecycle operation
- start
-
-
- The stop lifecycle operation
- stop
-
-
- The detyped lifecycle operation (for internal use only)
- jbossInternalLifecycle
-
- The lifecycle operation
- method
- java.lang.String
-
- void
-
-
-
- The detached invoker entry point
- invoke
-
- The method invocation context
- invocation
- org.jboss.invocation.Invocation
-
- java.lang.Object
-
-
-
-
-
-
-
-
-
-
-
-
Index: server/src/etc/deploy/legacy-invokers-service.xml
===================================================================
--- server/src/etc/deploy/legacy-invokers-service.xml (revision 104473)
+++ server/src/etc/deploy/legacy-invokers-service.xml (working copy)
@@ -2,29 +2,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
- jboss:service=TransactionManager
-
-
Index: server/pom.xml
===================================================================
--- server/pom.xml (revision 104473)
+++ server/pom.xml (working copy)
@@ -92,8 +92,6 @@
src/assembly/client.xml
src/assembly/jboss.xml
src/assembly/jboss-minimal.xml
- src/assembly/jmx-adaptor-plugin.xml
- src/assembly/jmx-invoker-adaptor-client.xml
Index: testsuite/local.properties
===================================================================
--- testsuite/local.properties (revision 104473)
+++ testsuite/local.properties (working copy)
@@ -49,12 +49,12 @@
# (even at the same machine). Actually what we needed are just node0 and node1
# ips and the rest are optional.
#
-#node0=${env.MYTESTIP_1}
+node0=${env.MYTESTIP_1}
#node0.http.url=http://192.168.1.103:8080
#node0.jndiurl=jnp://192.168.1.103:1099
#node0.hajndi.url=jnp://192.168.1.103:1100
-#node1=${env.MYTESTIP_2}
+node1=${env.MYTESTIP_2}
#node1.http.url=http://192.168.1.113:8080
#node1.jndiurl=jnp://192.168.1.113:1099
#node1.hajndi.url=jnp://192.168.1.113:1100
Index: testsuite/src/main/org/jboss/test/cluster/invokerha/JRMPInvokerHaMockUtils.java
===================================================================
--- testsuite/src/main/org/jboss/test/cluster/invokerha/JRMPInvokerHaMockUtils.java (revision 104473)
+++ testsuite/src/main/org/jboss/test/cluster/invokerha/JRMPInvokerHaMockUtils.java (working copy)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.cluster.invokerha;
-
-import java.util.List;
-
-import org.jboss.ha.framework.interfaces.LoadBalancePolicy;
-import org.jboss.invocation.Invocation;
-import org.jboss.invocation.Invoker;
-import org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxyHA;
-import org.jboss.invocation.jrmp.server.JRMPInvokerHA;
-
-/**
- * JrmpInvokerHaMockUtils.
- *
- * @author Galder Zamarreno
- */
-public class JRMPInvokerHaMockUtils
-{
- /**
- * Mock version of JRMPInvokerHA that eases debugging and swallows an
- * exception being thrown when unregistering the invoker ha mbean.
- *
- * @author Galder Zamarreno
- */
- public static class MockJRMPInvokerHA extends JRMPInvokerHA
- {
- /** The serialVersionUID */
- private static final long serialVersionUID = -4557124707606766661L;
-
- private String name;
-
- public MockJRMPInvokerHA(String name)
- {
- this.name = name;
- }
-
- /**
- * Override postDeregister() to avoid the following exception being
- * thrown on tearDown():
- *
- * javax.management.InstanceNotFoundException: jboss.system:service=ServiceController
- * at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1010)
- * at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:804)
- * at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
- * at org.jboss.system.ServiceMBeanSupport.postDeregister(ServiceMBeanSupport.java:424)
- * at org.jboss.invocation.jrmp.server.JRMPInvoker.postDeregister(JRMPInvoker.java:665)
- */
- @Override
- public void postDeregister()
- {
- }
-
- /**
- * Override toString because in absence of RemoteRef
- * java.rmi.server.RemoteObject's toString implementation prints just
- * the class name which makes it pretty ackward for assertions and
- * debugging.
- */
- @Override
- public String toString()
- {
- return name;
- }
-
- @Override
- protected Invoker createProxy(List> targets, LoadBalancePolicy policy, String proxyFamilyName,
- long viewId)
- {
- return new MockJRMPInvokerProxyHA(targets, policy, proxyFamilyName, viewId);
- }
-
- @Override
- public Object invoke(Invocation invocation) throws Exception
- {
- InvokerHaFailureType failureType = (InvokerHaFailureType)invocation.getValue("FAILURE_TYPE");
- if (failureType != null)
- {
- failureType.injectFailureIfExistsAfterServer((Integer)invocation.getAsIsValue("FAILOVER_COUNTER"));
- }
-
- return super.invoke(invocation);
- }
-
- }
-
- public static class MockJRMPInvokerProxyHA extends JRMPInvokerProxyHA
- {
-
- public MockJRMPInvokerProxyHA(List> targets, LoadBalancePolicy policy, String proxyFamilyName, long viewId)
- {
- super(targets, policy, proxyFamilyName, viewId);
- }
-
-
- @Override
- public boolean txContextAllowsFailover(Invocation invocation)
- {
- return super.txContextAllowsFailover(invocation);
- }
-
- @Override
- public Object invoke(Invocation invocation) throws Exception
- {
- return super.invoke(invocation);
- }
- }
-
-}
Index: testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JRMPInvokerHaTransactionStickyUnitTestCase.java
===================================================================
--- testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JRMPInvokerHaTransactionStickyUnitTestCase.java (revision 104473)
+++ testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JRMPInvokerHaTransactionStickyUnitTestCase.java (working copy)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.cluster.defaultcfg.test;
-
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.jboss.invocation.InvokerHA;
-import org.jboss.test.cluster.defaultcfg.test.JRMPInvokerHaUnitTestCase.JRMPInvokerHaFactory;
-import org.jboss.test.cluster.invokerha.AbstractInvokerHaTransactionSticky;
-
-/**
- * JRMPInvokerHaTransactionStickyUnitTestCase.
- *
- * @author Galder Zamarreno
- */
-public class JRMPInvokerHaTransactionStickyUnitTestCase extends AbstractInvokerHaTransactionSticky
-{
- @Override
- protected void setUp() throws Exception
- {
- setUp(2, new JRMPInvokerHaTransactionStickyFactory());
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- @Override
- protected List undeployChosenTargetNode(Object chosenTarget)
- {
- List extends InvokerHA> replicants = infrastructure.getReplicants();
- replicants.remove(chosenTarget);
- return replicants;
- }
-
- public static class JRMPInvokerHaTransactionStickyFactory extends JRMPInvokerHaFactory
- {
- @Override
- public String getChosenTargetKey()
- {
- return "TX_STICKY_TARGET";
- }
- }
-
- public static Test suite()
- {
- /* No transactions to be run for JRMP invoker version of transaction
- * sticky functionality because this old legacy invoker is no longer
- * supported for transaction sticky functionality. */
- return new TestSuite();
- }
-}
Index: testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JRMPInvokerHaUnitTestCase.java
===================================================================
--- testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JRMPInvokerHaUnitTestCase.java (revision 104473)
+++ testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/JRMPInvokerHaUnitTestCase.java (working copy)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.cluster.defaultcfg.test;
-
-import java.util.Map;
-
-import org.jboss.invocation.InvokerHA;
-import org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxyHA;
-import org.jboss.test.cluster.invokerha.AbstractInvokerHa;
-import org.jboss.test.cluster.invokerha.InvokerHaInfrastructure;
-import org.jboss.test.cluster.invokerha.InvokerHaInfrastructure.InvokerHaFactory;
-import org.jboss.test.cluster.invokerha.JRMPInvokerHaMockUtils.MockJRMPInvokerHA;
-
-/**
- * Unit test case for jrmp invoker ha proxy and invoker at the other side.
- *
- * @author Galder Zamarreno
- */
-public class JRMPInvokerHaUnitTestCase extends AbstractInvokerHa
-{
- @Override
- protected void setUp() throws Exception
- {
- setUp(2, new JRMPInvokerHaFactory());
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
-
- /** Classes **/
-
- public static class JRMPInvokerHaFactory implements InvokerHaFactory
- {
- public String getInvokerTypeName()
- {
- return "JRMPInvokerHa";
- }
-
- public InvokerHaInfrastructure getInvokerHaInfrastructure(int serverCount)
- {
- return new InvokerHaInfrastructure(serverCount, this);
- }
-
- public Map getTxFailoverAuthorizationsMap()
- {
- return JRMPInvokerProxyHA.txFailoverAuthorizations;
- }
-
- public InvokerHA createInvokerHaServer(String serverName, int serverNumber)
- {
- return new MockJRMPInvokerHA(getInvokerTypeName() + "-" + serverName + "-" + serverNumber);
- }
-
- public String getChosenTargetKey()
- {
- return "TEST_CHOSEN_TARGET";
- }
- }
-}
Index: testsuite/src/main/org/jboss/test/binding/BindingServiceUnitTestCase.java
===================================================================
--- testsuite/src/main/org/jboss/test/binding/BindingServiceUnitTestCase.java (revision 104473)
+++ testsuite/src/main/org/jboss/test/binding/BindingServiceUnitTestCase.java (working copy)
@@ -33,7 +33,6 @@
import javax.naming.Context;
import javax.naming.InitialContext;
-//import org.jboss.jmx.adaptor.rmi.RMIAdaptorExt;
import org.jboss.management.j2ee.StateManageable;
import org.jboss.system.BarrierController;
import org.jboss.system.ServiceMBean;
Index: testsuite/src/resources/test-configs/jrmp-invoker/conf/standardjboss.xml
===================================================================
--- testsuite/src/resources/test-configs/jrmp-invoker/conf/standardjboss.xml (revision 104473)
+++ testsuite/src/resources/test-configs/jrmp-invoker/conf/standardjboss.xml (working copy)
@@ -1,1111 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- true
-
- anonymous
-
-
-
-
- entity-unified-invoker
- jboss:service=invoker,type=jrmp
- org.jboss.proxy.ejb.ProxyFactory
-
-
-
- org.jboss.proxy.ejb.HomeInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
- org.jboss.proxy.ejb.EntityInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
- org.jboss.proxy.ejb.ListEntityInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
-
-
-
-
- clustered-entity-rmi-invoker
- jboss:service=invoker,type=jrmpha
- org.jboss.proxy.ejb.ProxyFactoryHA
-
-
-
- org.jboss.proxy.ejb.HomeInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.proxy.ejb.SingleRetryInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
- org.jboss.proxy.ejb.EntityInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.proxy.ejb.SingleRetryInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
- org.jboss.proxy.ejb.ListEntityInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.proxy.ejb.SingleRetryInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
-
-
-
-
- stateless-unified-invoker
- jboss:service=invoker,type=jrmp
- org.jboss.proxy.ejb.ProxyFactory
-
-
-
- org.jboss.proxy.ejb.HomeInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
- org.jboss.proxy.ejb.StatelessSessionInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
-
-
-
-
- clustered-stateless-rmi-invoker
- jboss:service=invoker,type=jrmpha
- org.jboss.proxy.ejb.ProxyFactoryHA
-
-
-
- org.jboss.proxy.ejb.HomeInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.proxy.ejb.SingleRetryInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
- org.jboss.proxy.ejb.StatelessSessionInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.proxy.ejb.SingleRetryInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
-
-
-
-
- stateful-unified-invoker
- jboss:service=invoker,type=jrmp
- org.jboss.proxy.ejb.ProxyFactory
-
-
-
- org.jboss.proxy.ejb.HomeInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
- org.jboss.proxy.ejb.StatefulSessionInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
-
-
-
-
- clustered-stateful-rmi-invoker
- jboss:service=invoker,type=jrmpha
- org.jboss.proxy.ejb.ProxyFactoryHA
-
-
-
- org.jboss.proxy.ejb.HomeInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.proxy.ejb.SingleRetryInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
- org.jboss.proxy.ejb.StatefulSessionInterceptor
- org.jboss.proxy.SecurityInterceptor
- org.jboss.proxy.ejb.SecurityContextInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.proxy.ejb.SingleRetryInterceptor
- org.jboss.invocation.InvokerInterceptor
- org.jboss.invocation.MarshallingInvokerInterceptor
-
-
-
-
-
-
- message-driven-bean
- default
- org.jboss.ejb.plugins.jms.JMSContainerInvoker
-
- DefaultJMSProvider
- StdJMSPool
- false
-
- 1
- 15
- 30000
- 1
-
- 10
-
- queue/DLQ
- 10
- 0
-
-
-
-
-
-
-
-
- singleton-message-driven-bean
- default
- org.jboss.ejb.plugins.jms.JMSContainerInvoker
-
- DefaultJMSProvider
- StdJMSPool
- false
-
- 1
- 1
- 30000
- 1
-
- 10
-
- queue/DLQ
- 10
- 0
-
-
-
-
-
-
- message-inflow-driven-bean
- default
- org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory
-
-
- org.jboss.proxy.ClientMethodInterceptor
- org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
-
-
-
-
-
- iiop
- jboss:service=invoker,type=iiop
- org.jboss.proxy.ejb.IORFactory
-
- org.jboss.iiop.WebCL
- per-servant
- true
- iiop
- false
-
-
-
-
- jms-message-inflow-driven-bean
- default
- org.jboss.ejb.plugins.inflow.JBossJMSMessageEndpointFactory
-
-
-
- providerAdapterJNDI
- DefaultJMSProvider
-
-
- minSession
- 1
-
-
- maxSession
- 15
-
-
- keepAlive
- 60000
-
-
- maxMessages
- 1
-
-
- reconnectInterval
- 10
-
-
- useDLQ
- true
-
-
- DLQHandler
- org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler
-
-
- DLQJNDIName
- queue/DLQ
-
-
- DLQMaxResent
- 10
-
-
-
- org.jboss.proxy.ClientMethodInterceptor
- org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor
- org.jboss.proxy.TransactionInterceptor
- org.jboss.invocation.InvokerInterceptor
-
-
-
-
-
-
-
-
- Standard Pessimistic CMP 2.x EntityBean
- false
- entity-unified-invoker
- false
- false
- true
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
- org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.InvalidableEntityInstanceCache
- org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager
- org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock
-
- org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
-
- 50
- 1000000
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
- B
-
-
-
-
- cmp2.x jdbc2 pm
- false
- entity-unified-invoker
- false
- true
- true
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
- org.jboss.ejb.plugins.cmp.jdbc2.RelationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.PerTxEntityInstanceCache
- org.jboss.ejb.plugins.cmp.jdbc2.JDBCStoreManager2
- org.jboss.ejb.plugins.lock.NoLock
-
-
- 500
- 10000
-
-
-
- 10
-
-
-
-
-
- 100
-
- C
-
-
-
- Clustered CMP 2.x EntityBean
- false
- clustered-entity-rmi-invoker
- false
- false
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.CleanShutdownInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
- org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.EntityInstanceCache
- org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager
- org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock
-
- org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
-
- 50
- 1000000
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
- B
-
- ${jboss.partition.name:DefaultPartition}
- org.jboss.ha.framework.interfaces.RoundRobin
- org.jboss.ha.framework.interfaces.FirstAvailable
-
-
-
-
- Standard CMP 2.x EntityBean with cache invalidation
- false
- entity-unified-invoker
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
- org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor
- org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.InvalidableEntityInstanceCache
- org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager
- org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock
-
- org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
-
- 50
- 1000000
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
- A
-
-
-
- Instance Per Transaction CMP 2.x EntityBean
- false
- entity-unified-invoker
- false
- false
- true
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
- org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.PerTxEntityInstanceCache
- org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager
- org.jboss.ejb.plugins.lock.NoLock
-
-
- 100
-
- C
-
-
-
- Standard CMP 2.x EntityBean
-
-
-
- Standard Pessimistic CMP EntityBean
- false
- entity-unified-invoker
- false
- false
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.EntityInstanceCache
- org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager
- org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock
-
- org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
-
- 50
- 1000000
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
- A
-
-
-
- Clustered CMP EntityBean
- false
- clustered-entity-rmi-invoker
- false
- false
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.CleanShutdownInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.EntityInstanceCache
- org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager
- org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock
-
- org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
-
- 50
- 1000000
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
- A
-
- ${jboss.partition.name:DefaultPartition}
- org.jboss.ha.framework.interfaces.RoundRobin
- org.jboss.ha.framework.interfaces.FirstAvailable
-
-
-
-
- Instance Per Transaction CMP EntityBean
- false
- entity-unified-invoker
- false
- false
- true
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.PerTxEntityInstanceCache
- org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager
- org.jboss.ejb.plugins.lock.NoLock
-
-
- 100
-
- C
-
-
-
- Standard CMP EntityBean
-
-
-
- Standard Stateless SessionBean
- false
- stateless-unified-invoker
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
-
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor
-
- org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor
- org.jboss.ejb.plugins.TxInterceptorBMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
-
- org.jboss.ejb.plugins.StatelessSessionInstancePool
-
-
-
- 100
-
-
-
-
- Clustered Stateless SessionBean
- false
- clustered-stateless-rmi-invoker
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.CleanShutdownInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
-
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor
-
- org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor
- org.jboss.ejb.plugins.TxInterceptorBMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
-
- org.jboss.ejb.plugins.StatelessSessionInstancePool
-
-
-
- 100
-
-
- ${jboss.partition.name:DefaultPartition}
- org.jboss.ha.framework.interfaces.RoundRobin
- org.jboss.ha.framework.interfaces.RoundRobin
-
-
-
-
-
- Standard Stateful SessionBean
- false
- stateful-unified-invoker
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
-
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
-
- org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
- org.jboss.ejb.plugins.TxInterceptorBMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.StatefulSessionSecurityInterceptor
-
- org.jboss.ejb.plugins.StatefulSessionInstanceCache
- org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager
-
- org.jboss.ejb.plugins.LRUStatefulContextCachePolicy
-
- 50
- 1000000
- 1800
- 1800
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
-
-
-
- Clustered Stateful SessionBean
- false
- clustered-stateful-rmi-invoker
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.CleanShutdownInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
-
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
-
- org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
- org.jboss.ejb.plugins.TxInterceptorBMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.StatefulSessionSecurityInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.StatefulHASessionSynchronisationInterceptor
-
- org.jboss.ejb.plugins.StatefulHASessionInstanceCache
- org.jboss.ejb.plugins.StatefulHASessionPersistenceManager
-
- org.jboss.ejb.plugins.LRUStatefulContextCachePolicy
-
- 50
- 1000000
- 1800
- 1800
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
-
- ${jboss.partition.name:DefaultPartition}
- org.jboss.ha.framework.interfaces.RoundRobin
- org.jboss.ha.framework.interfaces.FirstAvailable
- /HASessionState/Default
-
-
-
-
- Standard Pessimistic BMP EntityBean
- false
- entity-unified-invoker
- false
- false
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.EntityInstanceCache
- org.jboss.ejb.plugins.BMPPersistenceManager
- org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock
-
- org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
-
- 50
- 1000000
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
- A
-
-
-
- Clustered BMP EntityBean
- false
- clustered-entity-rmi-invoker
- false
- false
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.CleanShutdownInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.EntityInstanceCache
- org.jboss.ejb.plugins.BMPPersistenceManager
- org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock
-
- org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
-
- 50
- 1000000
- 300
- 600
- 400
- 60
- 1
- 0.75
-
-
-
- 100
-
- A
-
- ${jboss.partition.name:DefaultPartition}
- org.jboss.ha.framework.interfaces.RoundRobin
- org.jboss.ha.framework.interfaces.FirstAvailable
-
-
-
-
- Instance Per Transaction BMP EntityBean
- false
- entity-unified-invoker
- false
- false
- true
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.security.PreSecurityInterceptor
- org.jboss.ejb.plugins.SecurityInterceptor
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.EntityCreationInterceptor
- org.jboss.ejb.plugins.EntityLockInterceptor
- org.jboss.ejb.plugins.EntityInstanceInterceptor
- org.jboss.ejb.plugins.EntityReentranceInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
- org.jboss.ejb.plugins.EntitySynchronizationInterceptor
-
- org.jboss.ejb.plugins.EntityInstancePool
- org.jboss.ejb.plugins.PerTxEntityInstanceCache
- org.jboss.ejb.plugins.BMPPersistenceManager
- org.jboss.ejb.plugins.lock.NoLock
-
-
- 100
-
- C
-
-
-
- Standard BMP EntityBean
-
-
-
- Standard Message Driven Bean
- false
- message-driven-bean
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.RunAsSecurityInterceptor
-
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
-
- org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
- org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
-
- org.jboss.ejb.plugins.MessageDrivenInstancePool
-
-
-
- 100
-
-
-
-
- Singleton Message Driven Bean
- false
- singleton-message-driven-bean
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.RunAsSecurityInterceptor
-
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
-
- org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
- org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
-
- org.jboss.ejb.plugins.MessageDrivenInstancePool
-
-
-
- 100
-
-
-
-
- Standard Message Inflow Driven Bean
- false
- message-inflow-driven-bean
-
- org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
- org.jboss.ejb.plugins.LogInterceptor
- org.jboss.ejb.plugins.RunAsSecurityInterceptor
-
- org.jboss.ejb.plugins.TxInterceptorCMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
-
- org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
- org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
- org.jboss.ejb.plugins.CallValidationInterceptor
- org.jboss.resource.connectionmanager.CachedConnectionInterceptor
-
- org.jboss.ejb.plugins.MessageDrivenInstancePool
-
-
-
- 100
-
-
-
-
-
-
Index: testsuite/src/etc/cluster-harness/conf/jboss-service-bench1.xml
===================================================================
--- testsuite/src/etc/cluster-harness/conf/jboss-service-bench1.xml (revision 104473)
+++ testsuite/src/etc/cluster-harness/conf/jboss-service-bench1.xml (working copy)
@@ -255,20 +255,6 @@
-
-
- 4444
- ${jboss.bind.address}
-
- jboss:service=TransactionManager
-
-
Index: testsuite/src/etc/cluster-harness/conf/jboss-service-bench2.xml
===================================================================
--- testsuite/src/etc/cluster-harness/conf/jboss-service-bench2.xml (revision 104473)
+++ testsuite/src/etc/cluster-harness/conf/jboss-service-bench2.xml (working copy)
@@ -255,20 +255,6 @@
-
-
- 4444
- ${jboss.bind.address}
-
- jboss:service=TransactionManager
-
-
Index: testsuite/build.xml
===================================================================
--- testsuite/build.xml (revision 104473)
+++ testsuite/build.xml (working copy)
@@ -999,28 +999,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1270,7 +1248,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-