openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r945533 - in /openwebbeans/trunk: ./ samples/guess/ samples/guess/src/main/resources/META-INF/openwebbeans/ samples/reservation/ samples/reservation/src/main/resources/META-INF/openwebbeans/ webbeans-impl/src/main/java/org/apache/webbeans/c...
Date Tue, 18 May 2010 08:14:03 GMT
Author: gerdogdu
Date: Tue May 18 08:14:02 2010
New Revision: 945533

URL: http://svn.apache.org/viewvc?rev=945533&view=rev
Log:
Update for EL 1.0 and JSF 1.2 support

Modified:
    openwebbeans/trunk/pom.xml
    openwebbeans/trunk/samples/guess/pom.xml
    openwebbeans/trunk/samples/guess/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
    openwebbeans/trunk/samples/reservation/pom.xml
    openwebbeans/trunk/samples/reservation/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/OwbElContextListener.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WrappedValueExpression.java
    openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java

Modified: openwebbeans/trunk/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/pom.xml?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/pom.xml (original)
+++ openwebbeans/trunk/pom.xml Tue May 18 08:14:02 2010
@@ -279,7 +279,7 @@
                         <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                         <Bundle-Version>${pom.version}</Bundle-Version>
                         <Export-Package>!org.apache.webbeans.internal.*,org.apache.webbeans.*;version="${pom.version}"</Export-Package>
-                        <Private-Package>org.apache.webbeans..internal.*</Private-Package>
+                        <Private-Package>org.apache.webbeans.internal.*</Private-Package>
                     </instructions>
                 </configuration>
             </plugin>
@@ -399,8 +399,10 @@
         <module>webbeans-ee</module>
         <module>webbeans-openejb</module>
         <module>webbeans-tomcat6</module>
-        <module>webbeans-jms</module>
+        <module>webbeans-jms</module>       
         <module>webbeans-jsf</module>
+        <module>webbeans-jsf12</modulue>
+	<module>webbeans-el10</module>
         <module>webbeans-resource</module>
         <module>webbeans-porting</module>
         <module>webbeans-test</module>

Modified: openwebbeans/trunk/samples/guess/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/samples/guess/pom.xml?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/samples/guess/pom.xml (original)
+++ openwebbeans/trunk/samples/guess/pom.xml Tue May 18 08:14:02 2010
@@ -61,7 +61,14 @@
 		<!-- JSF Plugin -->
 		<dependency>
 			<groupId>org.apache.openwebbeans</groupId>
-			<artifactId>openwebbeans-jsf</artifactId>
+			<artifactId>openwebbeans-jsf12</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<!-- EL Plugin -->
+		<dependency>
+			<groupId>org.apache.openwebbeans</groupId>
+			<artifactId>openwebbeans-el10</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 				

Modified: openwebbeans/trunk/samples/guess/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/samples/guess/src/main/resources/META-INF/openwebbeans/openwebbeans.properties?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/samples/guess/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
(original)
+++ openwebbeans/trunk/samples/guess/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
Tue May 18 08:14:02 2010
@@ -27,4 +27,7 @@
 #use OWB Specific XML Configuration
 org.apache.webbeans.useOwbSpecificXmlConfig=true
 
-org.apache.webbeans.application.useJSF2Extensions=false
\ No newline at end of file
+org.apache.webbeans.application.useJSF2Extensions=false
+
+org.apache.webbeans.spi.adaptor.ELAdaptor=org.apache.webbeans.el10.EL10Adaptor
+

Modified: openwebbeans/trunk/samples/reservation/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/samples/reservation/pom.xml?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/samples/reservation/pom.xml (original)
+++ openwebbeans/trunk/samples/reservation/pom.xml Tue May 18 08:14:02 2010
@@ -89,10 +89,18 @@
 		<!-- JSF Plugin -->
 		<dependency>
 			<groupId>org.apache.openwebbeans</groupId>
-			<artifactId>openwebbeans-jsf</artifactId>
+			<artifactId>openwebbeans-jsf12</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		
+		<!-- EL Plugin -->
+		<dependency>
+			<groupId>org.apache.openwebbeans</groupId>
+			<artifactId>openwebbeans-el10</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		
+		
 		<!-- Web Plugin -->
 		<dependency>
 			<groupId>org.apache.openwebbeans</groupId>

Modified: openwebbeans/trunk/samples/reservation/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/samples/reservation/src/main/resources/META-INF/openwebbeans/openwebbeans.properties?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/samples/reservation/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
(original)
+++ openwebbeans/trunk/samples/reservation/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
Tue May 18 08:14:02 2010
@@ -29,4 +29,5 @@ org.apache.webbeans.useOwbSpecificXmlCon
 
 org.apache.webbeans.application.useJSF2Extensions=false
 
-org.apache.webbeans.spi.ResourceInjectionService=org.apache.webbeans.resource.spi.se.StandaloneResourceInjectionService
\ No newline at end of file
+org.apache.webbeans.spi.ResourceInjectionService=org.apache.webbeans.resource.spi.se.StandaloneResourceInjectionService
+org.apache.webbeans.spi.adaptor.ELAdaptor=org.apache.webbeans.el10.EL10Adaptor
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
Tue May 18 08:14:02 2010
@@ -103,6 +103,9 @@ public class OpenWebBeansConfiguration
     /**Use of EJB interceptor to inject EJBs*/
     public static final String USE_EJBINTERCEPTOR_INJECTION = "org.apache.webbeans.application.useEJBInterceptorInjection";
     
+    /**EL Adaptor*/
+    public static final String EL_ADAPTOR_CLASS = "org.apache.webbeans.spi.adaptor.ELAdaptor";
+    
     /**
      * Gets singleton instance.
      * @return singleton instance
@@ -173,6 +176,10 @@ public class OpenWebBeansConfiguration
 
         value = properties.getProperty(JNDI_SERVICE);
         setPropertyFromSystemProperty(JNDI_SERVICE, value);
+        
+        value = properties.getProperty(EL_ADAPTOR_CLASS);
+        setPropertyFromSystemProperty(EL_ADAPTOR_CLASS, value);
+        
     }
      
     private void setPropertyFromSystemProperty(String key, String value)

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Tue May 18 08:14:02 2010
@@ -66,11 +66,10 @@ import org.apache.webbeans.config.WebBea
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.context.creational.CreationalContextFactory;
 import org.apache.webbeans.context.creational.CreationalContextImpl;
+import org.apache.webbeans.corespi.ServiceLoader;
 import org.apache.webbeans.decorator.DecoratorComparator;
 import org.apache.webbeans.decorator.WebBeansDecorator;
 import org.apache.webbeans.decorator.WebBeansDecoratorConfig;
-import org.apache.webbeans.el.WebBeansELResolver;
-import org.apache.webbeans.el.WrappedExpressionFactory;
 import org.apache.webbeans.event.NotificationManager;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.inject.DefinitionException;
@@ -83,6 +82,7 @@ import org.apache.webbeans.portable.Anno
 import org.apache.webbeans.portable.creation.InjectionTargetProducer;
 import org.apache.webbeans.portable.events.discovery.ErrorStack;
 import org.apache.webbeans.proxy.JavassistProxyFactory;
+import org.apache.webbeans.spi.adaptor.ELAdaptor;
 import org.apache.webbeans.spi.plugins.OpenWebBeansEjbPlugin;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
@@ -700,7 +700,8 @@ public class BeanManagerImpl implements 
     @Override
     public ELResolver getELResolver()
     {
-        return new WebBeansELResolver();
+        ELAdaptor elAdaptor = ServiceLoader.getService(ELAdaptor.class);
+        return elAdaptor.getOwbELResolver();
     }
 
     /**
@@ -1063,7 +1064,8 @@ public class BeanManagerImpl implements 
     @Override
     public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory)
     {
-        return new WrappedExpressionFactory(expressionFactory);
+        ELAdaptor elAdaptor = ServiceLoader.getService(ELAdaptor.class);
+        return elAdaptor.getOwbWrappedExpressionFactory(expressionFactory);
     }
 
     public void addAdditionalQualifier(Class<? extends Annotation> qualifier)

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java
Tue May 18 08:14:02 2010
@@ -28,6 +28,8 @@ import javax.enterprise.inject.spi.Bean;
 
 public class ELContextStore
 {
+    public static ThreadLocal<ELContextStore> LOCAL_CONTEXT = new ThreadLocal<ELContextStore>();
+
     private Map<Bean<?>, CreationalStore> dependentObjects = new HashMap<Bean<?>,
CreationalStore>();
     
     private static class CreationalStore

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/OwbElContextListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/OwbElContextListener.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/OwbElContextListener.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/OwbElContextListener.java
Tue May 18 08:14:02 2010
@@ -28,7 +28,7 @@ public class OwbElContextListener implem
     public void contextCreated(ELContextEvent event)
     {
         ELContextStore store = new ELContextStore();        
-        WebBeansELResolver.LOCAL_CONTEXT.set(store);
+        ELContextStore.LOCAL_CONTEXT.set(store);
     }
 
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WebBeansELResolver.java
Tue May 18 08:14:02 2010
@@ -47,8 +47,6 @@ import org.apache.webbeans.container.Bea
  */
 public class WebBeansELResolver extends ELResolver
 {    
-
-    public static ThreadLocal<ELContextStore> LOCAL_CONTEXT = new ThreadLocal<ELContextStore>();
     
     public WebBeansELResolver()
     {
@@ -102,7 +100,7 @@ public class WebBeansELResolver extends 
         CreationalContext<Object> creationalContext = null;
         
         //Local store, set by the OwbELContextListener
-        ELContextStore store = LOCAL_CONTEXT.get();        
+        ELContextStore store = ELContextStore.LOCAL_CONTEXT.get();        
         if (obj == null)
         {                      
             //Name of the bean

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WrappedValueExpression.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WrappedValueExpression.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WrappedValueExpression.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/WrappedValueExpression.java
Tue May 18 08:14:02 2010
@@ -70,7 +70,7 @@ public class WrappedValueExpression exte
         }finally
         {
             //Destroy dependent store
-            ELContextStore store = WebBeansELResolver.LOCAL_CONTEXT.get();
+            ELContextStore store = ELContextStore.LOCAL_CONTEXT.get();
             if(store != null)
             {
                 store.destroy();

Modified: openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans-default.properties
Tue May 18 08:14:02 2010
@@ -41,6 +41,11 @@ org.apache.webbeans.spi.JNDIService=org.
 org.apache.webbeans.spi.ScannerService=org.apache.webbeans.corespi.se.DefaultScannerService
 ################################################################################################
 
+################################### Default EL Adaptor ####################################
+#Default implementation oforg.apache.webbeans.spi.adaptor.ELAdaptor
+org.apache.webbeans.spi.adaptor.ELAdaptor=org.apache.webbeans.el.el22.EL22Adaptor
+################################################################################################
+
 ################################### Default Contexts Service ####################################
 #Default implementation of org.apache.webbeans.corespi.ContextsService.
 org.apache.webbeans.spi.ContextsService=org.apache.webbeans.corespi.se.DefaultContextsService

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java
(original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplication.java
Tue May 18 08:14:02 2010
@@ -52,7 +52,8 @@ import javax.faces.event.SystemEventList
 import javax.faces.validator.Validator;
 
 import org.apache.webbeans.container.BeanManagerImpl;
-import org.apache.webbeans.el.OwbElContextListener;
+import org.apache.webbeans.corespi.ServiceLoader;
+import org.apache.webbeans.spi.adaptor.ELAdaptor;
 
 public class OwbApplication extends Application
 {
@@ -62,8 +63,9 @@ public class OwbApplication extends Appl
     
     public OwbApplication(Application wrappedApplication)
     {
+        ELAdaptor elAdaptor = ServiceLoader.getService(ELAdaptor.class);
         this.wrappedApplication = wrappedApplication;
-        this.wrappedApplication.addELContextListener(new OwbElContextListener());
+        this.wrappedApplication.addELContextListener(elAdaptor.getOwbELContextListener());
     }
 
     @Override

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Tue May 18 08:14:02 2010
@@ -39,7 +39,7 @@ import org.apache.webbeans.context.Reque
 import org.apache.webbeans.context.SessionContext;
 import org.apache.webbeans.context.SingletonContext;
 import org.apache.webbeans.conversation.ConversationManager;
-import org.apache.webbeans.el.WebBeansELResolver;
+import org.apache.webbeans.el.ELContextStore;
 import org.apache.webbeans.spi.ContextsService;
 
 /**
@@ -330,8 +330,8 @@ public class WebContextsService extends 
         }
         
         //Remove ELContext store
-        WebBeansELResolver.LOCAL_CONTEXT.set(null);
-        WebBeansELResolver.LOCAL_CONTEXT.remove();
+        ELContextStore.LOCAL_CONTEXT.set(null);
+        ELContextStore.LOCAL_CONTEXT.remove();
         
         //Clear thread locals
         requestContext.set(null);

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java?rev=945533&r1=945532&r2=945533&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/WebContainerLifecycle.java
Tue May 18 08:14:02 2010
@@ -22,6 +22,8 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
+import javax.el.ELContextListener;
+import javax.el.ELResolver;
 import javax.enterprise.inject.spi.BeanManager;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
@@ -31,11 +33,11 @@ import javax.servlet.jsp.JspFactory;
 import org.apache.webbeans.config.OpenWebBeansConfiguration;
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.conversation.ConversationManager;
-import org.apache.webbeans.el.OwbElContextListener;
-import org.apache.webbeans.el.WebBeansELResolver;
+import org.apache.webbeans.corespi.ServiceLoader;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.lifecycle.AbstractLifeCycle;
 import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.spi.adaptor.ELAdaptor;
 
 /**
  * Manages container lifecycle.
@@ -98,8 +100,9 @@ public final class WebContainerLifecycle
         service = Executors.newScheduledThreadPool(1);
         service.scheduleWithFixedDelay(new ConversationCleaner(), delay, delay, TimeUnit.MILLISECONDS);
         
-        WebBeansELResolver resolver = new WebBeansELResolver();
-        OwbElContextListener elContextListener = new OwbElContextListener();
+        ELAdaptor elAdaptor = ServiceLoader.getService(ELAdaptor.class);
+        ELResolver resolver = elAdaptor.getOwbELResolver();
+        ELContextListener elContextListener = elAdaptor.getOwbELContextListener();
         //Application is configured as JSP
         if(OpenWebBeansConfiguration.getInstance().isJspApplication())
         {



Mime
View raw message