[jboss-cvs] JBossAS SVN: r103998 - in trunk: server/src/etc/conf/all and 11 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 15 09:42:18 EDT 2010
Author: alex.loubyansky at jboss.com
Date: 2010-04-15 09:42:16 -0400 (Thu, 15 Apr 2010)
New Revision: 103998
Added:
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/MDBTestMessageListener.java
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/MyJMSContainerInvoker.java
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/StandardMDB.java
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatus.java
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatusBean.java
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatusHome.java
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/test/
trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/test/MDBDefaultRANameUnitTestCase.java
trunk/testsuite/src/resources/mdbdefaultraname/
trunk/testsuite/src/resources/mdbdefaultraname/META-INF/
trunk/testsuite/src/resources/mdbdefaultraname/META-INF/ejb-jar.xml
trunk/testsuite/src/resources/mdbdefaultraname/META-INF/jboss.xml
Modified:
trunk/component-matrix/pom.xml
trunk/server/src/etc/conf/all/standardjboss.xml
trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
trunk/server/src/main/java/org/jboss/ejb/plugins/inflow/JBossJMSMessageEndpointFactory.java
trunk/testsuite/imports/sections/mdb.xml
trunk/testsuite/imports/test-jars.xml
Log:
JBAS-7911
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2010-04-15 13:40:37 UTC (rev 103997)
+++ trunk/component-matrix/pom.xml 2010-04-15 13:42:16 UTC (rev 103998)
@@ -119,7 +119,7 @@
<version.org.jboss.metadata.client>2.0.0.Alpha2</version.org.jboss.metadata.client>
<version.org.jboss.metadata.common>2.0.0.Alpha14</version.org.jboss.metadata.common>
<version.org.jboss.metadata.ear>2.0.0.Alpha3</version.org.jboss.metadata.ear>
- <version.org.jboss.metadata.ejb>2.0.0-alpha-10</version.org.jboss.metadata.ejb>
+ <version.org.jboss.metadata.ejb>2.0.0-alpha-11</version.org.jboss.metadata.ejb>
<version.org.jboss.metadata.rar>2.0.0.Alpha</version.org.jboss.metadata.rar>
<version.org.jboss.metadata.war>2.0.0.Alpha14</version.org.jboss.metadata.war>
<version.org.jboss.mod_cluster>1.1.0.CR1</version.org.jboss.mod_cluster>
Modified: trunk/server/src/etc/conf/all/standardjboss.xml
===================================================================
--- trunk/server/src/etc/conf/all/standardjboss.xml 2010-04-15 13:40:37 UTC (rev 103997)
+++ trunk/server/src/etc/conf/all/standardjboss.xml 2010-04-15 13:42:16 UTC (rev 103998)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC
- "-//JBoss//DTD JBOSS 5.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
+ "-//JBoss//DTD JBOSS 6.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss_6_0.dtd">
<!-- ===================================================================== -->
<!-- Standard JBoss EJB Configurations -->
@@ -22,6 +22,8 @@
-->
<unauthenticated-principal>anonymous</unauthenticated-principal>
+ <jms-resource-adapter>jms-ra.rar</jms-resource-adapter>
+
<invoker-proxy-bindings>
<invoker-proxy-binding>
Modified: trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml 2010-04-15 13:40:37 UTC (rev 103997)
+++ trunk/server/src/etc/deployers/metadata-deployer-jboss-beans.xml 2010-04-15 13:42:16 UTC (rev 103998)
@@ -247,7 +247,7 @@
<!-- JBossMetaData -->
<entry>
<key>jboss</key>
- <value>org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData</value>
+ <value>org.jboss.metadata.ejb.jboss.JBoss60DTDMetaData</value>
</entry>
<entry>
<key>jboss_3_0.dtd</key>
@@ -268,8 +268,12 @@
<entry>
<key>jboss_5_0.dtd</key>
<value>org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData</value>
- </entry>
+ </entry>
<entry>
+ <key>jboss_6_0.dtd</key>
+ <value>org.jboss.metadata.ejb.jboss.JBoss60DTDMetaData</value>
+ </entry>
+ <entry>
<key>jboss_5_0.xsd</key>
<value>org.jboss.metadata.ejb.jboss.JBoss50MetaData</value>
</entry>
Modified: trunk/server/src/main/java/org/jboss/ejb/plugins/inflow/JBossJMSMessageEndpointFactory.java
===================================================================
--- trunk/server/src/main/java/org/jboss/ejb/plugins/inflow/JBossJMSMessageEndpointFactory.java 2010-04-15 13:40:37 UTC (rev 103997)
+++ trunk/server/src/main/java/org/jboss/ejb/plugins/inflow/JBossJMSMessageEndpointFactory.java 2010-04-15 13:42:16 UTC (rev 103998)
@@ -47,7 +47,10 @@
// No resource adapter specified assume jms
String result = super.resolveResourceAdapterName();
if (result == null)
+ {
+ getLog().warn("Metadata is missing JMS resource adpater name. The default will be " + jmsra);
result = jmsra;
+ }
return result;
}
Modified: trunk/testsuite/imports/sections/mdb.xml
===================================================================
--- trunk/testsuite/imports/sections/mdb.xml 2010-04-15 13:40:37 UTC (rev 103997)
+++ trunk/testsuite/imports/sections/mdb.xml 2010-04-15 13:42:16 UTC (rev 103998)
@@ -83,4 +83,19 @@
<delete file="${build.resources}/messagedriven/jar/META-INF/original-jboss.xml"/>
</target>
+
+ <target name="_jars-mdbdefaultraname">
+ <mkdir dir="${build.lib}"/>
+ <jar destfile="${build.lib}/mdbdefaultraname.jar">
+ <fileset dir="${build.classes}">
+ <patternset refid="jboss.test.util.ejb.set"/>
+ <include name="org/jboss/test/mdbdefaultraname/bean/**"/>
+ <include name="org/jboss/test/jca/inflow/TestMessage*.class"/>
+ </fileset>
+ <fileset dir="${build.resources}/mdbdefaultraname">
+ <include name="**/*.xml"/>
+ </fileset>
+ </jar>
+ </target>
+
</project>
Modified: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml 2010-04-15 13:40:37 UTC (rev 103997)
+++ trunk/testsuite/imports/test-jars.xml 2010-04-15 13:42:16 UTC (rev 103998)
@@ -148,6 +148,7 @@
_jars-mdb,
_jars-mdbsessionpoolclear,
_jars-messagedriven,
+ _jars-mdbdefaultraname,
_jars-naming,
_jars-perf,
_jars-profileservice,
Added: trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/MDBTestMessageListener.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/MDBTestMessageListener.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/MDBTestMessageListener.java 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.mdbdefaultraname.bean;
+
+import javax.ejb.EJBException;
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+
+import org.jboss.test.jca.inflow.TestMessage;
+import org.jboss.test.jca.inflow.TestMessageListener;
+
+/**
+ * A TestMDBMessageListener.
+ *
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 67777 $
+ */
+public class MDBTestMessageListener implements MessageDrivenBean, TestMessageListener
+{
+ private MessageDrivenContext ctx;
+
+ public void deliverMessage(TestMessage message)
+ {
+ message.acknowledge();
+ }
+
+ public void deliverMessageNoTransaction(TestMessage message)
+ {
+ deliverMessage(message);
+ }
+
+ public void ejbCreate()
+ {
+ }
+
+ public void ejbRemove()
+ {
+ }
+
+ public void setMessageDrivenContext(MessageDrivenContext ctx)
+ {
+ this.ctx = ctx;
+ }
+}
Added: trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/MyJMSContainerInvoker.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/MyJMSContainerInvoker.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/MyJMSContainerInvoker.java 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,18 @@
+package org.jboss.test.mdbdefaultraname.bean;
+
+import org.jboss.ejb.plugins.jms.JMSContainerInvoker;
+
+
+/**
+ * A MyJMSContainerInvoker.
+ *
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+public class MyJMSContainerInvoker extends JMSContainerInvoker
+{
+ public String getResourceAdapterName()
+ {
+ return resourceAdapterName;
+ }
+}
Added: trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/StandardMDB.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/StandardMDB.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/StandardMDB.java 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.mdbdefaultraname.bean;
+
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+import javax.ejb.EJBException;
+
+import javax.jms.MessageListener;
+import javax.jms.Message;
+
+
+
+/**
+ * MessageBeanImpl.java
+ *
+ *
+ * @author alex at jboss.org
+ */
+public class StandardMDB implements MessageDrivenBean, MessageListener
+{
+ private MessageDrivenContext ctx = null;
+
+ public StandardMDB()
+ {
+ }
+
+ public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
+ {
+ this.ctx = ctx;
+ }
+
+ public void ejbCreate() {}
+
+ public void ejbRemove() {ctx=null;}
+
+ public void onMessage(Message message)
+ {
+ }
+}
+
+
Added: trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatus.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatus.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatus.java 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,38 @@
+/*
+ * 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.mdbdefaultraname.bean;
+
+import java.rmi.RemoteException;
+import java.util.Map;
+
+import javax.ejb.EJBObject;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
+ * @version $Revision: 82920 $
+ */
+public interface TestStatus extends EJBObject
+{
+ public Map<String, String> getResourceAdapterNames() throws RemoteException;
+}
Added: trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatusBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatusBean.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatusBean.java 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,110 @@
+/*
+ * 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.mdbdefaultraname.bean;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.ejb.CreateException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.ejb.Container;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 82920 $
+ */
+public class TestStatusBean implements SessionBean
+{
+ private static final Logger log = Logger.getLogger(TestStatusBean.class.getName());
+
+ public TestStatusBean() {}
+
+ public Map<String, String> getResourceAdapterNames()
+ {
+ MBeanServer server = org.jboss.mx.util.MBeanServerLocator.locate();
+ ObjectName ejbModuleName;
+ try
+ {
+ ejbModuleName = new ObjectName("jboss.j2ee:service=EjbModule,module=\"mdbdefaultraname.jar\"");
+ }
+ catch(Exception e)
+ {
+ throw new IllegalStateException("Failed to create object name", e);
+ }
+
+ Collection<Container> containers;
+ try
+ {
+ containers = (Collection<Container>) server.getAttribute(ejbModuleName, "Containers");
+ }
+ catch(Exception e)
+ {
+ throw new IllegalStateException("Failed to get attribute Containers", e);
+ }
+
+ if(containers == null)
+ throw new IllegalStateException("the ejb module contains no containers");
+ if(containers.size() != 3)
+ throw new IllegalStateException("Expected one containers but got " + containers.size());
+
+ Map<String, String> map = new HashMap<String, String>();
+ for(Container container : containers)
+ {
+ BeanMetaData metadata = container.getBeanMetaData();
+ if(!metadata.isMessageDriven())
+ continue;
+
+ String invokerBinding = null;
+ Iterator<String> bindings = metadata.getInvokerBindings();
+ if(!bindings.hasNext())
+ throw new IllegalStateException("Expected one invoker binding.");
+ while(bindings.hasNext())
+ {
+ if(invokerBinding != null)
+ throw new IllegalStateException("Expected only one invoker binding.");
+ invokerBinding = bindings.next();
+ }
+
+ MyJMSContainerInvoker invoker = (MyJMSContainerInvoker)container.lookupProxyFactory(invokerBinding);
+ map.put(metadata.getEjbName(), invoker.getResourceAdapterName());
+ }
+ return map;
+ }
+
+ // Container callbacks -------------------------------------------
+
+ public void setSessionContext(SessionContext ctx) {}
+ public void ejbCreate() throws CreateException {}
+ public void ejbRemove() {}
+ public void ejbActivate() {}
+ public void ejbPassivate() {}
+}
Added: trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatusHome.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatusHome.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/bean/TestStatusHome.java 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,38 @@
+/*
+ * 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.mdbdefaultraname.bean;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
+ * @version $Revision: 82920 $
+ */
+public interface TestStatusHome extends EJBHome
+{
+ TestStatus create() throws RemoteException, CreateException;
+}
Added: trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/test/MDBDefaultRANameUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/test/MDBDefaultRANameUnitTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbdefaultraname/test/MDBDefaultRANameUnitTestCase.java 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.mdbdefaultraname.test;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.test.mdbdefaultraname.bean.TestStatus;
+import org.jboss.test.mdbdefaultraname.bean.TestStatusHome;
+
+import org.jboss.test.JBossJMSTestCase;
+
+/**
+ * A MDBDefaultRANameUnitTestCase.
+ *
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+public class MDBDefaultRANameUnitTestCase extends JBossJMSTestCase
+{
+ public MDBDefaultRANameUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testMDBDefaultRAName() throws Exception
+ {
+ TestStatusHome testHome = (TestStatusHome) new InitialContext().lookup("TestStatus");
+ TestStatus test = testHome.create();
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("StandardMDB", "jms-ra.rar");
+ map.put("MDBTestMessageListener", "jcainflow.rar");
+ assertEquals(map, test.getResourceAdapterNames());
+ }
+
+ public static Test suite() throws Exception
+ {
+ Test t = getDeploySetup(MDBDefaultRANameUnitTestCase.class, "mdbdefaultraname.jar");
+ t = getDeploySetup(t, "jcainflow.rar");
+ return t;
+ }
+}
Added: trunk/testsuite/src/resources/mdbdefaultraname/META-INF/ejb-jar.xml
===================================================================
--- trunk/testsuite/src/resources/mdbdefaultraname/META-INF/ejb-jar.xml (rev 0)
+++ trunk/testsuite/src/resources/mdbdefaultraname/META-INF/ejb-jar.xml 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar 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/ejb-jar_2_1.xsd"
+ version="2.1">
+
+ <enterprise-beans>
+ <session>
+ <ejb-name>TestStatus</ejb-name>
+ <home>org.jboss.test.mdbdefaultraname.bean.TestStatusHome</home>
+ <remote>org.jboss.test.mdbdefaultraname.bean.TestStatus</remote>
+ <ejb-class>org.jboss.test.mdbdefaultraname.bean.TestStatusBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+
+ <message-driven>
+ <ejb-name>MDBTestMessageListener</ejb-name>
+ <ejb-class>org.jboss.test.mdbdefaultraname.bean.MDBTestMessageListener</ejb-class>
+ <messaging-type>org.jboss.test.jca.inflow.TestMessageListener</messaging-type>
+ <transaction-type>Container</transaction-type>
+ <activation-config>
+ <activation-config-property>
+ <activation-config-property-name>name</activation-config-property-name>
+ <activation-config-property-value>testInflow</activation-config-property-value>
+ </activation-config-property>
+ <!-- Other non-String properties to test the ActivationSpec java bean -->
+ <activation-config-property>
+ <activation-config-property-name>anInt</activation-config-property-name>
+ <activation-config-property-value>5</activation-config-property-value>
+ </activation-config-property>
+ <activation-config-property>
+ <activation-config-property-name>anInteger</activation-config-property-name>
+ <activation-config-property-value>55</activation-config-property-value>
+ </activation-config-property>
+ <activation-config-property>
+ <activation-config-property-name>localhost</activation-config-property-name>
+ <activation-config-property-value>127.0.0.1</activation-config-property-value>
+ </activation-config-property>
+ <activation-config-property>
+ <activation-config-property-name>props</activation-config-property-name>
+ <activation-config-property-value>
+ key1=value1
+ key2=value2
+ key3=value3
+ </activation-config-property-value>
+ </activation-config-property>
+ </activation-config>
+ </message-driven>
+
+ <message-driven>
+ <ejb-name>StandardMDB</ejb-name>
+ <ejb-class>org.jboss.test.mdbdefaultraname.bean.StandardMDB</ejb-class>
+ <transaction-type>Container</transaction-type>
+ <activation-config>
+ <activation-config-property>
+ <activation-config-property-name>destination</activation-config-property-name>
+ <activation-config-property-value>queue/DLQ</activation-config-property-value>
+ </activation-config-property>
+ <activation-config-property>
+ <activation-config-property-name>destinationType</activation-config-property-name>
+ <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
+ </activation-config-property>
+ </activation-config>
+ </message-driven>
+
+ </enterprise-beans>
+</ejb-jar>
Added: trunk/testsuite/src/resources/mdbdefaultraname/META-INF/jboss.xml
===================================================================
--- trunk/testsuite/src/resources/mdbdefaultraname/META-INF/jboss.xml (rev 0)
+++ trunk/testsuite/src/resources/mdbdefaultraname/META-INF/jboss.xml 2010-04-15 13:42:16 UTC (rev 103998)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 6.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_6_0.dtd">
+
+<jboss>
+ <jms-resource-adapter>jcainflow.rar</jms-resource-adapter>
+
+ <enterprise-beans>
+ <session>
+ <ejb-name>TestStatus</ejb-name>
+ </session>
+ <message-driven>
+ <ejb-name>MDBTestMessageListener</ejb-name>
+ <configuration-name>Standard Message Driven Bean</configuration-name>
+ <invoker-bindings>
+ <invoker>
+ <invoker-proxy-binding-name>my-message-driven-bean</invoker-proxy-binding-name>
+ </invoker>
+ </invoker-bindings>
+ <depends>jboss.jca:service=RARDeployment,name='jcainflow.rar'</depends>
+ </message-driven>
+ <message-driven>
+ <ejb-name>StandardMDB</ejb-name>
+ <resource-adapter-name>jms-ra.rar</resource-adapter-name>
+ <configuration-name>Standard Message Driven Bean</configuration-name>
+ <invoker-bindings>
+ <invoker>
+ <invoker-proxy-binding-name>my-message-driven-bean</invoker-proxy-binding-name>
+ </invoker>
+ </invoker-bindings>
+ <depends>jboss.jca:service=RARDeployment,name='jcainflow.rar'</depends>
+ </message-driven>
+ </enterprise-beans>
+
+ <invoker-proxy-bindings>
+ <invoker-proxy-binding>
+ <name>my-message-driven-bean</name>
+ <invoker-mbean>default</invoker-mbean>
+ <proxy-factory>org.jboss.test.mdbdefaultraname.bean.MyJMSContainerInvoker</proxy-factory>
+ <proxy-factory-config>
+ <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
+ <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
+ <MaximumSize>1</MaximumSize>
+ <MaxMessages>1</MaxMessages>
+ <!--ForceClearOnShutdown>true</ForceClearOnShutdown>
+ <ForceClearAttempts>5</ForceClearAttempts>
+ <ForceClearInterval>500</ForceClearInterval-->
+ <MDBConfig>
+ <ReconnectIntervalSec>10</ReconnectIntervalSec>
+ <DLQConfig>
+ <DestinationQueue>queue/DLQ</DestinationQueue>
+ <MaxTimesRedelivered>10</MaxTimesRedelivered>
+ <TimeToLive>0</TimeToLive>
+ </DLQConfig>
+ </MDBConfig>
+ </proxy-factory-config>
+ </invoker-proxy-binding>
+ </invoker-proxy-bindings>
+
+</jboss>
More information about the jboss-cvs-commits
mailing list