geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/jmx JMXReferenceFactory.java
Date Fri, 06 Aug 2004 22:44:37 GMT
djencks     2004/08/06 15:44:37

  Modified:    modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment
                        EARConfigBuilder.java EARContext.java
               modules/assembly/src/plan j2ee-deployer-plan.xml
                        j2ee-server-plan.xml
               modules/axis/src/java/org/apache/geronimo/axis
                        WebServiceDeployer.java
               modules/axis/src/test/org/apache/geronimo/axis
                        DynamicEJBDeploymentTest.java
               modules/connector/src/test/org/apache/geronimo/connector/deployment
                        RAR_1_0ConfigBuilderTest.java
                        RAR_1_5ConfigBuilderTest.java
               modules/j2ee/src/test/org/apache/geronimo/j2ee/deployment
                        EARConfigBuilderTest.java EARContextTest.java
               modules/jetty/src/java/org/apache/geronimo/jetty/deployment
                        JettyModuleBuilder.java
               modules/naming project.xml
               modules/naming/src/java/org/apache/geronimo/naming/deployment
                        ENCConfigBuilder.java
               modules/naming/src/java/org/apache/geronimo/naming/java
                        ComponentContextBuilder.java
               modules/naming/src/java/org/apache/geronimo/naming/jmx
                        JMXReferenceFactory.java
  Added:       modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment
                        EJBReferenceBuilder.java
  Log:
  Implement non-link ejb refs and ejb local refs.  In the geronimo dd, target-name must be
the entire object name of the target ejb
  
  Revision  Changes    Path
  1.18      +7 -3      incubator-geronimo/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
  
  Index: EARConfigBuilder.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- EARConfigBuilder.java	1 Aug 2004 20:14:19 -0000	1.17
  +++ EARConfigBuilder.java	6 Aug 2004 22:44:36 -0000	1.18
  @@ -72,6 +72,7 @@
       private final ModuleBuilder ejbConfigBuilder;
       private final ModuleBuilderWithUnpack webConfigBuilder;
       private final ModuleBuilderWithUnpack connectorConfigBuilder;
  +    private final EJBReferenceBuilder ejbReferenceBuilder;
       private final String j2eeServerName;
       private final String j2eeDomainName;
       private final ObjectName j2eeServer;
  @@ -81,7 +82,7 @@
       private final ObjectName nonTransactionalTimerObjectName;
   
   
  -    public EARConfigBuilder(ObjectName j2eeServer, ObjectName transactionContextManagerObjectName,
ObjectName connectionTrackerObjectName, ObjectName transactionalTimerObjectName, ObjectName
nonTransactionalTimerObjectName, Repository repository, ModuleBuilder ejbConfigBuilder, ModuleBuilderWithUnpack
webConfigBuilder, ModuleBuilderWithUnpack connectorConfigBuilder, Kernel kernel) {
  +    public EARConfigBuilder(ObjectName j2eeServer, ObjectName transactionContextManagerObjectName,
ObjectName connectionTrackerObjectName, ObjectName transactionalTimerObjectName, ObjectName
nonTransactionalTimerObjectName, Repository repository, ModuleBuilder ejbConfigBuilder, EJBReferenceBuilder
ejbReferenceBuilder, ModuleBuilderWithUnpack webConfigBuilder, ModuleBuilderWithUnpack connectorConfigBuilder,
Kernel kernel) {
           this.kernel = kernel;
           this.repository = repository;
           this.j2eeServer = j2eeServer;
  @@ -89,6 +90,7 @@
           j2eeDomainName = j2eeServer.getDomain();
   
           this.ejbConfigBuilder = ejbConfigBuilder;
  +        this.ejbReferenceBuilder = ejbReferenceBuilder;
           this.webConfigBuilder = webConfigBuilder;
           this.connectorConfigBuilder = connectorConfigBuilder;
           this.transactionContextManagerObjectName = transactionContextManagerObjectName;
  @@ -348,7 +350,7 @@
                           transactionContextManagerObjectName,
                           connectionTrackerObjectName,
                           transactionalTimerObjectName,
  -                        nonTransactionalTimerObjectName);
  +                        nonTransactionalTimerObjectName, ejbReferenceBuilder);
               } catch (MalformedObjectNameException e) {
                   throw new DeploymentException(e);
               }
  @@ -645,6 +647,7 @@
   
           infoFactory.addReference("Repository", Repository.class);
           infoFactory.addReference("EJBConfigBuilder", ModuleBuilder.class);
  +        infoFactory.addReference("EJBReferenceBuilder", EJBReferenceBuilder.class);
           infoFactory.addReference("WebConfigBuilder", ModuleBuilderWithUnpack.class);
           infoFactory.addReference("ConnectorConfigBuilder", ModuleBuilderWithUnpack.class);
   
  @@ -660,6 +663,7 @@
               "nonTransactionalTimerObjectName",
               "Repository",
               "EJBConfigBuilder",
  +            "EJBReferenceBuilder",
               "WebConfigBuilder",
               "ConnectorConfigBuilder",
               "kernel"
  
  
  
  1.8       +21 -3     incubator-geronimo/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
  
  Index: EARContext.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- EARContext.java	22 Jul 2004 03:22:53 -0000	1.7
  +++ EARContext.java	6 Aug 2004 22:44:36 -0000	1.8
  @@ -25,6 +25,7 @@
   
   import javax.management.MalformedObjectNameException;
   import javax.management.ObjectName;
  +import javax.naming.Reference;
   
   import org.apache.geronimo.deployment.DeploymentContext;
   import org.apache.geronimo.deployment.DeploymentException;
  @@ -34,7 +35,7 @@
   /**
    * @version $Revision$ $Date$
    */
  -public class EARContext extends DeploymentContext {
  +public class EARContext extends DeploymentContext implements EJBReferenceBuilder {
       private final Map ejbRefs = new HashMap();
       private final Map ejbLocalRefs = new HashMap();
       private final Map resourceAdapterModules = new HashMap();
  @@ -52,7 +53,9 @@
       private final ObjectName transactedTimerName;
       private final ObjectName nonTransactedTimerName;
   
  -    public EARContext(JarOutputStream jos, URI id, ConfigurationModuleType moduleType,
URI parentID, Kernel kernel, String j2eeDomainName, String j2eeServerName, String j2eeApplicationName,
ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName
transactedTimerName, ObjectName nonTransactedTimerName) throws MalformedObjectNameException,
DeploymentException {
  +    private final EJBReferenceBuilder ejbReferenceBuilder;
  +
  +    public EARContext(JarOutputStream jos, URI id, ConfigurationModuleType moduleType,
URI parentID, Kernel kernel, String j2eeDomainName, String j2eeServerName, String j2eeApplicationName,
ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName
transactedTimerName, ObjectName nonTransactedTimerName, EJBReferenceBuilder ejbReferenceBuilder)
throws MalformedObjectNameException, DeploymentException {
           super(jos, id, moduleType, parentID, kernel);
           this.j2eeDomainName = j2eeDomainName;
           this.j2eeServerName = j2eeServerName;
  @@ -97,6 +100,7 @@
           this.connectionTrackerObjectName = connectionTrackerObjectName;
           this.transactedTimerName = transactedTimerName;
           this.nonTransactedTimerName = nonTransactedTimerName;
  +        this.ejbReferenceBuilder = ejbReferenceBuilder;
       }
   
       public String getJ2EEDomainName() {
  @@ -219,5 +223,19 @@
   
       public String getResourceAdapterModule(String resourceAdapterName) {
           return (String) resourceAdapterModules.get(resourceAdapterName);
  +    }
  +
  +    public Reference createEJBLocalReference(String objectName, boolean isSession, String
localHome, String local) throws DeploymentException {
  +        if (ejbReferenceBuilder != null) {
  +            return ejbReferenceBuilder.createEJBLocalReference(objectName, isSession, localHome,
local);
  +        }
  +        throw new DeploymentException("No ejb reference builder");
  +    }
  +
  +    public Reference createEJBRemoteReference(String objectName, boolean isSession, String
home, String remote) throws DeploymentException {
  +        if (ejbReferenceBuilder != null) {
  +            return ejbReferenceBuilder.createEJBRemoteReference(objectName, isSession,
home, remote);
  +        }
  +        throw new DeploymentException("No ejb reference builder");
       }
   }
  
  
  
  1.1                  incubator-geronimo/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EJBReferenceBuilder.java
  
  Index: EJBReferenceBuilder.java
  ===================================================================
  package org.apache.geronimo.j2ee.deployment;
  
  import org.apache.geronimo.deployment.DeploymentException;
  
  import javax.naming.Reference;
  
  /**
   */
  public interface EJBReferenceBuilder {
  
      Reference createEJBLocalReference(String objectName, boolean isSession, String localHome,
String local) throws DeploymentException;
  
      Reference createEJBRemoteReference(String objectName, boolean isSession, String home,
String remote) throws DeploymentException;
  
  }
  
  
  
  1.26      +1 -0      incubator-geronimo/modules/assembly/src/plan/j2ee-deployer-plan.xml
  
  Index: j2ee-deployer-plan.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/assembly/src/plan/j2ee-deployer-plan.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- j2ee-deployer-plan.xml	31 Jul 2004 15:50:11 -0000	1.25
  +++ j2ee-deployer-plan.xml	6 Aug 2004 22:44:36 -0000	1.26
  @@ -95,6 +95,7 @@
           <attribute name="nonTransactionalTimerObjectName" type="javax.management.ObjectName">geronimo.server:type=ThreadPooledTimer,name=JDBCNonTransactionalThreadPooledTimer</attribute>
           <reference name="Repository">*:role=Repository,*</reference>
           <reference name="EJBConfigBuilder">geronimo.deployer:role=ModuleBuilder,type=EJB,config=org/apache/geronimo/J2EEDeployer</reference>
  +        <reference name="EJBReferenceBuilder">geronimo.deployer:role=ModuleBuilder,type=EJB,config=org/apache/geronimo/J2EEDeployer</reference>
           <reference name="WebConfigBuilder">geronimo.deployer:role=ModuleBuilder,type=Web,config=org/apache/geronimo/J2EEDeployer</reference>
           <reference name="ConnectorConfigBuilder">geronimo.deployer:role=ModuleBuilder,type=Connector,config=org/apache/geronimo/J2EEDeployer</reference>
       </gbean>
  
  
  
  1.43      +1 -0      incubator-geronimo/modules/assembly/src/plan/j2ee-server-plan.xml
  
  Index: j2ee-server-plan.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/assembly/src/plan/j2ee-server-plan.xml,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- j2ee-server-plan.xml	31 Jul 2004 15:50:11 -0000	1.42
  +++ j2ee-server-plan.xml	6 Aug 2004 22:44:36 -0000	1.43
  @@ -242,6 +242,7 @@
           <attribute name="nonTransactionalTimerObjectName" type="javax.management.ObjectName">geronimo.server:type=ThreadPooledTimer,name=NonTransactionalThreadPooledTimer</attribute>
           <reference name="Repository">*:role=Repository,*</reference>
           <reference name="EJBConfigBuilder">geronimo.deployer:role=ModuleBuilder,type=EJB,config=org/apache/geronimo/Server</reference>
  +        <reference name="EJBReferenceBuilder">geronimo.deployer:role=ModuleBuilder,type=EJB,config=org/apache/geronimo/Server</reference>
           <reference name="WebConfigBuilder">geronimo.deployer:role=ModuleBuilder,type=Web,config=org/apache/geronimo/Server</reference>
           <reference name="ConnectorConfigBuilder">geronimo.deployer:role=ModuleBuilder,type=Connector,config=org/apache/geronimo/Server</reference>
       </gbean>
  
  
  
  1.3       +2 -2      incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceDeployer.java
  
  Index: WebServiceDeployer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/axis/src/java/org/apache/geronimo/axis/WebServiceDeployer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WebServiceDeployer.java	28 Jul 2004 14:24:48 -0000	1.2
  +++ WebServiceDeployer.java	6 Aug 2004 22:44:36 -0000	1.3
  @@ -321,7 +321,7 @@
              * But this can quickly fix looking at it.      
              */
   
  -            ModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(kernel);
  +            OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(kernel);
               ClassLoader oldCl =
                       Thread.currentThread().getContextClassLoader();
               ClassLoader cl =
  @@ -340,7 +340,7 @@
                           AxisGeronimoConstants.TRACKEDCONNECTIONASSOCIATOR_NAME, 
                           AxisGeronimoConstants.TRANSACTIONALTIMER_NAME, 
                           AxisGeronimoConstants.NONTRANSACTIONALTIMER_NAME, 
  -                        null, moduleBuilder, null, null, null);
  +                        null, moduleBuilder, moduleBuilder, null, null, null);
                   XmlObject plan =
                           earConfigBuilder.getDeploymentPlan(earFile.toURL());
   
  
  
  
  1.3       +2 -1      incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/DynamicEJBDeploymentTest.java
  
  Index: DynamicEJBDeploymentTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/axis/src/test/org/apache/geronimo/axis/DynamicEJBDeploymentTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DynamicEJBDeploymentTest.java	28 Jul 2004 14:24:50 -0000	1.2
  +++ DynamicEJBDeploymentTest.java	6 Aug 2004 22:44:36 -0000	1.3
  @@ -105,7 +105,7 @@
   
   	}
   	public void testEJBJarDeploy() throws Exception {
  -		ModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(kernel);
  +		OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(kernel);
   	
   		File earFile =  new File(outDir + "/echo-ewsimpl.jar");
   		if(!earFile.exists()){
  @@ -134,6 +134,7 @@
                               null,
                               null,
                               null,
  +                            moduleBuilder,
                               moduleBuilder,
                               null,
                               null,
  
  
  
  1.13      +2 -1      incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java
  
  Index: RAR_1_0ConfigBuilderTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- RAR_1_0ConfigBuilderTest.java	23 Jul 2004 06:06:19 -0000	1.12
  +++ RAR_1_0ConfigBuilderTest.java	6 Aug 2004 22:44:36 -0000	1.13
  @@ -149,6 +149,7 @@
                       null,
                       connectionTrackerName,
                       null,
  +                    null,
                       null);
   
               action.install(moduleBuilder, earContext, module);
  
  
  
  1.18      +2 -1      incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
  
  Index: RAR_1_5ConfigBuilderTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- RAR_1_5ConfigBuilderTest.java	23 Jul 2004 06:06:19 -0000	1.17
  +++ RAR_1_5ConfigBuilderTest.java	6 Aug 2004 22:44:36 -0000	1.18
  @@ -151,6 +151,7 @@
                       null,
                       connectionTrackerName,
                       null,
  +                    null,
                       null);
   
               action.install(moduleBuilder, earContext, module);
  
  
  
  1.7       +6 -6      incubator-geronimo/modules/j2ee/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
  
  Index: EARConfigBuilderTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/j2ee/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EARConfigBuilderTest.java	1 Aug 2004 20:14:19 -0000	1.6
  +++ EARConfigBuilderTest.java	6 Aug 2004 22:44:37 -0000	1.7
  @@ -71,7 +71,7 @@
           MockEJBConfigBuilder ejbConfigBuilder = new MockEJBConfigBuilder();
           MockWARConfigBuilder webConfigBuilder = new MockWARConfigBuilder();
           MockConnectorConfigBuilder connectorConfigBuilder = new MockConnectorConfigBuilder();
  -        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, null);
  +        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, null, webConfigBuilder, connectorConfigBuilder, null);
           File earFile = new File(EAR_BASE_DIR + "/test-ear.ear");
   
           File carFile = File.createTempFile("EARTest", ".car");
  @@ -92,7 +92,7 @@
           MockEJBConfigBuilder ejbConfigBuilder = new MockEJBConfigBuilder();
           MockWARConfigBuilder webConfigBuilder = new MockWARConfigBuilder();
           MockConnectorConfigBuilder connectorConfigBuilder = new MockConnectorConfigBuilder();
  -        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, null);
  +        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, null, webConfigBuilder, connectorConfigBuilder, null);
           File earFile = new File(EAR_BASE_DIR + "/test-naked-ear.ear");
   
           File carFile = File.createTempFile("EARTest", ".car");
  @@ -112,7 +112,7 @@
       public void testNoEJBDeployer() throws Exception {
           MockWARConfigBuilder warConfigBuilder = new MockWARConfigBuilder();
           MockConnectorConfigBuilder connectorConfigBuilder = new MockConnectorConfigBuilder();
  -        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, warConfigBuilder, connectorConfigBuilder, null);
  +        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, null, null, warConfigBuilder, connectorConfigBuilder, null);
           File earFile = new File(EAR_BASE_DIR + "/test-ear.ear");
   
           File carFile = File.createTempFile("EARTest", ".car");
  @@ -130,7 +130,7 @@
       public void testNoWARDeployer() throws Exception {
           MockEJBConfigBuilder ejbConfigBuilder = new MockEJBConfigBuilder();
           MockConnectorConfigBuilder connectorConfigBuilder = new MockConnectorConfigBuilder();
  -        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, null, connectorConfigBuilder, null);
  +        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, null, null, connectorConfigBuilder, null);
           File earFile = new File(EAR_BASE_DIR + "/test-ear.ear");
   
           File carFile = File.createTempFile("EARTest", ".car");
  @@ -148,7 +148,7 @@
       public void testNoConnectorDeployer() throws Exception {
           MockWARConfigBuilder warConfigBuilder = new MockWARConfigBuilder();
           MockEJBConfigBuilder ejbConfigBuilder = new MockEJBConfigBuilder();
  -        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, warConfigBuilder, null, null);
  +        EARConfigBuilder configBuilder = new EARConfigBuilder(j2eeServer, transactionManagerObjectName,
connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName,
null, ejbConfigBuilder, null, warConfigBuilder, null, null);
           File earFile = new File(EAR_BASE_DIR + "/test-ear.ear");
   
           File carFile = File.createTempFile("EARTest", ".car");
  
  
  
  1.5       +3 -3      incubator-geronimo/modules/j2ee/src/test/org/apache/geronimo/j2ee/deployment/EARContextTest.java
  
  Index: EARContextTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/j2ee/src/test/org/apache/geronimo/j2ee/deployment/EARContextTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EARContextTest.java	22 Jul 2004 03:22:53 -0000	1.4
  +++ EARContextTest.java	6 Aug 2004 22:44:37 -0000	1.5
  @@ -142,8 +142,8 @@
                   ObjectName.getInstance("j2eeDomain:type=TransactionManager"),
                   ObjectName.getInstance("j2eeDomain:type=ConnectionTracker"),
                   ObjectName.getInstance("j2eeDomain:type=TransactionalTimer"),
  -                ObjectName.getInstance("j2eeDomain:type=NonTransactionalTimer")
  -        );
  +                ObjectName.getInstance("j2eeDomain:type=NonTransactionalTimer"),
  +                null);
   
           earContext.addEJBRef(coffee, "peaberry", coffee_peaberry);
           earContext.addEJBLocalRef(coffee, "peaberry", coffee_peaberry_local);
  
  
  
  1.20      +29 -109   incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
  
  Index: JettyModuleBuilder.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JettyModuleBuilder.java	4 Aug 2004 12:05:34 -0000	1.19
  +++ JettyModuleBuilder.java	6 Aug 2004 22:44:37 -0000	1.20
  @@ -70,17 +70,7 @@
   import org.apache.geronimo.security.deploy.Role;
   import org.apache.geronimo.security.deploy.Security;
   import org.apache.geronimo.transaction.UserTransactionImpl;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyDefaultPrincipalType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyDependencyType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyGbeanType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyLocalRefType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyPrincipalType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyRealmType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyRoleMappingsType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyRoleType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettySecurityType;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyWebAppDocument;
  -import org.apache.geronimo.xbeans.geronimo.jetty.JettyWebAppType;
  +import org.apache.geronimo.xbeans.geronimo.jetty.*;
   import org.apache.geronimo.xbeans.j2ee.EjbLocalRefType;
   import org.apache.geronimo.xbeans.j2ee.EjbRefType;
   import org.apache.geronimo.xbeans.j2ee.EnvEntryType;
  @@ -381,48 +371,35 @@
       }
   
       private ReadOnlyContext buildComponentContext(EARContext earContext, WebModule webModule,
WebAppType webApp, JettyWebAppType jettyWebApp, UserTransaction userTransaction, ClassLoader
cl) throws DeploymentException {
  -        ComponentContextBuilder builder = new ComponentContextBuilder(new JMXReferenceFactory());
  -        if (userTransaction != null) {
  -            try {
  -                builder.addUserTransaction(userTransaction);
  -            } catch (NamingException e) {
  -                throw new DeploymentException("Unable to bind UserTransaction into ENC",
e);
  -            }
  -        }
  -
  -        EnvEntryType[] envEntries = webApp.getEnvEntryArray();
  -        ENCConfigBuilder.addEnvEntries(envEntries, builder);
  +        Map ejbRefMap = mapRefs(jettyWebApp.getEjbRefArray());
  +        Map ejbLocalRefMap = mapRefs(jettyWebApp.getEjbLocalRefArray());
  +        Map resourceRefMap = mapRefs(jettyWebApp.getResourceRefArray());
  +        Map resourceEnvRefMap = mapRefs(jettyWebApp.getResourceEnvRefArray());
  +
  +        URI uri = webModule.getURI();
  +
  +        return ENCConfigBuilder.buildComponentContext(earContext,
  +                uri,
  +                userTransaction,
  +                webApp.getEnvEntryArray(),
  +                webApp.getEjbRefArray(), ejbRefMap,
  +                webApp.getEjbLocalRefArray(), ejbLocalRefMap,
  +                webApp.getResourceRefArray(), resourceRefMap,
  +                webApp.getResourceEnvRefArray(), resourceEnvRefMap,
  +                webApp.getMessageDestinationRefArray(),
  +                cl);
   
  -        // ejb-ref
  -        EjbRefType[] ejbRefs = webApp.getEjbRefArray();
  -        addEJBRefs(earContext, webModule, ejbRefs, cl, builder);
  -
  -        // ejb-local-ref
  -        EjbLocalRefType[] ejbLocalRefs = webApp.getEjbLocalRefArray();
  -        addEJBLocalRefs(earContext, webModule, ejbLocalRefs, cl, builder);
  -
  -
  -        // resource-ref
  -        Map resourceRefMap = new HashMap();
  -        JettyLocalRefType[] jettyResourceRefs = jettyWebApp.getResourceRefArray();
  -        for (int i = 0; i < jettyResourceRefs.length; i++) {
  -            JettyLocalRefType jettyResourceRef = jettyResourceRefs[i];
  -            resourceRefMap.put(jettyResourceRef.getRefName(), new JettyRefAdapter(jettyResourceRef));
  -        }
  -        ENCConfigBuilder.addResourceRefs(webApp.getResourceRefArray(), cl, resourceRefMap,
builder);
  +    }
   
  -        // resource-env-ref
  -        Map resourceEnvRefMap = new HashMap();
  -        JettyLocalRefType[] jettyResourceEnvRefs = jettyWebApp.getResourceEnvRefArray();
  -        for (int i = 0; i < jettyResourceEnvRefs.length; i++) {
  -            JettyLocalRefType jettyResourceEnvRef = jettyResourceEnvRefs[i];
  -            resourceEnvRefMap.put(jettyResourceEnvRef.getRefName(), new JettyRefAdapter(jettyResourceEnvRef));
  +    private static Map mapRefs(JettyRemoteRefType[] refs) {
  +        Map refMap = new HashMap();
  +        if (refs != null) {
  +            for (int i = 0; i < refs.length; i++) {
  +                JettyRemoteRefType ref = refs[i];
  +                refMap.put(ref.getRefName(), new JettyRefAdapter(ref));
  +            }
           }
  -        ENCConfigBuilder.addResourceEnvRefs(webApp.getResourceEnvRefArray(), cl, resourceEnvRefMap,
builder);
  -
  -        ENCConfigBuilder.addMessageDestinationRefs(webApp.getMessageDestinationRefArray(),
cl, builder);
  -
  -        return builder.getContext();
  +        return refMap;
       }
   
       private static Security buildSecurityConfig(JettyWebAppType jettyWebApp) {
  @@ -481,64 +458,7 @@
           return principal;
       }
   
  -    private static void addEJBRefs(EARContext earContext, WebModule webModule, EjbRefType[]
ejbRefs, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
  -        for (int i = 0; i < ejbRefs.length; i++) {
  -            EjbRefType ejbRef = ejbRefs[i];
  -
  -            String ejbRefName = ejbRef.getEjbRefName().getStringValue();
  -
  -            String remote = ejbRef.getRemote().getStringValue();
  -            assureEJBObjectInterface(remote, cl);
  -
  -            String home = ejbRef.getHome().getStringValue();
  -            assureEJBHomeInterface(home, cl);
  -
  -            String ejbLink = getJ2eeStringValue(ejbRef.getEjbLink());
  -            Object ejbRefObject;
  -            if (ejbLink != null) {
  -                ejbRefObject = earContext.getEJBRef(webModule.getURI(), ejbLink);
  -            } else {
  -                // todo get the id from the geronimo-jetty.xml file
  -                throw new IllegalArgumentException("non ejb-link refs not supported");
  -            }
  -
  -            try {
  -                builder.bind(ejbRefName, ejbRefObject);
  -            } catch (NamingException e) {
  -                throw new DeploymentException("Unable to to bind ejb-ref: ejb-ref-name="
+ ejbRefName);
  -            }
  -        }
  -    }
  -
  -    private static void addEJBLocalRefs(EARContext earContext, WebModule webModule, EjbLocalRefType[]
ejbLocalRefs, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException
{
  -        for (int i = 0; i < ejbLocalRefs.length; i++) {
  -            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];
  -
  -            String ejbRefName = ejbLocalRef.getEjbRefName().getStringValue();
  -
  -            String local = ejbLocalRef.getLocal().getStringValue();
  -            assureEJBLocalObjectInterface(local, cl);
  -
  -            String localHome = ejbLocalRef.getLocalHome().getStringValue();
  -            assureEJBLocalHomeInterface(localHome, cl);
  -
  -            String ejbLink = getJ2eeStringValue(ejbLocalRef.getEjbLink());
  -            Object ejbLocalRefObject;
  -            if (ejbLink != null) {
  -                ejbLocalRefObject = earContext.getEJBLocalRef(webModule.getURI(), ejbLink);
  -            } else {
  -                // todo get the id from the geronimo-jetty.xml file
  -                throw new IllegalArgumentException("non ejb-link refs not supported");
  -            }
  -
  -            try {
  -                builder.bind(ejbRefName, ejbLocalRefObject);
  -            } catch (NamingException e) {
  -                throw new DeploymentException("Unable to to bind ejb-local-ref: ejb-ref-name="
+ ejbRefName);
  -            }
  -        }
  -    }
  -
  + 
       private void setResourceEnvironment(GBeanMBean bean, ResourceRefType[] resourceRefArray,
JettyLocalRefType[] jettyResourceRefArray) throws AttributeNotFoundException, ReflectionException
{
           Map openejbNames = new HashMap();
           for (int i = 0; i < jettyResourceRefArray.length; i++) {
  
  
  
  1.14      +7 -1      incubator-geronimo/modules/naming/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/project.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- project.xml	24 Jun 2004 20:59:51 -0000	1.13
  +++ project.xml	6 Aug 2004 22:44:37 -0000	1.14
  @@ -70,6 +70,12 @@
           </dependency>
   
           <dependency>
  +            <groupId>geronimo</groupId>
  +            <artifactId>geronimo-j2ee</artifactId>
  +            <version>${pom.currentVersion}</version>
  +        </dependency>
  +
  +        <dependency>
               <groupId>geronimo-spec</groupId>
               <artifactId>geronimo-spec-j2ee-deployment</artifactId>
               <version>1.1-rc2</version>
  
  
  
  1.5       +162 -8    incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
  
  Index: ENCConfigBuilder.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ENCConfigBuilder.java	25 Jul 2004 08:12:39 -0000	1.4
  +++ ENCConfigBuilder.java	6 Aug 2004 22:44:37 -0000	1.5
  @@ -18,15 +18,18 @@
   package org.apache.geronimo.naming.deployment;
   
   import java.util.Map;
  +import java.lang.String;
  +import java.net.URI;
   
   import javax.naming.NamingException;
  +import javax.transaction.UserTransaction;
   
  -import org.apache.geronimo.xbeans.j2ee.EnvEntryType;
  -import org.apache.geronimo.xbeans.j2ee.ResourceRefType;
  -import org.apache.geronimo.xbeans.j2ee.ResourceEnvRefType;
  -import org.apache.geronimo.xbeans.j2ee.MessageDestinationRefType;
  +import org.apache.geronimo.xbeans.j2ee.*;
   import org.apache.geronimo.deployment.DeploymentException;
   import org.apache.geronimo.naming.java.ComponentContextBuilder;
  +import org.apache.geronimo.naming.java.ReadOnlyContext;
  +import org.apache.geronimo.naming.jmx.JMXReferenceFactory;
  +import org.apache.geronimo.j2ee.deployment.EARContext;
   
   /**
    *
  @@ -71,7 +74,7 @@
               try {
                   builder.addResourceRef(name, iface, refAdapter);
               } catch (NamingException e) {
  -                throw new DeploymentException("Invalid env-entry definition for name: "
+ name, e);
  +                throw new DeploymentException("Invalid resource-ref definition for name:
" + name, e);
               }
           }
   
  @@ -95,7 +98,7 @@
               try {
                   builder.addResourceRef(name, iface, refAdapter);
               } catch (NamingException e) {
  -                throw new DeploymentException("Invalid env-entry definition for name: "
+ name, e);
  +                throw new DeploymentException("Invalid resource-env-ref definition for
name: " + name, e);
               }
           }
       }
  @@ -115,10 +118,161 @@
               try {
                   builder.addMessageDestinationRef(name, linkName, iface);
               } catch (NamingException e) {
  -                throw new DeploymentException("Invalid env-entry definition for name: "
+ name, e);
  +                throw new DeploymentException("Invalid message-destination-ref definition
for name: " + name, e);
  +            }
  +
  +        }
  +
  +    }
  +
  +    public static void addEJBRefs(EARContext earContext, URI uri, EjbRefType[] ejbRefs,
Map ejbRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException
{
  +        for (int i = 0; i < ejbRefs.length; i++) {
  +            EjbRefType ejbRef = ejbRefs[i];
  +
  +            String ejbRefName = ejbRef.getEjbRefName().getStringValue();
  +
  +            String remote = ejbRef.getRemote().getStringValue();
  +            assureEJBObjectInterface(remote, cl);
  +
  +            String home = ejbRef.getHome().getStringValue();
  +            assureEJBHomeInterface(home, cl);
  +
  +            boolean isSession = "Session".equals(ejbRef.getEjbRefType().getStringValue());
  +
  +            String ejbLink = getJ2eeStringValue(ejbRef.getEjbLink());
  +            if (ejbLink != null) {
  +                try {
  +                    builder.bind(ejbRefName, earContext.getEJBRef(uri, ejbLink));
  +                } catch (NamingException e) {
  +                    throw new DeploymentException("Unable to to bind ejb-ref: ejb-ref-name="
+ ejbRefName);
  +                }
  +            } else {
  +                RefAdapter refAdapter = (RefAdapter) ejbRefMap.get(ejbRefName);
  +                if (refAdapter == null) {
  +                    throw  new DeploymentException("No geronimo configuration for resource
ref named: " + ejbRefName);
  +                }
  +                try {
  +                    builder.bind(ejbRefName, earContext.createEJBRemoteReference(refAdapter.getTargetName(),
isSession, home, remote));
  +                } catch (NamingException e) {
  +                    throw new DeploymentException("Invalid env-entry definition for name:
" + ejbRefName, e);
  +                }
  +            }
  +
  +        }
  +    }
  +
  +    public static void addEJBLocalRefs(EARContext earContext, URI uri, EjbLocalRefType[]
ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws
DeploymentException {
  +        for (int i = 0; i < ejbLocalRefs.length; i++) {
  +            EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];
  +
  +            String ejbRefName = ejbLocalRef.getEjbRefName().getStringValue();
  +
  +            String local = ejbLocalRef.getLocal().getStringValue();
  +            assureEJBLocalObjectInterface(local, cl);
  +
  +            String localHome = ejbLocalRef.getLocalHome().getStringValue();
  +            assureEJBLocalHomeInterface(localHome, cl);
  +
  +            boolean isSession = "Session".equals(ejbLocalRef.getEjbRefType().getStringValue());
  +
  +            String ejbLink = getJ2eeStringValue(ejbLocalRef.getEjbLink());
  +            if (ejbLink != null) {
  +                try {
  +                    builder.bind(ejbRefName, earContext.getEJBLocalRef(uri, ejbLink));
  +                } catch (NamingException e) {
  +                    throw new DeploymentException("Unable to to bind ejb-local-ref: ejb-ref-name="
+ ejbRefName);
  +                }
  +            } else {
  +                RefAdapter refAdapter = (RefAdapter) ejbLocalRefMap.get(ejbRefName);
  +                if (refAdapter == null) {
  +                    throw  new DeploymentException("No geronimo configuration for resource
ref named: " + ejbRefName);
  +                }
  +                try {
  +                    builder.bind(ejbRefName, earContext.createEJBLocalReference(refAdapter.getTargetName(),
isSession, localHome, local));
  +                } catch (NamingException e) {
  +                    throw new DeploymentException("Invalid env-entry definition for name:
" + ejbRefName, e);
  +                }
               }
   
  +
           }
  +    }
  +
  +    public static void assureEJBObjectInterface(String remote, ClassLoader cl) throws DeploymentException
{
  +        assureInterface(remote, "javax.ejb.EJBObject", "Remote", cl);
  +    }
  +
  +    public static void assureEJBHomeInterface(String home, ClassLoader cl) throws DeploymentException
{
  +        assureInterface(home, "javax.ejb.EJBHome", "Home", cl);
  +    }
  +
  +    public static void assureEJBLocalObjectInterface(String local, ClassLoader cl) throws
DeploymentException {
  +        assureInterface(local, "javax.ejb.EJBLocalObject", "Local", cl);
  +    }
  +
  +    public static void assureEJBLocalHomeInterface(String localHome, ClassLoader cl) throws
DeploymentException {
  +        assureInterface(localHome, "javax.ejb.EJBLocalHome", "LocalHome", cl);
  +    }
  +
  +    public static void assureInterface(String interfaceName, String superInterfaceName,
String interfactType, ClassLoader cl) throws DeploymentException {
  +        Class clazz = null;
  +        try {
  +            clazz = cl.loadClass(interfaceName);
  +        } catch (ClassNotFoundException e) {
  +            throw new DeploymentException(interfactType + " interface class not found:
" + interfaceName);
  +        }
  +        if (!clazz.isInterface()) {
  +            throw new DeploymentException(interfactType + " interface is not an interface:
" + interfaceName);
  +        }
  +        Class superInterface = null;
  +        try {
  +            superInterface = cl.loadClass(superInterfaceName);
  +        } catch (ClassNotFoundException e) {
  +            throw new DeploymentException("Class " + superInterfaceName + " could not be
loaded");
  +        }
  +        if (clazz.isAssignableFrom(superInterface)) {
  +            throw new DeploymentException(interfactType + " interface does not extend "
+ superInterfaceName + ": " + interfaceName);
  +        }
  +    }
  +
  +    private static String getJ2eeStringValue(org.apache.geronimo.xbeans.j2ee.String string)
{
  +        if (string == null) {
  +            return null;
  +        }
  +        return string.getStringValue();
  +    }
  +
  +    public static ReadOnlyContext buildComponentContext(EARContext earContext, URI uri,
UserTransaction userTransaction, EnvEntryType[] envEntries, EjbRefType[] ejbRefs, Map ejbRefMap,
EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ResourceRefType[] resourceRefs, Map resourceRefMap,
ResourceEnvRefType[] resourceEnvRefs, Map resourceEnvRefMap, MessageDestinationRefType[] messageDestinationRefs,
ClassLoader cl) throws DeploymentException {
  +        ComponentContextBuilder builder = new ComponentContextBuilder(new JMXReferenceFactory());
  +
  +        if (userTransaction != null) {
  +            try {
  +                builder.addUserTransaction(userTransaction);
  +            } catch (NamingException e) {
  +                throw new DeploymentException("Could not bind UserTransaction", e);
  +            }
  +        }
  +
  +        addEnvEntries(envEntries, builder);
  +
  +        // ejb-ref
  +        addEJBRefs(earContext, uri, ejbRefs, ejbRefMap, cl, builder);
  +
  +        // ejb-local-ref
  +        addEJBLocalRefs(earContext, uri, ejbLocalRefs, ejbLocalRefMap, cl, builder);
  +
  +        // resource-ref
  +        if (!resourceRefMap.isEmpty()) {
  +            addResourceRefs(resourceRefs, cl, resourceRefMap, builder);
  +        }
  +
  +        // resource-env-ref
  +        if (!resourceEnvRefMap.isEmpty()) {
  +            addResourceEnvRefs(resourceEnvRefs, cl, resourceEnvRefMap, builder);
  +        }
  +
  +        addMessageDestinationRefs(messageDestinationRefs, cl, builder);
   
  +        return builder.getContext();
       }
   }
  
  
  
  1.10      +20 -11    incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java
  
  Index: ComponentContextBuilder.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ComponentContextBuilder.java	25 Jun 2004 21:33:27 -0000	1.9
  +++ ComponentContextBuilder.java	6 Aug 2004 22:44:37 -0000	1.10
  @@ -103,36 +103,45 @@
                   throw (NamingException) new NamingException("Could not convert " + refAdapter
+ " to URL").initCause(e);
               }
           } else {
  -            Reference ref = null;
               try {
  -                ref = referenceFactory.buildConnectionFactoryReference(refAdapter, iface);
  +                bind(name, referenceFactory.buildConnectionFactoryReference(refAdapter,
iface));
               } catch (MalformedObjectNameException e) {
                   throw (NamingException) new NamingException("invalid object name").initCause(e);
               }
  -            context.internalBind(ENV + name, ref);
           }
       }
   
       public void addResourceEnvRef(String name, Class iface, RefAdapter refAdapter) throws
NamingException {
  -        Reference ref = null;
           try {
  -            ref = referenceFactory.buildAdminObjectReference(refAdapter, iface);
  +            bind(name, referenceFactory.buildAdminObjectReference(refAdapter, iface));
           } catch (MalformedObjectNameException e) {
               throw (NamingException) new NamingException("invalid object name").initCause(e);
           }
  -        context.internalBind(ENV + name, ref);
       }
   
       //TODO this works only if there is only one kernel running.
       public void addMessageDestinationRef(String name, String linkName, Class iface) throws
NamingException {
  -        Reference ref = null;
           try {
  -            ref = referenceFactory.buildMessageDestinationReference(linkName, iface);
  +            bind(name, referenceFactory.buildMessageDestinationReference(linkName, iface));
  +        } catch (MalformedObjectNameException e) {
  +            throw (NamingException) new NamingException("invalid object name").initCause(e);
  +        }
  +    }
  +
  +    public void addEjbRef(String name, Class iface, RefAdapter refAdapter) throws NamingException
{
  +        try {
  +            bind(name, referenceFactory.buildEjbReference(refAdapter, iface));
  +        } catch (MalformedObjectNameException e) {
  +            throw (NamingException) new NamingException("invalid object name").initCause(e);
  +        }
  +    }
  +
  +    public void addEjbLocalRef(String name, Class iface, RefAdapter refAdapter) throws
NamingException {
  +        try {
  +            bind(name, referenceFactory.buildEjbLocalReference(refAdapter, iface));
           } catch (MalformedObjectNameException e) {
               throw (NamingException) new NamingException("invalid object name").initCause(e);
           }
  -        context.internalBind(ENV + name, ref);
       }
   
  -    // todo methods for other references
   }
  
  
  
  1.4       +13 -2     incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXReferenceFactory.java
  
  Index: JMXReferenceFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXReferenceFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JMXReferenceFactory.java	25 Jun 2004 21:33:27 -0000	1.3
  +++ JMXReferenceFactory.java	6 Aug 2004 22:44:37 -0000	1.4
  @@ -57,5 +57,16 @@
           return ref;
       }
   
  -    //TODO remotable references should check for externalURI and use a LinkRef if present.
  +    public Reference buildEjbReference(RefAdapter refAdapter, Class iface) throws MalformedObjectNameException
{
  +        Reference ref = new Reference(null, JMXObjectFactory.class.getName(), null);
  +        ref.add(new JMXRefAddr(refAdapter.getServerName(), refAdapter.getKernelName(),
ObjectName.getInstance(refAdapter.getTargetName()), iface));
  +        return ref;
  +    }
  +
  +    public Reference buildEjbLocalReference(RefAdapter refAdapter, Class iface) throws
MalformedObjectNameException {
  +        Reference ref = new Reference(null, JMXObjectFactory.class.getName(), null);
  +        ref.add(new JMXRefAddr(refAdapter.getServerName(), refAdapter.getKernelName(),
ObjectName.getInstance(refAdapter.getTargetName()), iface));
  +        return ref;
  +    }
  +
   }
  
  
  

Mime
View raw message