You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2012/12/04 22:07:51 UTC

svn commit: r1417182 [22/22] - in /openejb/trunk/openejb: container/openejb-core/ deps/ deps/webbeans-impl/ deps/webbeans-impl/src/ deps/webbeans-impl/src/main/ deps/webbeans-impl/src/main/java/ deps/webbeans-impl/src/main/java/org/ deps/webbeans-impl/...

Added: openejb/trunk/openejb/deps/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/deps/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java?rev=1417182&view=auto
==============================================================================
--- openejb/trunk/openejb/deps/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java (added)
+++ openejb/trunk/openejb/deps/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java Tue Dec  4 21:07:25 2012
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.xml;
+
+import org.apache.webbeans.exception.WebBeansException;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Implementation of the {@link ErrorHandler} .
+ * <p>
+ * Error handler that is used for handling errors while parsing the document.
+ * </p>
+ * 
+ * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
+ * @since 1.0
+ */
+public class WebBeansErrorHandler implements ErrorHandler
+{
+    private static Logger logger = WebBeansLoggerFacade.getLogger(WebBeansErrorHandler.class);
+
+    public void error(SAXParseException exception) throws SAXException
+    {
+        logger.log(Level.SEVERE, exception.getMessage(), exception.getCause());
+        throw new WebBeansException(exception);
+    }
+
+    public void fatalError(SAXParseException exception) throws SAXException
+    {
+        logger.log(Level.SEVERE, exception.getMessage(), exception.getCause());
+        throw new WebBeansException(exception);
+    }
+
+    public void warning(SAXParseException exception) throws SAXException
+    {
+        logger.log(Level.WARNING, exception.getMessage(), exception.getCause());
+    }
+
+}

Added: openejb/trunk/openejb/deps/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/deps/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java?rev=1417182&view=auto
==============================================================================
--- openejb/trunk/openejb/deps/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java (added)
+++ openejb/trunk/openejb/deps/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansXMLConfigurator.java Tue Dec  4 21:07:25 2012
@@ -0,0 +1,460 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.interceptor.Interceptor;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.webbeans.config.OWBLogConst;
+import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.decorator.DecoratorsManager;
+import org.apache.webbeans.exception.WebBeansConfigurationException;
+import org.apache.webbeans.exception.WebBeansException;
+import org.apache.webbeans.inject.AlternativesManager;
+import org.apache.webbeans.intercept.InterceptorsManager;
+import org.apache.webbeans.logger.WebBeansLoggerFacade;
+import org.apache.webbeans.portable.events.ProcessAnnotatedTypeImpl;
+import org.apache.webbeans.spi.ScannerService;
+import org.apache.webbeans.util.AnnotationUtil;
+import org.apache.webbeans.util.Asserts;
+import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.WebBeansConstants;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Configures the web beans from the xml declerations.
+ */
+@SuppressWarnings("unchecked")
+public final class WebBeansXMLConfigurator
+{
+    private static final Logger logger = WebBeansLoggerFacade.getLogger(WebBeansXMLConfigurator.class);
+
+    /**
+     * Current configuration file name
+     */
+    private String currentScanFileName = null;
+
+    /**
+     * Creates a new instance of the <code>WebBeansXMLConfigurator</code>
+     */
+    public WebBeansXMLConfigurator()
+    {
+    }
+
+    /**
+     * Configures XML configuration file.
+     *
+     * @param xmlStream xml configuration file
+     */
+    public void configure(InputStream xmlStream)
+    {
+        try
+        {
+            if (xmlStream.available() > 0)
+            {
+                configureSpecSpecific(xmlStream, "No-name XML Stream");
+            }
+        }
+        catch (IOException e)
+        {
+            throw new WebBeansConfigurationException(e);
+        }
+
+    }
+    
+    /**
+     * Configures XML configuration file.
+     *
+     * @param xmlStream xml configuration file
+     * @param fileName  file name
+     */
+    public void configure(InputStream xmlStream, String fileName)
+    {
+        configure(xmlStream, fileName, null);
+    }
+
+    /**
+     * Configures XML configuration file.
+     *
+     * @param xmlStream xml configuration file
+     * @param fileName  file name
+     * @param scanner null or current ScannerService ref
+     */
+    public void configure(InputStream xmlStream, String fileName, ScannerService scanner)
+    {
+        try
+        {
+            if (xmlStream.available() > 0)
+            {
+                configureSpecSpecific(xmlStream, fileName,scanner);
+            }
+        }
+        catch (IOException e)
+        {
+            throw new WebBeansConfigurationException(e);
+        }
+
+    }
+
+    /**
+     * Configures the web beans from the given input stream.
+     *
+     * @param xmlStream xml file containing the web beans definitions.
+     * @param fileName  name of the configuration file
+     */
+    public void configureSpecSpecific(InputStream xmlStream, String fileName)
+    {
+        configureSpecSpecific(xmlStream, fileName, null);
+    }
+    
+    
+    /**
+     * Configures the web beans from the given input stream.
+     *
+     * @param xmlStream xml file containing the web beans definitions.
+     * @param fileName  name of the configuration file
+     * @param scanner null or scanner ref
+     */
+    public void configureSpecSpecific(InputStream xmlStream, String fileName,ScannerService scanner)
+    {
+        try
+        {
+            if (xmlStream.available() > 0)
+            {
+                Asserts.assertNotNull(xmlStream, "xmlStream parameter can not be null!");
+                Asserts.assertNotNull(fileName, "fileName parameter can not be null!");
+
+                currentScanFileName = fileName;
+
+                //Get root element of the XML document
+                Element webBeansRoot = getSpecStrictRootElement(xmlStream);
+
+                //Start configuration
+                configureSpecSpecific(webBeansRoot,fileName,scanner);
+            }
+        }
+        catch (IOException e)
+        {
+            throw new WebBeansConfigurationException(e);
+        }
+    }
+
+    /**
+     * Gets the root element of the parsed document.
+     *
+     * @param stream parsed document
+     * @return root element of the document
+     * @throws WebBeansException if any runtime exception occurs
+     */
+    private Element getSpecStrictRootElement(InputStream stream) throws WebBeansException
+    {
+        try
+        {
+            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+            factory.setCoalescing(false);
+            factory.setExpandEntityReferences(true);
+            factory.setIgnoringComments(true);
+            factory.setIgnoringElementContentWhitespace(true);
+            factory.setNamespaceAware(true);
+            factory.setValidating(false);
+            DocumentBuilder documentBuilder = factory.newDocumentBuilder();
+            documentBuilder.setErrorHandler(new WebBeansErrorHandler());
+
+            Element root = documentBuilder.parse(stream).getDocumentElement();
+            return root;
+        }
+        catch (Exception e)
+        {
+            logger.log(Level.SEVERE, OWBLogConst.FATAL_0002, e);
+            throw new WebBeansException(WebBeansLoggerFacade.getTokenString(OWBLogConst.EXCEPT_0013), e);
+        }
+    }
+
+    private String getName(Element element)
+    {
+        Asserts.assertNotNull(element, "element argument can not be null");
+        return element.getLocalName();
+    }
+
+    /**
+     * Configures the xml file root element.
+     *
+     * @param webBeansRoot root element of the configuration xml file
+     */
+    private void configureSpecSpecific(Element webBeansRoot, String fileName,ScannerService scanner)
+    {
+        Node node;
+        Element child;
+        NodeList ns = webBeansRoot.getChildNodes();
+        for (int i = 0; i < ns.getLength(); i++)
+        {
+            node = ns.item(i);
+            if (!(node instanceof Element))
+            {
+                continue;
+            }
+            child = (Element) node;
+
+            /* <Interceptors> element decleration */
+            if (getName(child).equals(WebBeansConstants.WEB_BEANS_XML_SPEC_SPECIFIC_INTERCEPTORS_ELEMENT))
+            {
+                configureInterceptorsElement(child,fileName,scanner);
+            }
+            /* <Decorators> element decleration */
+            else if (getName(child).equals(WebBeansConstants.WEB_BEANS_XML_SPEC_SPECIFIC_DECORATORS_ELEMENT))
+            {
+                configureDecoratorsElement(child,fileName,scanner);
+            }
+            else if (getName(child).equals(WebBeansConstants.WEB_BEANS_XML_SPEC_SPECIFIC_ALTERNATIVES))
+            {
+                configureAlternativesElement(child,fileName,scanner);
+            }
+        }
+
+    }
+
+
+    /**
+     * Configures enablements of the interceptors.
+     *
+     * @param interceptorsElement interceptors element
+     */
+    private void configureInterceptorsElement(Element interceptorsElement, String fileName, ScannerService scanner)
+    {
+        WebBeansContext webBeansContext = WebBeansContext.getInstance();
+        InterceptorsManager manager = webBeansContext.getInterceptorsManager();
+        Node node;
+        Element child;
+
+        // the interceptors in this beans.xml
+        // this gets used to detect multiple definitions of the
+        // same interceptor in one beans.xml file.
+        Set<Class> interceptorsInFile = new HashSet<Class>();
+
+        NodeList ns = interceptorsElement.getChildNodes();
+        for (int i = 0; i < ns.getLength(); i++)
+        {
+            node = ns.item(i);
+            if (!(node instanceof Element))
+            {
+                continue;
+            }
+            child = (Element) node;
+            Class<?> clazz = null;
+
+            clazz = ClassUtil.getClassFromName(child.getTextContent().trim());
+
+            if (clazz == null)
+            {
+                throw new WebBeansConfigurationException(createConfigurationFailedMessage() + "Interceptor class : " +
+                                                         child.getTextContent().trim() + " not found");
+            }
+            else
+            {
+                Annotation[] classAnnotations;
+                AnnotatedType<?> annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(clazz);
+
+                ProcessAnnotatedTypeImpl<?> processAnnotatedEvent =
+                    webBeansContext.getWebBeansUtil().fireProcessAnnotatedTypeEvent(annotatedType);
+
+                // if veto() is called
+                if (processAnnotatedEvent.isVeto())
+                {
+                    return;
+                }
+
+                annotatedType = processAnnotatedEvent.getAnnotatedType();
+
+                Set<Annotation> annTypeAnnotations = annotatedType.getAnnotations();
+                if (annTypeAnnotations != null)
+                {
+                    classAnnotations = annTypeAnnotations.toArray(new Annotation[annTypeAnnotations.size()]);
+                }
+                else
+                {
+                    classAnnotations = new Annotation[0];
+                }
+
+                if (AnnotationUtil.hasAnnotation(classAnnotations, Interceptor.class) &&
+                    !webBeansContext.getAnnotationManager().
+                            hasInterceptorBindingMetaAnnotation(classAnnotations))
+                {
+                    throw new WebBeansConfigurationException(createConfigurationFailedMessage() + "Interceptor class : "
+                                                             + child.getTextContent().trim()
+                                                             + " must have at least one @InterceptorBinding");
+                }
+
+                // check if the interceptor got defined twice in this beans.xml
+                if (interceptorsInFile.contains(clazz))
+                {
+                    throw new WebBeansConfigurationException(createConfigurationFailedMessage() + "Interceptor class : "
+                                                             + child.getTextContent().trim()
+                                                             + " already defined in this beans.xml file!");
+                }
+                interceptorsInFile.add(clazz);
+
+                boolean isBDAScanningEnabled=(scanner!=null && scanner.isBDABeansXmlScanningEnabled());
+                if ((!isBDAScanningEnabled && manager.isInterceptorEnabled(clazz)) ||
+                        (isBDAScanningEnabled && !scanner.getBDABeansXmlScanner().addInterceptor(clazz, fileName)))
+                {
+                    logger.warning( "Interceptor class : " + child.getTextContent().trim() + " is already defined");
+                }
+                else
+                {
+                    manager.addNewInterceptor(clazz);
+                }
+            }
+
+        }
+
+    }
+
+    /**
+     * Configures enablements of the decorators.
+     *
+     * @param decoratorsElement decorators element
+     */
+    private void configureDecoratorsElement(Element decoratorsElement,String fileName,ScannerService scanner)
+    {
+        DecoratorsManager manager = WebBeansContext.getInstance().getDecoratorsManager();
+        Node node;
+        Element child;
+        NodeList ns = decoratorsElement.getChildNodes();
+        for (int i = 0; i < ns.getLength(); i++)
+        {
+            node = ns.item(i);
+            if (!(node instanceof Element))
+            {
+                continue;
+            }
+            child = (Element) node;
+            Class<?> clazz = null;
+
+            clazz = ClassUtil.getClassFromName(child.getTextContent().trim());
+
+            if (clazz == null)
+            {
+                throw new WebBeansConfigurationException(createConfigurationFailedMessage() + "Decorator class : " +
+                                                         child.getTextContent().trim() + " not found");
+            }
+            else
+            {
+                boolean isBDAScanningEnabled=(scanner!=null && scanner.isBDABeansXmlScanningEnabled());
+                if ((isBDAScanningEnabled && !scanner.getBDABeansXmlScanner().addDecorator(clazz, fileName))||
+                        (!isBDAScanningEnabled && manager.isDecoratorEnabled(clazz)))
+                {
+                    throw new WebBeansConfigurationException(createConfigurationFailedMessage() + "Decorator class : " +
+                                                             child.getTextContent().trim() + " is already defined");
+                }
+
+                manager.addNewDecorator(clazz);
+            }
+
+        }
+
+    }
+
+    /**
+     * Configures enablements of the decorators.
+     *
+     * @param alternativesElement decorators element
+     */
+    private void configureAlternativesElement(Element alternativesElement,String fileName,ScannerService scanner)
+    {
+        Node node;
+        Element child;
+        NodeList ns = alternativesElement.getChildNodes();
+        for (int i = 0; i < ns.getLength(); i++)
+        {
+            node = ns.item(i);
+            if (!(node instanceof Element))
+            {
+                continue;
+            }
+            child = (Element) node;
+
+            if (getName(child).equals(WebBeansConstants.WEB_BEANS_XML_SPEC_SPECIFIC_STEREOTYPE) ||
+                getName(child).equals(WebBeansConstants.WEB_BEANS_XML_OWB_SPECIFIC_STEREOTYPE))
+            {
+                addAlternative(child, true,fileName,scanner);
+            }
+            else if (getName(child).equals(WebBeansConstants.WEB_BEANS_XML_SPEC_SPECIFIC_CLASS)
+                     || getName(child).equals(WebBeansConstants.WEB_BEANS_XML_OWB_SPECIFIC_CLASS))
+            {
+                addAlternative(child, false,fileName,scanner);
+            }
+            else
+            {
+                if (logger.isLoggable(Level.WARNING))
+                {
+                    logger.log(Level.WARNING, OWBLogConst.WARN_0002, getName(child));
+                }
+            }
+        }
+    }
+
+    private void addAlternative(Element child, boolean isStereoType,String fileName,ScannerService scanner)
+    {
+        Class<?> clazz = null;
+
+        clazz = ClassUtil.getClassFromName(child.getTextContent().trim());
+
+        if (clazz == null)
+        {
+            throw new WebBeansConfigurationException(createConfigurationFailedMessage() + "Alternative class : " + getName(child) + " not found");
+        }
+        else
+        {
+            AlternativesManager manager = WebBeansContext.getInstance().getAlternativesManager();
+            if (isStereoType)
+            {
+                manager.addStereoTypeAlternative(clazz,fileName,scanner);
+            }
+            else
+            {
+                manager.addClazzAlternative(clazz,fileName,scanner);
+            }
+        }
+    }
+
+
+
+    /**
+     * Gets error message for XML parsing of the current XML file.
+     *
+     * @return the error messages
+     */
+    private String createConfigurationFailedMessage()
+    {
+        return "WebBeans XML configuration defined in " + currentScanFileName + " is failed. Reason is : ";
+    }
+
+}

Added: openejb/trunk/openejb/deps/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/deps/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties?rev=1417182&view=auto
==============================================================================
--- openejb/trunk/openejb/deps/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties (added)
+++ openejb/trunk/openejb/deps/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties Tue Dec  4 21:07:25 2012
@@ -0,0 +1,124 @@
+#Licensed to the Apache Software Foundation (ASF) under one
+#or more contributor license agreements.  See the NOTICE file
+#distributed with this work for additional information
+#regarding copyright ownership.  The ASF licenses this file
+#to you under the Apache License, Version 2.0 (the
+#"License"); you may not use this file except in compliance
+#with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing,
+#software distributed under the License is distributed on an
+#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#KIND, either express or implied.  See the License for the
+#specific language governing permissions and limitations
+#under the License.
+#---------------------------------------------------------------
+# The default configuration for OpenWebBeans
+#
+# The default configuration is intended for a JDK and a simple ServletContainer
+# like jetty, resin or tomcat.
+# 
+#---------------------------------------------------------------
+
+
+################################################################################################
+################################### DEFAULT SPI CONFIGURATION SECTION ##########################
+################################################################################################ 
+
+# this is the basic configuration, thus it has a very low ordinal of 10
+configuration.ordinal=10
+
+################################### Default Container Lifecycle ################################
+#Default implementation of org.apache.webbeans.corespi.ContainerLifecycle.
+org.apache.webbeans.spi.ContainerLifecycle=org.apache.webbeans.lifecycle.StandaloneLifeCycle
+################################################################################################
+
+################################### Default JNDI Service #######################################
+#Default implementation of org.apache.webbeans.corespi.JNDIService.
+org.apache.webbeans.spi.JNDIService=org.apache.webbeans.corespi.se.DefaultJndiService
+################################################################################################
+
+################################### Default Scanner Service ####################################
+#Default implementation of org.apache.webbeans.corespi.ScannerService.
+org.apache.webbeans.spi.ScannerService=org.apache.webbeans.corespi.se.DefaultScannerService
+################################################################################################
+
+################################### Default EL Adaptor ####################################
+#Default implementation of org.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
+################################################################################################
+
+################################### Default Contexts Service ####################################
+# Default SecurityService implementation which directly invokes underlying classes
+# without using a SecurityManager
+org.apache.webbeans.spi.SecurityService=org.apache.webbeans.corespi.security.SimpleSecurityService
+################################################################################################
+
+################################ Default Implementation-Loader Service ###########################################
+# Service which encapsulates the Service-Loader of Java 1.6+ to allow custom implementations to support Java 1.5
+org.apache.webbeans.spi.LoaderService=org.apache.webbeans.service.DefaultLoaderService
+
+################################################################################################ 
+#################################### SEVERAL CONFIGURATION PARAMETERS ##########################
+################################################################################################
+
+#################################### Use Embedded OpenEJB Discovery ############################
+#If it is true, it checks every bean class whether or not represent EJB Bean
+org.apache.webbeans.spi.deployer.useEjbMetaDataDiscoveryService=false
+################################################################################################
+
+############################# Use OWB EJB interceptor for injection ###########################
+#If it is true, the OWB EJB interceptor performs injection on the EJB instance
+org.apache.webbeans.application.useEJBInterceptorInjection=true
+################################################################################################
+
+############################# Use OWB EJB interceptor for Context activation ###################
+#If it is true, the OWB EJB interceptor performs activation of the contexts
+org.apache.webbeans.application.useEJBInterceptorActivation=true
+################################################################################################
+
+################# Force not having Checked Exceptions in lifecycle methods  ####################
+# If it is true, OWB forces that lifecycle methods like @PreDestroy and @PostConstruct must not
+# throw any checked exceptions. This is the behaviour which is defined in the EE interceptor
+# spec. Since this is sometimes way too restrictive, we allow to relax this rule by configuration
+# The default value is 'true' internally.
+# ATTENTION: this property works container wide!
+# org.apache.webbeans.forceNoCheckedExceptions=true
+################################################################################################
+
+################################## OWB Specific Injection ######################################
+#If false, uses spec. defined injection with @Inject. Not recommended use as true.
+#It will be removed in future development. 
+org.apache.webbeans.fieldInjection.useOwbSpecificInjection=false
+################################################################################################
+
+################################# Conversation Support #########################################
+org.apache.webbeans.application.supportsConversation=false
+################################################################################################
+
+####################### Archive Centric Beans.xml Scanning #####################################
+# If true, will enable decorators, interceptors and alternatives based on the beans.xml
+# of the appropriate archive.
+org.apache.webbeans.useBDABeansXMLScanner=false
+################################################################################################
+
+####################### Proxy Factory Class Loader Update ######################################
+# If true, ProxyFactory.classLoaderProvider will be updates on ClassNotFoundException, 
+# default to false
+org.apache.webbeans.javassist.useClassLoaderProvider=false
+################################################################################################
+
+########################### Proxy Implementation Mapping ######################################
+# This allows mapping a Scope Annotation class to a specific InterceptorProxy which are
+# typically sub classes of NormalScopedBeanInterceptorHandler
+#
+# org.apache.webbeans.proxy.mapping.javax.enterprise.context.RequestScoped=org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler
+org.apache.webbeans.proxy.mapping.javax.enterprise.context.ApplicationScoped=org.apache.webbeans.intercept.ApplicationScopedBeanInterceptorHandler
+################################################################################################

Added: openejb/trunk/openejb/deps/webbeans-impl/src/main/resources/openwebbeans/Messages.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/deps/webbeans-impl/src/main/resources/openwebbeans/Messages.properties?rev=1417182&view=auto
==============================================================================
--- openejb/trunk/openejb/deps/webbeans-impl/src/main/resources/openwebbeans/Messages.properties (added)
+++ openejb/trunk/openejb/deps/webbeans-impl/src/main/resources/openwebbeans/Messages.properties Tue Dec  4 21:07:25 2012
@@ -0,0 +1,119 @@
+# Copyright 2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+#========= BEGIN TRANSLATING MESSAGES HERE ============================
+
+#text bits... Check if translation required.
+TEXT_CONFIG_NOT_FOUND = Config properties [{0}] not found. Using default settings.
+TEXT_CONFIG_FOUND = Config properties [{0}] found at location \: [{1}]. Overriding default settings.
+TEXT_MB_IMPL = Managed Bean implementation class \: 
+TEXT_SAME_SCOPE =  stereotypes must declare the same @Scope annotations.
+TEXT_JAVA_TYPENAME = Java type with name \:
+
+
+#info messages:
+INFO_0001 = OpenWebBeans Container has started, it took [{0}] ms.
+INFO_0002 = OpenWebBeans Container was stopped for context path, [{0}]
+INFO_0003 = All injection points were validated successfully.
+INFO_0004 = Adding OpenWebBeansPlugin \: [{0}]
+INFO_0005 = OpenWebBeans Container is starting...
+INFO_0006 = Initializing OpenWebBeans Container.
+INFO_0008 = Stopping OpenWebBeans Container...
+INFO_0009 = OpenWebBeans Container has stopped.
+INFO_0010 = Cannot send event to bean in non-active context \: [{0}]
+INFO_0011 = Conversation with id {0} has been destroyed because it is not active for the period of configured time out interval.
+
+
+#warning messages:
+WARN_0001 = No plugins to shutDown.
+WARN_0002 = Alternative XML content is incorrect. Child of <alternatives> must be <class>,<stereotype> but found \: [{0}]
+WARN_0003 = Conversation with cid [{0}] already started
+WARN_0004 = Conversation with cid [{0}] already ended
+WARN_0005_1 = [{0}] has not DependentScope. If an interceptor or decorator has any scope other than @Dependent, non-portable behaviour results.
+WARN_0005_2 = [{0}] has a name. If an interceptor or decorator has name, non-portable behaviour results.
+WARN_0005_3 = [{0}] is Alternative. If an interceptor or decorator is @Alternative, non-portable behaviour results.
+WARN_0006 = Unable to close entity manager factory with name \: [{0}]
+WARN_0007 = Exception in ejbContext.proceed().
+WARN_0008 = Unable to find EJB bean with class \: [{0}] \: [{1}]
+WARN_0009 = Unable to find service with class name \: [{0}]
+WARN_0010 = Trying to serialize non-passivation capable bean proxy \: [{0}]
+WARN_0011 = Trying to de-serialize non-passivation capable bean proxy \: [{0}]
+WARN_0012 = No suitable constructor found for injection target class \: [{0}]. produce() method does not work\!
+WARN_0013 = Unable to clear ResourceFactory.
+WARN_0014 = Could not find [{0}] with name [{1}].
+WARN_0015 = Trying to serialize non-passivation capable bean proxy \: [{0}]
+WARN_0016 = Stereotypes can not annotated with @Typed but stereotype \: [{0}] has annotated, non-portable behaviour results.
+WARN_0017 = Stereotypes can not define qualifier other than @Named but stereotype \: [{0}] has defined [{1}] , non-portable behaviour results.  
+WARN_0018 = Ignoring class [{0}] because it could not be loaded: {1} 
+
+
+#error messages:
+ERROR_0001 = Unable to inject resource for \: [{0}]
+ERROR_0002 = Initialization of the WebBeans container has failed.
+ERROR_0003 = An exception occurred in the transactional observer.
+ERROR_0004 = Unable to initialize InitialContext object.
+ERROR_0005 = Unable to bind object with name \: [{0}]
+ERROR_0006 = Security exception. Cannot access decorator class \: [{0}] method \: [{1}]
+ERROR_0007 = Delegate field is not found on the given decorator class \: [{0}]
+ERROR_0008 = An error occurred while executing [{0}]
+ERROR_0009 = An error occurred while shutting down the plugin \: [{0}]
+ERROR_0010 = An error occurred while closing the JMS instance.
+ERROR_0011 = Method security access violation for method \: [{0}] in decorator class \: [{1}]
+ERROR_0012 = Exception in calling method \: [{0}] in decorator class \: [{1}]. Look in the log for target checked exception.
+ERROR_0013 = Caught an Exception while starting a fresh session!
+ERROR_0014 = Illegal access exception for method \: [{0}] in decorator class \: [{1}]
+ERROR_0015 = Illegal access exception for field \: [{0}] in decorator class \: [{1}]
+ERROR_0016 = IllegalArgumentException has occurred while calling the field \: [{0}] on the class \: [{1}]
+ERROR_0017 = IllegalAccessException has occurred while calling the field \: [{0}] on the class \: [{1}]
+ERROR_0018 = An error occured while starting application context path \: [{0}]
+ERROR_0019 = An error occured while starting request \: [{0}]
+ERROR_0020 = An error occured while starting session \: [{0}]
+ERROR_0021 = An error occured while stopping the container.
+ERROR_0022 = Unable to inject dependencies of EJB interceptor instance with class \: [{0}]
+ERROR_0023 = An error occured while injecting Java EE Resources for the bean instance \: [{0}]
+ERROR_0024 = Unable to get resource with class [{0}] in [{1}] with name [{2}].
+ERROR_0025 = Unable to inject field \: [{0}]
+ERROR_0026 = An error occured while injecting dependencies of bean \: [{0}]
+ERROR_0027 = Unable to create AnnotatedType for class \: [{0}]. Exception cause \: [{1}]
+
+#fatal messages:
+FATAL_0001 = Exception thrown while destroying bean instance \: [{0}]
+FATAL_0002 = Unable to read root element of the given input stream.
+
+
+#Text used in thrown exceptions:
+CRITICAL_DEFAULT_CONFIG_FAILURE = Problem while loading OpenWebBeans default configuration.
+EXCEPT_0002 = Wrong termination object.
+EXCEPT_0003 = Specialized class [
+EXCEPT_0004 = ] must extend another class.
+EXCEPT_XML = XML Specialization Error \: 
+EXCEPT_0005 = More than one class specialized the same super class \:
+EXCEPT_0006 = Caught Exceptions while sending shutdown to the following plugins \: 
+EXCEPT_0007 = TransactionPhase not supported \: 
+EXCEPT_0008 = Caught Exception while handling event object with type \: 
+EXCEPT_0009 = Unable to unbind object with name \: 
+EXCEPT_0010 = Unable to lookup object with name \: 
+EXCEPT_0012 = All elements in the beans.xml file have to declare name space.
+EXCEPT_0013 = Unable to read root element of the given input stream.
+EXCEPT_0014 = Multiple classes with name \: 
+EXCEPT_0015 = Passivation bean \: [{0}] decorators must be passivating capable.
+EXCEPT_0016 = Passivation bean \: [{0}] interceptors must be passivating capable.
+EXCEPT_0017 = Passivation bean \: [{0}] interceptor \: [{1}] must have serializable injection points.
+EXCEPT_0018 = Wrong startup object.
+
+DEBUG_ADD_BYTYPE_CACHE_BEANS = Adding resolved beans with key [{0}] to cache.
+DEBUG_ADD_BYNAME_CACHE_BEANS = Adding resolved EL beans with key [{0}] to cache.
+ 
+#========= END OF TRANSLATED MESSAGES =================================

Modified: openejb/trunk/openejb/tomee/tomee-webapp/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/pom.xml?rev=1417182&r1=1417181&r2=1417182&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/pom.xml (original)
+++ openejb/trunk/openejb/tomee/tomee-webapp/pom.xml Tue Dec  4 21:07:25 2012
@@ -157,6 +157,12 @@
       <groupId>org.apache.openwebbeans</groupId>
       <artifactId>openwebbeans-jsf</artifactId>
       <version>${org.apache.openwebbeans.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.openwebbeans</groupId>
+          <artifactId>openwebbeans-impl</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.myfaces.core</groupId>