[jboss-cvs] JBossAS SVN: r61626 - in branches/Branch_4_2/ejb3: src/resources/test and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 22 21:28:55 EDT 2007
Author: bdecoste
Date: 2007-03-22 21:28:55 -0400 (Thu, 22 Mar 2007)
New Revision: 61626
Added:
branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/
branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/META-INF/
branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/META-INF/jboss.xml
branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/propertyreplacement-service.xml
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/StatelessBean.java
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/StatelessRemote.java
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/unit/
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/unit/PropertyReplacementTestCase.java
Modified:
branches/Branch_4_2/ejb3/build-test.xml
Log:
test for property replacement based on StringProperyReplacer in dd object factories
Modified: branches/Branch_4_2/ejb3/build-test.xml
===================================================================
--- branches/Branch_4_2/ejb3/build-test.xml 2007-03-23 00:16:03 UTC (rev 61625)
+++ branches/Branch_4_2/ejb3/build-test.xml 2007-03-23 01:28:55 UTC (rev 61626)
@@ -2098,6 +2098,24 @@
</jar>
</target>
+ <target name="persistenceunits"
+ description="Builds all jar files."
+ depends="compile-classes">
+
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/persistenceunits-test.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/persistenceunits/*.class"/>
+ </fileset>
+ <fileset dir="${resources}/test/persistenceunits">
+ <include name="META-INF/persistence.xml"/>
+ <include name="*.xml"/>
+ <include name="*.jar"/>
+ </fileset>
+ </jar>
+ </target>
+
<target name="timestampentity"
description="Builds all jar files."
depends="compile-classes">
@@ -2636,7 +2654,7 @@
</fileset>
</copy>
</target>
-
+
<target name="stateless"
description="Builds all jar files."
depends="compile-classes">
@@ -2653,6 +2671,29 @@
</fileset>
</jar>
</target>
+
+ <target name="propertyreplacement"
+ description="Builds all jar files."
+ depends="compile-classes">
+
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/propertyreplacement-test.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/propertyreplacement/*.class"/>
+ </fileset>
+ <fileset dir="${resources}/test/propertyreplacement">
+ <include name="META-INF/*.xml"/>
+ <include name="*.xml"/>
+ </fileset>
+ </jar>
+
+ <copy todir="${build.lib}">
+ <fileset dir="${resources}/test/propertyreplacement">
+ <include name="*.xml"/>
+ </fileset>
+ </copy>
+ </target>
<target name="invoker"
description="Builds all jar files."
@@ -3043,7 +3084,7 @@
</jar>
</target>
- <target name="jars" depends="invalidtxmdb, descriptortypo, libdeployment, homeinterface, timestampentity, servicexmbean, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
+ <target name="jars" depends="propertyreplacement, persistenceunits, invalidtxmdb, descriptortypo, libdeployment, homeinterface, timestampentity, servicexmbean, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ear, ejbthree440,
ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree751, ejbthree832,
aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency, jaxws,
@@ -3468,6 +3509,9 @@
<param name="test" value="homeinterface"/>
</antcall>
<antcall target="test" inheritRefs="true">
+ <param name="test" value="propertyreplacement"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
<param name="test" value="deployer"/>
</antcall>
<antcall target="test" inheritRefs="true">
@@ -3619,6 +3663,9 @@
<param name="test" value="entity"/>
</antcall>
<antcall target="test" inheritRefs="true">
+ <param name="test" value="persistenceunits"/>
+ </antcall>
+ <antcall target="test" inheritRefs="true">
<param name="test" value="manytomany"/>
</antcall>
<antcall target="test" inheritRefs="true">
Added: branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/META-INF/jboss.xml (rev 0)
+++ branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/META-INF/jboss.xml 2007-03-23 01:28:55 UTC (rev 61626)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<jboss
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+ version="3.0">
+ <enterprise-beans>
+ <session>
+ <ejb-name>StatelessBean</ejb-name>
+ <jndi-name>${slsb-jndi-binding}</jndi-name>
+ </session>
+ </enterprise-beans>
+</jboss>
Added: branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/propertyreplacement-service.xml
===================================================================
--- branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/propertyreplacement-service.xml (rev 0)
+++ branches/Branch_4_2/ejb3/src/resources/test/propertyreplacement/propertyreplacement-service.xml 2007-03-23 01:28:55 UTC (rev 61626)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE server>
+<!-- $Id: properties-service.xml 16662 2003-08-27 04:38:22Z patriot1burke $ -->
+
+<server>
+
+
+ <!-- ==================================================================== -->
+ <!-- System Properties Service -->
+ <!-- ==================================================================== -->
+
+ <!--
+ | Allows rich access to system properties.
+ -->
+
+ <mbean code="org.jboss.varia.property.SystemPropertiesService"
+ name="jboss:type=Service,name=SystemPropertiesTest">
+
+ <!--
+ | Set raw properties file style properties.
+ -->
+
+ <attribute name="Properties">
+ slsb-jndi-binding=ReplacedBinding
+ </attribute>
+ </mbean>
+
+</server>
Added: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/StatelessBean.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/StatelessBean.java (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/StatelessBean.java 2007-03-23 01:28:55 UTC (rev 61626)
@@ -0,0 +1,41 @@
+/*
+ * 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.ejb3.test.propertyreplacement;
+
+import javax.ejb.Stateless;
+import javax.ejb.Remote;
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateless
+ at Remote(StatelessRemote.class)
+public class StatelessBean implements StatelessRemote
+{
+ private static final Logger log = Logger.getLogger(StatelessBean.class);
+
+ public void test()
+ {
+
+ }
+}
Added: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/StatelessRemote.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/StatelessRemote.java (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/StatelessRemote.java 2007-03-23 01:28:55 UTC (rev 61626)
@@ -0,0 +1,30 @@
+/*
+ * 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.ejb3.test.propertyreplacement;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface StatelessRemote
+{
+ void test();
+}
Added: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/unit/PropertyReplacementTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/unit/PropertyReplacementTestCase.java (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/propertyreplacement/unit/PropertyReplacementTestCase.java 2007-03-23 01:28:55 UTC (rev 61626)
@@ -0,0 +1,53 @@
+/*
+ * 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.ejb3.test.propertyreplacement.unit;
+
+import org.jboss.ejb3.test.propertyreplacement.StatelessRemote;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.JBossTestCase;
+import junit.framework.Test;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public class PropertyReplacementTestCase extends JBossTestCase
+{
+ private static final Logger log = Logger.getLogger(PropertyReplacementTestCase.class);
+
+ public PropertyReplacementTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testReplacement() throws Exception
+ {
+ StatelessRemote slsb = (StatelessRemote) getInitialContext().lookup("ReplacedBinding");
+ assertNotNull(slsb);
+ slsb.test();
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(PropertyReplacementTestCase.class, "propertyreplacement-test.jar");
+ }
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list