[jboss-cvs] JBossAS SVN: r96261 - in projects/weld-int/trunk/deployer-mc-int/src: test/resources/org/jboss/test/deployers/test and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 11 10:19:34 EST 2009
Author: kabir.khan at jboss.com
Date: 2009-11-11 10:19:33 -0500 (Wed, 11 Nov 2009)
New Revision: 96261
Added:
projects/weld-int/trunk/deployer-mc-int/src/main/java/org/jboss/weld/integration/deployer/mc/WeldElementSchemaInstaller.java
Modified:
projects/weld-int/trunk/deployer-mc-int/src/test/resources/org/jboss/test/deployers/test/McIntegrationTestCase.xml
projects/weld-int/trunk/deployer-mc-int/src/test/resources/weld/mcandweld/bidirectional/mc/end/META-INF/end-beans.xml
Log:
[WELDINT-29] Support and test <weld/> element
Added: projects/weld-int/trunk/deployer-mc-int/src/main/java/org/jboss/weld/integration/deployer/mc/WeldElementSchemaInstaller.java
===================================================================
--- projects/weld-int/trunk/deployer-mc-int/src/main/java/org/jboss/weld/integration/deployer/mc/WeldElementSchemaInstaller.java (rev 0)
+++ projects/weld-int/trunk/deployer-mc-int/src/main/java/org/jboss/weld/integration/deployer/mc/WeldElementSchemaInstaller.java 2009-11-11 15:19:33 UTC (rev 96261)
@@ -0,0 +1,43 @@
+/*
+* 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.weld.integration.deployer.mc;
+
+import org.jboss.kernel.weld.plugins.metadata.WeldBeanMetaData;
+import org.jboss.xb.util.JBossXBHelper;
+
+/**
+ * Bean to add the WeldBeanMetaData handler for <code><weld urn:jboss:weld-beans:1.0/></code>
+ * elements. These have the same format as the normal MC <code><bean></code> elements, but
+ * add an additional @WeldEnabled annotation which registers the MC beans so that they are pushed to
+ * weld.
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class WeldElementSchemaInstaller
+{
+ public WeldElementSchemaInstaller()
+ {
+ String namespace = JBossXBHelper.findNamespace(WeldBeanMetaData.class);
+ JBossXBHelper.addClassBinding(namespace, WeldBeanMetaData.class);
+ }
+}
Modified: projects/weld-int/trunk/deployer-mc-int/src/test/resources/org/jboss/test/deployers/test/McIntegrationTestCase.xml
===================================================================
--- projects/weld-int/trunk/deployer-mc-int/src/test/resources/org/jboss/test/deployers/test/McIntegrationTestCase.xml 2009-11-11 14:51:48 UTC (rev 96260)
+++ projects/weld-int/trunk/deployer-mc-int/src/test/resources/org/jboss/test/deployers/test/McIntegrationTestCase.xml 2009-11-11 15:19:33 UTC (rev 96261)
@@ -1,5 +1,7 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="WeldElementSchemaInstaller" class="org.jboss.weld.integration.deployer.mc.WeldElementSchemaInstaller"/>
+
<bean name="EarStructure" class="org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer"/>
<bean name="WarStructure" class="org.jboss.test.deployers.vfs.structure.war.support.MockWarStructureDeployer"/>
Modified: projects/weld-int/trunk/deployer-mc-int/src/test/resources/weld/mcandweld/bidirectional/mc/end/META-INF/end-beans.xml
===================================================================
--- projects/weld-int/trunk/deployer-mc-int/src/test/resources/weld/mcandweld/bidirectional/mc/end/META-INF/end-beans.xml 2009-11-11 14:51:48 UTC (rev 96260)
+++ projects/weld-int/trunk/deployer-mc-int/src/test/resources/weld/mcandweld/bidirectional/mc/end/META-INF/end-beans.xml 2009-11-11 15:19:33 UTC (rev 96261)
@@ -2,7 +2,5 @@
<bean name="First" class="org.jboss.test.deployers.support.mcandweld.bidirectional.end.First">
<annotation>@org.jboss.kernel.weld.metadata.api.annotations.WeldEnabled</annotation>
</bean>
- <bean name="Last" class="org.jboss.test.deployers.support.mcandweld.bidirectional.end.Last">
- <annotation>@org.jboss.kernel.weld.metadata.api.annotations.WeldEnabled</annotation>
- </bean>
+ <weld xmlns="urn:jboss:weld-beans:1.0" name="Last" class="org.jboss.test.deployers.support.mcandweld.bidirectional.end.Last"/>
</deployment>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list