[jboss-cvs] JBossAS SVN: r106149 - in trunk: ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 18 07:36:10 EDT 2010


Author: wolfc
Date: 2010-06-18 07:36:09 -0400 (Fri, 18 Jun 2010)
New Revision: 106149

Added:
   trunk/ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor/DefaultJNDIBindingPolicyProcessor.java
   trunk/ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor/DefaultJNDIBindingPolicyProcessorFactory.java
   trunk/ejb3/src/resources/standard/
   trunk/ejb3/src/resources/standard/ejb3-deployers-jboss-beans.xml
Modified:
   trunk/build/build.xml
Log:
JBAS-8113: use JavaEE6JndiBindingPolicy as default in standard config

Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml	2010-06-18 10:43:54 UTC (rev 106148)
+++ trunk/build/build.xml	2010-06-18 11:36:09 UTC (rev 106149)
@@ -486,6 +486,12 @@
       </fileset>
     </copy>
 
+    <!-- TODO: temporarily override ejb3-deployers-jboss-beans.xml -->
+    <copy todir="${install.standard.deployers}" overwrite="true">
+      <fileset dir="${project.root}/ejb3/src/resources/standard">
+        <include name="ejb3-deployers-jboss-beans.xml"/>
+      </fileset>
+    </copy>
   </target>
 
   <target name="jboss-all-client" depends="configure"

Added: trunk/ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor/DefaultJNDIBindingPolicyProcessor.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor/DefaultJNDIBindingPolicyProcessor.java	                        (rev 0)
+++ trunk/ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor/DefaultJNDIBindingPolicyProcessor.java	2010-06-18 11:36:09 UTC (rev 106149)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.ejb3.metadata.processor;
+
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.process.ProcessingException;
+import org.jboss.metadata.process.processor.JBossMetaDataProcessor;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class DefaultJNDIBindingPolicyProcessor implements JBossMetaDataProcessor<JBossMetaData>
+{
+   private String policy;
+
+   protected DefaultJNDIBindingPolicyProcessor(String policy)
+   {
+      this.policy = policy;
+   }
+
+   public JBossMetaData process(JBossMetaData metaData) throws ProcessingException
+   {
+      if(policy != null && metaData.getJndiBindingPolicy() == null)
+         metaData.setJndiBindingPolicy(policy);
+
+      return metaData;
+   }
+}

Added: trunk/ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor/DefaultJNDIBindingPolicyProcessorFactory.java
===================================================================
--- trunk/ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor/DefaultJNDIBindingPolicyProcessorFactory.java	                        (rev 0)
+++ trunk/ejb3/src/main/java/org/jboss/as/ejb3/metadata/processor/DefaultJNDIBindingPolicyProcessorFactory.java	2010-06-18 11:36:09 UTC (rev 106149)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.ejb3.metadata.processor;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb3.deployers.metadata.processor.JBossMetaDataProcessorFactory;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.process.processor.JBossMetaDataProcessor;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class DefaultJNDIBindingPolicyProcessorFactory implements JBossMetaDataProcessorFactory<JBossMetaData>
+{
+   private String policy = null;
+
+   public JBossMetaDataProcessor<JBossMetaData> create(DeploymentUnit deploymentUnit)
+   {
+      return new DefaultJNDIBindingPolicyProcessor(policy);
+   }
+
+   public void setPolicy(String policy)
+   {
+      this.policy = policy;
+   }
+}

Copied: trunk/ejb3/src/resources/standard/ejb3-deployers-jboss-beans.xml (from rev 105239, projects/ejb3/trunk/deployers/src/main/resources/META-INF/ejb3-deployers-jboss-beans.xml)
===================================================================
--- trunk/ejb3/src/resources/standard/ejb3-deployers-jboss-beans.xml	                        (rev 0)
+++ trunk/ejb3/src/resources/standard/ejb3-deployers-jboss-beans.xml	2010-06-18 11:36:09 UTC (rev 106149)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+    <!-- TODO: refactor ejb3-deployers to provide just the facility of Ejb3MetaDataProcessingDeployer
+         and create new ejb3-metadata-processors-beans.xml(s) in an AS6 (/other) runtime profile(s).
+      -->
+    
+    <!--  We don't want the AOPDependencyBuilder  -->
+    <annotation>@org.jboss.aop.microcontainer.annotations.DisableAOP</annotation>
+    
+    <!-- EJB3 ProcessorChain Deployer -->
+    <bean name="Ejb3MetadataProcessingDeployer"    class="org.jboss.ejb3.deployers.Ejb3MetadataProcessingDeployer">        
+        <!-- A validator chain for validating the processed metadata -->
+        <property name="validatorChain"><inject bean="EJBMetadataValidatorChain"/></property>
+
+        <!-- Allow for addition/removal of processor factories -->
+        <incallback method="addProcessorFactory"/>
+        <uncallback method="removeProcessorFactory" />
+    </bean>
+    
+    <!-- Validator chain for validating EJB3 metadata (right now uses default validators which
+    are not configured here -->
+    <bean name="EJBMetadataValidatorChain" class="org.jboss.metadata.validation.chain.ejb.jboss.JBossMetaDataValidatorChain"/>
+    
+    <!--  EJBsDeployer -->
+    <bean name="EJBsDeployer" class="org.jboss.ejb3.deployers.EJBsDeployer"/>
+
+    <bean name="DefaultJNDIBindingPolicyProcessorFactory" class="org.jboss.as.ejb3.metadata.processor.DefaultJNDIBindingPolicyProcessorFactory">
+        <property name="policy">org.jboss.metadata.ejb.jboss.jndipolicy.plugins.JavaEE6JndiBindingPolicy</property>
+    </bean>
+
+    <!-- Processor factory for setting the implicit default business local interface(JBMETA-122) -->
+    <bean name="SetDefaultLocalBusinessInterfaceProcessorFactory" 
+        class="org.jboss.ejb3.deployers.metadata.processor.SetDefaultLocalBusinessInterfaceProcessorFactory"/>
+
+    <!-- Processor factory for setting default ClusterConfig (JBMETA-133, EJBTHREE-1539)-->
+    <bean name="ClusterConfigDefaultValueProcessorFactory" 
+        class="org.jboss.ejb3.deployers.metadata.processor.ClusterConfigDefaultValueProcessorFactory"/>
+    
+    <!-- Processor factory for setting  explicit local JNDI name from @LocalBinding.jndiBinding (JBMETA-143) -->
+    <bean name="SetExplicitLocalJNDINameProcessorFactory" 
+        class="org.jboss.ejb3.deployers.metadata.processor.SetExplicitLocalJNDINameProcessorFactory"/>
+    
+    <!-- Processor factory for setting  the jndibinding policy for all beans in a deployment (JBMETA-232) -->
+    <bean name="JNDIBindingPolicyProcessorFactory" 
+        class="org.jboss.ejb3.deployers.metadata.processor.JNDIBindingPolicyProcessorFactory"/>
+    
+    <bean name="ContainerNameMetaDataProcessorFactory"
+        class="org.jboss.ejb3.deployers.metadata.processor.ContainerNameMetaDataProcessorFactory"/>
+    
+    
+</deployment>
\ No newline at end of file



More information about the jboss-cvs-commits mailing list