geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r921199 - in /geronimo/server/trunk/plugins/client: ./ client/ client/src/main/history/ client/src/main/plan/ geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/
Date Wed, 10 Mar 2010 00:48:09 GMT
Author: djencks
Date: Wed Mar 10 00:48:09 2010
New Revision: 921199

URL: http://svn.apache.org/viewvc?rev=921199&view=rev
Log:
GERONIMO-4934 make app client container work under osgi

Modified:
    geronimo/server/trunk/plugins/client/client/pom.xml
    geronimo/server/trunk/plugins/client/client/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/client/client/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
    geronimo/server/trunk/plugins/client/pom.xml

Modified: geronimo/server/trunk/plugins/client/client/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/client/client/pom.xml?rev=921199&r1=921198&r2=921199&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/client/client/pom.xml (original)
+++ geronimo/server/trunk/plugins/client/client/pom.xml Wed Mar 10 00:48:09 2010
@@ -113,6 +113,16 @@
             <groupId>org.apache.xbean</groupId>
             <artifactId>xbean-naming</artifactId>
         </dependency>
+        <!-- aries jndi integration -->
+        <dependency>
+            <groupId>org.apache.aries.jndi</groupId>
+            <artifactId>org.apache.aries.jndi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.jndi</groupId>
+            <artifactId>org.apache.aries.jndi.url</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>

Modified: geronimo/server/trunk/plugins/client/client/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/client/client/src/main/history/dependencies.xml?rev=921199&r1=921198&r2=921199&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/client/client/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/client/client/src/main/history/dependencies.xml Wed Mar
10 00:48:09 2010
@@ -7,6 +7,21 @@
         <type>car</type>
     </module-id>
     <dependency>
+        <groupId>org.apache.aries</groupId>
+        <artifactId>org.apache.aries.util</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.aries.jndi</groupId>
+        <artifactId>org.apache.aries.jndi.core</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.aries.jndi</groupId>
+        <artifactId>org.apache.aries.jndi.url</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
         <groupId>org.apache.geronimo.bundles</groupId>
         <artifactId>sxc-jaxb</artifactId>
         <type>jar</type>

Modified: geronimo/server/trunk/plugins/client/client/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/client/client/src/main/plan/plan.xml?rev=921199&r1=921198&r2=921199&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/client/client/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/client/client/src/main/plan/plan.xml Wed Mar 10 00:48:09
2010
@@ -21,11 +21,11 @@
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
     <!-- Naming properties -->
-    <gbean name="NamingProperties" class="org.apache.geronimo.system.properties.NamingProperties">
-        <attribute name="namingFactoryInitial">org.apache.xbean.naming.global.GlobalContextManager</attribute>
-        <attribute name="namingFactoryUrlPkgs">org.apache.xbean.naming</attribute>
-        <attribute name="namingProviderUrl">rmi://${PlanServerHostname}:${PlanNamingPort}</attribute>
-    </gbean>
+    <!--<gbean name="NamingProperties" class="org.apache.geronimo.system.properties.NamingProperties">-->
+        <!--<attribute name="namingFactoryInitial">org.apache.xbean.naming.global.GlobalContextManager</attribute>-->
+        <!--<attribute name="namingFactoryUrlPkgs">org.apache.xbean.naming</attribute>-->
+        <!--<attribute name="namingProviderUrl">rmi://${PlanServerHostname}:${PlanNamingPort}</attribute>-->
+    <!--</gbean>-->
 
     <gbean name="JavaGlobalContext" class="org.apache.geronimo.gjndi.FederatedContextGBean">
         <attribute name="nameInNamespace">java:</attribute>

Modified: geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=921199&r1=921198&r2=921199&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/client/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Wed Mar 10 00:48:09 2010
@@ -150,8 +150,8 @@ public class AppClientModuleBuilder impl
                 connectionTrackerObjectName,
                 corbaGBeanObjectName,
                 credentialStoreName, repositories, new SingleElementCollection<ModuleBuilder>(connectorModuleBuilder),
-                serviceBuilder == null ? Collections.EMPTY_SET : Collections.singleton(serviceBuilder),
-                namingBuilders == null ? Collections.EMPTY_SET : namingBuilders,
+                serviceBuilder == null ? Collections.<NamespaceDrivenBuilder>emptySet()
: Collections.singleton(serviceBuilder),
+                namingBuilders == null ? Collections.<NamingBuilder>emptySet() : namingBuilders,
                 moduleBuilderExtensions,
                 clientArtifactResolver);
     }
@@ -552,7 +552,7 @@ public class AppClientModuleBuilder impl
                     null,
                     clientEnvironment,
                     ConfigurationModuleType.CAR,
-                    module.getModuleName(),
+                    appClientModule.getAppClientName(),
                     transactionManagerObjectName,
                     connectionTrackerObjectName,
                     corbaGBeanObjectName,
@@ -590,7 +590,7 @@ public class AppClientModuleBuilder impl
     }
 
     public void initContext(EARContext earContext, Module clientModule, Bundle bundle) throws
DeploymentException {
-        namingBuilders.buildEnvironment(clientModule.getSpecDD(), clientModule.getVendorDD(),
((AppClientModule) clientModule).getEnvironment());
+        namingBuilders.buildEnvironment(clientModule.getSpecDD(), clientModule.getVendorDD(),
clientModule.getEnvironment());
 
         AppClientModule appClientModule = ((AppClientModule) clientModule);
         for (ConnectorModule connectorModule : appClientModule.getResourceModules()) {
@@ -608,12 +608,12 @@ public class AppClientModuleBuilder impl
 
         ApplicationClientType appClient = (ApplicationClientType) appClientModule.getSpecDD();
         GerApplicationClientType geronimoAppClient = (GerApplicationClientType) appClientModule.getVendorDD();
-
+        //First, the silly gbean on the server that says there's an app client
         // generate the object name for the app client
         AbstractName appClientModuleName = appClientModule.getModuleName();
 
         // create a gbean for the app client module and add it to the ear
-        GBeanData appClientModuleGBeanData = new GBeanData(appClientModuleName, J2EEAppClientModuleImpl.GBEAN_INFO);
+        GBeanData appClientModuleGBeanData = new GBeanData(appClientModuleName, J2EEAppClientModuleImpl.class);
         try {
             appClientModuleGBeanData.setReferencePattern("J2EEServer", earContext.getServerName());
             if (!module.isStandAlone()) {
@@ -629,6 +629,7 @@ public class AppClientModuleBuilder impl
             throw new DeploymentException("Could not add application client module gbean
to configuration", e);
         }
 
+        //Now, the gbeans for the actual remote app client
         EARContext appClientDeploymentContext = appClientModule.getEarContext();
         //Share the ejb info with the ear.
         //TODO this might be too much, but I don't want to impose a dependency on geronimo-openejb
to get
@@ -681,7 +682,7 @@ public class AppClientModuleBuilder impl
                 // add the app client static jndi provider
                 //TODO track resource ref shared and app managed security
                 AbstractName jndiContextName = earContext.getNaming().createChildName(appClientDeploymentContext.getModuleName(),
"StaticJndiContext", "StaticJndiContext");
-                GBeanData jndiContextGBeanData = new GBeanData(jndiContextName, StaticJndiContextPlugin.GBEAN_INFO);
+                GBeanData jndiContextGBeanData = new GBeanData(jndiContextName, StaticJndiContextPlugin.class);
                 try {
                     Map<NamingBuilder.Key, Object> buildingContext = new HashMap<NamingBuilder.Key,
Object>();
                     buildingContext.put(NamingBuilder.GBEAN_NAME_KEY, jndiContextName);
@@ -703,8 +704,9 @@ public class AppClientModuleBuilder impl
                         appClient.setMetadataComplete(true);
                         module.setOriginalSpecDD(module.getSpecDD().toString());
                     }
-
+                    //n the server
                     appClientModuleGBeanData.setAttribute("deploymentDescriptor", appClientModule.getOriginalSpecDD());
+                    //in the app client
                     holder = NamingBuilder.INJECTION_KEY.get(buildingContext);
                     jndiContextGBeanData.setAttribute("context", NamingBuilder.JNDI_KEY.get(buildingContext));
                 } catch (DeploymentException e) {
@@ -717,7 +719,7 @@ public class AppClientModuleBuilder impl
 
                 // finally add the app client container
                 AbstractName appClientContainerName = appClientDeploymentContext.getModuleName();
-                GBeanData appClientContainerGBeanData = new GBeanData(appClientContainerName,
AppClientContainer.GBEAN_INFO);
+                GBeanData appClientContainerGBeanData = new GBeanData(appClientContainerName,
AppClientContainer.class);
                 try {
                     appClientContainerGBeanData.setAttribute("mainClassName", appClientModule.getMainClassName());
                     appClientContainerGBeanData.setAttribute("appClientModuleName", appClientModuleName);

Modified: geronimo/server/trunk/plugins/client/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/client/pom.xml?rev=921199&r1=921198&r2=921199&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/client/pom.xml (original)
+++ geronimo/server/trunk/plugins/client/pom.xml Wed Mar 10 00:48:09 2010
@@ -43,7 +43,18 @@
         <module>geronimo-client</module>
         <module>geronimo-client-builder</module>
     </modules>
-
+    <dependencyManagement>
+        <dependencies>
+            <!-- aries jndi -->
+            <dependency>
+                <groupId>org.apache.geronimo.framework</groupId>
+                <artifactId>framework</artifactId>
+                <version>${version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
     <build>
         <plugins>
             <plugin>



Mime
View raw message