[jboss-cvs] JBossAS SVN: r72238 - in trunk/testsuite/src: main/org/jboss/test/deployers/ear/test and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 15 11:27:32 EDT 2008
Author: alex.loubyansky at jboss.com
Date: 2008-04-15 11:27:31 -0400 (Tue, 15 Apr 2008)
New Revision: 72238
Added:
trunk/testsuite/src/main/org/jboss/test/deployers/ear/test/EARAltDDClientDeploymentUnitTestCase.java
trunk/testsuite/src/resources/deployers/client1/META-INF/jboss-client.xml
trunk/testsuite/src/resources/deployers/ear-altdd-client/
trunk/testsuite/src/resources/deployers/ear-altdd-client/META-INF/
trunk/testsuite/src/resources/deployers/ear-altdd-client/META-INF/application.xml
trunk/testsuite/src/resources/deployers/ear-altdd-client/altdd-client.xml
Modified:
trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java
trunk/testsuite/src/resources/deployers/client1/META-INF/application-client.xml
Log:
JBAS-5445 a testcase for app client alt dd
Modified: trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java 2008-04-15 14:57:10 UTC (rev 72237)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/AbstractDeploymentTest.java 2008-04-15 15:27:31 UTC (rev 72238)
@@ -42,6 +42,7 @@
{
public static final String ear1Deployment = "testdeployers-ear1.ear";
public static final String earAltDDDeployment = "testdeployers-ear-altdd.ear";
+ public static final String earAltDDClientDeployment = "testdeployers-ear-altdd-client.ear";
public static final String ear1DeploymentUnpacked = "unpacked-ear1.ear";
public static final String ear2DeploymentUnpacked = "unpacked-ear2.ear";
public static final String earNoAppXml = "testdeployers-ear-noappxml.ear";
Added: trunk/testsuite/src/main/org/jboss/test/deployers/ear/test/EARAltDDClientDeploymentUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/ear/test/EARAltDDClientDeploymentUnitTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/ear/test/EARAltDDClientDeploymentUnitTestCase.java 2008-04-15 15:27:31 UTC (rev 72238)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.test.deployers.ear.test;
+
+import java.net.URL;
+import java.util.Properties;
+
+import javax.jms.Queue;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import junit.framework.Test;
+
+import org.jboss.test.cts.interfaces.StatelessSessionHome;
+import org.jboss.test.deployers.AbstractDeploymentTest;
+
+/**
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 66915 $
+ */
+public class EARAltDDClientDeploymentUnitTestCase extends AbstractDeploymentTest
+{
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(EARAltDDClientDeploymentUnitTestCase.class, earAltDDClientDeployment);
+ }
+
+ public EARAltDDClientDeploymentUnitTestCase(String test)
+ {
+ super(test);
+ }
+
+ public void testENC() throws Exception
+ {
+ Context enc = getENC();
+ String ddFile = (String) enc.lookup("dd-file");
+ assertEquals("altdd-client.xml", ddFile);
+ }
+
+ /** Build the InitialContext factory
+ * @return
+ * @throws NamingException
+ */
+ private Context getENC() throws NamingException
+ {
+ Properties env = new Properties();
+ env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
+ "org.jnp.interfaces.NamingContextFactory");
+ env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
+ env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
+ env.setProperty("j2ee.clientName", "test-client");
+ InitialContext ctx = new InitialContext(env);
+ Context enc = (Context) ctx.lookup("java:comp/env");
+ return enc;
+ }
+}
Modified: trunk/testsuite/src/resources/deployers/client1/META-INF/application-client.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/client1/META-INF/application-client.xml 2008-04-15 14:57:10 UTC (rev 72237)
+++ trunk/testsuite/src/resources/deployers/client1/META-INF/application-client.xml 2008-04-15 15:27:31 UTC (rev 72238)
@@ -6,4 +6,10 @@
http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
>
<display-name>Test Deployers Client1</display-name>
+
+ <env-entry>
+ <env-entry-name>dd-file</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>application-client.xml</env-entry-value>
+ </env-entry>
</application-client>
Added: trunk/testsuite/src/resources/deployers/client1/META-INF/jboss-client.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/client1/META-INF/jboss-client.xml (rev 0)
+++ trunk/testsuite/src/resources/deployers/client1/META-INF/jboss-client.xml 2008-04-15 15:27:31 UTC (rev 72238)
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>test-client</jndi-name>
+</jboss-client>
Added: trunk/testsuite/src/resources/deployers/ear-altdd-client/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/ear-altdd-client/META-INF/application.xml (rev 0)
+++ trunk/testsuite/src/resources/deployers/ear-altdd-client/META-INF/application.xml 2008-04-15 15:27:31 UTC (rev 72238)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<application version="1.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
+>
+
+ <display-name>EAR Deployment Test</display-name>
+
+ <module>
+ <java>testdeployers-client1.jar</java>
+ <alt-dd>altdd-client.xml</alt-dd>
+ </module>
+
+</application>
+
Added: trunk/testsuite/src/resources/deployers/ear-altdd-client/altdd-client.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/ear-altdd-client/altdd-client.xml (rev 0)
+++ trunk/testsuite/src/resources/deployers/ear-altdd-client/altdd-client.xml 2008-04-15 15:27:31 UTC (rev 72238)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+
+ <env-entry>
+ <env-entry-name>dd-file</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>altdd-client.xml</env-entry-value>
+ </env-entry>
+
+</application-client>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list