myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r905378 - in /myfaces/extensions/scripting/trunk: core/core/src/main/java/org/apache/myfaces/scripting/api/ core/core/src/main/java/org/apache/myfaces/scripting/core/ core/core/src/main/java/org/apache/myfaces/scripting/core/util/ core/core...
Date Mon, 01 Feb 2010 19:27:19 GMT
Author: werpu
Date: Mon Feb  1 19:27:18 2010
New Revision: 905378

URL: http://svn.apache.org/viewvc?rev=905378&view=rev
Log:
https://issues.apache.org/jira/browse/EXTSCRIPT-58

done we have a somewhat dirty solution but it works for now...

Added:
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestBean4.java
  (with props)
Modified:
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/CoreWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/DummyWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/RefreshPhaseListener.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaScriptingWeaver.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/RefreshContext.java
    myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java
    myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/GenericAnnotationScanner.java
    myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ClassScanner.java
Mon Feb  1 19:27:18 2010
@@ -25,4 +25,6 @@
 
     public void scanClass(Class clazz);
 
+
+    public void scanAndMarkChange();
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/api/ScriptingWeaver.java
Mon Feb  1 19:27:18 2010
@@ -127,4 +127,8 @@
      */
     public Collection<String> loadPossibleDynamicClasses();
 
+    /**
+     * scan for taint check
+     */
+    public void scanForAddedClasses();
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/CoreWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/CoreWeaver.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/CoreWeaver.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/CoreWeaver.java
Mon Feb  1 19:27:18 2010
@@ -121,6 +121,7 @@
     }
 
     public void requestRefresh() {
+
         for (ScriptingWeaver weaver : _weavers) {
             weaver.requestRefresh();
         }
@@ -133,4 +134,10 @@
         }
         return retVal;
     }
+
+    public void scanForAddedClasses() {
+        for (ScriptingWeaver weaver : _weavers) {
+            weaver.scanForAddedClasses();
+        }
+    }
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/DummyWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/DummyWeaver.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/DummyWeaver.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/DummyWeaver.java
Mon Feb  1 19:27:18 2010
@@ -79,4 +79,8 @@
         return null;
     }
 
+    public void scanForAddedClasses() {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/core/util/WeavingContext.java
Mon Feb  1 19:27:18 2010
@@ -23,6 +23,7 @@
 import org.apache.myfaces.extensions.scripting.compiler.CompilationResult;
 import org.apache.myfaces.scripting.api.Configuration;
 import org.apache.myfaces.scripting.api.Decorated;
+import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.api.ScriptingWeaver;
 import org.apache.myfaces.scripting.core.DummyWeaver;
 import org.apache.myfaces.scripting.core.MethodLevelReloadingHandler;
@@ -31,6 +32,7 @@
 
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
+import javax.servlet.ServletContext;
 import java.lang.ref.SoftReference;
 import java.lang.ref.WeakReference;
 import java.lang.reflect.InvocationHandler;
@@ -89,6 +91,14 @@
 
     }
 
+    public static void initThread(ServletContext context) {
+        WeavingContext.setWeaver(context.getAttribute("ScriptingWeaver"));
+        WeavingContext.setRefreshContext((RefreshContext) context.getAttribute("RefreshContext"));
+        WeavingContext.setConfiguration((Configuration) context.getAttribute(ScriptingConst.CTX_CONFIGURATION));
+        //WeavingContext.getRefreshContext().setCurrentlyRunningRequests(getRequestCnt());
+        WeavingContext.setExternalContext(context);
+    } 
+
     public static CompilationResult getCompilationResult(Integer scriptingEngine) {
         return _compilationResults.get(scriptingEngine);
     }
@@ -266,4 +276,6 @@
         _referenceThreadHolder = null;
     }
 
+
+
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/RefreshPhaseListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/RefreshPhaseListener.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/RefreshPhaseListener.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/jsf/RefreshPhaseListener.java
Mon Feb  1 19:27:18 2010
@@ -51,6 +51,7 @@
         if (requestMap.containsKey(EQ_KEY)) return;
         requestMap.put(EQ_KEY, Boolean.TRUE);
 
+
         WeavingContext.doRequestRefreshes();
 
 

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/groovy/GroovyScriptingWeaver.java
Mon Feb  1 19:27:18 2010
@@ -67,4 +67,11 @@
         return new GroovyCompilerFacade();
     }
 
+    /**
+     * checks outside of the request scope for changes and taints the corresponding engine
+     */
+    public void scanForAddedClasses() {
+        _dependencyScanner.scanAndMarkChange();
+    }
+
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScanner.java
Mon Feb  1 19:27:18 2010
@@ -27,6 +27,7 @@
 import org.apache.myfaces.scripting.core.dependencyScan.DefaultDependencyScanner;
 import org.apache.myfaces.scripting.core.dependencyScan.DependencyScanner;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
+import org.apache.myfaces.scripting.refresh.ReloadingMetadata;
 
 import java.util.*;
 
@@ -114,4 +115,22 @@
     public synchronized void scanClass(Class clazz) {
         //not needed anymore since we only rely on full scans and full recompile now
     }
+
+    public void scanAndMarkChange() {
+
+        final Set<String> possibleDynamicClasses = new HashSet<String>(_weaver.loadPossibleDynamicClasses());
+        Map <Integer, Boolean> recompileMap = WeavingContext.getRefreshContext().getDaemon().getSystemRecompileMap();
+        Map <String, ReloadingMetadata> classMap = WeavingContext.getRefreshContext().getDaemon().getClassMap();
+        Boolean alreadyTainted = recompileMap.get(getEngineType());
+        if(alreadyTainted != null && alreadyTainted) {
+            return;
+        }
+
+        for(String clazz: possibleDynamicClasses) {
+            if(!classMap.containsKey(clazz)) {
+                recompileMap.put(getEngineType(), Boolean.TRUE);
+            }
+        }
+    }
+
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaDependencyScannerMT.java
Mon Feb  1 19:27:18 2010
@@ -10,6 +10,7 @@
 import org.apache.myfaces.scripting.core.dependencyScan.DependencyScanner;
 import org.apache.myfaces.scripting.core.util.WeavingContext;
 import org.apache.myfaces.scripting.loaders.java.util.ExtendedLoopCnt;
+import org.apache.myfaces.scripting.refresh.ReloadingMetadata;
 
 import java.util.*;
 import java.util.concurrent.Semaphore;
@@ -157,5 +158,24 @@
         //not needed anymore since we only rely on full scans and full recompile now
     }
 
+      public void scanAndMarkChange() {
 
+        final Set<String> possibleDynamicClasses = new HashSet<String>(_weaver.loadPossibleDynamicClasses());
+        Map <Integer, Boolean> recompileMap = WeavingContext.getRefreshContext().getDaemon().getSystemRecompileMap();
+        Map <String, ReloadingMetadata> classMap = WeavingContext.getRefreshContext().getDaemon().getClassMap();
+        Boolean alreadyTainted = recompileMap.get(getEngineType());
+        if(alreadyTainted != null && alreadyTainted) {
+            return;
+        }
+
+        for(String clazz: possibleDynamicClasses) {
+            if(!classMap.containsKey(clazz)) {
+                recompileMap.put(getEngineType(), Boolean.TRUE);
+            }
+        }
+    }
+
+    public int getEngineType() {
+        return ScriptingConst.ENGINE_TYPE_JAVA;
+    }
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaScriptingWeaver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaScriptingWeaver.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaScriptingWeaver.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/loaders/java/JavaScriptingWeaver.java
Mon Feb  1 19:27:18 2010
@@ -105,7 +105,12 @@
         return identifier.isDynamic(clazz);  //To change body of implemented methods use
File | Settings | File Templates.
     }
 
-
+    /**
+     * checks outside of the request scope for changes and taints the corresponding engine
+     */
+    public void scanForAddedClasses() {
+        _dependencyScanner.scanAndMarkChange();
+    }
    
 
     protected DynamicCompiler instantiateCompiler() {

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/FileChangedDaemon.java
Mon Feb  1 19:27:18 2010
@@ -23,12 +23,14 @@
 import org.apache.myfaces.scripting.api.ScriptingConst;
 import org.apache.myfaces.scripting.api.ScriptingWeaver;
 import org.apache.myfaces.scripting.core.dependencyScan.ClassDependencies;
+import org.apache.myfaces.scripting.core.util.WeavingContext;
 
+import javax.servlet.ServletContext;
 import java.io.File;
+import java.lang.ref.WeakReference;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 
-
 /**
  * @author werpu
  *         Reimplementation of the file changed daemon thread
@@ -46,7 +48,6 @@
     Map<String, ReloadingMetadata> classMap = new ConcurrentHashMap<String, ReloadingMetadata>(8,
0.75f, 1);
     ClassDependencies dependencyMap = new ClassDependencies();
 
-
     /**
      * this map is a shortcut for the various scripting engines
      * it keeps track whether the engines source paths
@@ -59,11 +60,17 @@
      */
     Map<Integer, Boolean> systemRecompileMap = new ConcurrentHashMap<Integer, Boolean>(8,
0.75f, 1);
 
-
     boolean running = false;
+    boolean contextInitialized = false;
     Log log = LogFactory.getLog(FileChangedDaemon.class);
     ScriptingWeaver _weavers = null;
+    WeakReference externalContext;
 
+  
+    public void initWeavingContext(Object externalContext) {
+        if (this.externalContext != null) return;
+        this.externalContext = new WeakReference(externalContext);
+    }
 
     public static synchronized FileChangedDaemon getInstance() {
         if (instance == null) {
@@ -77,9 +84,12 @@
         return instance;
     }
 
-
     public void run() {
         while (running) {
+            if (externalContext != null && !contextInitialized) {
+                WeavingContext.initThread((ServletContext) externalContext.get());
+                contextInitialized = true;
+            }
             try {
                 try {
                     Thread.sleep(ScriptingConst.TAINT_INTERVAL);
@@ -87,6 +97,7 @@
                     //if the server shuts down while we are in sleep we get an error
                     //which we better should swallow
                 }
+
                 if (classMap == null || classMap.size() == 0)
                     continue;
 
@@ -107,21 +118,25 @@
      * as marks the engine as having to do a full recompile
      */
     private final void checkForChanges() {
+
+        WeavingContext.getWeaver().scanForAddedClasses();
+
+        //TODO move this code also into the weaver so that
+        //we have it centralized
         for (Map.Entry<String, ReloadingMetadata> it : this.classMap.entrySet()) {
             //if (!it.getValue().isTainted()) {
 
-                File proxyFile = new File(it.getValue().getSourcePath() + File.separator
+ it.getValue().getFileName());
-                if (/*!it.getValue().isTainted() &&*/ isModified(it, proxyFile))
{
+            File proxyFile = new File(it.getValue().getSourcePath() + File.separator + it.getValue().getFileName());
+            if (/*!it.getValue().isTainted() &&*/ isModified(it, proxyFile)) {
 
-
-                    systemRecompileMap.put(it.getValue().getScriptingEngine(), Boolean.TRUE);
-                    ReloadingMetadata meta = it.getValue();
-                    meta.setTainted(true);
-                    meta.setTaintedOnce(true);
-                    printInfo(it, proxyFile);
-                    meta.setTimestamp(proxyFile.lastModified());
-                    dependencyTainted(meta.getAClass().getName());
-                }
+                systemRecompileMap.put(it.getValue().getScriptingEngine(), Boolean.TRUE);
+                ReloadingMetadata meta = it.getValue();
+                meta.setTainted(true);
+                meta.setTaintedOnce(true);
+                printInfo(it, proxyFile);
+                meta.setTimestamp(proxyFile.lastModified());
+                dependencyTainted(meta.getAClass().getName());
+            }
             //}
         }
     }
@@ -150,7 +165,6 @@
         }
     }
 
-
     private final boolean isModified(Map.Entry<String, ReloadingMetadata> it, File
proxyFile) {
         return proxyFile.lastModified() != it.getValue().getTimestamp();
     }
@@ -176,7 +190,6 @@
         this.running = running;
     }
 
-
     public Map<Integer, Boolean> getSystemRecompileMap() {
         return systemRecompileMap;
     }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/RefreshContext.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/RefreshContext.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/RefreshContext.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/refresh/RefreshContext.java
Mon Feb  1 19:27:18 2010
@@ -56,7 +56,6 @@
      */
     volatile FileChangedDaemon daemon = FileChangedDaemon.getInstance();
 
-
     /**
      * the bean synchronisation has to be dealt with
      * differently, we have two volatile points in the lifecycle
@@ -103,21 +102,21 @@
 
     public boolean isDependencyScanned(int scriptingEngine) {
         FacesContext ctx = FacesContext.getCurrentInstance();
-        if(ctx == null) {
+        if (ctx == null) {
             return false;
         }
         Map<String, Object> requestMap = (Map<String, Object>) ctx.getExternalContext().getRequestMap();
-        Boolean retVal = (Boolean) requestMap.get("isDependencyScanned_"+scriptingEngine);
-        return (retVal == null)? false: retVal;
+        Boolean retVal = (Boolean) requestMap.get("isDependencyScanned_" + scriptingEngine);
+        return (retVal == null) ? false : retVal;
     }
 
     public void setDependencyScanned(int scriptingEngine, Boolean val) {
         FacesContext ctx = FacesContext.getCurrentInstance();
-         if(ctx == null) {
-             return;
-         }
-         Map<String, Object> requestMap = (Map<String, Object>) ctx.getExternalContext().getRequestMap();
-         requestMap.put("isDependencyScanned_"+scriptingEngine, val);
+        if (ctx == null) {
+            return;
+        }
+        Map<String, Object> requestMap = (Map<String, Object>) ctx.getExternalContext().getRequestMap();
+        requestMap.put("isDependencyScanned_" + scriptingEngine, val);
     }
 
     public FileChangedDaemon getDaemon() {
@@ -155,7 +154,6 @@
         return getCurrentlyRunningRequests().equals(1);
     }
 
-
     /**
      * getter for our request counter
      * we need this variable to keep a lock
@@ -176,4 +174,11 @@
         currentlyRunningRequests = currentlyRunning;
     }
 
+    /**
+     * checks outside of the request scope for changes and taints the corresponding engine
+     */
+    public static void scanAndMarkChange() {
+        WeavingContext.getWeaver();
+    }
+
 }

Modified: myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java
(original)
+++ myfaces/extensions/scripting/trunk/core/core/src/main/java/org/apache/myfaces/scripting/servlet/ScriptingServletFilter.java
Mon Feb  1 19:27:18 2010
@@ -44,12 +44,9 @@
 
     public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
FilterChain filterChain) throws IOException, ServletException {
         markRequestStart();
-
-        WeavingContext.setWeaver(context.getAttribute("ScriptingWeaver"));
-        WeavingContext.setRefreshContext((RefreshContext) context.getAttribute("RefreshContext"));
-        WeavingContext.setConfiguration((Configuration) context.getAttribute(ScriptingConst.CTX_CONFIGURATION));
+        WeavingContext.initThread(context);
         WeavingContext.getRefreshContext().setCurrentlyRunningRequests(getRequestCnt());
-        WeavingContext.setExternalContext(context);
+        WeavingContext.getFileChangedDaemon().initWeavingContext(context);
 
         try {
             filterChain.doFilter(servletRequest, servletResponse);
@@ -58,6 +55,7 @@
         }
     }
 
+
     public void destroy() {
 
         WeavingContext.clean();

Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/GenericAnnotationScanner.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/GenericAnnotationScanner.java?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/GenericAnnotationScanner.java
(original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/GenericAnnotationScanner.java
Mon Feb  1 19:27:18 2010
@@ -220,4 +220,8 @@
         _listeners.add(listener);
     }
 
+    @Override
+    public void scanAndMarkChange() {
+        //do nothing here
+    }
 }

Added: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestBean4.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestBean4.java?rev=905378&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestBean4.java
(added)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestBean4.java
Mon Feb  1 19:27:18 2010
@@ -0,0 +1,20 @@
+package org.apache.myfaces.javaloader.test;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+
+@ManagedBean(name = "javatestbean4")
+@SessionScoped
+
+public class TestBean4 {
+    private String hello = "hello world form bean 4";
+
+    public String getHello() {
+        return hello;
+    }
+
+    public void setHello(String hello) {
+        this.hello = hello;
+    }
+}

Propchange: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestBean4.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/WEB-INF/java/org/apache/myfaces/javaloader/test/TestBean4.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml?rev=905378&r1=905377&r2=905378&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
(original)
+++ myfaces/extensions/scripting/trunk/examples/myfaces20-example/src/main/webapp/helloWorld.xhtml
Mon Feb  1 19:27:18 2010
@@ -19,6 +19,7 @@
                     <h:panelGroup styleClass="stdBox">
                         <h3>Validator Test 1</h3>
                         <h:outputText id="output1" value="Please enter your name"/>
+                        <h:outputText value="aaa#{javatestbean4.hello}" />
                         <h:inputText id="input1" value="#{helloWorld.name}" required="true">
                             <grv:groovyvalidator/>
                         </h:inputText>



Mime
View raw message