openejb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r465108 [1/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
Author: djencks
Date: Tue Oct 17 17:23:40 2006
New Revision: 465108

URL: http://svn.apache.org/viewvc?view=rev&rev=465108
Log:
OPENEJB-280 Put corba classes in their own jar. Also associated builder classes in their own jar

Added:
    incubator/openejb/trunk/openejb2/modules/openejb-corba/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/corba/
      - copied from r464573, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/corba/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/corba/security/
      - copied from r465099, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/corba/security/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/OpenEjbCorbaRefBuilder.java   (contents, props changed)
      - copied, changed from r464573, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/TSSLinkBuilder.java   (with props)
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/xsd/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/xsd/corba-css-config-2.1.xsd
      - copied unchanged from r464573, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/corba-css-config-2.1.xsd
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/xsd/corba-tss-config-2.1.xsd
      - copied unchanged from r464573, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/corba-tss-config-2.1.xsd
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/xsdconfig/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/xsdconfig/xmlconfig.xml
      - copied unchanged from r464573, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsdconfig/xmlconfig.xml
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/test/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/test/java/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/test/java/org/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/test/java/org/apache/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/test/java/org/apache/openejb/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/test/java/org/apache/openejb/corba/
      - copied from r464573, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/test/java/org/apache/openejb/corba/
    incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/test/java/org/apache/openejb/corba/security/
      - copied from r465099, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/test/java/org/apache/openejb/corba/security/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/pom.xml
      - copied, changed from r454220, incubator/openejb/trunk/openejb2/modules/openejb-core/pom.xml
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/
      - copied from r454220, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/Adapter.java
      - copied, changed from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/Adapter.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterDelegate.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterDelegate.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterEntity.java
      - copied, changed from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterEntity.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterProxyFactory.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterProxyFactory.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateful.java
      - copied, changed from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterStateful.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterStateless.java
      - copied, changed from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterStateless.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterWrapper.java
      - copied, changed from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterWrapper.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CORBABean.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABean.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CORBABeanGBean.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBABeanGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CORBAEJBMemento.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBAEJBMemento.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CORBAEJBMetaData.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBAEJBMetaData.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CORBAException.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBAException.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CORBAHandle.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBAHandle.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CORBAHandleDelegate.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBAHandleDelegate.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CORBAHomeHandle.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CORBAHomeHandle.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CSSBean.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CSSBeanGBean.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CSSBeanGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/ClientContext.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/ClientContext.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/ClientContextHolder.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/ClientContextHolder.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/ClientContextManager.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/ClientContextManager.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/CorbaApplicationServer.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/CorbaApplicationServer.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/NameService.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/NameService.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/NameServiceGBean.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/NameServiceGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/ORBConfiguration.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/ORBConfiguration.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/ORBRef.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/ORBRef.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/RefGenerator.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/RefGenerator.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/StandardServant.java
      - copied unchanged from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/StandardServant.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBean.java
      - copied, changed from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/TSSBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java
      - copied, changed from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/TSSBeanGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLink.java   (with props)
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/TSSLinkGBean.java   (with props)
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/proxy/
      - copied from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/proxy/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/security/
      - copied from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/security/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/transaction/
      - copied from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/transaction/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/util/
      - copied from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/util/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/
      - copied from r454220, incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
      - copied, changed from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/GBeanInfosTest.java
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/compiler/
      - copied from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/compiler/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/java/org/apache/openejb/corba/util/
      - copied from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/util/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/resources/
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/resources/beanPropertiesNameMangler.properties
      - copied unchanged from r464573, incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/resources/beanPropertiesNameMangler.properties
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/resources/nameMangler.properties
      - copied unchanged from r464573, incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/resources/nameMangler.properties
    incubator/openejb/trunk/openejb2/modules/openejb-corba/src/test/resources/specialNameMangler.properties
      - copied unchanged from r464573, incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/resources/specialNameMangler.properties
Removed:
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/corba/
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/corba-css-config-2.1.xsd
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/corba-tss-config-2.1.xsd
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/test/java/org/apache/openejb/corba/
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/corba/
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/resources/beanPropertiesNameMangler.properties
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/resources/nameMangler.properties
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/resources/specialNameMangler.properties
Modified:
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbLocalRefBuilder.java
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/RpcEjbBuilder.java
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansEntityBuilder.java
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansMdbBuilder.java
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansSessionBuilder.java
    incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/openejb-jar-2.2.xsd
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/AbstractRpcDeployment.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeployment.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/BmpEjbDeploymentGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeployment.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/CmpEjbDeploymentGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeployment.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/RpcEjbDeploymentFactory.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeployment.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentFactory.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatefulEjbDeploymentGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeployment.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentFactory.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/StatelessEjbDeploymentGBean.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/cluster/server/DefaultClusteredEjbDeployment.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/mejb/MEJB.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/cluster/server/E2EIntegrationTest.java
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/test/java/org/apache/openejb/slsb/MockEjbDeployment.java
    incubator/openejb/trunk/openejb2/modules/openejb-sunorb/pom.xml
    incubator/openejb/trunk/openejb2/modules/openejb-yoko/pom.xml
    incubator/openejb/trunk/openejb2/modules/pom.xml

Modified: incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbLocalRefBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbLocalRefBuilder.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbLocalRefBuilder.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbLocalRefBuilder.java Tue Oct 17 17:23:40 2006
@@ -72,7 +72,7 @@
             GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);
 
             Reference ejbReference = addEJBLocalRef(remoteConfiguration, module.getModuleURI(), ejbLocalRef, localRef, cl);
-            componentContext.put(ENV + ejbRefName, ejbReference);
+            getJndiContextMap(componentContext).put(ENV + ejbRefName, ejbReference);
         }
     }
 

Modified: incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java Tue Oct 17 17:23:40 2006
@@ -18,7 +18,6 @@
 package org.apache.openejb.deployment;
 
 import java.net.URI;
-import java.net.URISyntaxException;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -41,11 +40,10 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
 import org.apache.geronimo.xbeans.j2ee.EjbRefType;
-import org.apache.xmlbeans.QNameSet;
-import org.apache.xmlbeans.XmlObject;
 import org.apache.openejb.RpcEjbDeployment;
-import org.apache.openejb.corba.proxy.CORBAProxyReference;
 import org.apache.openejb.proxy.EJBProxyReference;
+import org.apache.xmlbeans.QNameSet;
+import org.apache.xmlbeans.XmlObject;
 
 /**
  * @version $Revision$ $Date$
@@ -78,8 +76,11 @@
             String ejbRefName = getStringValue(ejbRef.getEjbRefName());
             GerEjbRefType remoteRef = (GerEjbRefType) ejbRefMap.get(ejbRefName);
 
-            Reference ejbReference = addEJBRef(localConfiguration, remoteConfiguration, module.getModuleURI(), ejbRef, remoteRef, cl);
-            componentContext.put(ENV + ejbRefName, ejbReference);
+            Reference ejbReference = addEJBRef(remoteConfiguration, module.getModuleURI(), ejbRef, remoteRef, cl);
+            //separate corba builder takes care of corba refs
+            if (ejbReference != null) {
+                getJndiContextMap(componentContext).put(ENV + ejbRefName, ejbReference);
+            }
         }
     }
 
@@ -87,7 +88,7 @@
         return convert(specDD.selectChildren(ejbRefQNameSet), J2EE_CONVERTER, EjbRefType.type);
     }
 
-    private Reference addEJBRef(Configuration earContext, Configuration ejbContext, URI moduleURI, EjbRefType ejbRef, GerEjbRefType remoteRef, ClassLoader cl) throws DeploymentException {
+    private Reference addEJBRef(Configuration ejbContext, URI moduleURI, EjbRefType ejbRef, GerEjbRefType remoteRef, ClassLoader cl) throws DeploymentException {
         String remote = getStringValue(ejbRef.getRemote());
         String refName = getStringValue(ejbRef.getEjbRefName());
         try {
@@ -103,7 +104,7 @@
             throw new DeploymentException("Error processing 'home' element for EJB Reference '" + refName + "' for module '" + moduleURI + "': " + e.getMessage());
         }
 
-        Reference ejbReference;
+        Reference ejbReference = null;
         boolean isSession = "Session".equals(getStringValue(ejbRef.getEjbRefType()));
 
         if (isSession && remote.equals("javax.management.j2ee.Management") && home.equals("javax.management.j2ee.ManagementHome")) {
@@ -112,25 +113,7 @@
         } else {
 
             String ejbLink = null;
-            if (remoteRef != null && remoteRef.isSetNsCorbaloc()) {
-                try {
-                    AbstractNameQuery cssBean;
-                    if (remoteRef.isSetCssLink()) {
-                        String cssLink = remoteRef.getCssLink().trim();
-                        cssBean = buildAbstractNameQuery(null, null, cssLink, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE);
-                    } else {
-                        GerPatternType css = remoteRef.getCss();
-                        cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE, null);
-                    }
-                    ejbReference = createCORBAReference(earContext,
-                            cssBean,
-                            new URI(remoteRef.getNsCorbaloc().trim()),
-                            remoteRef.getName().trim(),
-                            home);
-                } catch (URISyntaxException e) {
-                    throw new DeploymentException("Could not construct CORBA NameServer URI: " + remoteRef.getNsCorbaloc(), e);
-                }
-            } else {
+            if (!(remoteRef != null && remoteRef.isSetNsCorbaloc())) {
                 Artifact targetConfigId = null;
                 String optionalModule = moduleURI == null ? null : moduleURI.toString();
                 String requiredModule = null;
@@ -208,15 +191,6 @@
                     "reference remote: " + remote + "\n" +
                     "ejb remote: " + OpenEjbRemoteRefBuilder.getRemoteInterface(data));
         }
-    }
-
-    public Reference createCORBAReference(Configuration configuration, AbstractNameQuery containerNameQuery, URI nsCorbaloc, String objectName, String home) throws DeploymentException {
-        try {
-            configuration.findGBean(containerNameQuery);
-        } catch (GBeanNotFoundException e) {
-            throw new DeploymentException("Could not find css bean matching " + containerNameQuery + " from configuration " + configuration.getId());
-        }
-        return new CORBAProxyReference(configuration.getId(), containerNameQuery, nsCorbaloc, objectName, home);
     }
 
     public Reference createEJBRemoteRef(String refName, Configuration configuration, String name, String requiredModule, String optionalModule, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String home, String remote) throws DeploymentException {

Modified: incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/RpcEjbBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/RpcEjbBuilder.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/RpcEjbBuilder.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/RpcEjbBuilder.java Tue Oct 17 17:23:40 2006
@@ -199,7 +199,7 @@
         gbean.setAttribute("componentContextMap", componentContext);
 
         if (tssBeanQuery != null) {
-            gbean.setReferencePattern("TSSBean", tssBeanQuery);
+//            gbean.setReferencePattern("TSSBean", tssBeanQuery);
         }
 
         gbean.setAttribute("unshareableResources", unshareableResources);

Modified: incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansEntityBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansEntityBuilder.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansEntityBuilder.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansEntityBuilder.java Tue Oct 17 17:23:40 2006
@@ -24,33 +24,21 @@
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.EJBModule;
+import org.apache.geronimo.j2ee.deployment.NamingBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.ClassLoading;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.config.Configuration;
-import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
-import org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerEjbRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerGbeanRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerResourceEnvRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
 import org.apache.geronimo.xbeans.j2ee.EjbJarType;
-import org.apache.geronimo.xbeans.j2ee.EjbLocalRefType;
-import org.apache.geronimo.xbeans.j2ee.EjbRefType;
 import org.apache.geronimo.xbeans.j2ee.EnterpriseBeansType;
 import org.apache.geronimo.xbeans.j2ee.EntityBeanType;
-import org.apache.geronimo.xbeans.j2ee.EnvEntryType;
-import org.apache.geronimo.xbeans.j2ee.ResourceEnvRefType;
 import org.apache.geronimo.xbeans.j2ee.ResourceRefType;
-import org.apache.geronimo.xbeans.j2ee.ServiceRefType;
 import org.apache.openejb.BmpEjbDeploymentGBean;
 import org.apache.openejb.CmpEjbDeploymentGBean;
 import org.apache.openejb.xbeans.ejbjar.OpenejbEntityBeanType;
@@ -117,22 +105,22 @@
         builder.setTransactionPolicies(transactionPolicies);
         builder.setReentrant(entityBean.getReentrant().getBooleanValue());
 
-        AbstractNameQuery tssBeanQuery = getTssBeanQuery(openejbEntityBean, ejbModule, earContext, entityBean);
-        builder.setTssBeanQuery(tssBeanQuery);
+//        AbstractNameQuery tssBeanQuery = getTssBeanQuery(openejbEntityBean, ejbModule, earContext, entityBean);
+//        builder.setTssBeanQuery(tssBeanQuery);
 
         addSecurity(earContext, ejbName, builder, cl, ejbModule, entityBean, componentPermissions, policyContextID);
 
-        processEnvironmentRefs(builder, earContext, ejbModule, entityBean, openejbEntityBean, cl);
+        processEnvironmentRefs(builder, earContext, ejbModule, entityBean, openejbEntityBean, containerAbstractName, cl);
 
         try {
-            if (tssBeanQuery != null) {
-                if (openejbEntityBean.getJndiNameArray().length == 0) {
-                    throw new DeploymentException("Cannot expose an bean via CORBA unless a JNDI name is set (that's also used as the CORBA naming service name)");
-                }
-                if (!entityBean.isSetRemote() || !entityBean.isSetHome()) {
-                    throw new DeploymentException("An bean without a remote interface cannot be exposed via CORBA");
-                }
-            }
+//            if (tssBeanQuery != null) {
+//                if (openejbEntityBean.getJndiNameArray().length == 0) {
+//                    throw new DeploymentException("Cannot expose an bean via CORBA unless a JNDI name is set (that's also used as the CORBA naming service name)");
+//                }
+//                if (!entityBean.isSetRemote() || !entityBean.isSetHome()) {
+//                    throw new DeploymentException("An bean without a remote interface cannot be exposed via CORBA");
+//                }
+//            }
             GBeanData gbean = builder.createConfiguration();
             return gbean;
         } catch (Throwable e) {
@@ -145,36 +133,13 @@
         return earContext.getNaming().createChildName(moduleBaseName, ejbName, NameFactory.ENTITY_BEAN);
     }
 
-    private void processEnvironmentRefs(EntityBuilder builder, EARContext earContext, EJBModule ejbModule, EntityBeanType entityBean, OpenejbEntityBeanType openejbEntityBean, ClassLoader cl) throws DeploymentException {
-        // env entries
-        EnvEntryType[] envEntries = entityBean.getEnvEntryArray();
-
-        // ejb refs
-        EjbRefType[] ejbRefs = entityBean.getEjbRefArray();
-        GerEjbRefType[] openejbEjbRefs = null;
-
-        EjbLocalRefType[] ejbLocalRefs = entityBean.getEjbLocalRefArray();
-        GerEjbLocalRefType[] openejbEjbLocalRefs = null;
-
+    private void processEnvironmentRefs(EntityBuilder builder, EARContext earContext, EJBModule ejbModule, EntityBeanType entityBean, OpenejbEntityBeanType openejbEntityBean, AbstractName ejbAbstractName, ClassLoader cl) throws DeploymentException {
         // resource refs
         ResourceRefType[] resourceRefs = entityBean.getResourceRefArray();
         GerResourceRefType[] openejbResourceRefs = null;
 
-        // resource env refs
-        ResourceEnvRefType[] resourceEnvRefs = entityBean.getResourceEnvRefArray();
-        GerResourceEnvRefType[] openejbResourceEnvRefs = null;
-
-        ServiceRefType[] serviceRefs = entityBean.getServiceRefArray();
-        GerServiceRefType[] openejbServiceRefs = null;
-
-        GerGbeanRefType[] gBeanRefs = null;
-
         if (openejbEntityBean != null) {
-            openejbEjbRefs = openejbEntityBean.getEjbRefArray();
-            openejbEjbLocalRefs = openejbEntityBean.getEjbLocalRefArray();
             openejbResourceRefs = openejbEntityBean.getResourceRefArray();
-            openejbResourceEnvRefs = openejbEntityBean.getResourceEnvRefArray();
-            openejbServiceRefs = openejbEntityBean.getServiceRefArray();
             builder.setJndiNames(openejbEntityBean.getJndiNameArray());
             builder.setLocalJndiNames(openejbEntityBean.getLocalJndiNameArray());
         } else {
@@ -183,10 +148,13 @@
             builder.setLocalJndiNames(new String[]{"local/" + ejbName});
         }
 
-        Map componentContext = new HashMap();
+        Map buildingContext = new HashMap();
+        buildingContext.put(NamingBuilder.JNDI_KEY, new HashMap());
+        buildingContext.put(NamingBuilder.GBEAN_NAME_KEY, ejbAbstractName);
         Configuration earConfiguration = earContext.getConfiguration();
-        getNamingBuilders().buildNaming(entityBean, openejbEntityBean, earConfiguration, earConfiguration, ejbModule, componentContext);
-        builder.setComponentContext(componentContext);
+        getNamingBuilders().buildNaming(entityBean, openejbEntityBean, earConfiguration, earConfiguration, ejbModule, buildingContext);
+        Map compContext = (Map) buildingContext.get(NamingBuilder.JNDI_KEY);
+        builder.setComponentContext(compContext);
         getResourceEnvironmentSetter().setResourceEnvironment(builder, resourceRefs, openejbResourceRefs);
     }
 
@@ -264,34 +232,4 @@
         }
     }
 
-    protected AbstractNameQuery getTssBeanQuery(OpenejbEntityBeanType openejbEntityBean, EJBModule ejbModule, EARContext earContext, EntityBeanType entityBean) throws DeploymentException {
-        AbstractNameQuery tssBeanObjectName = null;
-        if (openejbEntityBean != null) {
-            if (openejbEntityBean.isSetTssLink()) {
-                String tssBeanLink = openejbEntityBean.getTssLink().trim();
-                URI moduleURI = ejbModule.getModuleURI();
-                String moduleType = NameFactory.EJB_MODULE;
-                tssBeanObjectName = ENCConfigBuilder.buildAbstractNameQuery(null, moduleURI == null? null: moduleURI.toString(), tssBeanLink, moduleType, NameFactory.EJB_MODULE);
-                try {
-                    earContext.getConfiguration().findGBean(tssBeanObjectName);
-                } catch (GBeanNotFoundException e) {
-                    tssBeanObjectName = ENCConfigBuilder.buildAbstractNameQuery(null, null, tssBeanLink, null, NameFactory.EJB_MODULE);
-                    try {
-                        earContext.getConfiguration().findGBean(tssBeanObjectName);
-                    } catch (GBeanNotFoundException e1) {
-                        throw new DeploymentException("No tss bean found", e);
-                    }
-                }
-            } else if (openejbEntityBean.isSetTss()) {
-                tssBeanObjectName = ENCConfigBuilder.buildAbstractNameQuery(openejbEntityBean.getTss(), NameFactory.CORBA_TSS, NameFactory.EJB_MODULE, null);
-            }
-        }
-        if (tssBeanObjectName != null && openejbEntityBean.getJndiNameArray().length == 0) {
-            throw new DeploymentException("Cannot expose a session bean via CORBA unless a JNDI name is set (that's also used as the CORBA naming service name)");
-        }
-        if (tssBeanObjectName != null && (!entityBean.isSetRemote() || !entityBean.isSetHome())) {
-            throw new DeploymentException("A session bean without a remote interface cannot be exposed via CORBA");
-        }
-        return tssBeanObjectName;
-    }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansMdbBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansMdbBuilder.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansMdbBuilder.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansMdbBuilder.java Tue Oct 17 17:23:40 2006
@@ -32,6 +32,7 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.EJBModule;
+import org.apache.geronimo.j2ee.deployment.NamingBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
@@ -40,25 +41,15 @@
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
-import org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerEjbRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerGbeanRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerResourceEnvRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceLocatorType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
 import org.apache.geronimo.xbeans.j2ee.ActivationConfigPropertyType;
 import org.apache.geronimo.xbeans.j2ee.EjbJarType;
-import org.apache.geronimo.xbeans.j2ee.EjbLocalRefType;
-import org.apache.geronimo.xbeans.j2ee.EjbRefType;
 import org.apache.geronimo.xbeans.j2ee.EnterpriseBeansType;
-import org.apache.geronimo.xbeans.j2ee.EnvEntryType;
 import org.apache.geronimo.xbeans.j2ee.MessageDestinationRefType;
 import org.apache.geronimo.xbeans.j2ee.MessageDrivenBeanType;
-import org.apache.geronimo.xbeans.j2ee.ResourceEnvRefType;
 import org.apache.geronimo.xbeans.j2ee.ResourceRefType;
-import org.apache.geronimo.xbeans.j2ee.ServiceRefType;
 import org.apache.geronimo.connector.deployment.AdminObjectRefBuilder;
 import org.apache.openejb.xbeans.ejbjar.OpenejbActivationConfigPropertyType;
 import org.apache.openejb.xbeans.ejbjar.OpenejbMessageDrivenBeanType;
@@ -100,7 +91,7 @@
                     messageDrivenBean.isSetMessageDestinationLink() ? messageDrivenBean.getMessageDestinationLink().getStringValue() : null,
                     messageDrivenBean.isSetMessageDestinationType() ? messageDrivenBean.getMessageDestinationType().getStringValue() : null,
                     messageDrivenBean.getEjbName().getStringValue());
-            GBeanData messageDrivenGBean = createBean(earContext, ejbModule, containerId, messageDrivenBean, openejbMessageDrivenBean, activationSpecName, transactionPolicyHelper, cl, componentPermissions, policyContextID);
+            GBeanData messageDrivenGBean = createBean(earContext, ejbModule, messageDrivenAbstractName, messageDrivenBean, openejbMessageDrivenBean, activationSpecName, transactionPolicyHelper, cl, componentPermissions, policyContextID);
             messageDrivenGBean.setAbstractName(messageDrivenAbstractName);
             try {
                 earContext.addGBean(messageDrivenGBean);
@@ -129,7 +120,7 @@
 
     private GBeanData createBean(EARContext earContext,
             EJBModule ejbModule,
-            String containerId,
+            AbstractName ejbAbstractName,
             MessageDrivenBeanType messageDrivenBean,
             OpenejbMessageDrivenBeanType openejbMessageDrivenBean,
             AbstractName activationSpecWrapperName,
@@ -145,7 +136,7 @@
         String ejbName = messageDrivenBean.getEjbName().getStringValue().trim();
 
         MdbBuilder builder = new MdbBuilder();
-        builder.setContainerId(containerId);
+        builder.setContainerId(ejbAbstractName.toString());
         builder.setEjbName(ejbName);
 
         builder.setEndpointInterfaceName(getMessagingType(messageDrivenBean));
@@ -177,7 +168,7 @@
             builder.setTransactionPolicies(transactionPolicies);
         }
 
-        processEnvironmentRefs(builder, earContext, ejbModule, messageDrivenBean, openejbMessageDrivenBean, cl);
+        processEnvironmentRefs(builder, earContext, ejbModule, messageDrivenBean, openejbMessageDrivenBean, ejbAbstractName, cl);
 
         try {
             GBeanData gbean = builder.createConfiguration();
@@ -367,45 +358,24 @@
         return ENCConfigBuilder.buildAbstractNameQuery(resourceLocator.getPattern(), type, NameFactory.RESOURCE_ADAPTER_MODULE, null);
     }
 
-    protected void processEnvironmentRefs(MdbBuilder builder, EARContext earContext, EJBModule ejbModule, MessageDrivenBeanType messageDrivenBean, OpenejbMessageDrivenBeanType openejbMessageDrivenBean, ClassLoader cl) throws DeploymentException {
-        // env entries
-        EnvEntryType[] envEntries = messageDrivenBean.getEnvEntryArray();
-
-        // ejb refs
-        EjbRefType[] ejbRefs = messageDrivenBean.getEjbRefArray();
-        GerEjbRefType[] openejbEjbRefs = null;
-
-        EjbLocalRefType[] ejbLocalRefs = messageDrivenBean.getEjbLocalRefArray();
-        GerEjbLocalRefType[] openejbEjbLocalRefs = null;
+    protected void processEnvironmentRefs(MdbBuilder builder, EARContext earContext, EJBModule ejbModule, MessageDrivenBeanType messageDrivenBean, OpenejbMessageDrivenBeanType openejbMessageDrivenBean, AbstractName ejbAbstractName, ClassLoader cl) throws DeploymentException {
 
         // resource refs
         ResourceRefType[] resourceRefs = messageDrivenBean.getResourceRefArray();
         GerResourceRefType[] openejbResourceRefs = null;
 
-        // resource env refs
-        ResourceEnvRefType[] resourceEnvRefs = messageDrivenBean.getResourceEnvRefArray();
-        GerResourceEnvRefType[] openejbResourceEnvRefs = null;
-
-        ServiceRefType[] serviceRefs = messageDrivenBean.getServiceRefArray();
-        GerServiceRefType[] openejbServiceRefs = null;
-
-        GerGbeanRefType[] gBeanRefs = null;
-
         //get arrays from openejb plan if present
         if (openejbMessageDrivenBean != null) {
-            openejbEjbRefs = openejbMessageDrivenBean.getEjbRefArray();
-            openejbEjbLocalRefs = openejbMessageDrivenBean.getEjbLocalRefArray();
             openejbResourceRefs = openejbMessageDrivenBean.getResourceRefArray();
-            openejbResourceEnvRefs = openejbMessageDrivenBean.getResourceEnvRefArray();
-            openejbServiceRefs = openejbMessageDrivenBean.getServiceRefArray();
         }
 
-        MessageDestinationRefType[] messageDestinationRefs = messageDrivenBean.getMessageDestinationRefArray();
-
-        Map componentContext = new HashMap();
+        Map buildingContext = new HashMap();
+        buildingContext.put(NamingBuilder.JNDI_KEY, new HashMap());
+        buildingContext.put(NamingBuilder.GBEAN_NAME_KEY, ejbAbstractName);
         Configuration earConfiguration = earContext.getConfiguration();
-        getNamingBuilders().buildNaming(messageDrivenBean, openejbMessageDrivenBean, earConfiguration, earConfiguration, ejbModule, componentContext);
-        builder.setComponentContext(componentContext);
+        getNamingBuilders().buildNaming(messageDrivenBean, openejbMessageDrivenBean, earConfiguration, earConfiguration, ejbModule, buildingContext);
+        Map compContext = (Map) buildingContext.get(NamingBuilder.JNDI_KEY);
+        builder.setComponentContext(compContext);
         getResourceEnvironmentSetter().setResourceEnvironment(builder, resourceRefs, openejbResourceRefs);
     }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansSessionBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansSessionBuilder.java?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansSessionBuilder.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/XmlBeansSessionBuilder.java Tue Oct 17 17:23:40 2006
@@ -33,11 +33,10 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.EJBModule;
+import org.apache.geronimo.j2ee.deployment.NamingBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.config.Configuration;
-import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
@@ -241,11 +240,11 @@
         }
 
         // tssBean
-        AbstractNameQuery tssBeanQuery = getTssBeanQuery(openejbSessionBean, ejbModule, earContext, sessionBean);
-        sessionBuilder.setTssBeanQuery(tssBeanQuery);
+//        AbstractNameQuery tssBeanQuery = getTssBeanQuery(openejbSessionBean, ejbModule, earContext, sessionBean);
+//        sessionBuilder.setTssBeanQuery(tssBeanQuery);
 
         // componentContext, unshareableResources and applicationManagedSecurityResources
-        processEnvironmentRefs(sessionBuilder, earContext, ejbModule, sessionBean, openejbSessionBean, cl);
+        processEnvironmentRefs(sessionBuilder, earContext, ejbModule, sessionBean, openejbSessionBean, sessionAbstractName, cl);
 
         GBeanData sessionGBean;
         try {
@@ -262,7 +261,7 @@
         }
     }
 
-    public void processEnvironmentRefs(SessionBuilder sessionBuilder, EARContext earContext, EJBModule ejbModule, SessionBeanType sessionBean, OpenejbSessionBeanType openejbSessionBean, ClassLoader cl) throws DeploymentException {
+    public void processEnvironmentRefs(SessionBuilder sessionBuilder, EARContext earContext, EJBModule ejbModule, SessionBeanType sessionBean, OpenejbSessionBeanType openejbSessionBean, AbstractName ejbAbstractName, ClassLoader cl) throws DeploymentException {
         // resource refs
         ResourceRefType[] resourceRefs = sessionBean.getResourceRefArray();
         GerResourceRefType[] openejbResourceRefs = null;
@@ -271,10 +270,13 @@
             openejbResourceRefs = openejbSessionBean.getResourceRefArray();
         }
 
-        Map componentContext = new HashMap();
+        Map buildingContext = new HashMap();
+        buildingContext.put(NamingBuilder.JNDI_KEY, new HashMap());
+        buildingContext.put(NamingBuilder.GBEAN_NAME_KEY, ejbAbstractName);
         Configuration earConfiguration = earContext.getConfiguration();
-        getNamingBuilders().buildNaming(sessionBean, openejbSessionBean, earConfiguration, earConfiguration, ejbModule, componentContext);
-        sessionBuilder.setComponentContext(componentContext);
+        getNamingBuilders().buildNaming(sessionBean, openejbSessionBean, earConfiguration, earConfiguration, ejbModule, buildingContext);
+        Map compContext = (Map) buildingContext.get(NamingBuilder.JNDI_KEY);
+        sessionBuilder.setComponentContext(compContext);
         getResourceEnvironmentSetter().setResourceEnvironment(sessionBuilder, resourceRefs, openejbResourceRefs);
     }
 
@@ -364,34 +366,4 @@
         }
     }
 
-    private AbstractNameQuery getTssBeanQuery(OpenejbSessionBeanType openejbSessionBean, EJBModule ejbModule, EARContext earContext, SessionBeanType sessionBean) throws DeploymentException {
-        AbstractNameQuery tssBeanName = null;
-        if (openejbSessionBean != null) {
-            if (openejbSessionBean.isSetTssLink()) {
-                String tssBeanLink = openejbSessionBean.getTssLink().trim();
-                URI moduleURI = ejbModule.getModuleURI();
-                String moduleType = NameFactory.EJB_MODULE;
-                tssBeanName = ENCConfigBuilder.buildAbstractNameQuery(null, moduleURI == null ? null : moduleURI.toString(), tssBeanLink, moduleType, NameFactory.EJB_MODULE);
-                try {
-                    earContext.getConfiguration().findGBean(tssBeanName);
-                } catch (GBeanNotFoundException e) {
-                    tssBeanName = ENCConfigBuilder.buildAbstractNameQuery(null, null, tssBeanLink, null, NameFactory.EJB_MODULE);
-                    try {
-                        earContext.getConfiguration().findGBean(tssBeanName);
-                    } catch (GBeanNotFoundException e1) {
-                        throw new DeploymentException("No tss bean found", e);
-                    }
-                }
-            } else if (openejbSessionBean.isSetTss()) {
-                tssBeanName = ENCConfigBuilder.buildAbstractNameQuery(openejbSessionBean.getTss(), NameFactory.CORBA_TSS, NameFactory.EJB_MODULE, null);
-            }
-        }
-        if (tssBeanName != null && openejbSessionBean.getJndiNameArray().length == 0) {
-            throw new DeploymentException("Cannot expose a session bean via CORBA unless a JNDI name is set (that's also used as the CORBA naming service name)");
-        }
-        if (tssBeanName != null && (!sessionBean.isSetRemote() || !sessionBean.isSetHome())) {
-            throw new DeploymentException("A session bean without a remote interface cannot be exposed via CORBA");
-        }
-        return tssBeanName;
-    }
 }

Modified: incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/openejb-jar-2.2.xsd
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/openejb-jar-2.2.xsd?view=diff&rev=465108&r1=465107&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/openejb-jar-2.2.xsd (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/xsd/openejb-jar-2.2.xsd Tue Oct 17 17:23:40 2006
@@ -101,18 +101,6 @@
         </xs:sequence>
     </xs:group>
 
-    <xs:complexType name="tssType">
-        <xs:sequence>
-            <!-- this is object name group from geronimo-naming.xsd -->
-            <xs:element name="domain" type="xs:string" minOccurs="0"/>
-            <xs:element name="server" type="xs:string" minOccurs="0"/>
-            <xs:element name="application" type="xs:string" minOccurs="0"/>
-            <xs:element name="module" type="xs:string" minOccurs="0"/>
-            <!--            <xs:element name="type" type="xs:string" minOccurs="0"/>-->
-            <xs:element name="name" type="xs:string"/>
-        </xs:sequence>
-    </xs:complexType>
-
     <xs:complexType name="web-service-securityType">
         <xs:sequence>
             <xs:element name="security-realm-name" type="xs:string"/>

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/OpenEjbCorbaRefBuilder.java (from r464573, incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/OpenEjbCorbaRefBuilder.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java&r1=464573&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/OpenEjbCorbaRefBuilder.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-builder/src/main/java/org/apache/openejb/deployment/OpenEjbRemoteRefBuilder.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/OpenEjbCorbaRefBuilder.java Tue Oct 17 17:23:40 2006
@@ -19,7 +19,6 @@
 
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -41,34 +40,44 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
 import org.apache.geronimo.xbeans.j2ee.EjbRefType;
-import org.apache.xmlbeans.QNameSet;
-import org.apache.xmlbeans.XmlObject;
 import org.apache.openejb.RpcEjbDeployment;
 import org.apache.openejb.corba.proxy.CORBAProxyReference;
 import org.apache.openejb.proxy.EJBProxyReference;
+import org.apache.xmlbeans.QNameSet;
+import org.apache.xmlbeans.XmlObject;
 
 /**
+ * Installs ejb refs that use corba transport into jndi context.
+ * Such ejb refs are determined by the nscorbaloc element in the openejb ejb plan.
+ *  
  * @version $Revision$ $Date$
  */
-public class OpenEjbRemoteRefBuilder extends OpenEjbAbstractRefBuilder {
+public class OpenEjbCorbaRefBuilder extends OpenEjbAbstractRefBuilder {
 
     private static final QName GER_EJB_REF_QNAME = GerEjbRefDocument.type.getDocumentElementName();
     private static final QNameSet GER_EJB_REF_QNAME_SET = QNameSet.singleton(GER_EJB_REF_QNAME);
 
     private final QNameSet ejbRefQNameSet;
 
-    public OpenEjbRemoteRefBuilder(Environment defaultEnvironment, String[] eeNamespaces) {
+    public OpenEjbCorbaRefBuilder(Environment defaultEnvironment, String[] eeNamespaces) {
         super(defaultEnvironment);
         ejbRefQNameSet = buildQNameSet(eeNamespaces, "ejb-ref");
     }
 
     protected boolean willMergeEnvironment(XmlObject specDD, XmlObject plan) {
-         return getEjbRefs(specDD).length > 0;
+        XmlObject[] refs = plan == null ? NO_REFS : plan.selectChildren(GER_EJB_REF_QNAME_SET);
+        for (int i = 0; i < refs.length; i++) {
+            GerEjbRefType ref = (GerEjbRefType) refs[i].copy().changeType(GerEjbRefType.type);
+            if (ref.isSetNsCorbaloc()) {
+                return true;
+            }
+        }
+        return false;
     }
 
     public void buildNaming(XmlObject specDD, XmlObject plan, Configuration localConfiguration, Configuration remoteConfiguration, Module module, Map componentContext) throws DeploymentException {
         XmlObject[] ejbRefsUntyped = getEjbRefs(specDD);
-        XmlObject[] gerEjbRefsUntyped = plan == null? NO_REFS: plan.selectChildren(GER_EJB_REF_QNAME_SET);
+        XmlObject[] gerEjbRefsUntyped = plan == null ? NO_REFS : plan.selectChildren(GER_EJB_REF_QNAME_SET);
         Map ejbRefMap = mapEjbRefs(gerEjbRefsUntyped);
         ClassLoader cl = localConfiguration.getConfigurationClassLoader();
 
@@ -79,7 +88,9 @@
             GerEjbRefType remoteRef = (GerEjbRefType) ejbRefMap.get(ejbRefName);
 
             Reference ejbReference = addEJBRef(localConfiguration, remoteConfiguration, module.getModuleURI(), ejbRef, remoteRef, cl);
-            componentContext.put(ENV + ejbRefName, ejbReference);
+            if (ejbReference != null) {
+                getJndiContextMap(componentContext).put(ENV + ejbRefName, ejbReference);
+            }
         }
     }
 
@@ -88,74 +99,39 @@
     }
 
     private Reference addEJBRef(Configuration earContext, Configuration ejbContext, URI moduleURI, EjbRefType ejbRef, GerEjbRefType remoteRef, ClassLoader cl) throws DeploymentException {
-        String remote = getStringValue(ejbRef.getRemote());
-        String refName = getStringValue(ejbRef.getEjbRefName());
-        try {
-            assureEJBObjectInterface(remote, cl);
-        } catch (DeploymentException e) {
-            throw new DeploymentException("Error processing 'remote' element for EJB Reference '" + refName + "' for module '" + moduleURI + "': " + e.getMessage());
-        }
 
-        String home = getStringValue(ejbRef.getHome());
-        try {
-            assureEJBHomeInterface(home, cl);
-        } catch (DeploymentException e) {
-            throw new DeploymentException("Error processing 'home' element for EJB Reference '" + refName + "' for module '" + moduleURI + "': " + e.getMessage());
-        }
-
-        Reference ejbReference;
-        boolean isSession = "Session".equals(getStringValue(ejbRef.getEjbRefType()));
-
-        if (isSession && remote.equals("javax.management.j2ee.Management") && home.equals("javax.management.j2ee.ManagementHome")) {
-            AbstractNameQuery query = new AbstractNameQuery(null, Collections.singletonMap("name", "ejb/mgmt/MEJB"));
-            ejbReference = createEJBRemoteRef(null, ejbContext, null, null, null, null, query, isSession, home, remote);
-        } else {
+        Reference ejbReference = null;
+        if (remoteRef != null && remoteRef.isSetNsCorbaloc()) {
+            String remote = getStringValue(ejbRef.getRemote());
+            String refName = getStringValue(ejbRef.getEjbRefName());
+            try {
+                assureEJBObjectInterface(remote, cl);
+            } catch (DeploymentException e) {
+                throw new DeploymentException("Error processing 'remote' element for EJB Reference '" + refName + "' for module '" + moduleURI + "': " + e.getMessage());
+            }
 
-            String ejbLink = null;
-            if (remoteRef != null && remoteRef.isSetNsCorbaloc()) {
-                try {
-                    AbstractNameQuery cssBean;
-                    if (remoteRef.isSetCssLink()) {
-                        String cssLink = remoteRef.getCssLink().trim();
-                        cssBean = buildAbstractNameQuery(null, null, cssLink, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE);
-                    } else {
-                        GerPatternType css = remoteRef.getCss();
-                        cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE, null);
-                    }
-                    ejbReference = createCORBAReference(earContext,
-                            cssBean,
-                            new URI(remoteRef.getNsCorbaloc().trim()),
-                            remoteRef.getName().trim(),
-                            home);
-                } catch (URISyntaxException e) {
-                    throw new DeploymentException("Could not construct CORBA NameServer URI: " + remoteRef.getNsCorbaloc(), e);
-                }
-            } else {
-                Artifact targetConfigId = null;
-                String optionalModule = moduleURI == null ? null : moduleURI.toString();
-                String requiredModule = null;
-                AbstractNameQuery containerQuery = null;
-                if (remoteRef != null && remoteRef.isSetEjbLink()) {
-                    ejbLink = remoteRef.getEjbLink();
-                } else if (ejbRef.isSetEjbLink()) {
-                    ejbLink = getStringValue(ejbRef.getEjbLink());
-                    targetConfigId = ejbContext.getId();
-                }
-                if (ejbLink != null) {
-                    String[] bits = ejbLink.split("#");
-                    if (bits.length == 2) {
-                        //look only in specified module.
-                        requiredModule = bits[0];
-                        if (moduleURI != null) {
-                            requiredModule = moduleURI.resolve(requiredModule).getPath();
-                        }
-                        ejbLink = bits[1];
-                    }
-                } else if (remoteRef != null) {
-                    GerPatternType patternType = remoteRef.getPattern();
-                    containerQuery = buildAbstractNameQuery(patternType, null, NameFactory.EJB_MODULE, null);
+            String home = getStringValue(ejbRef.getHome());
+            try {
+                assureEJBHomeInterface(home, cl);
+            } catch (DeploymentException e) {
+                throw new DeploymentException("Error processing 'home' element for EJB Reference '" + refName + "' for module '" + moduleURI + "': " + e.getMessage());
+            }
+            try {
+                AbstractNameQuery cssBean;
+                if (remoteRef.isSetCssLink()) {
+                    String cssLink = remoteRef.getCssLink().trim();
+                    cssBean = buildAbstractNameQuery(null, null, cssLink, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE);
+                } else {
+                    GerPatternType css = remoteRef.getCss();
+                    cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE, null);
                 }
-                ejbReference = createEJBRemoteRef(refName, ejbContext, ejbLink, requiredModule, optionalModule, targetConfigId, containerQuery, isSession, home, remote);
+                ejbReference = createCORBAReference(earContext,
+                        cssBean,
+                        new URI(remoteRef.getNsCorbaloc().trim()),
+                        remoteRef.getName().trim(),
+                        home);
+            } catch (URISyntaxException e) {
+                throw new DeploymentException("Could not construct CORBA NameServer URI: " + remoteRef.getNsCorbaloc(), e);
             }
         }
         return ejbReference;
@@ -201,12 +177,12 @@
             //we can't check anything, hope for the best.
 //            throw new DeploymentException("Could not locate ejb matching " + query + " in configuration " + configuration.getId());
         }
-        if (!home.equals(getHomeInterface(data)) || !remote.equals(OpenEjbRemoteRefBuilder.getRemoteInterface(data))) {
+        if (!home.equals(getHomeInterface(data)) || !remote.equals(OpenEjbCorbaRefBuilder.getRemoteInterface(data))) {
             throw new DeploymentException("Reference interfaces do not match bean interfaces:\n" +
                     "reference home: " + home + "\n" +
-                    "ejb home: " + OpenEjbRemoteRefBuilder.getHomeInterface(data) + "\n" +
+                    "ejb home: " + OpenEjbCorbaRefBuilder.getHomeInterface(data) + "\n" +
                     "reference remote: " + remote + "\n" +
-                    "ejb remote: " + OpenEjbRemoteRefBuilder.getRemoteInterface(data));
+                    "ejb remote: " + OpenEjbCorbaRefBuilder.getRemoteInterface(data));
         }
     }
 
@@ -240,11 +216,11 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(OpenEjbRemoteRefBuilder.class, NameFactory.MODULE_BUILDER); //TODO decide what type this should be
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(OpenEjbCorbaRefBuilder.class, NameFactory.MODULE_BUILDER); //TODO decide what type this should be
         infoBuilder.addAttribute("eeNamespaces", String[].class, true, true);
         infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
 
-        infoBuilder.setConstructor(new String[] {"defaultEnvironment", "eeNamespaces"});
+        infoBuilder.setConstructor(new String[]{"defaultEnvironment", "eeNamespaces"});
 
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }

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

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

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

Added: incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/TSSLinkBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/TSSLinkBuilder.java?view=auto&rev=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/TSSLinkBuilder.java (added)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba-builder/src/main/java/org/apache/openejb/deployment/TSSLinkBuilder.java Tue Oct 17 17:23:40 2006
@@ -0,0 +1,153 @@
+/*
+ * 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.deployment;
+
+import java.net.URI;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.naming.deployment.AbstractNamingBuilder;
+import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
+import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
+import org.apache.openejb.corba.TSSLinkGBean;
+import org.apache.openejb.xbeans.ejbjar.OpenejbOpenejbJarDocument;
+import org.apache.xmlbeans.QNameSet;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class TSSLinkBuilder extends AbstractNamingBuilder {
+
+    private static final String OPENEJB_NAMESPACE = OpenejbOpenejbJarDocument.type.getDocumentElementName().getNamespaceURI();
+    private static final QName EJB_NAME_QNAME = new QName(OPENEJB_NAMESPACE, "ejb-name");
+    private static final QName TSS_LINK_QNAME = new QName(OPENEJB_NAMESPACE, "tss-link");
+    private static final QName TSS_QNAME = new QName(OPENEJB_NAMESPACE, "tss");
+    private static final QName JNDI_NAME_QNAME = new QName(OPENEJB_NAMESPACE, "jndi-name");
+
+    public TSSLinkBuilder() {
+    }
+
+    public TSSLinkBuilder(Environment defaultEnvironment) {
+        super(defaultEnvironment);
+    }
+
+    protected boolean willMergeEnvironment(XmlObject specDD, XmlObject plan) {
+        return plan.selectChildren(TSS_LINK_QNAME).length > 0 ||
+                plan.selectChildren(TSS_QNAME).length > 0;
+    }
+
+    public void buildNaming(XmlObject specDD, XmlObject plan, Configuration localConfiguration, Configuration remoteConfiguration, Module module, Map componentContext) throws DeploymentException {
+        AbstractName ejbName = getGBeanName(componentContext);
+
+        String[] tssLinks = toStringArray(plan.selectChildren(TSS_LINK_QNAME));
+        XmlObject[] tsss = plan.selectChildren(TSS_QNAME);
+        String[] jndiNames = toStringArray(plan.selectChildren(JNDI_NAME_QNAME));
+        for (int i = 0; i < tssLinks.length; i++) {
+            String tssLink = tssLinks[i];
+            URI moduleURI = module.getModuleURI();
+            String moduleString = moduleURI == null ? null : moduleURI.toString();
+            AbstractNameQuery tssBeanName = ENCConfigBuilder.buildAbstractNameQuery(null, moduleString, tssLink, NameFactory.EJB_MODULE, NameFactory.EJB_MODULE);
+            try {
+                localConfiguration.findGBean(tssBeanName);
+            } catch (GBeanNotFoundException e) {
+                tssBeanName = ENCConfigBuilder.buildAbstractNameQuery(null, null, tssLink, null, NameFactory.EJB_MODULE);
+                try {
+                    localConfiguration.findGBean(tssBeanName);
+                } catch (GBeanNotFoundException e1) {
+                    throw new DeploymentException("No tss bean found", e);
+                }
+            }
+            AbstractName tssLinkName = module.getEarContext().getNaming().createChildName(ejbName, "tssLink" + i, "TSSLink");
+            GBeanData tssLinkData = new GBeanData(tssLinkName, TSSLinkGBean.GBEAN_INFO);
+            tssLinkData.setAttribute("jndiNames", jndiNames);
+            tssLinkData.setReferencePattern("EJB", ejbName);
+            tssLinkData.setReferencePattern("TSSBean", tssBeanName);
+            try {
+                localConfiguration.addGBean(tssLinkData);
+            } catch (GBeanAlreadyExistsException e) {
+                throw new DeploymentException("tss link gbean already present", e);
+            }
+        }
+        for (int i = 0; i < tsss.length; i++) {
+            GerPatternType tss = (GerPatternType) tsss[i];
+            AbstractNameQuery tssBeanName = ENCConfigBuilder.buildAbstractNameQuery(tss, NameFactory.CORBA_TSS, NameFactory.EJB_MODULE, null);
+            AbstractName tssLinkName = module.getEarContext().getNaming().createChildName(ejbName, "tssRef" + i, "TSSLink");
+            GBeanData tssLinkData = new GBeanData(tssLinkName, TSSLinkGBean.GBEAN_INFO);
+            tssLinkData.setAttribute("jndiNames", jndiNames);
+            tssLinkData.setReferencePattern("EJB", ejbName);
+            tssLinkData.setReferencePattern("TSSBean", tssBeanName);
+            try {
+                localConfiguration.addGBean(tssLinkData);
+            } catch (GBeanAlreadyExistsException e) {
+                throw new DeploymentException("tss link gbean already present", e);
+            }
+        }
+
+    }
+
+    public QNameSet getSpecQNameSet() {
+        return QNameSet.EMPTY;
+    }
+
+    public QNameSet getPlanQNameSet() {
+        return QNameSet.singleton(TSS_LINK_QNAME);
+    }
+
+    private String[] toStringArray(XmlObject[] xmlObjects) {
+        String[] result = new String[xmlObjects.length];
+        for (int i = 0; i < result.length; i++) {
+            result[i] = xmlObjects[i].toString();
+        }
+        return result;
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(TSSLinkBuilder.class, NameFactory.MODULE_BUILDER); //TODO decide what type this should be
+        infoBuilder.addAttribute("defaultEnvironment", Environment.class, true, true);
+
+        infoBuilder.setConstructor(new String[] {"defaultEnvironment"});
+
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}
+
+

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

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

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

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/pom.xml (from r454220, incubator/openejb/trunk/openejb2/modules/openejb-core/pom.xml)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/pom.xml?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/pom.xml&r1=454220&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/pom.xml&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/pom.xml (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/pom.xml Tue Oct 17 17:23:40 2006
@@ -12,220 +12,16 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <name>OpenEJB :: Core</name>
-    <artifactId>openejb-core</artifactId>
-    <description>OpenEJB Core EJB Container</description>
+    <name>OpenEJB :: CORBA</name>
+    <artifactId>openejb-corba</artifactId>
+    <description>OpenEJB Base Corba integration</description>
     <url>http://www.openejb.org</url>
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-util</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-connector</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-core</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-j2ee</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-management</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-kernel</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>activeio</groupId>
-            <artifactId>activeio</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-security</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-timer</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-transaction</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-axis</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-naming</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-client</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-system</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-common</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-corba_2.3_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-ejb_2.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-j2ee-jacc_1.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jaxr_1.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jsp_2.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-qname_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-saaj_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.4_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-webservices</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>tranql</groupId>
-            <artifactId>tranql</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>castor</groupId>
-            <artifactId>castor</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>cglib</groupId>
-            <artifactId>cglib-nodep</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging-api</artifactId>
-        </dependency>
-
-        <!--
-        NOTE: Still needed for bits that use activeio
-        -->
-        <dependency>
-            <groupId>concurrent</groupId>
-            <artifactId>concurrent</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>backport-util-concurrent</groupId>
-            <artifactId>backport-util-concurrent</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>mx4j</groupId>
-            <artifactId>mx4j</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>axis</groupId>
-            <artifactId>axis</artifactId>
-        </dependency>
-
-        <!-- TODO REFACTOR SO THESE AREN'T DEPENDENCIES -->
-        <dependency>
-            <groupId>activecluster</groupId>
-            <artifactId>activecluster</artifactId>
-            <version>1.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>activemq</groupId>
-            <artifactId>activemq</artifactId>
-            <version>3.2.4-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>wadi</groupId>
-            <artifactId>wadi-core</artifactId>
-            <version>2.0M1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jms_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-core</artifactId>
+            <version>${pom.version}</version>
         </dependency>
 
     </dependencies>

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/Adapter.java (from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/Adapter.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/Adapter.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/Adapter.java&r1=465099&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/Adapter.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/Adapter.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/Adapter.java Tue Oct 17 17:23:40 2006
@@ -47,13 +47,13 @@
     private final byte[] home_id;
     private final org.omg.CORBA.Object homeReference;
 
-    protected Adapter(RpcEjbDeployment deployment, ORB orb, POA parentPOA, Policy securityPolicy) throws CORBAException {
-        this.deployment = deployment;
-        this.home_id = deployment.getContainerId().toString().getBytes();
+    protected Adapter(TSSLink tssLink, ORB orb, POA parentPOA, Policy securityPolicy) throws CORBAException {
+        this.deployment = tssLink.getDeployment();
+        this.home_id = tssLink.getContainerId().getBytes();
         this.orb = orb;
 
         Any any = orb.create_any();
-        any.insert_Value(deployment.getHomeTxPolicyConfig());
+        any.insert_Value(tssLink.getHomeTxPolicyConfig());
 
         try {
             Policy[] policies = new Policy[]{
@@ -65,7 +65,7 @@
                 parentPOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID),
                 parentPOA.create_implicit_activation_policy(ImplicitActivationPolicyValue.NO_IMPLICIT_ACTIVATION),
             };
-            homePOA = parentPOA.create_POA(deployment.getContainerId().toString(), parentPOA.the_POAManager(), policies);
+            homePOA = parentPOA.create_POA(tssLink.getContainerId(), parentPOA.the_POAManager(), policies);
 
             homePOA.the_POAManager().activate();
 
@@ -76,7 +76,7 @@
 
             org.omg.CORBA.Object obj = orb.resolve_initial_references("NameService");
             initialContext = NamingContextExtHelper.narrow(obj);
-            String[] names = deployment.getJndiNames();
+            String[] names = tssLink.getJndiNames();
             for (int i = 0; i < names.length; i++) {
                 NameComponent[] nameComponent = initialContext.to_name(names[i]);
                 NamingContext currentContext = initialContext;

Copied: incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterEntity.java (from r465099, incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterEntity.java)
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterEntity.java?view=diff&rev=465108&p1=incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterEntity.java&r1=465099&p2=incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterEntity.java&r2=465108
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/AdapterEntity.java (original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-corba/src/main/java/org/apache/openejb/corba/AdapterEntity.java Tue Oct 17 17:23:40 2006
@@ -52,11 +52,11 @@
     private final POA poa;
     private final String referenceInterface;
 
-    public AdapterEntity(RpcEjbDeployment deployment, ORB orb, POA parentPOA, Policy securityPolicy) throws CORBAException {
-        super(deployment, orb, parentPOA, securityPolicy);
+    public AdapterEntity(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);



Mime
View raw message