geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r159005 [1/9] - in geronimo/trunk/modules: assembly/src/plan/ interop/ interop/src/idl/ interop/src/java/org/apache/geronimo/interop/ interop/src/java/org/apache/geronimo/interop/CosNaming/iiop_stubs/ interop/src/java/org/apache/geronimo/interop/adapter/ interop/src/java/org/apache/geronimo/interop/client/ interop/src/java/org/apache/geronimo/interop/generator/ interop/src/java/org/apache/geronimo/interop/naming/ interop/src/java/org/apache/geronimo/interop/properties/ interop/src/java/org/apache/geronimo/interop/repository/ interop/src/java/org/apache/geronimo/interop/rmi/iiop/ interop/src/java/org/apache/geronimo/interop/rmi/iiop/client/ interop/src/java/org/apache/geronimo/interop/rmi/iiop/compiler/ interop/src/java/org/apache/geronimo/interop/rmi/iiop/server/ interop/src/java/org/apache/geronimo/interop/server/ interop/src/java/org/apache/geronimo/interop/util/
Date Fri, 25 Mar 2005 11:54:52 GMT
Author: adc
Date: Fri Mar 25 03:54:30 2005
New Revision: 159005

URL: http://svn.apache.org/viewcvs?view=rev&rev=159005
Log:
Numerous enhancements / fixes to interop
http://issues.apache.org/jira/browse/GERONIMO-613

Added:
    geronimo/trunk/modules/interop/build.xml
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManagerGBean.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/CorbaAdapter.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/HomeAdapter.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/RemoteAdapter.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/GenWarning.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JType.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/CorbaObject.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/FinalFieldSetter.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/FinalFieldSetterJdk14.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/StringSeqHelper.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/StringSeqHolder.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/server/RmiIiopServerGBean.java
Removed:
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/CosNaming/iiop_stubs/NamingContext_Stub.1.txt
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/CosNaming/iiop_stubs/NamingContext_Stub.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/repository/Repository.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/server/SocketListener.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/server/IIOPDaemon.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/server/IIOPSDaemon.java
Modified:
    geronimo/trunk/modules/assembly/src/plan/interop-server-plan.xml
    geronimo/trunk/modules/interop/maven.xml
    geronimo/trunk/modules/interop/project.xml
    geronimo/trunk/modules/interop/src/idl/org-apache-geronimo-interop-rmi-iiop.idl
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/InteropGBean.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/SystemException.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/Adapter.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManager.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/client/InitialContextFactory.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/CodeWriter.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/GenException.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/GenOptions.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JBlockStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JCaseStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JCatchStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JClass.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JCodeStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JConstructor.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JDeclareStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JEntity.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JExpression.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JFinallyStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JForStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JIfElseIfElseStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JIfStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JMethod.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JPackage.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JReturnType.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JSwitchStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JTryCatchFinallyStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JTryStatement.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JVariable.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JavaGenerator.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/generator/JavaWriter.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/naming/InitialContext.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/naming/InitialContextFactory.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/naming/NameService.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/naming/NamingContext.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/BooleanProperty.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/ByteProperty.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/DoubleProperty.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/FloatProperty.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/IntProperty.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/LongProperty.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/PropertyLog.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/PropertyType.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/ShortProperty.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/StringProperty.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/SystemProperties.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/properties/SystemPropertyLog.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/Any.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ArrayHelper.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/BadMagicException.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/CdrInputStream.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/CdrOutputStream.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/FieldByNameComparator.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/FieldComparator.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/GiopMessage.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/GiopVersion.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/IDLEntityHelper.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/IiopVersion.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ListenerInfo.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/NameServiceOperations_Skeleton.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ObjectHelper.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ObjectInputStream.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ObjectKey.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ObjectOutputStream.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ObjectRef.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ObjectRefHelper.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/PrimitiveType.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/Protocol.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/RemoteInterface.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/RemoteObject.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/SecurityInfo.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/SimpleObjectInputStream.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/SimpleObjectOutputStream.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/StringHelper.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/StringValueHelper.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/TypeCode.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/UnsupportedProtocolVersionException.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ValueType.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/ValueTypeField.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/client/ClientNamingContext.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/client/Connection.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/client/ConnectionPool.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/client/NameBinding.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/client/UrlInfo.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/client/ValueInfo.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/compiler/Compiler.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/compiler/SkelCompiler.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/compiler/SkelFactory.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/compiler/StubClass.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/compiler/StubCompiler.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/compiler/StubFactory.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/server/MessageHandler.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/server/ServerNamingContext.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/util/JavaClass.java
    geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/util/SystemUtil.java

Modified: geronimo/trunk/modules/assembly/src/plan/interop-server-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/interop-server-plan.xml?view=diff&r1=159004&r2=159005
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/interop-server-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/interop-server-plan.xml Fri Mar 25 03:54:30 2005
@@ -45,6 +45,13 @@
 
 
     <!-- RMI-IIOP Protocol -->
+    <gbean gbeanName="interop:name=AdapterManager" class="org.apache.geronimo.interop.adapter.AdapterManager">
+        <references name="containers">
+          <pattern><gbean-name>geronimo.server:j2eeType=StatelessSessionBean,*</gbean-name></pattern>
+          <pattern><gbean-name>geronimo.server:j2eeType=StatefulSessionBean,*</gbean-name></pattern>
+          <pattern><gbean-name>geronimo.server:j2eeType=EntityBean,*</gbean-name></pattern>
+        </references>
+    </gbean>
 
     <gbean gbeanName="interop:type=NetworkService,name=RMIIIOP" class="org.openejb.server.StandardServiceStackGBean">
         <attribute name="name">RMIIIOP</attribute>
@@ -56,6 +63,19 @@
         <attribute name="logOnSuccess">HOST,NAME,THREADID,USERID</attribute>
         <attribute name="logOnFailure">HOST,NAME</attribute>
         <reference name="Server"><gbean-name>interop:type=Server,name=RMIIIOP</gbean-name></reference>
+    </gbean>
+
+    <gbean gbeanName="interop:type=Server,name=RMIIIOP" class="org.apache.geronimo.interop.rmi.iiop.server.RmiIiopServerGBean">
+        <reference name="adapterManager"><gbean-name>interop:name=AdapterManager</gbean-name></reference>
+        <attribute name="writeSystemExceptionStackTrace">false</attribute>
+        <attribute name="simpleIDL">false</attribute>
+        <attribute name="args">-ORBPort, 2001, -ORBInitRef, NameService=corbaloc::localhost:1050/NameService, -ORBCSIv2, -ORBGSSClientUser, "user1,a"</attribute>
+        <attribute name="props">
+
+            org.omg.PortableInterceptor.ORBInitializerClass.org.openejb.corba.transaction.TransactionInitializer
+            org.omg.PortableInterceptor.ORBInitializerClass.org.openejb.corba.security.SecurityInitializer
+
+        </attribute>
     </gbean>
 
 </configuration>

Added: geronimo/trunk/modules/interop/build.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/build.xml?view=auto&rev=159005
==============================================================================
--- geronimo/trunk/modules/interop/build.xml (added)
+++ geronimo/trunk/modules/interop/build.xml Fri Mar 25 03:54:30 2005
@@ -0,0 +1,65 @@
+<project name="IDLGen" default="idlj">
+
+    <target name="init">
+      <mkdir dir="${maven.build.src}"/>
+    </target>
+
+    <target name="checkidlts">
+      <uptodate property="idl.build.not.required" 
+        srcfile="${maven.src.dir}/idl/${idl.file}.idl"
+        targetfile="${maven.build.src}/${idl.file}.ts"/>
+    </target>
+
+    <target name="idlj" depends="init, checkidlts" unless="idl.build.not.required">
+      <echo message="blah" file="${maven.build.src}/${idl.file}.ts"/>
+      <echo message="Interop :: idlj :: ${idl.file}"/>
+      <exec dir="${maven.basedir}" executable="idlj">
+            <arg value="-td"/>
+            <arg file="${maven.build.src}"/>
+            <arg value="-i"/>
+            <arg file="${java.home}/lib"/>
+            <arg value="-i"/>
+            <arg file="${maven.src.dir}/idl"/>
+            <arg value="${idlj.verbose}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="IOP"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="IIOP"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="GIOP"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="CosNaming"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="CSI"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="GSSUP"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="CSIIOP"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="TimeBase"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="SecurityService"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="CosTransactions"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="CosTSInteroperation"/>
+            <arg value="${pkg.prefix}"/>
+            <arg value="-pkgPrefix"/>
+            <arg value="CosTSPortability"/>
+            <arg value="${pkg.prefix}"/>
+            <arg file="${maven.src.dir}/idl/${idl.file}.idl"/>
+    </exec>
+  </target>
+
+
+</project>

Modified: geronimo/trunk/modules/interop/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/maven.xml?view=diff&r1=159004&r2=159005
==============================================================================
--- geronimo/trunk/modules/interop/maven.xml (original)
+++ geronimo/trunk/modules/interop/maven.xml Fri Mar 25 03:54:30 2005
@@ -24,6 +24,10 @@
     xmlns:ant="jelly:ant"
     >
 
+    <!-- <property name="idlj.verbose" value="-verbose"/> -->
+    <property name="idlj.verbose" value="-verbose"/> 
+    <property name="pkg.prefix" value="org.apache.geronimo.interop"/>
+
     <!--
       #
       # Be carefull about changing the package prefix.  When generating the java
@@ -40,416 +44,168 @@
       #    build goals are almost the same.  Maybe we could figure out how to use a for
       #    script statement....
       #
-      # 2. Run the idlj targets only if the idl files were changed.  Figure out how
-      #    to add a dependency check....
-      #
-      # 3. ....
-      #
     -->
 
     <goal name="interop:idlj:iop">
-        <j:set var="pkg.prefix" value="org.apache.geronimo.interop"/>
-        <ant:echo message="Interop :: idlj :: IOP"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg file="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/IOP.idl"/>
-        </ant:exec>
+      <ant:echo message="Interop :: idlj :: IOP">
+      </ant:echo>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="IOP"/>
+      </ant:ant>
     </goal>
 
     <goal name="interop:idlj:giop">
-        <j:set var="pkg.prefix" value="org.apache.geronimo.interop"/>
-        <ant:echo message="Interop :: idlj :: GIOP"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/GIOP.idl"/>
-        </ant:exec>
+      <ant:echo message="Interop :: idlj :: GIOP"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="GIOP"/>
+      </ant:ant>
     </goal>
 
     <goal name="interop:idlj:iiop">
-        <j:set var="pkg.prefix" value="org.apache.geronimo.interop"/>
-        <ant:echo message="Interop :: idlj :: IIOP"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/IIOP.idl"/>
-        </ant:exec>
+      <ant:echo message="Interop :: idlj :: IIOP"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="IIOP"/>
+      </ant:ant>
     </goal>
 
     <goal name="interop:idlj:cosnaming">
-        <j:set var="pkg.prefix" value="org.apache.geronimo.interop"/>
-        <ant:echo message="Interop :: idlj :: CosNaming"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/CosNaming.idl"/>
-        </ant:exec>
-    </goal>
-
-    <goal name="interop:idlj:interop-rmi-iiop">
-        <j:set var="pkg.prefix" value="org.apache.geronimo.interop"/>
-        <ant:echo message="Interop :: idlj :: interop-rmi-iiop"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/org-apache-geronimo-interop-rmi-iiop.idl"/>
-        </ant:exec>
-    </goal>
-
-    <goal name="interop:idlj:csi">
-        <ant:echo message="Interop :: idlj :: CSIv2 :: CSI"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CSI"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GSSUP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CSIIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/CSI.idl"/>
-        </ant:exec>
-
-        <ant:echo message="Interop :: idlj :: CSIv2 :: GSSUP"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CSI"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GSSUP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CSIIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/GSSUP.idl"/>
-        </ant:exec>
+      <ant:echo message="Interop :: idlj :: CosNaming"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="CosNaming"/>
+      </ant:ant>
+    </goal>
+
+    <goal name="interop:idlj:csiv2">
+      <attainGoal name="interop:idlj:csiv2:csi"/>
+      <attainGoal name="interop:idlj:csiv2:gssup"/>
+      <attainGoal name="interop:idlj:csiv2:csiiop"/>
+    </goal>
+
+    <goal name="interop:idlj:csiv2:csi">
+      <ant:echo message="Interop :: idlj :: CSIv2 :: CSI"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="CSI"/>
+      </ant:ant>
+    </goal>
+
+    <goal name="interop:idlj:csiv2:gssup">
+      <ant:echo message="Interop :: idlj :: CSIv2 :: GSSUP"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="GSSUP"/>
+      </ant:ant>
+    </goal>
         
-	<ant:echo message="Interop :: idlj :: CSIv2 :: CSIIOP"/>
-	<ant:exec dir="${basedir}" executable="idlj">
-	    <ant:arg value="-td"/>
-	    <ant:arg value="${maven.build.src}"/>
-	    <ant:arg value="-i"/>
-	    <ant:arg file="${java.home}/lib"/>
-	    <ant:arg value="-i"/>
-	    <ant:arg file="${maven.src.dir}/idl"/>
-	    <ant:arg value="-verbose"/>
-	    <ant:arg value="-pkgPrefix"/>
-	    <ant:arg value="IOP"/>
-	    <ant:arg value="${pkg.prefix}"/>
-	    <ant:arg value="-pkgPrefix"/>
-	    <ant:arg value="IIOP"/>
-	    <ant:arg value="${pkg.prefix}"/>
-	    <ant:arg value="-pkgPrefix"/>
-	    <ant:arg value="GIOP"/>
-	    <ant:arg value="${pkg.prefix}"/>
-	    <ant:arg value="-pkgPrefix"/>
-	    <ant:arg value="CosNaming"/>
-	    <ant:arg value="${pkg.prefix}"/>
-	    <ant:arg value="-pkgPrefix"/>
-	    <ant:arg value="CSI"/>
-	    <ant:arg value="${pkg.prefix}"/>
-	    <ant:arg value="-pkgPrefix"/>
-	    <ant:arg value="GSSUP"/>
-	    <ant:arg value="${pkg.prefix}"/>
-	    <ant:arg value="-pkgPrefix"/>
-	    <ant:arg value="CSIIOP"/>
-	    <ant:arg value="${pkg.prefix}"/>
-	    <ant:arg file="${maven.src.dir}/idl/CSIIOP.idl"/>
-	</ant:exec>
+    <goal name="interop:idlj:csiv2:csiiop">
+      <ant:echo message="Interop :: idlj :: CSIv2 :: CSIIIOP"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="CSIIOP"/>
+      </ant:ant>
     </goal>
 
     <goal name="interop:idlj:security-service">
-        <ant:echo message="Interop :: idlj :: SecurityService :: TimeBase"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="TimeBase"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="SecurityService"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/TimeBase.idl"/>
-        </ant:exec>
-
-        <ant:echo message="Interop :: idlj :: SecurityService :: SecurityService"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="TimeBase"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="SecurityService"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/Security.idl"/>
-        </ant:exec>
-
-        <ant:echo message="Interop :: idlj :: SecurityService :: SSLIOP"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="TimeBase"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="SecurityService"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/SSLIOP.idl"/>
-        </ant:exec>
+      <attainGoal name="interop:idlj:security-service:timebase"/>
+      <attainGoal name="interop:idlj:security-service:securityservice"/>
+      <attainGoal name="interop:idlj:security-service:ssliop"/>
+    </goal>
+
+    <goal name="interop:idlj:security-service:timebase">
+      <ant:echo message="Interop :: idlj :: SecurityService :: TimeBase"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="TimeBase"/>
+      </ant:ant>
+    </goal>
+
+    <goal name="interop:idlj:security-service:securityservice">
+      <ant:echo message="Interop :: idlj :: SecurityService :: SecurityService"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="Security"/>
+      </ant:ant>
+    </goal>
 
+    <goal name="interop:idlj:security-service:ssliop">
+      <ant:echo message="Interop :: idlj :: SecurityService :: SSLIOP"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="SSLIOP"/>
+      </ant:ant>
+    </goal>
+
+    <goal name="interop:idlj:costxn:costransactions">
+      <ant:echo message="Interop :: idlj :: CosTx :: CosTransactions"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="CosTransactions"/>
+      </ant:ant>
+    </goal>
+
+    <goal name="interop:idlj:costxn:costsinterop">
+      <ant:echo message="Interop :: idlj :: CosTx :: CosTSInteroperation"/>
+      <ant:ant antfile="build.xml">
+        <ant:property name="maven.build.src" value="${maven.build.src}"/>
+        <ant:property name="maven.src.dir" value="${maven.src.dir}"/>
+        <ant:property name="maven.basedir" value="${basedir}"/>
+        <ant:property name="pkg.prefix" value="${pkg.prefix}"/>
+        <ant:property name="idlj.verbose" value="${idlj.verbose}"/>
+        <ant:property name="idl.file" value="CosTransactions"/>
+      </ant:ant>
     </goal>
 
     <goal name="interop:idlj:costxn">
-        <!-- Are there any CosTransaction IDL files that require generation? -->
-        <j:set var="pkg.prefix" value="org.apache.geronimo.interop"/>
-        <ant:echo message="Interop :: idlj :: CosTransactions"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="TimeBase"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosTransactions"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosTSInteroperation"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosTSPortability"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/CosTransactions.idl"/>
-        </ant:exec>
-        
-        <ant:echo message="Interop :: idlj :: CosTSInteroperation"/>
-        <ant:exec dir="${basedir}" executable="idlj">
-            <ant:arg value="-td"/>
-            <ant:arg value="${maven.build.src}"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${java.home}/lib"/>
-            <ant:arg value="-i"/>
-            <ant:arg file="${maven.src.dir}/idl"/>
-            <ant:arg value="-verbose"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="IIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="GIOP"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosNaming"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="TimeBase"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosTransactions"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosTSInteroperation"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg value="-pkgPrefix"/>
-            <ant:arg value="CosTSPortability"/>
-            <ant:arg value="${pkg.prefix}"/>
-            <ant:arg file="${maven.src.dir}/idl/CosTSInteroperation.idl"/>
-        </ant:exec>
+      <attainGoal name="interop:idlj:costxn:costransactions"/>
+      <attainGoal name="interop:idlj:costxn:costsinterop"/>
     </goal>
 
     <goal name="interop:java:compile">
@@ -463,15 +219,67 @@
         <attainGoal name="interop:idlj:giop"/>
         <attainGoal name="interop:idlj:iiop"/>
         <attainGoal name="interop:idlj:cosnaming"/>
-        <attainGoal name="interop:idlj:interop-rmi-iiop"/>
-        <attainGoal name="interop:idlj:csi"/>
+        <attainGoal name="interop:idlj:csiv2"/>
         <attainGoal name="interop:idlj:security-service"/>
         <attainGoal name="interop:idlj:costxn"/>
     </goal>
 
+    <goal name="interop:stub:generate-compile">
+      <ant:exec dir="${maven.basedir}" executable="java">
+          <ant:arg value="-cp"/>
+          <ant:arg path="${maven.build.dest};${maven.repo.local}\geronimo-spec\jars\geronimo-spec-ejb-2.1-rc3.jar;${maven.repo.local}\commons-logging\jars\commons-logging-1.0.4.jar"/>
+          <ant:arg value="org.apache.geronimo.interop.rmi.iiop.compiler.StubCompiler"/>
+          <ant:arg value="-g"/>
+          <ant:arg value="-c"/>
+          <ant:arg value="-s"/>
+          <ant:arg value="-v"/>
+          <ant:arg value="-o"/>
+          <ant:arg value="-r"/>
+          <ant:arg path="${maven.repo.local}"/>
+          <ant:arg value="-gs"/>
+          <ant:arg path="target/stubs"/>
+          <ant:arg value="-gc"/>
+          <ant:arg path="target/classes"/>
+          <ant:arg value="IDL:org.apache.geronimo.interop.CosNaming.NamingContext"/>
+      </ant:exec>
+    </goal>
+
+    <goal name="interop:skel:generate-compile">
+      <ant:exec dir="${maven.basedir}" executable="java">
+          <ant:arg value="-cp"/>
+          <ant:arg path="${maven.build.dest};${maven.repo.local}\geronimo-spec\jars\geronimo-spec-ejb-2.1-rc3.jar;${maven.repo.local}\commons-logging\jars\commons-logging-1.0.4.jar"/>
+          <ant:arg value="org.apache.geronimo.interop.rmi.iiop.compiler.SkelCompiler"/>
+          <ant:arg value="-g"/>
+          <ant:arg value="-c"/>
+          <ant:arg value="-s"/>
+          <ant:arg value="-v"/>
+          <ant:arg value="-o"/>
+          <ant:arg value="-r"/>
+          <ant:arg path="${maven.repo.local}"/>
+          <ant:arg value="-gs"/>
+          <ant:arg path="target/skels"/>
+          <ant:arg value="-gc"/>
+          <ant:arg path="target/classes"/>
+          <ant:arg value="IDL:org.apache.geronimo.interop.CosNaming.NamingContext"/>
+      </ant:exec>
+    </goal>
+
     <preGoal name="java:compile">
         <attainGoal name="interop:idlj"/>
         <attainGoal name="interop:java:compile"/>
     </preGoal>
+
+    <postGoal name="java:compile">
+      <!--
+      <attainGoal name="interop:stub:generate-compile"/>
+      <attainGoal name="interop:skel:generate-compile"/>
+      -->
+    </postGoal>
+
+    <!--
+    <goal name="showprops">
+      <ant:echoproperties/>
+    </goal>
+    -->
 
 </project>

Modified: geronimo/trunk/modules/interop/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/project.xml?view=diff&r1=159004&r2=159005
==============================================================================
--- geronimo/trunk/modules/interop/project.xml (original)
+++ geronimo/trunk/modules/interop/project.xml Fri Mar 25 03:54:30 2005
@@ -49,9 +49,21 @@
         </dependency>
 
         <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-core</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
             <groupId>geronimo-spec</groupId>
             <artifactId>geronimo-spec-ejb</artifactId>
             <version>${geronimo_spec_ejb_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>openejb</groupId>
+            <artifactId>openejb-core</artifactId>
+            <version>${openejb_version}</version>
         </dependency>
 
         <!-- Thirdparty -->

Modified: geronimo/trunk/modules/interop/src/idl/org-apache-geronimo-interop-rmi-iiop.idl
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/src/idl/org-apache-geronimo-interop-rmi-iiop.idl?view=diff&r1=159004&r2=159005
==============================================================================
--- geronimo/trunk/modules/interop/src/idl/org-apache-geronimo-interop-rmi-iiop.idl (original)
+++ geronimo/trunk/modules/interop/src/idl/org-apache-geronimo-interop-rmi-iiop.idl Fri Mar 25 03:54:30 2005
@@ -1,30 +0,0 @@
-
-#include "CosNaming.idl"
-
-/* 
- * resolve_host is a custom API that lets the name service send back a logical hostname for
- * a component, which then can be resolved by the server for clustering and loadbalancing
- */
-
-module org
-{
-    module apache
-    {
-        module geronimo
-        {
-            module interop
-            {
-                module rmi
-                {
-                    module iiop
-                    {
-                        interface NameService : ::CosNaming::NamingContextExt
-                        {
-                            string resolve_host(in string host);
-                        };
-                    };
-                };
-            };
-        };
-    };
-};

Modified: geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/InteropGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/InteropGBean.java?view=diff&r1=159004&r2=159005
==============================================================================
--- geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/InteropGBean.java (original)
+++ geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/InteropGBean.java Fri Mar 25 03:54:30 2005
@@ -39,17 +39,17 @@
 
     private IOR ior;
 
-    private Properties properties;
-    private String strprop;
-    private String objectName;
+    private Properties  properties;
+    private String      strprop;
+    private String      name;
 
     /**
      * Construct an instance of InteropGBean
      *
      * @param strprop some strprop
      */
-    public InteropGBean(String objectName, String strprop, Properties properties) {
-        this.objectName = objectName;
+    public InteropGBean(String name, String strprop, Properties properties) {
+        this.name = name;
         this.strprop = strprop;
         this.properties = (properties == null ? new Properties() : properties);
     }
@@ -89,15 +89,15 @@
     /**
      * Returns the object name of this protocol GBean
      */
-    public String getObjectName() {
-        return objectName;
+    public String getName() {
+        return name;
     }
 
     /**
      * Add the overrides from the member variables to the properties file.
      */
     public void echo(String msg) {
-        log.info(getObjectName() + ": Echo " + msg);
+        log.info(getName() + ": Echo " + msg);
     }    
 
     /* 
@@ -105,15 +105,15 @@
      */
 
     public void doStart() throws Exception {
-        log.info("Started " + getObjectName());
+        log.info("Started " + getName());
     }
 
     public void doStop() throws Exception {
-        log.info("Stopped " + getObjectName());
+        log.info("Stopped " + getName());
     }
 
     public void doFail() {
-        log.info("Failed " + getObjectName());
+        log.info("Failed " + getName());
     }
 
     /* 
@@ -125,13 +125,13 @@
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(InteropGBean.class);
 
-        infoFactory.addAttribute("objectName", String.class, false);
+        infoFactory.addAttribute("name", String.class, true);
         infoFactory.addAttribute("strprop", String.class, true);
         infoFactory.addAttribute("properties", Properties.class, true);
 
         infoFactory.addOperation("echo", new Class[]{String.class});
 
-        infoFactory.setConstructor(new String[]{"objectName", "strprop", "properties"});
+        infoFactory.setConstructor(new String[]{"name", "strprop", "properties"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/SystemException.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/SystemException.java?view=diff&r1=159004&r2=159005
==============================================================================
--- geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/SystemException.java (original)
+++ geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/SystemException.java Fri Mar 25 03:54:30 2005
@@ -17,6 +17,24 @@
  */
 package org.apache.geronimo.interop;
 
+/*
+ * This class is used to help marshall server side exceptions back to the client.
+ * A server exception is caught and then set as a cause of the system exception.
+ *
+ * Originally there were two different implementations of the this cause, one for 
+ * JDK 1.3 (which didn't have the cause object on an Exception) and this one for JDK 1.4
+ * The JDK 1.3 class has been removed.
+ *
+ * In the stubs/skeletons, they check to see if the marshalled exception is an instance of
+ * SystemException and then it take appropriate actions.
+ *
+ * Its possible that this could change to use the JDK 1.4 RuntimeException.  This may 
+ * cause some troubles with identification of specific server side exceptions vs. a
+ * general runtime exception.
+ *
+ * For now, I am going to leave this class in place.  A future TODO would be to investigate
+ * this situation more carefully.
+ */
 
 public class SystemException extends RuntimeException {
     public SystemException(String message) {
@@ -34,17 +52,4 @@
                        && cause.getMessage() == null
                        ? cause.getCause() : cause);
     }
-
-    /*
-Constructor Summary 
-RuntimeException() 
-          Constructs a new runtime exception with null as its detail message. 
-RuntimeException(String message) 
-          Constructs a new runtime exception with the specified detail message. 
-RuntimeException(String message, Throwable cause) 
-          Constructs a new runtime exception with the specified detail message and cause. 
-RuntimeException(Throwable cause) 
-          Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). 
-          */
-
 }

Modified: geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/Adapter.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/Adapter.java?view=diff&r1=159004&r2=159005
==============================================================================
--- geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/Adapter.java (original)
+++ geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/Adapter.java Fri Mar 25 03:54:30 2005
@@ -17,236 +17,39 @@
  */
 package org.apache.geronimo.interop.adapter;
 
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Vector;
-
+import org.apache.geronimo.interop.rmi.iiop.ObjectRef;
 import org.apache.geronimo.interop.rmi.iiop.RemoteInterface;
+import org.openejb.EJBContainer;
 
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 
-public class Adapter {
-    //
-    // Public Accessible Properties
-    //
-    protected String _bindName;
-    protected String _remoteClassName;
-    protected String _remoteInterfaceName;
-    protected Vector _idVector;
-    protected boolean _shared;
-    protected ClassLoader _cl;
-    protected RemoteInterface _ri;
-
-    //
-    // Internal Properrties
-    //
-
-    protected Object _sharedObject;
-    protected HashMap _objects;
-    protected Class _remoteClassClass;
-    protected Class _remoteInterfaceClass;
-
-    public Adapter() {
-        _objects = new HashMap();
-        _idVector = new Vector();
-    }
-
-    /*
-     * BindName is the name that will be registered with the INS (Inter-operable Name Service)
-     */
-    public String getBindName() {
-        return _bindName;
-    }
-
-    public void setBindName(String bindName) {
-        _bindName = bindName;
-    }
-
-    /*
-     * Is this a shared component?  If so this will invoke the getInstance method on
-     * the component ...
-     */
-    public boolean isShared() {
-        return _shared;
-    }
-
-    public void setShared(boolean shared) {
-        _shared = shared;
-    }
-
-    /*
-     * The classloader that will load any dependancies of the adapter or corba skel interfaces.
-     * Its should be set by the ejb container
-     */
-    public ClassLoader getClassLoader() {
-        return _cl;
-    }
-
-    public void setClassLoader(ClassLoader cl) {
-        _cl = cl;
-    }
-
-    /*
-     * This is the name of the remote class that implements the remote interface.
-     *
-     * This is only used if this adapter is going to directly invoke an object.  For the
-     * EJB Container, the adapter will pass through the method invocations.
-     */
-    public String getRemoteClassName() {
-        return _remoteClassName;
-    }
-
-    public void setRemoteClassName(String rcName) {
-        _remoteClassName = rcName;
-    }
-
-    /*
-     * The remote interface name for the remote object.  This will most likely be the name
-     * of the EJB's RemoteInterface and RemoteHomeInterface
-     *
-     * The stub/skel generator will use this interface name.
-     */
-    public String getRemoteInterfaceName() {
-        return _remoteInterfaceName;
-    }
-
-    public void setRemoteInterfaceName(String riName) {
-        _remoteInterfaceName = riName;
-    }
-
-    /*
-     * A list of public IDs that the remote object implements:
-     *
-     * IDL:....:1.0
-     * RMI:....:X:Y
-     */
-    public Vector getIds() {
-        return _idVector;
-    }
-
-    public void addId(String id) {
-        _idVector.add(id);
-    }
-
-    public void removeId(String id) {
-        _idVector.remove(id);
-    }
-
-    /*
-     * Return the skeleton implemention for the remote interface.  This interface has the
-     * invoke method to handle the rmi/iiop messages.
-     */
-    public RemoteInterface getRemoteInterface() {
-        if (_ri == null) {
-            synchronized (this) {
-                String riName = _remoteInterfaceName + "_Skeleton";
-                _remoteInterfaceClass = loadClass(riName);
-
-                try {
-                    _ri = (RemoteInterface) _remoteInterfaceClass.newInstance();
-                } catch (InstantiationException e) {
-                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-                } catch (IllegalAccessException e) {
-                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-                }
-            }
-        }
-
-        return _ri;
-    }
-
-    /*
-     * Get an object instance to invoke based on the object key.
-     *
-     * The objectKey could probably be passed to the EJB container so that the
-     * container can directly invoke the ejb object as required.
-     */
-    public Object getInstance(byte[] objectKey) {
-        String key = new String(objectKey);
-        return getInstance(key);
-    }
-
-    public Object getInstance(String key) {
-        Object o = _objects.get(key);
-
-        if (o == null) {
-            o = newInstance(key);
-        }
-
-        return o;
-    }
-
-    public Object newInstance(byte[] objectKey) {
-        String key = new String(objectKey);
-        return newInstance(key);
-    }
+public abstract class Adapter
+{
+    public abstract Object getAdapterID();
+    public abstract String[] getBindNames();
 
-    public Object newInstance(String key) {
-        Object o = null;
+    public abstract void start();
+    public abstract void stop();
 
-        if (_remoteClassClass == null) {
-            synchronized (this) {
-                _remoteClassClass = loadClass(_remoteClassName);
-            }
-
-            try {
-                if (_shared) {
-                    synchronized (this) {
-                        Method m = _remoteClassClass.getMethod("getInstance", (Class[]) null);
-                        o = m.invoke(_remoteClassClass, (Object[]) null);
-
-                        if (o != null) {
-                            _objects.put(key, o);
-                        }
-                    }
-                } else {
-                    o = _remoteClassClass.newInstance();
-                    _objects.put(key, o);
-                }
-            } catch (InstantiationException e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-            } catch (IllegalAccessException e) {
-                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-            } catch (NoSuchMethodException e) {
-                e.printStackTrace();
-            } catch (InvocationTargetException e) {
-                e.printStackTrace();
-            }
-        }
+    public abstract ObjectRef getObjectRef();
 
-        return o;
-    }
+    public abstract Object getServant();
+    public abstract EJBContainer getEJBContainer();
+    public abstract Object getEJBHome();
 
-    /*
-     * Invoke method from the IIOP Message Handler.  The adapter is bound to the INS name service.
-     * When an RMI/IIOP message is processed by the server, the message handler will perform a lookup
-     * on the name service to get the Adapter, then the invocation will be passed to the adapter
-     * The adapter will obtain the object key and then determine which object instance to pass the
-     * invocation to.
-     */
-    public void invoke(java.lang.String methodName, byte[] objectKey, org.apache.geronimo.interop.rmi.iiop.ObjectInputStream input, org.apache.geronimo.interop.rmi.iiop.ObjectOutputStream output) {
-        RemoteInterface skeleton = getRemoteInterface();
-        Object instance = getInstance(objectKey);
-
-        if (instance != null) {
-            skeleton.$invoke(methodName, objectKey, instance, input, output);
-        } else {
-            throw new org.omg.CORBA.OBJECT_NOT_EXIST(new String(objectKey));
-        }
-    }
+    public abstract void invoke(java.lang.String methodName, byte[] objectKey, org.apache.geronimo.interop.rmi.iiop.ObjectInputStream input, org.apache.geronimo.interop.rmi.iiop.ObjectOutputStream output);
 
-    /*
-     * Helper function to load a class.  This uses classloader for the adapter.
-     */
-    protected Class loadClass(String name) {
-        Class c = null;
 
+    protected Class loadClass( String className, ClassLoader cl )
+    {
+        Class rc = null;
         try {
-            c = _cl.loadClass(name);
-        } catch (Exception e) {
-            e.printStackTrace();
+            rc = cl.loadClass(className);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();  
         }
-
-        return c;
+        return rc;
     }
+
 }

Modified: geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManager.java?view=diff&r1=159004&r2=159005
==============================================================================
--- geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManager.java (original)
+++ geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManager.java Fri Mar 25 03:54:30 2005
@@ -17,27 +17,176 @@
  */
 package org.apache.geronimo.interop.adapter;
 
-import java.util.Hashtable;
+import org.openejb.EJBContainer;
+import org.openejb.EJBComponentType;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.gbean.*;
+import org.apache.geronimo.interop.naming.NameService;
+
+import java.util.HashMap;
+import java.util.Collection;
+import java.util.Collections;
+
+public class AdapterManager implements ReferenceCollectionListener {
+
+    private final Log       log = LogFactory.getLog(AdapterManager.class);
+    private HashMap         homeAdapters;
+    private HashMap         remoteAdapters;
+    private Collection      containers = Collections.EMPTY_SET;
+    private ClassLoader     classLoader;
+
+    private NameService     nameService = NameService.getInstance();
+
+    /*
+     * This is a singleton GBean.  Do not reference it directly, but use a
+     * GBean reference to get it.
+     */
+    public AdapterManager()
+    {
+        this.homeAdapters = null;
+        this.remoteAdapters = null;
+        this.containers = null;
+        this.classLoader = null;
+    }
+
+    public AdapterManager( ClassLoader classLoader, Collection containers ) {
+        log.debug( "AdapterManager(): containers = " + containers );
+
+        this.classLoader = classLoader;
+
+        ReferenceCollection ref = (ReferenceCollection) containers;
+        ref.addReferenceCollectionListener(this);
+
+        this.containers = containers;
+
+        int len = ( containers != null ? containers.size() : 20 );
+        homeAdapters = new HashMap( len );
+        remoteAdapters = new HashMap( len );
+
+        // Todo: Add the containers .. invoke memberAdded for each element in containers.
+
+        registerNameServer();
+    }
+
+    protected void registerNameServer()
+    {
+        //
+        // NameService
+        //
+
+        String bindNames[] = new String[] { "NameService" };
+        String remoteClassName = "org.apache.geronimo.interop.rmi.iiop.server.ServerNamingContext";
+        //String remoteInterfaceName = "org.apache.geronimo.interop.rmi.iiop.NameService";
+        String remoteInterfaceName = "org.apache.geronimo.interop.CosNaming.NamingContext";
+        String ids[] = new String[] { "IDL:omg.org/CosNaming/NamingContext:1.0",
+                                      "IDL:omg.org/CosNaming/NamingContextExt:1.0" };                                      
+        ClassLoader cl = this.getClass().getClassLoader();
+
+        CorbaAdapter a = new CorbaAdapter( bindNames, ids, remoteClassName, remoteInterfaceName, cl );
+        a.start();
+        registerRemoteAdapter(a);
+    }
+
+    protected Adapter getAdapter( Object adapterID ) {
+        // more likely to be using the remoteadapter...
+        Adapter rc = getRemoteAdapter( adapterID );
+        if (rc == null)
+        {
+            rc = getHomeAdapter( adapterID );
+        }
+        return rc;
+    }
+
+    protected Adapter getHomeAdapter( Object adapterID )
+    {
+        return (Adapter)homeAdapters.get( adapterID );
+    }
 
+    protected Adapter getRemoteAdapter( Object adapterID )
+    {
+        return (Adapter)remoteAdapters.get( adapterID );
+    }
+
+    protected void registerHomeAdapter( Adapter adapter )
+    {
+        homeAdapters.put( adapter.getAdapterID(), adapter );
+    }
+
+    protected void registerRemoteAdapter( Adapter adapter )
+    {
+        remoteAdapters.put( adapter.getAdapterID(), adapter );
+    }
 
-public class AdapterManager {
-    protected Hashtable _adapters;
-    protected static AdapterManager _me = new AdapterManager();
+    protected void unregisterHomeAdapter( Adapter adapter )
+    {
+        homeAdapters.remove( adapter.getAdapterID() );
+    }
 
-    protected AdapterManager() {
-        _adapters = new Hashtable();
+    protected void unregisterRemoteAdapter( Adapter adapter )
+    {
+        remoteAdapters.remove( adapter.getAdapterID() );
     }
 
-    public static AdapterManager getInstance() {
-        return _me;
+    public void memberAdded(ReferenceCollectionEvent event) {
+        EJBContainer container = (EJBContainer) event.getMember();
+
+        log.debug( "AdapterManager.memberAdded(): container = " + container );
+        log.debug( "AdapterManager.memberAdded(): containerID = " + container.getContainerID() );
+
+        switch (container.getProxyInfo().getComponentType()) {
+            case EJBComponentType.STATELESS:
+                //generator = new AdapterStateless(container, orb, poa, tieLoader);
+                break;
+            case EJBComponentType.STATEFUL:
+                //generator = new AdapterStateful(container, orb, poa, tieLoader);
+                break;
+            case EJBComponentType.BMP_ENTITY:
+            case EJBComponentType.CMP_ENTITY:
+                //generator = new AdapterEntity(container, orb, poa, tieLoader);
+                break;
+            default:
+                // throw new CORBAException("CORBA HomeAdapter does not handle MDB containers");
+        }
+
+        Adapter adapter = new HomeAdapter( container );
+        adapter.start();
+        registerHomeAdapter( adapter );
+
+        adapter = new RemoteAdapter( container );
+        adapter.start();
+        registerRemoteAdapter( adapter );
     }
 
-    public void registerAdapter(Adapter a) {
+    public void memberRemoved(ReferenceCollectionEvent event) {
+        EJBContainer container = (EJBContainer) event.getMember();
+
+        log.debug( "AdapterManager.memberRemoved(): container = " + container );
+        log.debug( "AdapterManager.memberRemoved(): containerID = " + container.getContainerID() );
+
+        Adapter adapter = getHomeAdapter( container.getContainerID() );
+        adapter.stop();
+        unregisterHomeAdapter( adapter );
+
+        adapter = getRemoteAdapter( container.getContainerID() );
+        adapter.stop();
+        unregisterRemoteAdapter( adapter );
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(AdapterManager.class);
+
+        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
+        infoFactory.addReference("containers", EJBContainer.class);
+
+        infoFactory.setConstructor(new String[]{"classLoader", "containers"});
 
-        _adapters.put(a.getBindName(), a);
+        GBEAN_INFO = infoFactory.getBeanInfo();
     }
 
-    public Adapter getAdapter(String objectName) {
-        return (Adapter) _adapters.get(objectName);
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
     }
 }

Added: geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManagerGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManagerGBean.java?view=auto&rev=159005
==============================================================================
--- geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManagerGBean.java (added)
+++ geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/AdapterManagerGBean.java Fri Mar 25 03:54:30 2005
@@ -0,0 +1,37 @@
+/**
+ *
+ *  Copyright 2004-2005 The Apache Software Foundation
+ *
+ *  Licensed 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.geronimo.interop.adapter;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+
+
+public class AdapterManagerGBean
+{
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(AdapterManager.class);                        
+        GBEAN_INFO = infoFactory.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}

Added: geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/CorbaAdapter.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/CorbaAdapter.java?view=auto&rev=159005
==============================================================================
--- geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/CorbaAdapter.java (added)
+++ geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/adapter/CorbaAdapter.java Fri Mar 25 03:54:30 2005
@@ -0,0 +1,177 @@
+/**
+ *
+ *  Copyright 2004-2005 The Apache Software Foundation
+ *
+ *  Licensed 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.geronimo.interop.adapter;
+
+import java.util.HashMap;
+
+import org.apache.geronimo.interop.rmi.iiop.RemoteInterface;
+import org.apache.geronimo.interop.rmi.iiop.ObjectInputStream;
+import org.apache.geronimo.interop.rmi.iiop.ObjectOutputStream;
+import org.apache.geronimo.interop.rmi.iiop.ObjectRef;
+import org.apache.geronimo.interop.naming.NameService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.openejb.EJBContainer;
+
+public class CorbaAdapter extends Adapter {
+
+    private final Log log = LogFactory.getLog(CorbaAdapter.class);
+
+    private ClassLoader     classLoader;
+
+    private NameService     nameService = NameService.getInstance();
+
+    private String          bindNames[];
+    private String          ids[];
+    private String          remoteClassName;
+    private String          remoteInterfaceClassName;
+
+    private Class           remoteClassClass;
+    private Class           remoteInterfaceClass;
+    private RemoteInterface remoteInterfaceObject;
+    private Object          remoteClassObject;
+
+    public CorbaAdapter( String[] bindNames, String[] ids, String remoteClassName,
+                         String remoteInterfaceName, ClassLoader classLoader ) {
+        this.bindNames = bindNames;
+        this.ids = ids;
+        this.remoteClassName = remoteClassName;
+        this.remoteInterfaceClassName = remoteInterfaceName;
+        this.classLoader = classLoader;
+
+        this.remoteInterfaceClassName += "_Skeleton";
+
+        loadRemoteInterface();
+        loadRemoteObject();
+    }
+
+    public Object getAdapterID()
+    {
+        return "CorbaAdapter";
+    }
+
+    /*
+     * BindName is the name that will be registered with the INS (Inter-operable Name Service)
+     * These are the names from the EJBContainer.
+     */
+    public String[] getBindNames() {
+        return bindNames;
+    }
+
+    /*
+     * The classloader that will load any dependancies of the adapter or corba skel interfaces.
+     * Its should be set by the ejb container
+     */
+    public ClassLoader getClassLoader() {
+        return classLoader;
+    }
+
+    /*
+     * The classloader that will load any dependancies of the adapter or corba skel interfaces.
+     * Its should be set by the ejb container
+     */
+    public void setClassLoader(ClassLoader cl) {
+        this.classLoader = cl;
+    }
+
+    /*
+     * Invoke method from the IIOP Message Handler.  The adapter is bound to the INS name service.
+     * When an RMI/IIOP message is processed by the server, the message handler will perform a lookup
+     * on the name service to get the HomeAdapter, then the invocation will be passed to the adapter
+     * The adapter will obtain the object key and then determine which object instance to pass the
+     * invocation to.
+     */
+    public void invoke(java.lang.String methodName, byte[] objectKey, org.apache.geronimo.interop.rmi.iiop.ObjectInputStream input, org.apache.geronimo.interop.rmi.iiop.ObjectOutputStream output) {
+        if (remoteInterfaceObject != null) {
+            remoteInterfaceObject.invoke(methodName, objectKey, this, input, output);
+        } else {
+            throw new org.omg.CORBA.OBJECT_NOT_EXIST(new String(objectKey));
+        }
+    }
+
+    public void start()
+    {
+        log.info( "Starting CorbaAdapter: " );
+        nameService.bindAdapter( this );
+    }
+
+    public void stop()
+    {
+        log.info( "Stopping CorbaAdapter: " );
+        nameService.unbindAdapter( this );
+    }
+
+    public ObjectRef getObjectRef()
+    {
+        return remoteInterfaceObject.getObjectRef();
+        //org.apache.geronimo.interop.rmi.iiop.ObjectRef or = new ObjectRef();
+        //or.$setID("RMI:org.apache.geronimo.interop.CosNaming.NamingContext:0000000000000000");
+        //or.$setObjectKey("org.apache.geronimo.interop.CosNaming.NamingContext");
+        //return or;
+    }
+
+    protected void loadRemoteInterface()
+    {
+        remoteInterfaceClass = loadClass( remoteInterfaceClassName, classLoader );
+
+        if (remoteInterfaceClass != null)
+        {
+            remoteInterfaceObject = null;
+            try {
+                remoteInterfaceObject = (RemoteInterface)remoteInterfaceClass.newInstance();
+            } catch (IllegalAccessException e) {
+                e.printStackTrace();
+            } catch (InstantiationException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    protected void loadRemoteObject()
+    {
+        remoteClassClass = loadClass( remoteClassName, classLoader );
+
+        if (remoteClassClass != null)
+        {
+            remoteClassObject = null;
+            try {
+                remoteClassObject = remoteClassClass.newInstance();
+            } catch (IllegalAccessException e) {
+                e.printStackTrace();
+            } catch (InstantiationException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public Object getServant()
+    {
+        return remoteClassObject;
+    }
+
+    public EJBContainer getEJBContainer()
+    {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public Object getEJBHome()
+    {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+}



Mime
View raw message