[jboss-cvs] JBossAS SVN: r110225 - in tags/6.0.0.Final: component-matrix and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Dec 26 20:53:35 EST 2010
Author: smcgowan at redhat.com
Date: 2010-12-26 20:53:35 -0500 (Sun, 26 Dec 2010)
New Revision: 110225
Added:
tags/6.0.0.Final/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataHackDeployer.java
tags/6.0.0.Final/server/src/main/java/org/jboss/web/deployers/SpecCompliantWarAnnotationDeployer.java
tags/6.0.0.Final/tomcat/src/resources/standard/
tags/6.0.0.Final/tomcat/src/resources/standard/war-deployers-jboss-beans.xml
Modified:
tags/6.0.0.Final/build/build.xml
tags/6.0.0.Final/component-matrix/pom.xml
tags/6.0.0.Final/server/pom.xml
tags/6.0.0.Final/tomcat/src/resources/standalone/switchboard-jboss-beans.xml
Log:
JBAS-8775, JBAS-8659
Modified: tags/6.0.0.Final/build/build.xml
===================================================================
--- tags/6.0.0.Final/build/build.xml 2010-12-24 22:38:29 UTC (rev 110224)
+++ tags/6.0.0.Final/build/build.xml 2010-12-27 01:53:35 UTC (rev 110225)
@@ -407,6 +407,8 @@
<exclude name="deployers/ear-deployer-jboss-beans.xml"/>
<!-- Disable system property replacement in Java EE xml files -->
<exclude name="deployers/metadata-deployer-jboss-beans.xml"/>
+ <!-- Exclude war-deployers-jboss-beans.xml so that we can use a custom MergedJBossWebMetaDataDeployer for standard profile -->
+ <exclude name="deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml"/>
</fileset>
<fileset dir="${install.all}">
<include name="conf/jacorb.properties"/>
@@ -449,6 +451,14 @@
<include name="jpa-deployers-jboss-beans.xml"/>
</fileset>
</copy>
+
+ <!-- override war-deployers-jboss-beans.xml for a custom merged JBossWebMetadata deployer -->
+ <copy todir="${install.standard.deployers}/jbossweb.deployer/META-INF" overwrite="true">
+ <fileset dir="${project.root}/tomcat/src/resources/standard">
+ <include name="war-deployers-jboss-beans.xml"/>
+ </fileset>
+ </copy>
+
</target>
<target name="jboss-all-client" depends="configure"
Modified: tags/6.0.0.Final/component-matrix/pom.xml
===================================================================
--- tags/6.0.0.Final/component-matrix/pom.xml 2010-12-24 22:38:29 UTC (rev 110224)
+++ tags/6.0.0.Final/component-matrix/pom.xml 2010-12-27 01:53:35 UTC (rev 110225)
@@ -113,7 +113,7 @@
<version.org.jboss.mc-int>2.2.0.GA</version.org.jboss.mc-int>
<version.org.jboss.mdr>2.2.0.GA</version.org.jboss.mdr>
<version.org.jboss.metadata.client>2.0.0.Alpha2</version.org.jboss.metadata.client>
- <version.org.jboss.metadata.common>2.0.0.Alpha23</version.org.jboss.metadata.common>
+ <version.org.jboss.metadata.common>2.0.0.Alpha24</version.org.jboss.metadata.common>
<version.org.jboss.metadata.ear>2.0.0.Alpha4</version.org.jboss.metadata.ear>
<version.org.jboss.metadata.ejb>2.0.0-alpha-27</version.org.jboss.metadata.ejb>
<version.org.jboss.metadata.rar>2.0.0.Alpha</version.org.jboss.metadata.rar>
Modified: tags/6.0.0.Final/server/pom.xml
===================================================================
--- tags/6.0.0.Final/server/pom.xml 2010-12-24 22:38:29 UTC (rev 110224)
+++ tags/6.0.0.Final/server/pom.xml 2010-12-27 01:53:35 UTC (rev 110225)
@@ -414,6 +414,16 @@
</dependency>
<dependency>
+ <groupId>org.jboss.spec.javax.servlet</groupId>
+ <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.spec.javax.servlet.jsp</groupId>
+ <artifactId>jboss-jsp-api_2.2_spec</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.1_spec</artifactId>
</dependency>
Added: tags/6.0.0.Final/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataHackDeployer.java
===================================================================
--- tags/6.0.0.Final/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataHackDeployer.java (rev 0)
+++ tags/6.0.0.Final/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataHackDeployer.java 2010-12-27 01:53:35 UTC (rev 110225)
@@ -0,0 +1,176 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.web.deployers;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb.deployers.MergedJBossMetaDataDeployer;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.javaee.spec.DataSourceMetaData;
+import org.jboss.metadata.javaee.spec.DataSourcesMetaData;
+import org.jboss.metadata.javaee.spec.Environment;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+
+/**
+ * As the name suggests this deployer isn't meant for any real use.
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+// As https://issues.jboss.org/browse/JBAS-8775 explains, the WarAnnotationMetaDataDeployer
+// can be too aggressive while annotation scanning and subsequent metadata creation out of those
+// annotations. This can lead to incorrect Environment metadata creation in JBossWebMetaData.
+// Ultimately, the incorrect Environment leads to deployment failures. For more details refer
+// to the forum post in that JIRA issue.
+// This deployer adds a hack to remove such incorrect metadata from the JBossWebMetaData's
+// Environment.
+public class MergedJBossWebMetaDataHackDeployer extends MergedJBossWebMetaDataDeployer
+{
+
+ public MergedJBossWebMetaDataHackDeployer()
+ {
+ // let the MergedJBossWebMetaDataDeployer add all the necessary
+ // input/output. We just add MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME
+ // as an input so that the ordering is right
+ this.addInput(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
+ }
+
+ /**
+ *
+ */
+ // We remove any DataSourceMetaData that was incorrectly created off an EJB's interceptor
+ // and added to the JBossWebMetaData's Environment. Ideally, the EJB's interceptor class shouldn't really have
+ // been picked up by the WarAnnotationMetaDataDeployer
+ @Override
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ // let the MergedJBossWebMetaDataDeployer do all its usual work
+ super.deploy(unit);
+ // if we don't have any DataSource references in our ENC, then nothing to hack!
+ JBossWebMetaData mergedJBossWebMetaData = unit.getAttachment(JBossWebMetaData.class);
+ if (mergedJBossWebMetaData == null || !this.hasDataSources(mergedJBossWebMetaData))
+ {
+ return;
+ }
+ // we only hack if this web unit contains EJB deployments (i.e. Java EE6 shared ENC)
+ if (!this.isSharedENC(unit))
+ {
+ return;
+ }
+
+ JBossMetaData jbossMetaData = unit.getAttachment(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME, JBossMetaData.class);
+ JBossEnterpriseBeansMetaData enterpriseBeans = jbossMetaData.getEnterpriseBeans();
+ if (enterpriseBeans == null || enterpriseBeans.isEmpty())
+ {
+ // no beans, no hack!
+ return;
+ }
+
+ // process each EJB
+ for (JBossEnterpriseBeanMetaData enterpriseBean : enterpriseBeans)
+ {
+ this.removeCommonDataResourceReference(mergedJBossWebMetaData, enterpriseBean);
+ }
+ // attach the updated merged JBossWebMetaData to the unit
+ unit.getTransientManagedObjects().addAttachment(JBossWebMetaData.class, mergedJBossWebMetaData);
+
+ }
+
+ /**
+ * Returns true if the passed {@link DeploymentUnit} is a 3.0 web-app
+ * and also contains EJBs within the unit.
+ * <p/>
+ * Java EE6 allows EJB deployment via .war files
+ *
+ * @param unit
+ * @return
+ */
+ private boolean isSharedENC(DeploymentUnit unit)
+ {
+ JBossWebMetaData jbossWeb = unit.getAttachment(JBossWebMetaData.class);
+ // we are only interested in web-app 3.0 version which allows
+ // deploying EJBs in .war
+ if (jbossWeb == null || !jbossWeb.is30())
+ {
+ return false;
+ }
+ // now that we know it's a web-app 3.0, let's check if it contains EJBs
+ return unit.isAttachmentPresent(JBossMetaData.class);
+ }
+
+ private void removeCommonDataResourceReference(JBossWebMetaData jbossWeb, Environment ejbJndiEnv)
+ {
+ Environment jbossWebEnv = jbossWeb.getJndiEnvironmentRefsGroup();
+ if (jbossWebEnv == null || ejbJndiEnv == null)
+ {
+ return;
+ }
+ // datasource(s)
+ DataSourcesMetaData jbossWebDataSources = jbossWebEnv.getDataSources();
+ DataSourcesMetaData ejbCompDataSources = ejbJndiEnv.getDataSources();
+ if (jbossWebDataSources != null && ejbCompDataSources != null)
+ {
+ for (DataSourceMetaData ejbCompDataSource : ejbCompDataSources)
+ {
+ if (ejbCompDataSource == null)
+ {
+ continue;
+ }
+ // remove from JBossWebMetaData environment, the datasource reference
+ // which was picked up from an EJB
+ boolean removed = jbossWebDataSources.remove(ejbCompDataSource);
+ if (removed)
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace("Removed data-source reference: " + ejbCompDataSource.getName()
+ + " from jbossweb metadata since the same reference is present in a EJB's jndi environment");
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns true if the passed {@link JBossWebMetaData} has atleast one {@link DataSourceMetaData}
+ * in it's {@link Environment}. Else returns false.
+ *
+ * @param jbossWebMetaData
+ * @return
+ */
+ private boolean hasDataSources(JBossWebMetaData jbossWebMetaData)
+ {
+ Environment jbossWebEnv = jbossWebMetaData.getJndiEnvironmentRefsGroup();
+ if (jbossWebEnv == null)
+ {
+ return false;
+ }
+ if(jbossWebEnv.getDataSources() == null || jbossWebEnv.getDataSources().isEmpty())
+ {
+ return false;
+ }
+ return true;
+ }
+
+}
Added: tags/6.0.0.Final/server/src/main/java/org/jboss/web/deployers/SpecCompliantWarAnnotationDeployer.java
===================================================================
--- tags/6.0.0.Final/server/src/main/java/org/jboss/web/deployers/SpecCompliantWarAnnotationDeployer.java (rev 0)
+++ tags/6.0.0.Final/server/src/main/java/org/jboss/web/deployers/SpecCompliantWarAnnotationDeployer.java 2010-12-27 01:53:35 UTC (rev 110225)
@@ -0,0 +1,240 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.web.deployers;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.servlet.AsyncListener;
+import javax.servlet.Filter;
+import javax.servlet.Servlet;
+import javax.servlet.ServletContextAttributeListener;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletRequestAttributeListener;
+import javax.servlet.ServletRequestListener;
+import javax.servlet.http.HttpSessionAttributeListener;
+import javax.servlet.http.HttpSessionListener;
+import javax.servlet.jsp.tagext.SimpleTag;
+import javax.servlet.jsp.tagext.Tag;
+
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.annotation.creator.AnnotationContext;
+import org.jboss.metadata.annotation.creator.web.Web30MetaDataCreator;
+import org.jboss.metadata.annotation.finder.AnnotationFinder;
+import org.jboss.metadata.annotation.finder.DefaultAnnotationFinder;
+import org.jboss.metadata.web.spec.WebMetaData;
+import org.jboss.scanning.web.spi.ResourcesIndex;
+import org.jboss.vfs.VirtualFile;
+
+/**
+ * Servlet spec (and JSP spec) lists only specific set of class types which
+ * are eligible for Java EE resource injections. Unlike the {@link WarAnnotationMetaDataDeployer},
+ * which picks up all classes in the classpath for annotation processing and subsequent metadata creation,
+ * this {@link SpecCompliantWarAnnotationDeployer} attempts to scan only the following types
+ * of classes for Java EE resource injections.
+ * <p>
+ * As determined by the Servlet spec and JSP spec, the following class types will be scanned for resource injection
+ * annotations:
+ * <ul>
+ * <li>javax.servlet.Servlet</li>
+ * <li>javax.servlet.Filter</li>
+ * <li>javax.servlet.ServletContextListener</li>
+ * <li>javax.servlet.ServletContextAttributeListener</li>
+ * <li>javax.servlet.ServletRequestListener</li>
+ * <li>javax.servlet.ServletRequestAttributeListener</li>
+ * <li>javax.servlet.http.HttpSessionListener</li>
+ * <li>javax.servlet.http.HttpSessionAttributeListener</li>
+ * <li>javax.servlet.AsyncListener</li>
+ * <li>javax.servlet.jsp.tagext.Tag</li>
+ * <li>javax.servlet.jsp.tagext.SimpleTag</li>
+ * </ul>
+ * TODO: This is currently a work-in-progress deployer. The blocker currently, is that the JSF managed bean
+ * integration implementation assumes that the WarAnnotationDeployer will scan for annotations on a JSF managed bean.
+ * However, for this {@link SpecCompliantWarAnnotationDeployer} to work correctly, we need to know if a specific class
+ * has been marked as a JSF managed bean (via faces-config.xml). Currently there's no way to get that information
+ * during deployment phase of a unit. Needs more thought on how to get this working cleanly.
+ * @see https://issues.jboss.org/browse/JBAS-8775. Once this deployer is fully functional, it will replace the
+ * {@link WarAnnotationMetaDataDeployer}
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public class SpecCompliantWarAnnotationDeployer extends WarAnnotationMetaDataDeployer
+{
+
+ public SpecCompliantWarAnnotationDeployer()
+ {
+
+ }
+
+ @Override
+ protected void processMetaData(VFSDeploymentUnit unit, List<VirtualFile> classpath) throws Exception
+ {
+ ResourcesIndex resourceIndex = unit.getAttachment(ResourcesIndex.class);
+ if (resourceIndex == null)
+ {
+ return;
+ }
+ AnnotationFinder<AnnotatedElement> finder = new DefaultAnnotationFinder<AnnotatedElement>();
+ Web30MetaDataCreator creator = new Web30MetaDataCreator(finder);
+ // Merge processed annotations from all scopes
+ Set<Class<? extends Annotation>> annotations = new HashSet<Class<? extends Annotation>>();
+ AnnotationContext annotationContext = creator.getAnnotationContext();
+ if (annotationContext.getTypeAnnotations() != null)
+ annotations.addAll(annotationContext.getTypeAnnotations());
+ if (annotationContext.getMethodAnnotations() != null)
+ annotations.addAll(annotationContext.getMethodAnnotations());
+ if (annotationContext.getFieldAnnotations() != null)
+ annotations.addAll(annotationContext.getFieldAnnotations());
+
+ Collection<Class<?>> specEligibleResourceInjectionClasses = this.getResourceInjectionEligibleWebAppClasses(resourceIndex, classpath);
+ if (specEligibleResourceInjectionClasses.isEmpty())
+ {
+ return;
+ }
+ boolean metaData = false;
+ for (VirtualFile path : classpath)
+ {
+ Collection<Class<?>> eligibleAnnotatedClasses = new HashSet<Class<?>>();
+ for (Class<? extends Annotation> annotation : annotations)
+ {
+ Collection<Class<?>> annotatedClasses = resourceIndex.getAnnotatedClasses(path, annotation);
+ eligibleAnnotatedClasses.addAll(this.retainResourceInjectionEligibleWebAppClasses(specEligibleResourceInjectionClasses, annotatedClasses));
+ }
+ WebMetaData annotationMetaData = creator.create(eligibleAnnotatedClasses);
+ if (annotationMetaData != null)
+ {
+ unit.addAttachment(WEB_ANNOTATED_ATTACHMENT_NAME + ":" + path.getName(), annotationMetaData,
+ WebMetaData.class);
+ metaData = true;
+ }
+ }
+ if (metaData)
+ {
+ unit.addAttachment(WEB_ANNOTATED_ATTACHMENT_NAME, Boolean.TRUE);
+ }
+ }
+
+ protected Collection<Class<?>> getResourceInjectionEligibleWebAppClasses(ResourcesIndex resourceIndex, List<VirtualFile> classpath)
+ {
+ Set<Class<?>> eligibleClasses = new HashSet<Class<?>>();
+
+ for (VirtualFile file : classpath)
+ {
+ // javax.servlet.Servlet type classes
+ Collection<Class<? extends Servlet>> servlets = resourceIndex.getInheritedClasses(file, Servlet.class);
+ if (servlets != null)
+ {
+ eligibleClasses.addAll(servlets);
+ }
+ // javax.servlet.Filter classes
+ Collection<Class<? extends Filter>> filters = resourceIndex.getInheritedClasses(file, Filter.class);
+ if (filters != null)
+ {
+ eligibleClasses.addAll(filters);
+ }
+ // javax.servlet.ServletContextListener classes
+ Collection<Class<? extends ServletContextListener>> servletContextListeners = resourceIndex.getInheritedClasses(file, ServletContextListener.class);
+ if (servletContextListeners != null)
+ {
+ eligibleClasses.addAll(servletContextListeners);
+ }
+ // javax.servlet.ServletContextAttributeListener classes
+ Collection<Class<? extends ServletContextAttributeListener>> servletCtxAttributeListeners = resourceIndex.getInheritedClasses(file, ServletContextAttributeListener.class);
+ if (servletCtxAttributeListeners != null)
+ {
+ eligibleClasses.addAll(servletCtxAttributeListeners);
+ }
+ // javax.servlet.ServletRequestListener classes
+ Collection<Class<? extends ServletRequestListener>> servletRequestListeners = resourceIndex.getInheritedClasses(file, ServletRequestListener.class);
+ if (servletRequestListeners != null)
+ {
+ eligibleClasses.addAll(servletRequestListeners);
+ }
+ // javax.servlet.ServletRequestAttributeListener classes
+ Collection<Class<? extends ServletRequestAttributeListener>> servletRequestAttrListeners = resourceIndex.getInheritedClasses(file, ServletRequestAttributeListener.class);
+ if (servletRequestAttrListeners != null)
+ {
+ eligibleClasses.addAll(servletRequestAttrListeners);
+ }
+ // javax.servlet.http.HttpSessionListener classes
+ Collection<Class<? extends HttpSessionListener>> httpSessionListeners = resourceIndex.getInheritedClasses(file, HttpSessionListener.class);
+ if (httpSessionListeners != null)
+ {
+ eligibleClasses.addAll(httpSessionListeners);
+ }
+ // javax.servlet.http.HttpSessionAttributeListener classes
+ Collection<Class<? extends HttpSessionAttributeListener>> httpSessionAttrListeners = resourceIndex.getInheritedClasses(file, HttpSessionAttributeListener.class);
+ if (httpSessionAttrListeners != null)
+ {
+ eligibleClasses.addAll(httpSessionAttrListeners);
+ }
+ // javax.servlet.AsyncListener classes
+ Collection<Class<? extends AsyncListener>> asyncListeners = resourceIndex.getInheritedClasses(file, AsyncListener.class);
+ if (asyncListeners != null)
+ {
+ eligibleClasses.addAll(asyncListeners);
+ }
+
+ // JSP resource injection support
+ // javax.servlet.jsp.tagext.Tag classes
+ Collection<Class<? extends Tag>> jspTags = resourceIndex.getInheritedClasses(file, Tag.class);
+ if (jspTags != null)
+ {
+ eligibleClasses.addAll(jspTags);
+ }
+
+ // javax.servlet.jsp.tagext.SimpleTag classes
+ Collection<Class<? extends SimpleTag>> simpleTags = resourceIndex.getInheritedClasses(file, SimpleTag.class);
+ if (simpleTags != null)
+ {
+ eligibleClasses.addAll(simpleTags);
+ }
+
+ }
+
+ return eligibleClasses;
+ }
+
+ private Collection<Class<?>> retainResourceInjectionEligibleWebAppClasses(Collection<Class<?>> specEligibleClasses, Collection<Class<?>> annotatedClasses)
+ {
+ Set<Class<?>> eligibleClasses = new HashSet<Class<?>>();
+
+ for (Class<?> annotatedClass : annotatedClasses)
+ {
+ for (Class<?> specEligibleClass : specEligibleClasses)
+ {
+ if (annotatedClass.isAssignableFrom(specEligibleClass))
+ {
+ eligibleClasses.add(annotatedClass);
+ break;
+ }
+ }
+ }
+ return eligibleClasses;
+ }
+
+}
Modified: tags/6.0.0.Final/tomcat/src/resources/standalone/switchboard-jboss-beans.xml
===================================================================
--- tags/6.0.0.Final/tomcat/src/resources/standalone/switchboard-jboss-beans.xml 2010-12-24 22:38:29 UTC (rev 110224)
+++ tags/6.0.0.Final/tomcat/src/resources/standalone/switchboard-jboss-beans.xml 2010-12-27 01:53:35 UTC (rev 110225)
@@ -72,9 +72,6 @@
-->
<bean name="org.jboss.switchboard.UserTransactionRefResourceProvider" class="org.jboss.as.switchboard.resource.provider.UserTransactionRefResourceProvider"/>
- <!-- ResourceProvider for java:comp/TransactionSynchronizationRegistry (EE.5.11 of Java EE 6 spec)
--->
- <bean name="org.jboss.switchboard.TransactionSyncRegistryRefResourceProvider" class="org.jboss.as.switchboard.resource.provider.TransactionSynchronizationRefResourceProvider"/>
@@ -87,9 +84,6 @@
<inject bean="org.jboss.switchboard.ResourceRefResourceProvider"/>
<inject bean="org.jboss.switchboard.ORBRefResourceProvider"/>
<inject bean="org.jboss.switchboard.UserTransactionRefResourceProvider"/>
- <!-- Disabled till https://jira.jboss.org/browse/JBAS-8465 is fixed
- <inject bean="org.jboss.switchboard.TransactionSyncRegistryRefResourceProvider"/>
- -->
</list>
</property>
Added: tags/6.0.0.Final/tomcat/src/resources/standard/war-deployers-jboss-beans.xml
===================================================================
--- tags/6.0.0.Final/tomcat/src/resources/standard/war-deployers-jboss-beans.xml (rev 0)
+++ tags/6.0.0.Final/tomcat/src/resources/standard/war-deployers-jboss-beans.xml 2010-12-27 01:53:35 UTC (rev 110225)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Web application deployers
+$Id: war-deployers-jboss-beans.xml 107713 2010-08-20 13:18:57Z wolfc $
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- WAR Structure -->
+ <bean name="WARStructure" class="org.jboss.web.deployers.WARStructure">
+ <property name="webInfLibFilter">
+ <!-- We accept all .jar files in WEB-INF/lib -->
+ <bean name="WebInfLibFilter" class="org.jboss.vfs.util.SuffixMatchFilter">
+ <constructor><parameter class="java.lang.String">.jar</parameter></constructor>
+ </bean>
+ </property>
+ <property name="includeWebInfInClasspath">true</property>
+ <property name="contextInfoOrder">1000</property>
+ </bean>
+
+ <bean name="WebAppParsingDeployer" class="org.jboss.deployment.WebAppParsingDeployer">
+ <property name="relativeOrder">2000</property>
+ </bean>
+ <bean name="WebAppFragmentParsingDeployer" class="org.jboss.deployment.WebAppFragmentParsingDeployer">
+ <property name="relativeOrder">2001</property>
+ </bean>
+ <bean name="TldParsingDeployer" class="org.jboss.deployment.TldParsingDeployer">
+ <property name="relativeOrder">2002</property>
+ </bean>
+ <bean name="JBossWebAppParsingDeployer" class="org.jboss.deployment.JBossWebAppParsingDeployer">
+ <property name="relativeOrder">2003</property>
+ </bean>
+ <bean name="ServletContainerInitializerDeployer" class="org.jboss.web.deployers.ServletContainerInitializerDeployer">
+ <!-- JARs containing SCIs -->
+ <property name="sciJars">
+ <list class="java.util.ArrayList" elementClass="java.net.URL">
+ </list>
+ </property>
+ </bean>
+ <bean name="SharedTldMetaDataDeployer"
+ class="org.jboss.web.deployers.SharedTldMetaDataDeployer">
+ <!-- JARs containing TLDs -->
+ <property name="tldJars">
+ <list class="java.util.ArrayList" elementClass="java.net.URL">
+ <value>${jboss.server.home.url}/deploy/jbossweb.sar/jstl.jar</value>
+ </list>
+ </property>
+ </bean>
+ <bean name="SharedJBossWebMetaDataDeployer"
+ class="org.jboss.web.deployers.SharedJBossWebMetaDataDeployer">
+ <property name="webXml">${jboss.server.home.url}/deploy/jbossweb.sar/web.xml</property>
+ </bean>
+ <bean name="WebAnnotationMetaDataDeployer" class="org.jboss.web.deployers.WarAnnotationMetaDataDeployer">
+ <property name="relativeOrder">2005</property>
+ <!-- Order this after AopMetaDataDeployer *if it is present* -->
+ <install method="addInput">
+ <parameter class="java.lang.String">org.jboss.aop.asintegration.jboss5.AopMetaDataDeployerOutput</parameter>
+ </install>
+ </bean>
+
+ <!-- See JBAS-6062 -->
+ <bean name="WebXmlLessDeployer" class="org.jboss.deployment.LegacyWebXmlLessDeployer"/>
+
+ <!-- Allow for war local class loaders: in testing -->
+ <bean name="WarClassLoaderDeployer" class="org.jboss.web.tomcat.service.deployers.WarClassLoaderDeployer">
+ <property name="relativeOrder">-1</property>
+ <property name="filteredPackages">javax.servlet</property>
+ </bean>
+
+ <!--
+ Injects default clustering metadata.
+ TODO. A better approach is to use a jboss-web.xml equivalent to conf/web.xml
+ and conf/standardjboss.xml as the source for defaults.
+ -->
+ <bean name="WebAppClusteringDefaultsDeployer"
+ class="org.jboss.web.tomcat.service.deployers.ClusteringDefaultsDeployer">
+
+ <!-- Default session cache config used by distributable webapps -->
+ <property name="cacheName">standard-session-cache</property>
+
+ <!--
+ The following two properties define when sessions are replicated to
+ the other nodes.
+ The default value, "instant", uses the request thread to replicate changes
+ to the other nodes at the end of requests. In this case, the
+ "SnapshotInterval" property is not used.
+ The "interval" mode uses a background thread that periodically checks for
+ modified sessions and replicates them. The "SnapshotInterval"
+ property controls how often (in milliseconds) the background thread
+ should run.
+ -->
+ <property name="snapshotMode">INSTANT</property>
+ <property name="snapshotInterval">1000</property>
+
+ <property name="replicationGranularity">SESSION</property>
+ <property name="replicationTrigger">SET_AND_NON_PRIMITIVE_GET</property>
+
+ <!--
+ Whether by default to add special session handling to coordinate use
+ with mod_jk or other JK connector variants.
+ If a JK connector is used, you will need to set the JvmRoute inside
+ JBossWeb, e.g. configure,
+ Engine name="jboss.web" jvmRoute="Node1" defaultHost="localhost"
+ in server.xml.
+
+ This value can be configured per webapp in the webapp's jboss.xml.
+
+ If not set, the default will be to add the special session handling
+ if a jvmRoute is configured on the Engine. So, generally the only reason
+ to configure this overall default is to set it to 'false' and thus force
+ per webapp configuration.
+ -->
+ <property name="useJK">true</property>
+ <!--
+ <property name="useSessionPassivation">false</property>
+ <property name="passivationMaxIdleTime">-1</property>
+ <property name="passivationMinIdleTime">-1</property>
+ -->
+
+ <!--
+ Determines the maximum interval between requests, in seconds, after
+ which a request will trigger replication of the session's timestamp
+ regardless of whether the request has otherwise made the session dirty.
+ Such replication ensures that other nodes in the cluster are aware of
+ the most recent value for the session's timestamp and won't incorrectly
+ expire an unreplicated session upon failover. It also results in correct
+ values for HttpSession.getLastAccessedTime() calls following failover.
+
+ The cost of timestamp replication is considerably lower in JBoss AS 5
+ than it is in earlier versions since replicating a timestamp does not
+ necessitate replicating any other data.
+
+ A value of 0 means the metadata will be replicated whenever the session is
+ accessed. A value of -1 means the metadata will be replicated only if some
+ other activity during the request (e.g. modifying an attribute) has
+ resulted in other replication work involving the session. A positive value
+ greater than the HttpSession.getMaxInactiveInterval() value will be treated
+ as a likely misconfiguration and converted to 0; i.e. replicate the
+ metadata on every request.
+ -->
+ <property name="maxUnreplicatedInterval">60</property>
+
+ </bean>
+
+ <!-- The WebMetaData to service mbean deployer -->
+ <bean name="WarDeployer" class="org.jboss.web.tomcat.service.deployers.TomcatDeployer">
+ <constructor><parameter><inject bean="NamingJavaEEComponentInformer"/></parameter></constructor>
+
+ <!-- Inject the MainDeployer for resolving cross deployment refs -->
+ <property name="mainDeployer"><inject bean="MainDeployer" /></property>
+
+ <property name="relativeOrder">3000</property>
+
+ <property name="configFile">
+ <value-factory bean="ServiceBindingManager" method="getResourceBinding">
+ <parameter>jboss.web:service=WebServer</parameter>
+ <parameter>${jboss.server.home.url}/deploy/jbossweb.sar/server.xml</parameter>
+ </value-factory>
+ </property>
+
+ <!-- You can configure a set of authenticators keyed by http-auth method
+ used. This will apply the same set of authenticators across all web
+ applications. You can override the set of authenticators at the web
+ application level by adding <authenticators> element to the respective
+ jboss-web.xml
+ -->
+ <property name="authenticators">
+ <map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>BASIC</key>
+ <value>org.apache.catalina.authenticator.BasicAuthenticator</value>
+ </entry>
+ <entry>
+ <key>CLIENT-CERT</key>
+ <value>org.apache.catalina.authenticator.SSLAuthenticator</value>
+ </entry>
+ <entry>
+ <key>DIGEST</key>
+ <value>org.apache.catalina.authenticator.DigestAuthenticator</value>
+ </entry>
+ <entry>
+ <key>FORM</key>
+ <value>org.apache.catalina.authenticator.FormAuthenticator</value>
+ </entry>
+ <entry>
+ <key>NONE</key>
+ <value>org.apache.catalina.authenticator.NonLoginAuthenticator</value>
+ </entry>
+ </map>
+ </property>
+
+ <!-- The JAAS security domain to use in the absense of an explicit
+ security-domain specification in the war WEB-INF/jboss-web.xml
+ -->
+ <property name="defaultSecurityDomain">java:/jaas/jboss-web-policy</property>
+
+ <!-- Get the flag indicating if the normal Java2 parent first class
+ loading model should be used over the servlet 2.3 web container first
+ model.
+ -->
+ <property name="java2ClassLoadingCompliance">false</property>
+
+ <property name="lenientEjbLink">true</property>
+
+ <!--Flag to delete the Work Dir on Context Destroy -->
+ <property name="deleteWorkDirOnContextDestroy">true</property>
+
+ <!-- The name of the request property under with the authenticated JAAS
+ Subject is stored on successful authentication. If null or empty then
+ the Subject will not be stored.
+ -->
+ <!--
+ <property name="subjectAttributeName">j_subject</property>
+ -->
+
+ <!-- The SessionIdAlphabet is the set of characters used to create a session Id
+ It must be made up of exactly 65 unique characters
+ <property name="sessionIdAlphabet">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_</property>
+ -->
+
+ <property name="domain">jboss.web</property>
+ <!-- Specify a Bean for JBoss Security PolicyRegistration -->
+ <property name="policyRegistrationName">JBossSecurityPolicyRegistration</property>
+
+ <!-- Specify a SecurityManagement Wrapper -->
+ <property name="securityManagementName">JNDIBasedSecurityManagement</property>
+
+ <!-- Specify a SecurityContext FQN class name -->
+ <property name="securityContextClassName">org.jboss.security.plugins.JBossSecurityContext</property>
+
+ <install bean="ManagedDeploymentCreator" method="addAttachmentType">
+ <parameter>
+ <value>org.jboss.metadata.web.jboss.JBossWebMetaData</value>
+ </parameter>
+ <parameter>
+ <value>war</value>
+ </parameter>
+ </install>
+ <uninstall bean="ManagedDeploymentCreator" method="removeAttachmentType">
+ <parameter>
+ <value>org.jboss.metadata.web.jboss.JBossWebMetaData</value>
+ </parameter>
+ </uninstall>
+
+ </bean>
+
+ <!-- A custom (a.k.a hack) deployer for merging jbossweb metadata -->
+ <bean name="MergedJBossWebMetaDataDeployer"
+ class="org.jboss.web.deployers.MergedJBossWebMetaDataHackDeployer">
+ </bean>
+
+</deployment>
More information about the jboss-cvs-commits
mailing list