geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r331154 - /geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/J2eeContextImpl.java
Date Sun, 06 Nov 2005 21:15:25 GMT
Author: ammulder
Date: Sun Nov  6 13:15:23 2005
New Revision: 331154

URL: http://svn.apache.org/viewcvs?rev=331154&view=rev
Log:
Note about and workaround for GERONIMO-1140

Modified:
    geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/J2eeContextImpl.java

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/J2eeContextImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/J2eeContextImpl.java?rev=331154&r1=331153&r2=331154&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/J2eeContextImpl.java
(original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/J2eeContextImpl.java
Sun Nov  6 13:15:23 2005
@@ -46,7 +46,24 @@
                 source.getKeyProperty(NameFactory.J2EE_SERVER),
                 source.getKeyProperty(NameFactory.J2EE_APPLICATION),
                 moduleType,
-                source.getKeyProperty(moduleType),
+                source.getKeyProperty(moduleType), // <-- This might be wrong!!! GERONIMO-1140
+                source.getKeyProperty(NameFactory.J2EE_NAME),
+                source.getKeyProperty(NameFactory.J2EE_TYPE));
+    }
+
+    /**
+     * This method is a workaround for GERONIMO-1140 -- it's the same as the
+     * previous one except for the offending line.  If this is determined to
+     * be a valid change in general, this can replace newContext(ObjectName, String)
+     * However, I'm not 100% sure that it's OK to have the J2EE_NAME in two
+     * consecutive parameters in the general case.
+     */
+    public static J2eeContextImpl newModuleContext(ObjectName source, String moduleType)
{
+        return new J2eeContextImpl(source.getDomain(),
+                source.getKeyProperty(NameFactory.J2EE_SERVER),
+                source.getKeyProperty(NameFactory.J2EE_APPLICATION),
+                moduleType,
+                source.getKeyProperty(NameFactory.J2EE_NAME),
                 source.getKeyProperty(NameFactory.J2EE_NAME),
                 source.getKeyProperty(NameFactory.J2EE_TYPE));
     }



Mime
View raw message