[Jboss-cvs] JBossAS SVN: r55301 - in trunk/ejb3/src: main/org/jboss/annotation/security main/org/jboss/ejb3 main/org/jboss/ejb3/embedded main/org/jboss/ejb3/mdb main/org/jboss/ejb3/mdb/inflow main/org/jboss/ejb3/tx test/org/jboss/ejb3/test/jca/inflowmdb/unit
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 4 19:39:16 EDT 2006
Author: bdecoste
Date: 2006-08-04 19:39:12 -0400 (Fri, 04 Aug 2006)
New Revision: 55301
Removed:
trunk/ejb3/src/main/org/jboss/ejb3/JmxServiceServer.java
trunk/ejb3/src/main/org/jboss/ejb3/KernelServiceServer.java
trunk/ejb3/src/main/org/jboss/ejb3/ServiceServer.java
trunk/ejb3/src/main/org/jboss/ejb3/ServiceServerFactory.java
Modified:
trunk/ejb3/src/main/org/jboss/annotation/security/SecurityDomainImpl.java
trunk/ejb3/src/main/org/jboss/ejb3/JmxKernelAbstraction.java
trunk/ejb3/src/main/org/jboss/ejb3/KernelAbstraction.java
trunk/ejb3/src/main/org/jboss/ejb3/MCKernelAbstraction.java
trunk/ejb3/src/main/org/jboss/ejb3/embedded/EJB3StandaloneBootstrap.java
trunk/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/mdb/inflow/JBossMessageEndpointFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/tx/TxInterceptorFactory.java
trunk/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/InflowUnitTestCase.java
Log:
removed ServiceServer - merged into KernelAbstraction
Modified: trunk/ejb3/src/main/org/jboss/annotation/security/SecurityDomainImpl.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/annotation/security/SecurityDomainImpl.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/annotation/security/SecurityDomainImpl.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -32,7 +32,7 @@
public class SecurityDomainImpl implements SecurityDomain
{
private String value;
- private String unauthenticatedPrincipal;
+ private String unauthenticatedPrincipal = null;
public SecurityDomainImpl(String value)
{
@@ -58,4 +58,14 @@
{
return org.jboss.annotation.security.SecurityDomain.class;
}
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer(100);
+ sb.append("SecurityDomainImpl[");
+ sb.append("value=").append(value);
+ sb.append(", unauthenticatedPrincipal=").append(unauthenticatedPrincipal);
+ sb.append("]");
+ return sb.toString();
+ }
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/JmxKernelAbstraction.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/JmxKernelAbstraction.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/JmxKernelAbstraction.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -52,6 +52,13 @@
this.di = di;
}
+ public JmxKernelAbstraction(MBeanServer server)
+ {
+ this.server = server;
+ serviceController = (ServiceControllerMBean) MBeanProxyExt.create(ServiceControllerMBean.class, ServiceControllerMBean.OBJECT_NAME,
+ server);
+ }
+
public void setMbeanServer(MBeanServer server)
{
this.server = server;
@@ -160,4 +167,9 @@
uninstallMBean(on);
}
+
+ public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws Exception
+ {
+ return server.invoke(name, operationName, params, signature);
+ }
}
Deleted: trunk/ejb3/src/main/org/jboss/ejb3/JmxServiceServer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/JmxServiceServer.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/JmxServiceServer.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.ejb3;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-/**
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- */
-public class JmxServiceServer implements ServiceServer
-{
- protected MBeanServerConnection server;
-
- public JmxServiceServer(MBeanServerConnection server)
- {
- this.server = server;
- }
-
- public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws Exception
- {
- return server.invoke(name, operationName, params, signature);
- }
-
-}
-
Modified: trunk/ejb3/src/main/org/jboss/ejb3/KernelAbstraction.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/KernelAbstraction.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/KernelAbstraction.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -42,4 +42,6 @@
void uninstallMBean(ObjectName on);
void setMbeanServer(MBeanServer server);
+
+ Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws Exception;
}
Deleted: trunk/ejb3/src/main/org/jboss/ejb3/KernelServiceServer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/KernelServiceServer.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/KernelServiceServer.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.ejb3;
-
-import java.lang.reflect.Method;
-
-import javax.management.ObjectName;
-
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.logging.Logger;
-
-import org.jboss.ejb3.embedded.resource.RARDeployment;
-
-/**
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- */
-public class KernelServiceServer implements ServiceServer
-{
- private static final Logger log = Logger.getLogger(KernelServiceServer.class);
-
- protected Kernel kernel;
-
- public KernelServiceServer(Kernel kernel)
- {
- this.kernel = kernel;
- }
-
- public Object invoke(ObjectName objectName, String operationName, Object[] params, String[] signature) throws Exception
- {
- String name = objectName.getCanonicalName();
- KernelRegistryEntry entry = kernel.getRegistry().getEntry(name);
- if (entry != null)
- {
- Object target = entry.getTarget();
- if (target instanceof RARDeployment)
- {
- RARDeployment deployment = (RARDeployment)target;
- return deployment.invoke(operationName, params, signature);
- }
- else
- {
- Class[] types = new Class[signature.length];
- for (int i = 0; i < signature.length; ++i)
- {
- types[i] = Thread.currentThread().getContextClassLoader().loadClass(signature[i]);
- }
- Method method = target.getClass().getMethod(operationName, types);
- return method.invoke(target, params);
- }
- }
- return null;
- }
-
-}
-
Modified: trunk/ejb3/src/main/org/jboss/ejb3/MCKernelAbstraction.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/MCKernelAbstraction.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/MCKernelAbstraction.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -21,6 +21,8 @@
*/
package org.jboss.ejb3;
+import java.lang.reflect.Method;
+
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.management.MBeanInfo;
@@ -33,6 +35,10 @@
import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+
+import org.jboss.ejb3.embedded.resource.RARDeployment;
+
import org.jboss.logging.Logger;
/**
@@ -179,4 +185,30 @@
throw new RuntimeException(e);
}
}
+
+ public Object invoke(ObjectName objectName, String operationName, Object[] params, String[] signature) throws Exception
+ {
+ String name = objectName.getCanonicalName();
+ KernelRegistryEntry entry = kernel.getRegistry().getEntry(name);
+ if (entry != null)
+ {
+ Object target = entry.getTarget();
+ if (target instanceof RARDeployment)
+ {
+ RARDeployment deployment = (RARDeployment)target;
+ return deployment.invoke(operationName, params, signature);
+ }
+ else
+ {
+ Class[] types = new Class[signature.length];
+ for (int i = 0; i < signature.length; ++i)
+ {
+ types[i] = Thread.currentThread().getContextClassLoader().loadClass(signature[i]);
+ }
+ Method method = target.getClass().getMethod(operationName, types);
+ return method.invoke(target, params);
+ }
+ }
+ return null;
+ }
}
Deleted: trunk/ejb3/src/main/org/jboss/ejb3/ServiceServer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/ServiceServer.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/ServiceServer.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.ejb3;
-
-import javax.management.ObjectName;
-
-/**
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- */
-public interface ServiceServer
-{
- Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws Exception;
-
-}
-
Deleted: trunk/ejb3/src/main/org/jboss/ejb3/ServiceServerFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/ServiceServerFactory.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/ServiceServerFactory.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.ejb3;
-
-import javax.management.MBeanServerConnection;
-
-import org.jboss.kernel.Kernel;
-import org.jboss.logging.Logger;
-
-/**
- * @version <tt>$Revision$</tt>
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- */
-public class ServiceServerFactory
-{
- private static final Logger log = Logger.getLogger(ServiceServerFactory.class);
-
- private static ServiceServer serviceServer = null;
- private static Kernel kernel = null;
-
- public static ServiceServer getInstance() throws Exception
- {
- if (serviceServer == null)
- {
- if (kernel != null)
- serviceServer = new KernelServiceServer(kernel);
- else
- {
- MBeanServerConnection mbeanServer;
-
- try
- {
- mbeanServer = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
- serviceServer = new JmxServiceServer(mbeanServer);
- }
- catch (IllegalStateException e)
- {
- String adaptorName = System.getProperty("jbosstest.server.name", "jmx/invoker/RMIAdaptor");
- mbeanServer = (MBeanServerConnection)InitialContextFactory.getInitialContext().lookup(adaptorName);
- serviceServer = new JmxServiceServer(mbeanServer);
- }
- }
- }
-
- return serviceServer;
- }
-
- public static void setKernel(Kernel k)
- {
- kernel = k;
- }
-
-}
-
Modified: trunk/ejb3/src/main/org/jboss/ejb3/embedded/EJB3StandaloneBootstrap.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/embedded/EJB3StandaloneBootstrap.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/embedded/EJB3StandaloneBootstrap.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -37,7 +37,7 @@
import org.jboss.aop.AspectXmlLoader;
import org.jboss.ejb3.InitialContextFactory;
-import org.jboss.ejb3.ServiceServerFactory;
+import org.jboss.ejb3.KernelAbstractionFactory;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
@@ -413,6 +413,6 @@
BasicBootstrap bootstrap1 = new BasicBootstrap();
bootstrap1.run();
kernel = bootstrap1.getKernel();
- ServiceServerFactory.setKernel(kernel);
+ KernelAbstractionFactory.setKernel(kernel);
}
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -527,9 +527,9 @@
ObjectName destinationManagerName = new ObjectName("jboss.mq:service=DestinationManager");
- ServiceServer server = ServiceServerFactory.getInstance();
+ KernelAbstraction kernel = KernelAbstractionFactory.getInstance();
// invoke the server to create the destination
- Object result = server.invoke(destinationManagerName,
+ Object result = kernel.invoke(destinationManagerName,
methodName,
new Object[]{jndiSuffix},
new String[]{"java.lang.String"});
Modified: trunk/ejb3/src/main/org/jboss/ejb3/mdb/inflow/JBossMessageEndpointFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/mdb/inflow/JBossMessageEndpointFactory.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/mdb/inflow/JBossMessageEndpointFactory.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -40,7 +40,7 @@
import org.jboss.deployment.DeploymentException;
import org.jboss.ejb3.Container;
-import org.jboss.ejb3.ServiceServerFactory;
+import org.jboss.ejb3.KernelAbstractionFactory;
import org.jboss.ejb3.tx.TxUtil;
import org.jboss.ejb3.mdb.MessagingContainer;
import org.jboss.mx.util.JMXExceptionDecoder;
@@ -282,7 +282,7 @@
try
{
- activationSpec = (ActivationSpec) ServiceServerFactory.getInstance().invoke(resourceAdapterObjectName, "createActivationSpec", params, createActivationSpecSig);
+ activationSpec = (ActivationSpec) KernelAbstractionFactory.getInstance().invoke(resourceAdapterObjectName, "createActivationSpec", params, createActivationSpecSig);
}
catch (Throwable t)
{
@@ -302,7 +302,7 @@
Object[] params = new Object[] { this, activationSpec };
try
{
- ServiceServerFactory.getInstance().invoke(resourceAdapterObjectName, "endpointActivation", params, activationSig);
+ KernelAbstractionFactory.getInstance().invoke(resourceAdapterObjectName, "endpointActivation", params, activationSig);
}
catch (Throwable t)
{
@@ -320,7 +320,7 @@
Object[] params = new Object[] { this, activationSpec };
try
{
- ServiceServerFactory.getInstance().invoke(resourceAdapterObjectName, "endpointDeactivation", params, activationSig);
+ KernelAbstractionFactory.getInstance().invoke(resourceAdapterObjectName, "endpointDeactivation", params, activationSig);
}
catch (Throwable t)
{
Modified: trunk/ejb3/src/main/org/jboss/ejb3/tx/TxInterceptorFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/tx/TxInterceptorFactory.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/main/org/jboss/ejb3/tx/TxInterceptorFactory.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -31,6 +31,7 @@
import org.jboss.aop.joinpoint.MethodJoinpoint;
import org.jboss.aspects.tx.TxInterceptor;
import org.jboss.logging.Logger;
+import org.jboss.tm.TransactionManagerLocator;
import org.jboss.tm.TxManager;
import org.jboss.ejb3.stateful.StatefulContainer;
import org.jboss.ejb3.stateless.StatelessContainer;
Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/InflowUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/InflowUnitTestCase.java 2006-08-04 23:38:45 UTC (rev 55300)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/jca/inflowmdb/unit/InflowUnitTestCase.java 2006-08-04 23:39:12 UTC (rev 55301)
@@ -24,8 +24,8 @@
import javax.management.ObjectName;
import org.jboss.ejb3.InitialContextFactory;
-import org.jboss.ejb3.ServiceServer;
-import org.jboss.ejb3.ServiceServerFactory;
+import org.jboss.ejb3.KernelAbstraction;
+import org.jboss.ejb3.KernelAbstractionFactory;
import org.jboss.ejb3.test.jca.inflow.TestResourceAdapter;
import org.jboss.ejb3.test.jca.inflow.TestResourceAdapterInflowResults;
@@ -50,8 +50,8 @@
public void testInflow() throws Throwable
{
- ServiceServer server = ServiceServerFactory.getInstance();
- TestResourceAdapterInflowResults results = (TestResourceAdapterInflowResults)server.invoke
+ KernelAbstraction kernel = KernelAbstractionFactory.getInstance();
+ TestResourceAdapterInflowResults results = (TestResourceAdapterInflowResults)kernel.invoke
(
TestResourceAdapter.mbean,
"testInflow",
More information about the jboss-cvs-commits
mailing list