You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by gt...@apache.org on 2012/05/24 04:12:57 UTC

svn commit: r1342119 - in /river/jtsk/skunk/surrogate: ./ docs/ src/org/apache/river/container/ src/org/apache/river/container/deployer/ test/org/apache/river/container/deployer/ testfiles/ testfiles/testroot/profile/default/

Author: gtrasuk
Date: Thu May 24 02:12:56 2012
New Revision: 1342119

URL: http://svn.apache.org/viewvc?rev=1342119&view=rev
Log:
Successfully hosts services written for ServiceStarter usage, complete with security manager, codebase server, and configuration "special" variables copied from the overall container config (so, for example, all the hosted services can use the discoveryGroup setting in the main config.xml file).

Infrastructure is in place for privileged services, for example, a deployer that can be driven from an IDE.

Remaining to be done:
	- Hosting of Jini clients
	- Auto-deployment/undeployment based on dropping jars into the 'deploy' directory.
	- Another "deliverable" package that would include modules for all the infrastructure services.
	- Surrogate hosting (which should actually be pretty trivial at this point)
	- Command-line settings for things like discovery group, locators, etc.
	- Documentation.
	- Translation of messages to other languages.
	- Development and deployment tools
	- OS Service deployment (like Tomcat)
	- Installers for Windows, Linux, etc.

Modified:
    river/jtsk/skunk/surrogate/build.xml
    river/jtsk/skunk/surrogate/docs/Todo.txt
    river/jtsk/skunk/surrogate/src/org/apache/river/container/MessageNames.java
    river/jtsk/skunk/surrogate/src/org/apache/river/container/Messages.properties
    river/jtsk/skunk/surrogate/src/org/apache/river/container/Strings.java
    river/jtsk/skunk/surrogate/src/org/apache/river/container/deployer/StarterServiceDeployer.java
    river/jtsk/skunk/surrogate/test/org/apache/river/container/deployer/DeployerConfigParserTest.java
    river/jtsk/skunk/surrogate/testfiles/reggie.config
    river/jtsk/skunk/surrogate/testfiles/testroot/profile/default/config.xml

Modified: river/jtsk/skunk/surrogate/build.xml
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/build.xml?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/build.xml (original)
+++ river/jtsk/skunk/surrogate/build.xml Thu May 24 02:12:56 2012
@@ -130,34 +130,34 @@
     <!-- Pre-compiler target to run javacc against our parser sources. -->
     <target name="-pre-compile">
         <!-- Do parser generation for the deployer configuration parser -->
-        <mkdir dir="${build.generated.sources.dir}/org/apache/river/container/deployer"/>
+        <mkdir dir="${build.generated.sources.dir}/java/org/apache/river/container/deployer"/>
         <jjtree
             target="${basedir}/src/org/apache/river/container/deployer/DeployerConfigParser.jjt"
-            outputdirectory="${build.generated.sources.dir}/org/apache/river/container/deployer"
+            outputdirectory="${build.generated.sources.dir}/java/org/apache/river/container/deployer"
             javacchome="${libs.JavaCC.src}"
         />
         <javacc
-            target="${build.generated.sources.dir}/org/apache/river/container/deployer/DeployerConfigParser.jj"
-            outputdirectory="${build.generated.sources.dir}/org/apache/river/container/deployer"
+            target="${build.generated.sources.dir}/java/org/apache/river/container/deployer/DeployerConfigParser.jj"
+            outputdirectory="${build.generated.sources.dir}/java/org/apache/river/container/deployer"
             javacchome="${libs.JavaCC.src}"
         />
 
         <!-- Do parser generation for the classpath filter expression parser. -->
-        <mkdir dir="${build.generated.sources.dir}/org/apache/river/container/classloading"/>
+        <mkdir dir="${build.generated.sources.dir}/java/org/apache/river/container/classloading"/>
         <jjtree
             target="${basedir}/src/org/apache/river/container/classloading/ClasspathExpressionParser.jjt"
-            outputdirectory="${build.generated.sources.dir}/org/apache/river/container/classloading"
+            outputdirectory="${build.generated.sources.dir}/java/org/apache/river/container/classloading"
             javacchome="${libs.JavaCC.src}"
         />
         <javacc
-            target="${build.generated.sources.dir}/org/apache/river/container/classloading/ClasspathExpressionParser.jj"
-            outputdirectory="${build.generated.sources.dir}/org/apache/river/container/classloading"
+            target="${build.generated.sources.dir}/java/org/apache/river/container/classloading/ClasspathExpressionParser.jj"
+            outputdirectory="${build.generated.sources.dir}/java/org/apache/river/container/classloading"
             javacchome="${libs.JavaCC.src}"
         />
-        <mkdir dir="${build.generated.sources.dir}/org/apache/river/container/config" />
-        <xjc destdir="${build.generated.sources.dir}" schema="src/schemas/config.xsd"
+        <mkdir dir="${build.generated.sources.dir}/java/org/apache/river/container/config" />
+        <xjc destdir="${build.generated.sources.dir}/java" schema="src/schemas/config.xsd"
         package="org.apache.river.container.config">
-            <produces dir="src/org/apache/river/container/config" includes="*.java" />
+            <produces dir="${build.generated.sources.dir}/java/org/apache/river/container/config" includes="*.java" />
         </xjc>
     </target>
     

Modified: river/jtsk/skunk/surrogate/docs/Todo.txt
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/docs/Todo.txt?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/docs/Todo.txt (original)
+++ river/jtsk/skunk/surrogate/docs/Todo.txt Thu May 24 02:12:56 2012
@@ -1,4 +1,4 @@
 
-TODO 20120329 ClassServer comes up with address 0.0.0.0:8080 instead of hostname or IP.
-TODO 20120329 Add security manager setup.
+DONE 20120518 20120329 ClassServer comes up with address 0.0.0.0:8080 instead of hostname or IP.
+DONE 20120518 20120329 Add security manager setup.
 TODO 20120329 Add remote deployment capability (will require privileged application infrastructure).

Modified: river/jtsk/skunk/surrogate/src/org/apache/river/container/MessageNames.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/src/org/apache/river/container/MessageNames.java?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/src/org/apache/river/container/MessageNames.java (original)
+++ river/jtsk/skunk/surrogate/src/org/apache/river/container/MessageNames.java Thu May 24 02:12:56 2012
@@ -41,6 +41,7 @@ public class MessageNames {
     public static final String BUNDLE_NAME="org.apache.river.container.Messages";
 
     public static final String
+            ADDED_PLATFORM_CODEBASE_JAR="addedPlatformCodebaseJar",
             ADDING_CLASSPATH_ENTRY="addingClasspathEntry",
             ANNOTATED_OBJECT_DEPLOYER_HAS_UNRESOLVED_DEPENDENCIES="annotatedObjectDeployerHasUnresolvedDependencies",
             BAD_CLASSPATH_EXPR="badClasspathExpression",
@@ -85,6 +86,7 @@ public class MessageNames {
             INIT_METHOD_NOT_VOID="initMethodIsntVoid",
             INJECT="inject",
             MISSING_PROPERTY_ENTRY="missingPropertyEntry",
+            MISSING_SPECIAL_VALUE="missingSpecialValue",
             NO_DEPLOYMENT_DIRECTORY="noDeploymentDirectory",
             PARENT_CLASS_LOADER_IS="parentClassLoaderIs",
             POLICY_DECLINED="policyDeclined",

Modified: river/jtsk/skunk/surrogate/src/org/apache/river/container/Messages.properties
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/src/org/apache/river/container/Messages.properties?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/src/org/apache/river/container/Messages.properties (original)
+++ river/jtsk/skunk/surrogate/src/org/apache/river/container/Messages.properties Thu May 24 02:12:56 2012
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+addedPlatformCodebaseJar=Added platform codebase jar ''{0}''.
 addingClasspathEntry=Adding classpath entry ''{0}''.
 annotatedObjectDeployerHasUnresolvedDependencies=Initialization failed because \
 one or more dependencies flagged with @Injected or @Name annotations \
@@ -66,6 +67,10 @@ initMethodIsntVoid=A method flagged as @
 Method ''{1}'' on class ''{0}'' returns ''{2}''.
 inject=Injecting {2} into member ''{1}'' of deployed object {0}.
 missingPropertyEntry="Properties file ''{0}'' is missing entry for ''{1}''.
+missingSpecialValue=Deployer configuration file ''{0}'' calls for a special entry called\n\
+''{1}'' to be created with value expression ''{2}'', but the value resolves to null.\n\
+This is unlikely to be the desired behavior, so check to see if you''re missing\n\
+value ''{2}'' in other configurations or command line parameters.
 noDeploymentDirectory=No deployment directory called {0} found in {1}; \
 skipping deployment.
 parentClassLoaderIs=Parent class loader is {0}.

Modified: river/jtsk/skunk/surrogate/src/org/apache/river/container/Strings.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/src/org/apache/river/container/Strings.java?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/src/org/apache/river/container/Strings.java (original)
+++ river/jtsk/skunk/surrogate/src/org/apache/river/container/Strings.java Thu May 24 02:12:56 2012
@@ -37,6 +37,7 @@ public class Strings {
             DEFAULT = "default",
             DEFAULT_DEPLOY_DIRECTORY="deploy",
             DEFAULT_DISCOVERY_CONTEXT = "defaultDiscoveryContext",
+            DOLLAR="$",
             DOT=".",
             DOT_CLASS=".class",
             DOT_JAR=".jar",
@@ -56,6 +57,7 @@ public class Strings {
             PROFILE = "profile",
             PROFILE_DIR="profileDirectory",
             PUT = "put",
+            PUT_SPECIAL_ENTRY="putSpecialEntry",
             READ="read",
             SECURITY_POLICY="securityPolicy",
             SPACE=" ",

Modified: river/jtsk/skunk/surrogate/src/org/apache/river/container/deployer/StarterServiceDeployer.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/src/org/apache/river/container/deployer/StarterServiceDeployer.java?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/src/org/apache/river/container/deployer/StarterServiceDeployer.java (original)
+++ river/jtsk/skunk/surrogate/src/org/apache/river/container/deployer/StarterServiceDeployer.java Thu May 24 02:12:56 2012
@@ -74,23 +74,18 @@ public class StarterServiceDeployer {
             Logger.getLogger(StarterServiceDeployer.class.getName(), MessageNames.BUNDLE_NAME);
     @Injected(style = InjectionStyle.BY_TYPE)
     private FileUtility fileUtility = null;
-    
-    @Injected(style=InjectionStyle.BY_TYPE)
+    @Injected(style = InjectionStyle.BY_TYPE)
     private Context context;
-    
     @Name
     private String myName = null;
     @Injected(style = InjectionStyle.BY_TYPE)
     private CodebaseHandler codebaseHandler = null;
-    
     private String deployDirectory = Strings.DEFAULT_DEPLOY_DIRECTORY;
-    
     private String config = Strings.STARTER_SERVICE_DEPLOYER_CONFIG;
-    private ASTconfig configNode=null;
-    
-    private List<ApplicationEnvironment> applicationEnvironments=
+    private ASTconfig configNode = null;
+    private List<ApplicationEnvironment> applicationEnvironments =
             new ArrayList<ApplicationEnvironment>();
-    
+
     public String getDeployDirectory() {
         return deployDirectory;
     }
@@ -106,7 +101,6 @@ public class StarterServiceDeployer {
     public void setConfig(String config) {
         this.config = config;
     }
-    
     private FileObject deploymentDirectoryFile = null;
     @Injected(style = InjectionStyle.BY_TYPE)
     private PropertiesFileReader propertiesFileReader = null;
@@ -116,18 +110,21 @@ public class StarterServiceDeployer {
     private WorkManager workManager = null;
     @Injected(style = InjectionStyle.BY_TYPE)
     private DynamicPolicyProvider securityPolicy = null;
-    
+
     public void addPlatformCodebaseJars(CodebaseContext codebaseContext) throws IOException {
+        ASTcodebase codebaseNode = (ASTcodebase) configNode.search(new Class[]{
+                    ASTconfig.class, ASTclassloader.class, ASTcodebase.class
+                }).get(0);
         /*
          Register the platform codebase jars with the codebase service.
-         
-        String platformCodebaseSpec = configProperties.getProperty(Strings.PLATFORM_CODEBASE);
-        String[] codebaseJars = Utils.splitOnWhitespace(platformCodebaseSpec);
-        for (String codebaseJar : codebaseJars) {
-            FileObject fo = fileUtility.getLibDirectory().resolveFile(codebaseJar);
+         */
+        for (int i = 0; i < codebaseNode.jjtGetNumChildren(); i++) {
+            String jarFile = codebaseNode.jjtGetChild(i).toString();
+            FileObject fo = fileUtility.getLibDirectory().resolveFile(jarFile);
             codebaseContext.addFile(fo);
+            log.log(Level.FINE, MessageNames.ADDED_PLATFORM_CODEBASE_JAR,
+                    jarFile);
         }
-        */
     }
 
     public String[] constructArgs(String argLine) {
@@ -145,20 +142,19 @@ public class StarterServiceDeployer {
         String parentLoaderName = configNode.search(
                 new Class[]{ASTconfig.class, ASTclassloader.class, ASTparent.class}).get(0).jjtGetChild(0).toString();
         log.log(Level.FINE, MessageNames.SERVICE_PARENT_CLASSLOADER_IS, parentLoaderName);
-        ClassLoader parentLoader= (ClassLoader) context.get(parentLoaderName);
+        ClassLoader parentLoader = (ClassLoader) context.get(parentLoaderName);
         VirtualFileSystemClassLoader cl =
                 createChildOfGivenClassloader(parentLoader, codeSource);
         /*
          Include platform jars from the container's lib directory.
-        */
-        ASTclasspath platformJarSpec = (ASTclasspath)
-                configNode.search(new Class[]{ASTconfig.class, 
+         */
+        ASTclasspath platformJarSpec = (ASTclasspath) configNode.search(new Class[]{ASTconfig.class,
                     ASTclassloader.class, ASTjars.class, ASTclasspath.class}).get(0);
         addPlatformJarsToClassloader(platformJarSpec, cl);
         addLibDirectoryJarsToClasspath(serviceRoot, cl);
-        
+
         return cl;
-        
+
     }
 
     protected void addLibDirectoryJarsToClasspath(FileObject serviceRoot, VirtualFileSystemClassLoader cl) throws FileSystemException {
@@ -175,9 +171,9 @@ public class StarterServiceDeployer {
 
     protected void addPlatformJarsToClassloader(ASTclasspath platformJarSpec, VirtualFileSystemClassLoader cl) throws IOException, LocalizedRuntimeException {
         log.log(Level.FINE, MessageNames.ADDING_CLASSPATH_ENTRY, new Object[]{platformJarSpec.toString()});
-        List<ClasspathFilter> filters=ClasspathFilterBuilder.filtersFromClasspathExpression(platformJarSpec);
-        
-        cl.addClasspathFilters(filters,fileUtility.getLibDirectory());
+        List<ClasspathFilter> filters = ClasspathFilterBuilder.filtersFromClasspathExpression(platformJarSpec);
+
+        cl.addClasspathFilters(filters, fileUtility.getLibDirectory());
     }
 
     protected VirtualFileSystemClassLoader createChildOfGivenClassloader(ClassLoader parent, CodeSource codeSource) {
@@ -263,15 +259,32 @@ public class StarterServiceDeployer {
                 workingDir = new File(serviceRoot.getURL().toURI());
 
             }
-            grantPermissions(cl, 
-                    new Permission[] {new FilePermission(workingDir.getAbsolutePath(), Strings.READ)});
-            // Just to see if this is a security problem...
-            //grantPermissions(cl, new Permission[] { new AllPermission() });
+            grantPermissions(cl,
+                    new Permission[]{new FilePermission(workingDir.getAbsolutePath(), Strings.READ)});
             Utils.logClassLoaderHierarchy(log, Level.FINE, this.getClass());
             String configName = VirtualFileSystemConfiguration.class.getName();
             invokeStatic(cl, configName,
                     Strings.SET_WORKING_DIRECTORY,
                     workingDir);
+            /*
+             Setup the "special" variables in the configuration.
+             */
+            ASTconfiguration configurationNode = (ASTconfiguration) configNode.search(new Class[]{ASTconfig.class, ASTconfiguration.class}).get(0);
+            for (int i = 0; i < configurationNode.jjtGetNumChildren(); i++) {
+                ASTconfigEntry cfgEntryNode = (ASTconfigEntry) configurationNode.jjtGetChild(i);
+                String varName = cfgEntryNode.jjtGetChild(0).toString();
+                String contextVarName = cfgEntryNode.jjtGetChild(1).toString();
+                Object contextValue = context.get(contextVarName);
+                if (contextValue != null) {
+                    invokeStatic(cl, configName, 
+                            Strings.PUT_SPECIAL_ENTRY, 
+                            new Class[] {String.class, Object.class}, 
+                            Strings.DOLLAR + varName, contextValue);
+                } else {
+                    log.log(Level.WARNING, MessageNames.MISSING_SPECIAL_VALUE, 
+                            new Object[] {getConfig(), varName, contextVarName});
+                } 
+            }
         } catch (Exception ex) {
             log.log(Level.WARNING, MessageNames.EXCEPTION_THROWN, ex);
             throw new ConfigurationException(ex,
@@ -290,11 +303,13 @@ public class StarterServiceDeployer {
             log.log(Level.WARNING, MessageNames.NO_DEPLOYMENT_DIRECTORY,
                     new Object[]{deployDirectory, fileUtility.getProfileDirectory()});
         }
-        /* Read and parse the configuration file. */
-        
-        FileObject configFile=fileUtility.getProfileDirectory().resolveFile(config);
-        InputStream in=configFile.getContent().getInputStream();
-        configNode=DeployerConfigParser.parseConfig(in);
+        /*
+         Read and parse the configuration file.
+         */
+
+        FileObject configFile = fileUtility.getProfileDirectory().resolveFile(config);
+        InputStream in = configFile.getContent().getInputStream();
+        configNode = DeployerConfigParser.parseConfig(in);
 
         /*
          Go through the deployment directory looking for services to deploy.
@@ -333,7 +348,7 @@ public class StarterServiceDeployer {
 
     private void deployServiceArchive(FileObject serviceArchive) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {
         // Create an application environment
-        ApplicationEnvironment env=new ApplicationEnvironment();
+        ApplicationEnvironment env = new ApplicationEnvironment();
         env.setServiceArchive(serviceArchive);
         env.setServiceRoot(
                 serviceArchive.getFileSystem().getFileSystemManager().createFileSystem(Strings.JAR, serviceArchive));
@@ -382,7 +397,7 @@ public class StarterServiceDeployer {
          Grant the appropriate permissions to the service's classloader and
          protection domain.
          */
-        Permission[] perms=createPermissionsInClassloader(cl);
+        Permission[] perms = createPermissionsInClassloader(cl);
         grantPermissions(cl, perms);
         setupLiaisonConfiguration(env.getServiceArchive(), env.getServiceRoot(), cl);
         Properties startProps = readStartProperties(env.getServiceRoot());
@@ -394,23 +409,23 @@ public class StarterServiceDeployer {
     }
 
     Permission[] createPermissionsInClassloader(ClassLoader cl) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {
-        List<Permission> perms=new ArrayList<Permission>();
+        List<Permission> perms = new ArrayList<Permission>();
         // Get all the permission nodes from the config.
-        Class[] path=new Class[]{ ASTconfig.class, ASTgrant.class, ASTpermission.class};
-        List<ASTNode> permNodes=configNode.search(path);
+        Class[] path = new Class[]{ASTconfig.class, ASTgrant.class, ASTpermission.class};
+        List<ASTNode> permNodes = configNode.search(path);
         // Create a permission for each
-        for(ASTNode node: permNodes) {
-            String className=(String)((ASTsymbol) node.jjtGetChild(0)).getValue();
-            Object permissionConstructorArgs[]=new String[node.jjtGetNumChildren()-1];
+        for (ASTNode node : permNodes) {
+            String className = (String) ((ASTsymbol) node.jjtGetChild(0)).getValue();
+            Object permissionConstructorArgs[] = new String[node.jjtGetNumChildren() - 1];
             for (int i = 0; i < permissionConstructorArgs.length; i++) {
-                permissionConstructorArgs[i]=(String)((ASTliteral) node.jjtGetChild(i+1)).getValue();     
+                permissionConstructorArgs[i] = (String) ((ASTliteral) node.jjtGetChild(i + 1)).getValue();
             }
-            Permission perm=(Permission) invokeConstructor(cl, className, permissionConstructorArgs);
+            Permission perm = (Permission) invokeConstructor(cl, className, permissionConstructorArgs);
             perms.add(perm);
         }
         return perms.toArray(new Permission[0]);
     }
-    
+
     private Object invokeStatic(ClassLoader cl, String className, String methodName,
             Object... parms) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
         Class clazz = Class.forName(className, true, cl);
@@ -422,7 +437,14 @@ public class StarterServiceDeployer {
         return method.invoke(null, parms);
     }
 
-    private Object invokeConstructor(ClassLoader cl, String className, 
+    private Object invokeStatic(ClassLoader cl, String className, String methodName, Class[] argTypes,
+            Object... parms) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+        Class clazz = Class.forName(className, true, cl);
+        Method method = clazz.getMethod(methodName, argTypes);
+        return method.invoke(null, parms);
+    }
+
+    private Object invokeConstructor(ClassLoader cl, String className,
             Object... parms) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException {
         Class clazz = Class.forName(className, true, cl);
         Class[] parameterTypes = new Class[parms.length];
@@ -466,5 +488,4 @@ public class StarterServiceDeployer {
     private void establishLiveDeploymentMonitoring() {
         // TODO: Write this
     }
-
 }

Modified: river/jtsk/skunk/surrogate/test/org/apache/river/container/deployer/DeployerConfigParserTest.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/test/org/apache/river/container/deployer/DeployerConfigParserTest.java?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/test/org/apache/river/container/deployer/DeployerConfigParserTest.java (original)
+++ river/jtsk/skunk/surrogate/test/org/apache/river/container/deployer/DeployerConfigParserTest.java Thu May 24 02:12:56 2012
@@ -28,8 +28,8 @@ import org.junit.Test;
 import static org.junit.Assert.*;
 
 /**
- *
- * @author trasukg
+
+ @author trasukg
  */
 public class DeployerConfigParserTest {
 
@@ -56,8 +56,8 @@ public class DeployerConfigParserTest {
 
     @Test
     /**
-    Ensure that the parsing basically happens; we can create the stream and
-    run it through the parser without errors.
+     Ensure that the parsing basically happens; we can create the stream and run
+     it through the parser without errors.
      */
     public void testBasicParsing() throws ParseException {
         ASTconfig config = parseTestConfig();
@@ -86,8 +86,9 @@ public class DeployerConfigParserTest {
     }
 
     /**
-    Matching the ASTConfig should return the root node.
-    @throws Exception 
+     Matching the ASTConfig should return the root node.
+
+     @throws Exception
      */
     @Test
     public void testPathMatch() throws Exception {
@@ -98,8 +99,9 @@ public class DeployerConfigParserTest {
     }
 
     /**
-    Matching the ASTConfig should return the root node.
-    @throws Exception 
+     Matching the ASTConfig should return the root node.
+
+     @throws Exception
      */
     @Test
     public void testlongerPathMatch() throws Exception {
@@ -112,7 +114,7 @@ public class DeployerConfigParserTest {
     }
 
     /**
-    Checking format and contents of the permission grants.
+     Checking format and contents of the permission grants.
      */
     @Test
     public void testPermissionContents() throws Exception {
@@ -137,4 +139,13 @@ public class DeployerConfigParserTest {
 
 
     }
+
+    @Test
+    public void testCodebaseNode() throws Exception {
+        ASTNode configNode = parseTestConfig();
+        ASTcodebase codebaseNode = (ASTcodebase) configNode.search(new Class[]{
+                    ASTconfig.class, ASTclassloader.class, ASTcodebase.class
+                }).get(0);
+        assertEquals("codebase callout", "jsk-dl.jar", codebaseNode.jjtGetChild(0).toString());
+    }
 }
\ No newline at end of file

Modified: river/jtsk/skunk/surrogate/testfiles/reggie.config
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/testfiles/reggie.config?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/testfiles/reggie.config (original)
+++ river/jtsk/skunk/surrogate/testfiles/reggie.config Thu May 24 02:12:56 2012
@@ -4,8 +4,8 @@ import net.jini.jeri.tcp.TcpServerEndpoi
 
 com.sun.jini.reggie {
 	
-    initialLookupGroups = new String[] {"HOSTED-TEST"};
-    initialMemberGroups = new String[] {"HOSTED-TEST"};
+    initialLookupGroups = new String[] {$discoveryGroup};
+    initialMemberGroups = new String[] {$discoveryGroup};
 
     serverExporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
                                      new BasicILFactory());

Modified: river/jtsk/skunk/surrogate/testfiles/testroot/profile/default/config.xml
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/testfiles/testroot/profile/default/config.xml?rev=1342119&r1=1342118&r2=1342119&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/testfiles/testroot/profile/default/config.xml (original)
+++ river/jtsk/skunk/surrogate/testfiles/testroot/profile/default/config.xml Thu May 24 02:12:56 2012
@@ -32,9 +32,7 @@
    xsi:schemaLocation='http://river.apache.org/xml/ns/container/config/1.0 file:/home/trasukg/development/surrogate/src/schemas/config.xsd'>
     <cfg:property name="deploymentDirectory" value="deploy"/>
 
-    <cfg:discovery-context name="default">
-        <cfg:group>TEST</cfg:group>
-    </cfg:discovery-context>
+    <cfg:property name="defaultDiscoveryGroup" value="RiverContainerDefault"/>
     <cfg:component class="org.apache.river.container.work.BasicWorkManager"/>
     <cfg:component class="org.apache.river.container.codebase.ClassServer"/>