[jboss-cvs] JBossAS SVN: r73078 - in branches/JBPAPP_4_2_0_GA_CP/ejb3: src/resources/test and 6 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 6 11:00:03 EDT 2008
Author: wolfc
Date: 2008-05-06 11:00:03 -0400 (Tue, 06 May 2008)
New Revision: 73078
Added:
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/application.xml
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/jboss-app.xml
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/jboss.xml
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/lib/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/lib/xercesImpl-2.6.2.jar
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/Hello.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/HelloBean.java
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/unit/
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/unit/Classloader2UnitTestCase.java
Modified:
branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml
Log:
JBPAPP-818: unit test
Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml 2008-05-06 14:30:48 UTC (rev 73077)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml 2008-05-06 15:00:03 UTC (rev 73078)
@@ -1582,6 +1582,30 @@
</jar>
</target>
+ <target name="classloader2" depends="compile-classes">
+ <mkdir dir="${build.lib}"/>
+
+ <jar jarfile="${build.lib}/classloader2.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/test/classloader2/**/*.class"/>
+ </fileset>
+ <fileset dir="${resources}/test/classloader2">
+ <include name="META-INF/jboss.xml"/>
+ </fileset>
+ </jar>
+
+ <ear earfile="${build.lib}/classloader2.ear"
+ appxml="${build.resources}/test/classloader2/META-INF/application.xml">
+ <fileset dir="${build.lib}">
+ <include name="classloader2.jar"/>
+ </fileset>
+ <fileset dir="${resources}/test/classloader2">
+ <include name="META-INF/jboss-app.xml"/>
+ <include name="lib/xercesImpl-2.6.2.jar"/>
+ </fileset>
+ </ear>
+ </target>
+
<target name="clusteredservice"
description="Builds all jar files."
depends="compile-classes">
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/application.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/application.xml (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/application.xml 2008-05-06 15:00:03 UTC (rev 73078)
@@ -0,0 +1,9 @@
+<application version="1.4" schemaLocation="http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <display-name>Dummy application</display-name>
+ <description>Test application</description>
+
+ <module>
+ <ejb>classloader2.jar</ejb>
+ </module>
+
+</application>
\ No newline at end of file
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/jboss-app.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/jboss-app.xml (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/jboss-app.xml 2008-05-06 15:00:03 UTC (rev 73078)
@@ -0,0 +1,6 @@
+<jboss-app>
+ <loader-repository>
+ lysetele:loader=no.lyse.tele.ear
+ <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+ </loader-repository>
+</jboss-app>
\ No newline at end of file
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/jboss.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/jboss.xml (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/META-INF/jboss.xml 2008-05-06 15:00:03 UTC (rev 73078)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
+
+<jboss>
+
+</jboss>
\ No newline at end of file
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/lib/xercesImpl-2.6.2.jar
===================================================================
(Binary files differ)
Property changes on: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test/classloader2/lib/xercesImpl-2.6.2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/Hello.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/Hello.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/Hello.java 2008-05-06 15:00:03 UTC (rev 73078)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, 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.classloader2;
+
+import javax.ejb.Remote;
+
+/**
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Remote
+public interface Hello
+{
+ String sayHi(String name);
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/HelloBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/HelloBean.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/HelloBean.java 2008-05-06 15:00:03 UTC (rev 73078)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, 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.classloader2;
+
+import javax.ejb.Stateless;
+
+/**
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+public class HelloBean implements Hello
+{
+ public String sayHi(String name)
+ {
+ return "Hi " + name;
+ }
+}
Added: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/unit/Classloader2UnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/unit/Classloader2UnitTestCase.java (rev 0)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/test/org/jboss/ejb3/test/classloader2/unit/Classloader2UnitTestCase.java 2008-05-06 15:00:03 UTC (rev 73078)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, 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.classloader2.unit;
+
+import javax.naming.NamingException;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.classloader2.Hello;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Packaging xerces within an ear gives ClassCastExceptions during parsing of the jboss.xml
+ * descriptor.
+ *
+ * https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=176496&gid=1354
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class Classloader2UnitTestCase extends JBossTestCase
+{
+ public Classloader2UnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void test1() throws Exception
+ {
+ Hello bean = (Hello) getInitialContext().lookup("classloader2/HelloBean/remote");
+ String actual = bean.sayHi("me");
+
+ assertEquals("Hi me", actual);
+ }
+
+ /**
+ * Setup the test suite.
+ */
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(Classloader2UnitTestCase.class, "classloader2.ear");
+ }
+}
More information about the jboss-cvs-commits
mailing list