geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r726062 - /geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
Date Fri, 12 Dec 2008 16:01:40 GMT
Author: jdillon
Date: Fri Dec 12 08:01:40 2008
New Revision: 726062

URL: http://svn.apache.org/viewvc?rev=726062&view=rev
Log:
Each shell gets its own variables using its apps vars as its parent

Modified:
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java?rev=726062&r1=726061&r2=726062&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
Fri Dec 12 08:01:40 2008
@@ -100,24 +100,18 @@
 
         assert application != null;
 
-        // Dereference some bits from the applciation context
-        final IO io = application.getIo();
-
-        //
-        // TODO: Each shell should really have its own variables, using the apps vars as
its parents
-        //       but before we do that we need to implement a general ShellContextHolder
to allow
-        //       detached components access in the threads context.
-        //
-        final Variables vars = application.getVariables();
-
-        context = new ShellContext() {
+        // Each shell gets its own variables, using application variables for defaults
+        final Variables vars = new Variables(application.getVariables());
 
+        context = new ShellContext()
+        {
             public Shell getShell() {
                 return ShellImpl.this;
             }
 
             public IO getIo() {
-                return io;
+                // Shells inherit the application's IO
+                return application.getIo();
             }
 
             public Variables getVariables() {



Mime
View raw message