openejb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r465108 [2/2] - in /incubator/openejb/trunk/openejb2/modules: ./ openejb-builder/src/main/java/org/apache/openejb/corba/ openejb-builder/src/main/java/org/apache/openejb/deployment/ openejb-builder/src/main/xsd/ openejb-builder/src/test/jav...
Date Wed, 18 Oct 2006 00:23:46 GMT
Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateful.java (from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterStateful.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateful.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterStateful.java&r1=465099&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateful.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterStateful.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateful.java Tue Oct 17 17:23:40 2006
@@ -52,11 +52,11 @@
     private final POA poa;
     private final String referenceInterface;
 
-    public AdapterStateful(RpcEjbDeployment deployment, ORB orb, POA parentPOA, Policy securityPolicy) throws CORBAException {
-        super(deployment, orb, parentPOA, securityPolicy);
+    public AdapterStateful(TSSLink tssLink, ORB orb, POA parentPOA, Policy securityPolicy) throws CORBAException {
+        super(tssLink, orb, parentPOA, securityPolicy);
 
         Any any = orb.create_any();
-        any.insert_Value(deployment.getRemoteTxPolicyConfig());
+        any.insert_Value(tssLink.getRemoteTxPolicyConfig());
 
         try {
             Policy[] policies = new Policy[]{
@@ -68,12 +68,12 @@
                 homePOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID),
                 homePOA.create_implicit_activation_policy(ImplicitActivationPolicyValue.NO_IMPLICIT_ACTIVATION),
             };
-            poa = homePOA.create_POA(deployment.getContainerId().toString(), homePOA.the_POAManager(), policies);
+            poa = homePOA.create_POA(tssLink.getContainerId(), homePOA.the_POAManager(), policies);
             poa.set_servant_manager(new ObjectActivator());
 
             poa.the_POAManager().activate();
 
-            StandardServant servant = new StandardServant(orb, EJBInterfaceType.REMOTE, deployment);
+            StandardServant servant = new StandardServant(orb, EJBInterfaceType.REMOTE, tssLink.getDeployment());
             referenceInterface = servant._all_interfaces(null, null)[0];
         } catch (Exception e) {
             throw new CORBAException(e);
@@ -91,7 +91,7 @@
 
     public org.omg.CORBA.Object genObjectReference(ProxyInfo proxyInfo) throws CORBAException {
 
-        byte[] bytes = null;
+        byte[] bytes;
         try {
             ByteArrayOutputStream b = new ByteArrayOutputStream();
             ObjectOutputStream os = new ObjectOutputStream(b);
@@ -119,8 +119,7 @@
                 is.close();
 
                 RpcEjbDeployment deployment = getDeployment();
-                StandardServant servant = new StandardServant(getOrb(), EJBInterfaceType.REMOTE, deployment, pk);
-                return servant;
+                return new StandardServant(getOrb(), EJBInterfaceType.REMOTE, deployment, pk);
             } catch (IOException e) {
                 // if we can't deserialize, then this object can't exist in this process
                 throw new OBJECT_NOT_EXIST(0, org.omg.CORBA.CompletionStatus.COMPLETED_NO);

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateless.java (from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterStateless.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateless.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterStateless.java&r1=465099&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateless.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterStateless.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateless.java Tue Oct 17 17:23:40 2006
@@ -26,7 +26,6 @@
 import org.omg.PortableServer.POAPackage.WrongPolicy;
 import org.omg.PortableServer.RequestProcessingPolicyValue;
 import org.omg.PortableServer.ServantRetentionPolicyValue;
-import org.apache.openejb.RpcEjbDeployment;
 import org.apache.openejb.EJBInterfaceType;
 import org.apache.openejb.corba.transaction.ServerTransactionPolicyFactory;
 import org.apache.openejb.proxy.ProxyInfo;
@@ -39,10 +38,10 @@
     private final byte[] object_id;
     private final org.omg.CORBA.Object objectReference;
 
-    public AdapterStateless(RpcEjbDeployment deployment, ORB orb, POA parentPOA, Policy securityPolicy) throws CORBAException {
-        super(deployment, orb, parentPOA, securityPolicy);
+    public AdapterStateless(TSSLink tssLink, ORB orb, POA parentPOA, Policy securityPolicy) throws CORBAException {
+        super(tssLink, orb, parentPOA, securityPolicy);
         Any any = orb.create_any();
-        any.insert_Value(deployment.getRemoteTxPolicyConfig());
+        any.insert_Value(tssLink.getRemoteTxPolicyConfig());
 
         try {
             Policy[] policies = new Policy[]{
@@ -54,13 +53,13 @@
                 homePOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID),
                 homePOA.create_implicit_activation_policy(ImplicitActivationPolicyValue.NO_IMPLICIT_ACTIVATION),
             };
-            poa = homePOA.create_POA(deployment.getContainerId().toString(), homePOA.the_POAManager(), policies);
+            poa = homePOA.create_POA(tssLink.getContainerId(), homePOA.the_POAManager(), policies);
 
             poa.the_POAManager().activate();
 
-            StandardServant servant = new StandardServant(orb, EJBInterfaceType.REMOTE, deployment);
+            StandardServant servant = new StandardServant(orb, EJBInterfaceType.REMOTE, tssLink.getDeployment());
 
-            poa.activate_object_with_id(object_id = deployment.getContainerId().toString().getBytes(), servant);
+            poa.activate_object_with_id(object_id = tssLink.getContainerId().getBytes(), servant);
             objectReference = poa.servant_to_reference(servant);
         } catch (Exception e) {
             e.printStackTrace();

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterWrapper.java (from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterWrapper.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterWrapper.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterWrapper.java&r1=465099&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterWrapper.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterWrapper.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterWrapper.java Tue Oct 17 17:23:40 2006
@@ -32,39 +32,35 @@
  */
 public final class AdapterWrapper {
     private final static Map adapters = new HashMap();
-    private final RpcEjbDeployment deployment;
+    private final TSSLink tssLink;
     private Adapter generator;
 
-    public AdapterWrapper(RpcEjbDeployment deployment) {
-        this.deployment = deployment;
+    public AdapterWrapper(TSSLink tssLink) {
+        this.tssLink = tssLink;
 
     }
 
-    public EjbDeployment getDeployment() {
-        return deployment;
-    }
-
     public void start(ORB orb, POA poa, NamingContextExt initialContext, Policy securityPolicy) throws CORBAException {
-        switch (deployment.getProxyInfo().getComponentType()) {
+        switch (tssLink.getProxyInfo().getComponentType()) {
             case EJBComponentType.STATELESS:
-                generator = new AdapterStateless(deployment, orb, poa, securityPolicy);
+                generator = new AdapterStateless(tssLink, orb, poa, securityPolicy);
                 break;
             case EJBComponentType.STATEFUL:
-                generator = new AdapterStateful(deployment, orb, poa, securityPolicy);
+                generator = new AdapterStateful(tssLink, orb, poa, securityPolicy);
                 break;
             case EJBComponentType.BMP_ENTITY:
             case EJBComponentType.CMP_ENTITY:
-                generator = new AdapterEntity(deployment, orb, poa, securityPolicy);
+                generator = new AdapterEntity(tssLink, orb, poa, securityPolicy);
                 break;
             default:
                 throw new CORBAException("CORBA Adapter does not handle MDB containers");
         }
-        adapters.put(deployment.getContainerId(), generator);
+        adapters.put(tssLink.getContainerId(), generator);
     }
 
     public void stop() throws CORBAException {
         generator.stop();
-        adapters.remove(deployment.getContainerId());
+        adapters.remove(tssLink.getContainerId());
     }
 
     public static RefGenerator getRefGenerator(String containerId) {

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBean.java (from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/TSSBean.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBean.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/TSSBean.java&r1=465099&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBean.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/TSSBean.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBean.java Tue Oct 17 17:23:40 2006
@@ -170,23 +170,23 @@
         return config;
     }
 
-    public void registerContainer(RpcEjbDeployment container) throws CORBAException {
-        AdapterWrapper adapterWrapper = new AdapterWrapper(container);
+    public void registerContainer(TSSLink tssLink) throws CORBAException {
+        AdapterWrapper adapterWrapper = new AdapterWrapper(tssLink);
 
         adapterWrapper.start(server.getORB(), localPOA, initialContext, securityPolicy);
-        adapters.put(container.getContainerId(), adapterWrapper);
+        adapters.put(tssLink.getContainerId(), adapterWrapper);
 
-        log.debug(POAName + " - Linked container " + container.getContainerId());
+        log.debug(POAName + " - Linked container " + tssLink.getContainerId());
     }
 
-    public void unregisterContainer(RpcEjbDeployment container) {
-        AdapterWrapper adapterWrapper = (AdapterWrapper) adapters.remove(container.getContainerId());
+    public void unregisterContainer(TSSLink tssLink) {
+        AdapterWrapper adapterWrapper = (AdapterWrapper) adapters.remove(tssLink.getContainerId());
         if (adapterWrapper != null) {
             try {
                 adapterWrapper.stop();
-                log.debug(POAName + " - Unlinked container " + container.getContainerId());
+                log.debug(POAName + " - Unlinked container " + tssLink.getContainerId());
             } catch (CORBAException e) {
-                log.error(POAName + " - Error unlinking container " + container.getContainerId(), e);
+                log.error(POAName + " - Error unlinking container " + tssLink.getContainerId(), e);
             }
         }
     }

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java (from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java&r1=465099&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java Tue Oct 17 17:23:40 2006
@@ -36,8 +36,8 @@
         infoFactory.addAttribute("POAName", String.class, true);
         infoFactory.addReference("Server", CORBABean.class, NameFactory.CORBA_SERVICE);
         infoFactory.addAttribute("tssConfig", TSSConfig.class, true);
-        infoFactory.addOperation("registerContainer", new Class[] {RpcEjbDeployment.class});
-        infoFactory.addOperation("unregisterContainer", new Class[] {RpcEjbDeployment.class});
+        infoFactory.addOperation("registerContainer", new Class[] {TSSLink.class});
+        infoFactory.addOperation("unregisterContainer", new Class[] {TSSLink.class});
         infoFactory.setConstructor(new String[]{"classLoader", "POAName", "Server"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();

Added: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLink.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLink.java?view=auto&rev=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLink.java (added)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLink.java Tue Oct 17 17:23:40 2006
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.openejb.corba;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.lang.reflect.Method;
+
+import org.apache.openejb.EJBInterfaceType;
+import org.apache.openejb.RpcEjbDeployment;
+import org.apache.openejb.proxy.ProxyInfo;
+import org.apache.openejb.corba.util.Util;
+import org.apache.openejb.corba.transaction.ServerTransactionPolicyConfig;
+import org.apache.openejb.corba.transaction.OperationTxPolicy;
+import org.apache.openejb.corba.transaction.MappedServerTransactionPolicyConfig;
+import org.apache.openejb.corba.transaction.nodistributedtransactions.NoDTxServerTransactionPolicies;
+import org.apache.openejb.transaction.TransactionPolicyType;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class TSSLink {
+    private final TSSBean tssBean;
+    private final RpcEjbDeployment ejb;
+    private final String[] jndiNames;
+
+    public TSSLink() {
+        tssBean = null;
+        ejb = null;
+        jndiNames = null;
+    }
+
+    public TSSLink(String[] jndiNames, TSSBean tssBean, RpcEjbDeployment ejb) {
+        this.jndiNames = jndiNames;
+        this.tssBean = tssBean;
+        this.ejb = ejb;
+    }
+
+    public void doStart() throws Exception {
+        if (tssBean != null) {
+            tssBean.registerContainer(this);
+        }
+    }
+
+    protected void destroy() {
+        if (tssBean != null) {
+            tssBean.unregisterContainer(this);
+        }
+    }
+
+    public RpcEjbDeployment getDeployment() {
+        return ejb;
+    }
+
+    public String getContainerId() {
+        return ejb.getContainerId();
+    }
+
+    public String[] getJndiNames() {
+        return jndiNames;
+    }
+
+    /**
+     * CORBA home transaction import policy configuration
+     * @return home transaction import policy
+     */
+    public Serializable getHomeTxPolicyConfig() {
+        if (getProxyInfo().getHomeInterface() == null) {
+            return null;
+        }
+        Serializable policy = buildTransactionImportPolicy(EJBInterfaceType.HOME, getProxyInfo().getHomeInterface(), true);
+        return policy;
+    }
+
+    /**
+     * CORBA remote transaction import policy configuration
+     * @return remote transaction import policy
+     */
+    public Serializable getRemoteTxPolicyConfig() {
+        if (getProxyInfo().getRemoteInterface() == null) {
+            return null;
+        }
+        Serializable policy = buildTransactionImportPolicy(EJBInterfaceType.REMOTE, getProxyInfo().getRemoteInterface(), false);
+        return policy;
+    }
+
+    private Serializable buildTransactionImportPolicy(EJBInterfaceType methodIntf, Class intf, boolean isHomeMethod) {
+
+        Map policies = new HashMap();
+
+        Map methodToOperation = Util.mapMethodToOperation(intf);
+        for (Iterator iterator = methodToOperation.entrySet().iterator(); iterator.hasNext();) {
+            Map.Entry entry = (Map.Entry) iterator.next();
+            Method method = (Method) entry.getKey();
+            String operation = (String) entry.getValue();
+
+            int index = ejb.getMethodIndex(method);
+            TransactionPolicyType transactionPolicyType = ejb.getTransactionPolicyManager().getTransactionPolicyType(methodIntf, index);
+            OperationTxPolicy operationTxPolicy = NoDTxServerTransactionPolicies.getTransactionPolicy(transactionPolicyType);
+            policies.put(operation, operationTxPolicy);
+        }
+        ServerTransactionPolicyConfig serverTransactionPolicyConfig = new MappedServerTransactionPolicyConfig(policies);
+
+        return serverTransactionPolicyConfig;
+    }
+
+    ProxyInfo getProxyInfo() {
+        return ejb.getProxyInfo();
+    }
+
+}

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLink.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLink.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLink.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLinkGBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLinkGBean.java?view=auto&rev=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLinkGBean.java (added)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLinkGBean.java Tue Oct 17 17:23:40 2006
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.openejb.corba;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.openejb.RpcEjbDeployment;
+
+/**
+ * @version $Revision$ $Date$
+ */
+public final class TSSLinkGBean {
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(TSSLinkGBean.class, TSSLink.class, NameFactory.CORBA_TSS);
+        infoBuilder.addAttribute("jndiNames", String[].class, true, true);
+        infoBuilder.addReference("TSSBean", TSSBean.class, NameFactory.CORBA_TSS);
+        //this may not work properly due to variable j2eeType in ejbs.
+        infoBuilder.addReference("EJB", RpcEjbDeployment.class);
+        infoBuilder.setConstructor(new String[]{"jndiNames", "TSSBean", "EJB"});
+
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return TSSLinkGBean.GBEAN_INFO;
+    }
+}

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLinkGBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLinkGBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLinkGBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java (from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java&r1=465099&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java Tue Oct 17 17:23:40 2006
@@ -25,7 +25,7 @@
 /**
  *
  * Make sure various GBeanInfos have correct constructor info
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class GBeanInfosTest extends TestCase {
 
@@ -39,6 +39,10 @@
 
     public void testTSSBeanGBean() throws Exception {
         new TSSBeanGBean();
+    }
+
+    public void testTSSLink() throws Exception {
+        new TSSLink();
     }
 
     public void testNameServiceGBean() throws Exception {

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/AbstractRpcDeployment.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/AbstractRpcDeployment.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/AbstractRpcDeployment.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/AbstractRpcDeployment.java Tue Oct 17 17:23:40 2006
@@ -16,14 +16,12 @@
  */
 package org.apache.openejb;
 
-import java.io.Serializable;
 import java.lang.reflect.Method;
 import java.rmi.RemoteException;
-import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
-import java.util.SortedMap;
 import java.util.Set;
+import java.util.SortedMap;
+
 import javax.ejb.EJBHome;
 import javax.ejb.EJBLocalHome;
 import javax.ejb.EJBLocalObject;
@@ -35,18 +33,10 @@
 import org.apache.geronimo.interceptor.InvocationResult;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
-import org.apache.geronimo.timer.PersistenceException;
 import org.apache.openejb.client.EJBObjectHandler;
 import org.apache.openejb.client.EJBObjectProxy;
-import org.apache.openejb.corba.TSSBean;
-import org.apache.openejb.corba.transaction.MappedServerTransactionPolicyConfig;
-import org.apache.openejb.corba.transaction.OperationTxPolicy;
-import org.apache.openejb.corba.transaction.ServerTransactionPolicyConfig;
-import org.apache.openejb.corba.transaction.nodistributedtransactions.NoDTxServerTransactionPolicies;
-import org.apache.openejb.corba.util.Util;
 import org.apache.openejb.proxy.EJBProxyFactory;
 import org.apache.openejb.proxy.ProxyInfo;
-import org.apache.openejb.transaction.TransactionPolicyType;
 
 /**
  * @version $Revision$ $Date$
@@ -59,8 +49,6 @@
     private final String[] localJndiNames;
 
     protected final EJBProxyFactory proxyFactory;
-    private final TSSBean tssBean;
-
 
     public AbstractRpcDeployment(String containerId,
             String ejbName,
@@ -87,8 +75,6 @@
 
             Kernel kernel,
 
-            TSSBean tssBean,
-
             Set unshareableResources,
             Set applicationManagedSecurityResources) throws Exception {
 
@@ -122,8 +108,6 @@
         }
         this.localJndiNames = localJndiNames;
 
-        this.tssBean = tssBean;
-
         // create the proxy factory
         // NOTE: this can't be called until the signaure array has been built and the proxy info has been set
         proxyFactory = new EJBProxyFactory(this);
@@ -165,7 +149,7 @@
     }
 
     public Object invoke(Method method, Object[] args, Object primKey) throws Throwable {
-        EJBInterfaceType invocationType = null;
+        EJBInterfaceType invocationType;
         int index = getMethodIndex(method);
 
         Class serviceEndpointInterface = getProxyInfo().getServiceEndpointInterface();
@@ -194,7 +178,7 @@
 
         EjbInvocation invocation = new EjbInvocationImpl(invocationType, primKey, index, args);
 
-        InvocationResult result = null;
+        InvocationResult result;
         try {
             result = invoke(invocation);
         } catch (Throwable t) {
@@ -212,56 +196,6 @@
         } else {
             return result.getResult();
         }
-    }
-
-    public Serializable getHomeTxPolicyConfig() {
-        if (proxyInfo.getHomeInterface() == null) {
-            return null;
-        }
-        Serializable policy = buildTransactionImportPolicy(EJBInterfaceType.HOME, proxyInfo.getHomeInterface(), true);
-        return policy;
-    }
-
-    public Serializable getRemoteTxPolicyConfig() {
-        if (proxyInfo.getRemoteInterface() == null) {
-            return null;
-        }
-        Serializable policy = buildTransactionImportPolicy(EJBInterfaceType.REMOTE, proxyInfo.getRemoteInterface(), false);
-        return policy;
-    }
-
-    public Serializable buildTransactionImportPolicy(EJBInterfaceType methodIntf, Class intf, boolean isHomeMethod) {
-
-        Map policies = new HashMap();
-
-        Map methodToOperation = Util.mapMethodToOperation(intf);
-        for (Iterator iterator = methodToOperation.entrySet().iterator(); iterator.hasNext();) {
-            Map.Entry entry = (Map.Entry) iterator.next();
-            Method method = (Method) entry.getKey();
-            String operation = (String) entry.getValue();
-
-            int index = getMethodIndex(method);
-            TransactionPolicyType transactionPolicyType = transactionPolicyManager.getTransactionPolicyType(methodIntf, index);
-            OperationTxPolicy operationTxPolicy = NoDTxServerTransactionPolicies.getTransactionPolicy(transactionPolicyType);
-            policies.put(operation, operationTxPolicy);
-        }
-        ServerTransactionPolicyConfig serverTransactionPolicyConfig = new MappedServerTransactionPolicyConfig(policies);
-
-        return serverTransactionPolicyConfig;
-    }
-
-    public void doStart() throws Exception {
-        super.doStart();
-        if (tssBean != null) {
-            tssBean.registerContainer(this);
-        }
-    }
-
-    protected void destroy() throws PersistenceException {
-        if (tssBean != null) {
-            tssBean.unregisterContainer(this);
-        }
-        super.destroy();
     }
 
     private static String[] copyNames(String[] names) {

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeployment.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeployment.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeployment.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeployment.java Tue Oct 17 17:23:40 2006
@@ -20,7 +20,6 @@
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.openejb.cache.InstanceFactory;
 import org.apache.openejb.cache.InstancePool;
-import org.apache.openejb.corba.TSSBean;
 import org.apache.openejb.dispatch.EJBTimeoutOperation;
 import org.apache.openejb.dispatch.InterfaceMethodSignature;
 import org.apache.openejb.dispatch.MethodHelper;
@@ -80,8 +79,6 @@
 
                             Kernel kernel,
 
-                            TSSBean tssBean,
-
                             // connector stuff
                             Set unshareableResources,
                             Set applicationManagedSecurityResources,
@@ -107,7 +104,6 @@
                 transactionPolicies,
                 componentContext,
                 kernel,
-                tssBean,
                 unshareableResources,
                 applicationManagedSecurityResources,
                 reentrant);
@@ -140,8 +136,6 @@
 
                             Kernel kernel,
 
-                            TSSBean tssBean,
-
                             // connector stuff
                             Set unshareableResources,
                             Set applicationManagedSecurityResources,
@@ -172,7 +166,8 @@
                 transactionPolicies,
                 componentContext,
                 kernel,
-                tssBean, unshareableResources, applicationManagedSecurityResources);
+                unshareableResources,
+                applicationManagedSecurityResources);
 
         this.reentrant = reentrant;
 

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeploymentGBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeploymentGBean.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeploymentGBean.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeploymentGBean.java Tue Oct 17 17:23:40 2006
@@ -21,7 +21,6 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.openejb.corba.TSSBean;
 
 import javax.security.auth.Subject;
 import java.util.SortedMap;
@@ -65,7 +64,6 @@
 
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
-        infoFactory.addReference("TSSBean", TSSBean.class);
 
         infoFactory.addAttribute("unshareableResources", Set.class, true);
         infoFactory.addAttribute("applicationManagedSecurityResources", Set.class, true);
@@ -99,8 +97,6 @@
                 "componentContextMap",
 
                 "kernel",
-
-                "TSSBean",
 
                 "unshareableResources",
                 "applicationManagedSecurityResources",

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeployment.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeployment.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeployment.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeployment.java Tue Oct 17 17:23:40 2006
@@ -21,7 +21,6 @@
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.openejb.cache.InstanceFactory;
 import org.apache.openejb.cache.InstancePool;
-import org.apache.openejb.corba.TSSBean;
 import org.apache.openejb.dispatch.EJBTimeoutOperation;
 import org.apache.openejb.dispatch.InterfaceMethodSignature;
 import org.apache.openejb.dispatch.MethodHelper;
@@ -93,8 +92,6 @@
 
                             Kernel kernel,
 
-                            TSSBean tssBean,
-
                             // connector stuff
                             Set unshareableResources,
                             Set applicationManagedSecurityResources,
@@ -122,7 +119,6 @@
                 transactionPolicies,
                 componentContext,
                 kernel,
-                tssBean,
                 unshareableResources,
                 applicationManagedSecurityResources,
                 moduleCmpEngine,
@@ -157,8 +153,6 @@
 
                             Kernel kernel,
 
-                            TSSBean tssBean,
-
                             // connector stuff
                             Set unshareableResources,
                             Set applicationManagedSecurityResources,
@@ -191,7 +185,7 @@
                 transactionPolicies,
                 componentContext,
                 kernel,
-                tssBean, unshareableResources, applicationManagedSecurityResources);
+                unshareableResources, applicationManagedSecurityResources);
 
         this.reentrant = reentrant;
 
@@ -336,7 +330,7 @@
                 if (method == null) {
                     throw new IllegalArgumentException("Could not find select for signature: " + signature);
                 }
-                Method selectMethod = null;
+                Method selectMethod;
                 try {
                     selectMethod = beanClass.getMethod(selectQuery.getMethodName(), selectQuery.getParameterTypes());
                 } catch (NoSuchMethodException e) {

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeploymentGBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeploymentGBean.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeploymentGBean.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeploymentGBean.java Tue Oct 17 17:23:40 2006
@@ -21,7 +21,6 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.openejb.corba.TSSBean;
 import org.apache.openejb.entity.cmp.ModuleCmpEngine;
 
 import javax.security.auth.Subject;
@@ -66,8 +65,6 @@
 
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
-        infoFactory.addReference("TSSBean", TSSBean.class);
-
         infoFactory.addAttribute("unshareableResources", Set.class, true);
         infoFactory.addAttribute("applicationManagedSecurityResources", Set.class, true);
 
@@ -102,8 +99,6 @@
                 "componentContextMap",
 
                 "kernel",
-
-                "TSSBean",
 
                 "unshareableResources",
                 "applicationManagedSecurityResources",

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeployment.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeployment.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeployment.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeployment.java Tue Oct 17 17:23:40 2006
@@ -31,7 +31,7 @@
  *
  * @version $Revision$ $Date$
  */
-public interface RpcEjbDeployment extends EjbDeployment {
+public interface RpcEjbDeployment extends ExtendedEjbDeployment {
 
     /**
      * Return a proxy for the EJB's home interface. This can be passed back
@@ -70,18 +70,6 @@
     String[] getLocalJndiNames();
 
     ProxyInfo getProxyInfo();
-
-    /**
-     * CORBA home transaction import policy configuration
-     * @return home transaction import policy
-     */
-    Serializable getHomeTxPolicyConfig();
-
-    /**
-     * CORBA remote transaction import policy configuration
-     * @return remote transaction import policy
-     */
-    Serializable getRemoteTxPolicyConfig();
 
     /**
      * Legacy invoke method for openejb 1.0 code

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeploymentFactory.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeploymentFactory.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeploymentFactory.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeploymentFactory.java Tue Oct 17 17:23:40 2006
@@ -23,7 +23,6 @@
 
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.openejb.corba.TSSBean;
 
 /**
  * @version $Revision$ $Date$
@@ -45,7 +44,6 @@
     protected Subject runAs;
     protected SortedMap transactionPolicies;
     protected Map componentContext;
-    protected TSSBean tssBean;
     protected Set unshareableResources;
     protected Set applicationManagedSecurityResources;
     protected Kernel kernel;
@@ -177,14 +175,6 @@
 
     public void setComponentContext(Map componentContext) {
         this.componentContext = componentContext;
-    }
-
-    public TSSBean getTssBean() {
-        return tssBean;
-    }
-
-    public void setTssBean(TSSBean tssBean) {
-        this.tssBean = tssBean;
     }
 
     public Set getUnshareableResources() {

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeployment.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeployment.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeployment.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeployment.java Tue Oct 17 17:23:40 2006
@@ -29,7 +29,6 @@
 import org.apache.openejb.cluster.server.DefaultClusteredInstanceCache;
 import org.apache.openejb.cluster.server.EJBClusterManager;
 import org.apache.openejb.cluster.sfsb.ClusteredSFInstanceContextFactory;
-import org.apache.openejb.corba.TSSBean;
 import org.apache.openejb.dispatch.InterfaceMethodSignature;
 import org.apache.openejb.dispatch.MethodSignature;
 import org.apache.openejb.dispatch.VirtualOperation;
@@ -84,8 +83,6 @@
 
                                  Kernel kernel,
 
-                                 TSSBean tssBean,
-
                                  // connector stuff
                                  Set unshareableResources,
                                  Set applicationManagedSecurityResources,
@@ -121,8 +118,6 @@
 
                 kernel,
 
-                tssBean,
-
                 unshareableResources,
                 applicationManagedSecurityResources,
 
@@ -156,8 +151,6 @@
 
                                  Kernel kernel,
 
-                                 TSSBean tssBean,
-
                                  // connector stuff
                                  Set unshareableResources,
                                  Set applicationManagedSecurityResources,
@@ -203,7 +196,8 @@
 
                 kernel,
 
-                tssBean, unshareableResources, applicationManagedSecurityResources);
+                unshareableResources,
+                applicationManagedSecurityResources);
 
         dispatchMethodMap = buildDispatchMethodMap();
 

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentFactory.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentFactory.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentFactory.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentFactory.java Tue Oct 17 17:23:40 2006
@@ -71,7 +71,6 @@
                 transactionPolicies,
                 componentContext,
                 kernel,
-                tssBean,
                 unshareableResources,
                 applicationManagedSecurityResources,
                 clusterManager);

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentGBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentGBean.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentGBean.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentGBean.java Tue Oct 17 17:23:40 2006
@@ -22,7 +22,6 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.openejb.cluster.server.EJBClusterManager;
-import org.apache.openejb.corba.TSSBean;
 
 import javax.security.auth.Subject;
 import java.util.Map;
@@ -66,8 +65,6 @@
 
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
-        infoFactory.addReference("TSSBean", TSSBean.class);
-
         infoFactory.addAttribute("unshareableResources", Set.class, true);
         infoFactory.addAttribute("applicationManagedSecurityResources", Set.class, true);
 
@@ -100,8 +97,6 @@
                 "componentContextMap",
 
                 "kernel",
-
-                "TSSBean",
 
                 "unshareableResources",
                 "applicationManagedSecurityResources",

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeployment.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeployment.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeployment.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeployment.java Tue Oct 17 17:23:40 2006
@@ -21,7 +21,6 @@
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.openejb.cache.InstanceFactory;
 import org.apache.openejb.cache.InstancePool;
-import org.apache.openejb.corba.TSSBean;
 import org.apache.openejb.dispatch.EJBTimeoutOperation;
 import org.apache.openejb.dispatch.InterfaceMethodSignature;
 import org.apache.openejb.dispatch.MethodSignature;
@@ -82,8 +81,6 @@
 
                                   Kernel kernel,
 
-                                  TSSBean tssBean,
-
                                   // connector stuff
                                   Set unshareableResources,
                                   Set applicationManagedSecurityResources,
@@ -112,7 +109,6 @@
                 transactionPolicies,
                 componentContext,
                 kernel,
-                tssBean,
                 unshareableResources,
                 applicationManagedSecurityResources,
                 handlerInfos);
@@ -147,8 +143,6 @@
 
                                   Kernel kernel,
 
-                                  TSSBean tssBean,
-
                                   // connector stuff
                                   Set unshareableResources,
                                   Set applicationManagedSecurityResources,
@@ -180,7 +174,8 @@
                 transactionPolicies,
                 componentContext,
                 kernel,
-                tssBean, unshareableResources, applicationManagedSecurityResources);
+                unshareableResources,
+                applicationManagedSecurityResources);
 
         dispatchMethodMap = buildDispatchMethodMap();
 

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentFactory.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentFactory.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentFactory.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentFactory.java Tue Oct 17 17:23:40 2006
@@ -98,7 +98,6 @@
                 transactionPolicies,
                 componentContext,
                 kernel,
-                tssBean,
                 unshareableResources,
                 applicationManagedSecurityResources,
                 handlerInfos);

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentGBean.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentGBean.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentGBean.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentGBean.java Tue Oct 17 17:23:40 2006
@@ -21,7 +21,6 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.openejb.corba.TSSBean;
 
 import javax.security.auth.Subject;
 import java.util.SortedMap;
@@ -68,8 +67,6 @@
 
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
-        infoFactory.addReference("TSSBean", TSSBean.class);
-
         infoFactory.addAttribute("unshareableResources", Set.class, true);
         infoFactory.addAttribute("applicationManagedSecurityResources", Set.class, true);
 
@@ -104,8 +101,6 @@
                 "componentContextMap",
 
                 "kernel",
-
-                "TSSBean",
 
                 "unshareableResources",
                 "applicationManagedSecurityResources",

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/cluster/server/DefaultClusteredEjbDeployment.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/cluster/server/DefaultClusteredEjbDeployment.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/cluster/server/DefaultClusteredEjbDeployment.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/cluster/server/DefaultClusteredEjbDeployment.java Tue Oct 17 17:23:40 2006
@@ -18,18 +18,25 @@
 
 import java.io.Serializable;
 import java.lang.reflect.Method;
+import java.util.Set;
 
 import javax.ejb.EJBHome;
 import javax.ejb.EJBLocalHome;
 import javax.ejb.EJBLocalObject;
 import javax.ejb.EJBObject;
+import javax.ejb.Timer;
 import javax.security.auth.Subject;
+import javax.naming.Context;
 
 import org.apache.geronimo.interceptor.Invocation;
 import org.apache.geronimo.interceptor.InvocationResult;
 import org.apache.openejb.RpcEjbDeployment;
 import org.apache.openejb.EjbDeployment;
+import org.apache.openejb.timer.BasicTimerServiceImpl;
+import org.apache.openejb.transaction.TransactionPolicyManager;
+import org.apache.openejb.security.PermissionManager;
 import org.apache.openejb.dispatch.InterfaceMethodSignature;
+import org.apache.openejb.dispatch.VirtualOperation;
 import org.apache.openejb.proxy.ProxyInfo;
 
 
@@ -80,10 +87,6 @@
         return container.getEjbObject(primaryKey);
     }
 
-    public Serializable getHomeTxPolicyConfig() {
-        return container.getHomeTxPolicyConfig();
-    }
-
     public String[] getJndiNames() {
         return container.getJndiNames();
     }
@@ -100,10 +103,6 @@
         return container.getProxyInfo();
     }
 
-    public Serializable getRemoteTxPolicyConfig() {
-        return container.getRemoteTxPolicyConfig();
-    }
-
     public InterfaceMethodSignature[] getSignatures() {
         return container.getSignatures();
     }
@@ -126,5 +125,58 @@
 
     public ClusteredInstanceContextFactory getInstanceContextFactory() {
         return factory;
+    }
+
+    //TODO need to review if the following methods should be here
+    public Subject getRunAsSubject() {
+        return container.getRunAsSubject();
+    }
+
+    public Context getComponentContext() {
+        return container.getComponentContext();
+    }
+
+    public void logSystemException(Throwable t) {
+        container.logSystemException(t);
+    }
+
+    public VirtualOperation getVirtualOperation(int methodIndex) {
+        return container.getVirtualOperation(methodIndex);
+    }
+
+    public boolean isSecurityEnabled() {
+        return container.isSecurityEnabled();
+    }
+
+    public String getPolicyContextId() {
+        return container.getPolicyContextId();
+    }
+
+    public PermissionManager getPermissionManager() {
+        return container.getPermissionManager();
+    }
+
+    public TransactionPolicyManager getTransactionPolicyManager() {
+        return container.getTransactionPolicyManager();
+    }
+
+    public Class getBeanClass() {
+        return container.getBeanClass();
+    }
+
+    public Timer getTimerById(Long id) {
+        return container.getTimerById(id);
+    }
+
+    public BasicTimerServiceImpl getTimerService() {
+        return container.getTimerService();
+    }
+
+    public Set getUnshareableResources() {
+        return container.getUnshareableResources();
+    }
+
+    public Set getApplicationManagedSecurityResources() {
+        return container.getApplicationManagedSecurityResources();
     }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/mejb/MEJB.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/mejb/MEJB.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/mejb/MEJB.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/mejb/MEJB.java Tue Oct 17 17:23:40 2006
@@ -17,6 +17,26 @@
 
 package org.apache.openejb.mejb;
 
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Set;
+
+import javax.ejb.EJBException;
+import javax.ejb.EJBHome;
+import javax.ejb.EJBLocalHome;
+import javax.ejb.EJBLocalObject;
+import javax.ejb.EJBObject;
+import javax.ejb.Timer;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.j2ee.Management;
+import javax.management.j2ee.ManagementHome;
+import javax.naming.Context;
+import javax.security.auth.Subject;
+
 import net.sf.cglib.reflect.FastClass;
 import org.apache.geronimo.interceptor.Invocation;
 import org.apache.geronimo.interceptor.InvocationResult;
@@ -27,25 +47,12 @@
 import org.apache.openejb.RpcEjbDeployment;
 import org.apache.openejb.dispatch.InterfaceMethodSignature;
 import org.apache.openejb.dispatch.MethodSignature;
+import org.apache.openejb.dispatch.VirtualOperation;
 import org.apache.openejb.proxy.EJBProxyFactory;
 import org.apache.openejb.proxy.ProxyInfo;
-
-import javax.ejb.EJBException;
-import javax.ejb.EJBHome;
-import javax.ejb.EJBLocalHome;
-import javax.ejb.EJBLocalObject;
-import javax.ejb.EJBObject;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.MBeanServer;
-import javax.management.j2ee.Management;
-import javax.management.j2ee.ManagementHome;
-import javax.security.auth.Subject;
-import java.io.Serializable;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
+import org.apache.openejb.security.PermissionManager;
+import org.apache.openejb.timer.BasicTimerServiceImpl;
+import org.apache.openejb.transaction.TransactionPolicyManager;
 
 /**
  * @version $Rev$ $Date$
@@ -173,16 +180,6 @@
         return null;
     }
 
-    //todo implement to make MEJB accessible through CORBA
-    public Serializable getHomeTxPolicyConfig() {
-        return null;
-    }
-
-    //todo implement to make MEJB accessible through CORBA
-    public Serializable getRemoteTxPolicyConfig() {
-        return null;
-    }
-
     public InvocationResult invoke(Invocation invocation) throws Throwable {
         EjbInvocation ejbInvocation = (EjbInvocation) invocation;
         int methodIndex = methodMap[ejbInvocation.getMethodIndex()];
@@ -203,4 +200,56 @@
         }
     }
 
+    //TODO It's not clear the following methods should even be here and they need to be implemented!!
+
+    public Subject getRunAsSubject() {
+        return null;
+    }
+
+    public Context getComponentContext() {
+        return null;
+    }
+
+    public void logSystemException(Throwable t) {
+    }
+
+    public VirtualOperation getVirtualOperation(int methodIndex) {
+        return null;
+    }
+
+    public boolean isSecurityEnabled() {
+        return false;
+    }
+
+    public String getPolicyContextId() {
+        return null;
+    }
+
+    public PermissionManager getPermissionManager() {
+        return null;
+    }
+
+    public TransactionPolicyManager getTransactionPolicyManager() {
+        return null;
+    }
+
+    public Class getBeanClass() {
+        return null;
+    }
+
+    public Timer getTimerById(Long id) {
+        return null;
+    }
+
+    public BasicTimerServiceImpl getTimerService() {
+        return null;
+    }
+
+    public Set getUnshareableResources() {
+        return null;
+    }
+
+    public Set getApplicationManagedSecurityResources() {
+        return null;
+    }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/cluster/server/E2EIntegrationTest.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/cluster/server/E2EIntegrationTest.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/cluster/server/E2EIntegrationTest.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/cluster/server/E2EIntegrationTest.java Tue Oct 17 17:23:40 2006
@@ -19,6 +19,8 @@
 import java.io.Serializable;
 import java.lang.reflect.Method;
 import java.rmi.RemoteException;
+import java.util.Set;
+
 import javax.ejb.EJBException;
 import javax.ejb.EJBHome;
 import javax.ejb.EJBLocalHome;
@@ -26,7 +28,9 @@
 import javax.ejb.EJBObject;
 import javax.ejb.SessionBean;
 import javax.ejb.SessionContext;
+import javax.ejb.Timer;
 import javax.security.auth.Subject;
+import javax.naming.Context;
 
 import junit.framework.TestCase;
 import org.activemq.broker.BrokerContainer;
@@ -41,10 +45,14 @@
 import org.apache.openejb.cache.SimpleInstanceCache;
 import org.apache.openejb.cluster.sfsb.ClusteredSFInstanceContextFactory;
 import org.apache.openejb.dispatch.InterfaceMethodSignature;
+import org.apache.openejb.dispatch.VirtualOperation;
 import org.apache.openejb.proxy.EJBProxyFactory;
 import org.apache.openejb.proxy.ProxyInfo;
 import org.apache.openejb.sfsb.StatefulInstanceContext;
 import org.apache.openejb.StatefulEjbContainer;
+import org.apache.openejb.timer.BasicTimerServiceImpl;
+import org.apache.openejb.transaction.TransactionPolicyManager;
+import org.apache.openejb.security.PermissionManager;
 
 /**
  * TODO remove this end-to-end test, usefull for lightweight end-to-end testing,
@@ -226,16 +234,60 @@
             throw new UnsupportedOperationException();
         }
 
-        public Serializable getHomeTxPolicyConfig() {
+        public InvocationResult invoke(Invocation arg0) throws Throwable {
             throw new UnsupportedOperationException();
         }
 
-        public Serializable getRemoteTxPolicyConfig() {
-            throw new UnsupportedOperationException();
+        //TODO not sure if the following need to throw an exception or need an impl.
+        public Subject getRunAsSubject() {
+            return null;
         }
 
-        public InvocationResult invoke(Invocation arg0) throws Throwable {
-            throw new UnsupportedOperationException();
+        public Context getComponentContext() {
+            return null;
+        }
+
+        public void logSystemException(Throwable t) {
+        }
+
+        public VirtualOperation getVirtualOperation(int methodIndex) {
+            return null;
+        }
+
+        public boolean isSecurityEnabled() {
+            return false;
+        }
+
+        public String getPolicyContextId() {
+            return null;
+        }
+
+        public PermissionManager getPermissionManager() {
+            return null;
+        }
+
+        public TransactionPolicyManager getTransactionPolicyManager() {
+            return null;
+        }
+
+        public Class getBeanClass() {
+            return null;
+        }
+
+        public Timer getTimerById(Long id) {
+            return null;
+        }
+
+        public BasicTimerServiceImpl getTimerService() {
+            return null;
+        }
+
+        public Set getUnshareableResources() {
+            return null;
+        }
+
+        public Set getApplicationManagedSecurityResources() {
+            return null;
         }
     }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/slsb/MockEjbDeployment.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/slsb/MockEjbDeployment.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/slsb/MockEjbDeployment.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/slsb/MockEjbDeployment.java Tue Oct 17 17:23:40 2006
@@ -20,11 +20,15 @@
 import java.lang.reflect.Method;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.util.Set;
+
 import javax.ejb.EJBHome;
 import javax.ejb.EJBLocalHome;
 import javax.ejb.EJBLocalObject;
 import javax.ejb.EJBObject;
+import javax.ejb.Timer;
 import javax.security.auth.Subject;
+import javax.naming.Context;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -34,7 +38,11 @@
 import org.apache.openejb.EJBComponentType;
 import org.apache.openejb.EjbDeployment;
 import org.apache.openejb.RpcEjbDeployment;
+import org.apache.openejb.timer.BasicTimerServiceImpl;
+import org.apache.openejb.transaction.TransactionPolicyManager;
+import org.apache.openejb.security.PermissionManager;
 import org.apache.openejb.dispatch.InterfaceMethodSignature;
+import org.apache.openejb.dispatch.VirtualOperation;
 import org.apache.openejb.proxy.EJBProxyFactory;
 import org.apache.openejb.proxy.ProxyInfo;
 
@@ -151,14 +159,6 @@
         return null;
     }
 
-    public Serializable getHomeTxPolicyConfig() {
-        return null;
-    }
-
-    public Serializable getRemoteTxPolicyConfig() {
-        return null;
-    }
-
     public static final GBeanInfo GBEAN_INFO;
 
     static {
@@ -202,4 +202,57 @@
 //        kernel.startGBean(gbean.getName());
 //        return gbean.getName();
 //    }
+
+    //TODO not sure if the following need implementation
+
+    public Subject getRunAsSubject() {
+        return null;
+    }
+
+    public Context getComponentContext() {
+        return null;
+    }
+
+    public void logSystemException(Throwable t) {
+    }
+
+    public VirtualOperation getVirtualOperation(int methodIndex) {
+        return null;
+    }
+
+    public boolean isSecurityEnabled() {
+        return false;
+    }
+
+    public String getPolicyContextId() {
+        return null;
+    }
+
+    public PermissionManager getPermissionManager() {
+        return null;
+    }
+
+    public TransactionPolicyManager getTransactionPolicyManager() {
+        return null;
+    }
+
+    public Class getBeanClass() {
+        return null;
+    }
+
+    public Timer getTimerById(Long id) {
+        return null;
+    }
+
+    public BasicTimerServiceImpl getTimerService() {
+        return null;
+    }
+
+    public Set getUnshareableResources() {
+        return null;
+    }
+
+    public Set getApplicationManagedSecurityResources() {
+        return null;
+    }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-sunorb/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-sunorb/pom.xml?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-sunorb/pom.xml (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-sunorb/pom.xml Tue Oct 17 17:23:40 2006
@@ -20,7 +20,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.openejb</groupId>
-            <artifactId>openejb-core</artifactId>
+            <artifactId>openejb-corba</artifactId>
             <version>${pom.version}</version>
         </dependency>
 

Modified: incubator/openejb/trunk/openejb2/modules/openejb-yoko/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-yoko/pom.xml?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-yoko/pom.xml (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-yoko/pom.xml Tue Oct 17 17:23:40 2006
@@ -20,14 +20,15 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.openejb</groupId>
-            <artifactId>openejb-core</artifactId>
+            <artifactId>openejb-corba</artifactId>
             <version>${pom.version}</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.openejb</groupId>
-            <artifactId>openejb-builder</artifactId>
+            <artifactId>openejb-corba-builder</artifactId>
             <version>${pom.version}</version>
+            <scope>test</scope>
         </dependency>
 
         <dependency>

Modified: incubator/openejb/trunk/openejb2/modules/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/pom.xml?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/pom.xml (original)
+++ incubator/openejb/trunk/openejb2/modules/pom.xml Tue Oct 17 17:23:40 2006
@@ -19,7 +19,9 @@
     <modules>
         <module>openejb-pkgen-builder</module>
         <module>openejb-core</module>
+        <module>openejb-corba</module>
         <module>openejb-builder</module>
+        <module>openejb-corba-builder</module>
         <module>openejb-yoko</module>
     </modules>
 



Mime
View raw message