geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r279717 - in /geronimo/trunk/modules: j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ naming-builder/src/java/org/apache/geronimo/naming/deployment/ naming-builder/src/test/org/apache/geronimo/naming/ naming-builder/src/test/org/...
Date Fri, 09 Sep 2005 06:42:16 GMT
Author: djencks
Date: Thu Sep  8 23:42:11 2005
New Revision: 279717

URL: http://svn.apache.org/viewcvs?rev=279717&view=rev
Log:
GERONIMO-989 Make app client css-links work.  Also remove an NPE possibility

Added:
    geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/
    geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java
      - copied, changed from r279608, geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/MessageDestinationTest.java
Removed:
    geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/MessageDestinationTest.java
Modified:
    geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
    geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java?rev=279717&r1=279716&r2=279717&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
Thu Sep  8 23:42:11 2005
@@ -259,7 +259,7 @@
     private GBeanData locateComponentInModule(String resourceLink, URI moduleURI, String
moduleType, String type, J2eeContext j2eeContext, String queryType, NamingContext context)
throws UnresolvedReferenceException {
         GBeanData match;
         String name = resourceLink.substring(resourceLink.lastIndexOf('#') + 1);
-        String module = moduleURI.getPath();
+        String module = moduleURI == null? "": moduleURI.getPath();
 
         if (resourceLink.indexOf('#') > -1) {
             //presence of # means they explicitly want only gbeans in specified module in
this application.

Modified: geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?rev=279717&r1=279716&r2=279717&view=diff
==============================================================================
--- geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Thu Sep  8 23:42:11 2005
@@ -165,7 +165,7 @@
     }
 
 
-    public static void addEnvEntries(EnvEntryType[] envEntries, ComponentContextBuilder builder,
ClassLoader classLoader) throws DeploymentException {
+    static void addEnvEntries(EnvEntryType[] envEntries, ComponentContextBuilder builder,
ClassLoader classLoader) throws DeploymentException {
         for (int i = 0; i < envEntries.length; i++) {
             EnvEntryType envEntry = envEntries[i];
             String name = getStringValue(envEntry.getEnvEntryName());
@@ -182,7 +182,7 @@
 
     }
 
-    public static void addResourceRefs(EARContext earContext, URI moduleURI, ResourceRefType[]
resourceRefs, Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException
{
+    static void addResourceRefs(EARContext earContext, URI moduleURI, ResourceRefType[] resourceRefs,
Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
         if (refMap == null) {
             refMap = Collections.EMPTY_MAP;
         }
@@ -264,7 +264,7 @@
         return containerId;
     }
 
-    public static void addResourceEnvRefs(EARContext earContext, ResourceEnvRefType[] resourceEnvRefArray,
Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
+    static void addResourceEnvRefs(EARContext earContext, ResourceEnvRefType[] resourceEnvRefArray,
Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
         if (refMap == null) {
             refMap = Collections.EMPTY_MAP;
         }
@@ -331,7 +331,7 @@
         return containerId;
     }
 
-    public static void addMessageDestinationRefs(RefContext refContext, NamingContext namingContext,
MessageDestinationRefType[] messageDestinationRefs, ClassLoader cl, ComponentContextBuilder
builder) throws DeploymentException {
+    static void addMessageDestinationRefs(RefContext refContext, NamingContext namingContext,
MessageDestinationRefType[] messageDestinationRefs, ClassLoader cl, ComponentContextBuilder
builder) throws DeploymentException {
         for (int i = 0; i < messageDestinationRefs.length; i++) {
             MessageDestinationRefType messageDestinationRef = messageDestinationRefs[i];
             String name = getStringValue(messageDestinationRef.getMessageDestinationRefName());
@@ -358,7 +358,7 @@
                     linkName = destination.getAdminObjectLink().trim();
                 }
             } else {
-                //well, we know for sure an admin object is not going to be defined in a
modules that can have a message-destination 
+                //well, we know for sure an admin object is not going to be defined in a
modules that can have a message-destination
                 int pos = linkName.indexOf('#');
                 if (pos > -1) {
                     linkName = linkName.substring(pos + 1);
@@ -375,7 +375,7 @@
 
     }
 
-    public static void addEJBRefs(NamingContext ejbContext, RefContext refContext, URI moduleURI,
EjbRefType[] ejbRefs, Map ejbRefMap, ClassLoader cl, ComponentContextBuilder builder) throws
DeploymentException {
+    static void addEJBRefs(NamingContext earContext, NamingContext ejbContext, RefContext
refContext, URI moduleURI, EjbRefType[] ejbRefs, Map ejbRefMap, ClassLoader cl, ComponentContextBuilder
builder) throws DeploymentException {
         J2eeContext j2eeContext = ejbContext.getJ2eeContext();
         for (int i = 0; i < ejbRefs.length; i++) {
             EjbRefType ejbRef = ejbRefs[i];
@@ -418,7 +418,7 @@
                                 String cssLink = remoteRef.getCssLink().trim();
                                 //TODO is this correct?
                                 String moduleType = null;
-                                cssBean = refContext.locateComponentName(cssLink, moduleURI,
moduleType, NameFactory.CORBA_CSS, j2eeContext, ejbContext, "css gbean");
+                                cssBean = refContext.locateComponentName(cssLink, moduleURI,
moduleType, NameFactory.CORBA_CSS, earContext.getJ2eeContext(), earContext, "css gbean");
                             } else {
                                 GerCssType css = remoteRef.getCss();
                                 cssBean = NameFactory.getComponentName(getStringValue(css.getDomain()),
@@ -427,7 +427,7 @@
                                     getStringValue(css.getModule()),
                                     getStringValue(css.getName()),
                                     getStringValue(NameFactory.CORBA_CSS),
-                                    j2eeContext);
+                                    earContext.getJ2eeContext());
                             }
                             ejbReference = refContext.getCORBARemoteRef(new URI(getStringValue(remoteRef.getNsCorbaloc())),
                                                                         getStringValue(remoteRef.getName()),
@@ -462,7 +462,7 @@
         }
     }
 
-    public static void addEJBLocalRefs(NamingContext ejbContext, RefContext refContext, URI
moduleURI, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder
builder) throws DeploymentException {
+    static void addEJBLocalRefs(NamingContext ejbContext, RefContext refContext, URI moduleURI,
EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder
builder) throws DeploymentException {
         J2eeContext j2eeContext = ejbContext.getJ2eeContext();
         for (int i = 0; i < ejbLocalRefs.length; i++) {
             EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];
@@ -515,7 +515,7 @@
     }
 
     //TODO current implementation does not deal with portComponentRef links.
-    public static void addServiceRefs(EARContext earContext, Module module, ServiceRefType[]
serviceRefs, Map serviceRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException
{
+    static void addServiceRefs(EARContext earContext, Module module, ServiceRefType[] serviceRefs,
Map serviceRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException
{
 
         RefContext refContext = earContext.getRefContext();
 
@@ -752,7 +752,7 @@
 
         RefContext refContext = earContext.getRefContext();
         // ejb-ref
-        addEJBRefs(ejbContext, refContext, moduleURI, ejbRefs, mapEjbRefs(gerEjbRefs), cl,
builder);
+        addEJBRefs(earContext, ejbContext, refContext, moduleURI, ejbRefs, mapEjbRefs(gerEjbRefs),
cl, builder);
 
         // ejb-local-ref
         addEJBLocalRefs(ejbContext, refContext, moduleURI, ejbLocalRefs, mapEjbLocalRefs(gerEjbLocalRef),
cl, builder);

Copied: geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java
(from r279608, geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/MessageDestinationTest.java)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java?p2=geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java&p1=geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/MessageDestinationTest.java&r1=279608&r2=279717&rev=279717&view=diff
==============================================================================
--- geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/MessageDestinationTest.java
(original)
+++ geronimo/trunk/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java
Thu Sep  8 23:42:11 2005
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.naming;
+package org.apache.geronimo.naming.deployment;
 
 import java.net.URI;
 import java.util.Map;



Mime
View raw message