[jboss-cvs] JBossAS SVN: r87087 - in branches/Branch_5_0/testsuite: src/main/org/jboss/test/jca/test and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 9 11:57:47 EDT 2009
Author: jesper.pedersen
Date: 2009-04-09 11:57:47 -0400 (Thu, 09 Apr 2009)
New Revision: 87087
Added:
branches/Branch_5_0/testsuite/src/main/org/jboss/test/jca/test/ScopedRARNoJBossAppUnitTestCase.java
branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/
branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/ear/
branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/ear/META-INF/
branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/ear/META-INF/application.xml
branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/scoped-adapter-ds.xml
Modified:
branches/Branch_5_0/testsuite/imports/sections/jca.xml
Log:
[JBAS-6600] ScopedRARNoJBossApp test case
Modified: branches/Branch_5_0/testsuite/imports/sections/jca.xml
===================================================================
--- branches/Branch_5_0/testsuite/imports/sections/jca.xml 2009-04-09 15:50:34 UTC (rev 87086)
+++ branches/Branch_5_0/testsuite/imports/sections/jca.xml 2009-04-09 15:57:47 UTC (rev 87087)
@@ -296,6 +296,26 @@
<include name="scoped-adapter-ds.xml"/>
</metainf>
</jar>
+
+ <!-- test a scoped rar without a jboss-app.xml -->
+ <jar destfile="${build.lib}/testscopedrar-nojbossapp.ear">
+
+ <fileset dir="${build.lib}">
+ <include name="jbosstestadapter.rar"/>
+ </fileset>
+ <metainf dir="${build.resources}/jca/scoped-nojbossapp/ear/META-INF">
+ <include name="*.xml"/>
+ </metainf>
+ </jar>
+ <jar destfile="${build.lib}/testscopedrar-nojbossapp.jar">
+
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/test/jca/mbean/Scoped*"/>
+ </fileset>
+ <metainf dir="${build.resources}/jca/scoped-nojbossapp">
+ <include name="scoped-adapter-ds.xml"/>
+ </metainf>
+ </jar>
</target>
<!-- jca property test -->
Added: branches/Branch_5_0/testsuite/src/main/org/jboss/test/jca/test/ScopedRARNoJBossAppUnitTestCase.java
===================================================================
--- branches/Branch_5_0/testsuite/src/main/org/jboss/test/jca/test/ScopedRARNoJBossAppUnitTestCase.java (rev 0)
+++ branches/Branch_5_0/testsuite/src/main/org/jboss/test/jca/test/ScopedRARNoJBossAppUnitTestCase.java 2009-04-09 15:57:47 UTC (rev 87087)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.test.jca.test;
+
+import javax.management.ObjectName;
+
+import org.jboss.system.ServiceMBean;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * ScopedRARNoJBossAppUnitTestCase.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ * @version $Revision: 85945 $
+ */
+public class ScopedRARNoJBossAppUnitTestCase extends JBossTestCase
+{
+
+ public ScopedRARNoJBossAppUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testScopedRAR() throws Exception
+ {
+ deploy("testscopedrar-nojbossapp.ear");
+ try
+ {
+ deploy("testscopedrar-nojbossapp.jar");
+ try
+ {
+ ObjectName name = new ObjectName("jboss.test:test=Scoped");
+ int state = (Integer) getServer().getAttribute(name, "State");
+ assertEquals(ServiceMBean.STARTED, state);
+ }
+ finally
+ {
+ undeploy("testscopedrar-nojbossapp.jar");
+ }
+ }
+ finally
+ {
+ undeploy("testscopedrar-nojbossapp.ear");
+ }
+ }
+}
Added: branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/ear/META-INF/application.xml
===================================================================
--- branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/ear/META-INF/application.xml (rev 0)
+++ branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/ear/META-INF/application.xml 2009-04-09 15:57:47 UTC (rev 87087)
@@ -0,0 +1,15 @@
+<?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>Scoped EAR Deployment Test</display-name>
+
+ <module><ejb>jbosstestadapter.rar</ejb></module>
+
+</application>
+
Added: branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/scoped-adapter-ds.xml
===================================================================
--- branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/scoped-adapter-ds.xml (rev 0)
+++ branches/Branch_5_0/testsuite/src/resources/jca/scoped-nojbossapp/scoped-adapter-ds.xml 2009-04-09 15:57:47 UTC (rev 87087)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<connection-factories>
+
+ <loader-repository>jboss.j2ee:service=EARDeployment,url='testscopedrar-nojbossapp.ear',extension=LoaderRepository</loader-repository>
+
+ <tx-connection-factory>
+
+ <jndi-name>ScopedCF</jndi-name>
+
+ <xa-transaction/>
+
+ <rar-name>testscopedrar-nojbossapp.ear#jbosstestadapter.rar</rar-name>
+ <connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
+
+ <config-property name="IntegerProperty" type="java.lang.Integer">2</config-property>
+ <config-property name="BooleanProperty" type="java.lang.Boolean">false</config-property>
+ <config-property name="DoubleProperty" type="java.lang.Double">5.5</config-property>
+ <config-property name="UrlProperty" type="java.net.URL">http://www.jboss.org</config-property>
+
+ </tx-connection-factory>
+
+ <mbean code="org.jboss.test.jca.mbean.Scoped"
+ name="jboss.test:test=Scoped">
+ <depends>jboss.jca:service=ConnectionFactoryBinding,name=ScopedCF</depends>
+ </mbean>
+
+</connection-factories>
More information about the jboss-cvs-commits
mailing list