[jboss-cvs] JBossAS SVN: r72858 - in branches/Branch_4_2/testsuite: imports/sections and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 29 03:38:48 EDT 2008
Author: jesper.pedersen
Date: 2008-04-29 03:38:48 -0400 (Tue, 29 Apr 2008)
New Revision: 72858
Added:
branches/Branch_4_2/testsuite/imports/sections/mdbsessionpoolclear.xml
branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/
branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/
branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/Mdb.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatus.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusBean.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusHome.java
branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/
branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java
branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/
branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/
branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/ejb-jar.xml
branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml
branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml
Modified:
branches/Branch_4_2/testsuite/imports/test-jars.xml
Log:
[JBAS-5485] Add mdbsessionpoolclear testcase
Added: branches/Branch_4_2/testsuite/imports/sections/mdbsessionpoolclear.xml
===================================================================
--- branches/Branch_4_2/testsuite/imports/sections/mdbsessionpoolclear.xml (rev 0)
+++ branches/Branch_4_2/testsuite/imports/sections/mdbsessionpoolclear.xml 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,28 @@
+<project name="tests-mdbsessionpoolclear-jars">
+
+ <target name="_jars-mdbsessionpoolclear">
+ <mkdir dir="${build.lib}"/>
+
+ <jar destfile="${build.lib}/mdbsessionpoolcleartest.jar"
+ manifest="${build.etc}/manifest.mf">
+ <fileset dir="${build.classes}">
+ <patternset refid="common.test.client.classes"/>
+ <include name="org/jboss/test/mdbsessionpoolclear/bean/**"/>
+ <include name="org/jboss/test/mdbsessionpoolclear/test/**"/>
+ </fileset>
+ <fileset dir="${build.resources}/mdbsessionpoolclear">
+ <include name="*.*"/>
+ </fileset>
+ </jar>
+ <jar destfile="${build.lib}/mdbsessionpoolclear.jar">
+ <fileset dir="${build.classes}">
+ <patternset refid="jboss.test.util.ejb.set"/>
+ <include name="org/jboss/test/mdbsessionpoolclear/bean/**"/>
+ </fileset>
+ <fileset dir="${build.resources}/mdbsessionpoolclear">
+ <include name="**/*.xml"/>
+ </fileset>
+ </jar>
+ </target>
+
+</project>
Modified: branches/Branch_4_2/testsuite/imports/test-jars.xml
===================================================================
--- branches/Branch_4_2/testsuite/imports/test-jars.xml 2008-04-29 06:54:43 UTC (rev 72857)
+++ branches/Branch_4_2/testsuite/imports/test-jars.xml 2008-04-29 07:38:48 UTC (rev 72858)
@@ -48,6 +48,7 @@
<import file="sections/marshal.xml"/>
<import file="sections/marshaliiop.xml"/>
<import file="sections/mdb.xml"/>
+ <import file="sections/mdbsessionpoolclear.xml"/>
<import file="sections/naming.xml"/>
<import file="sections/perf.xml"/>
<import file="sections/pooled.xml"/>
@@ -126,6 +127,7 @@
_jars-marshal,
_jars-marshaliiop,
_jars-mdb,
+ _jars-mdbsessionpoolclear,
_jars-messagedriven,
_jars-naming,
_jars-perf,
Added: branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/Mdb.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/Mdb.java (rev 0)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/Mdb.java 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,82 @@
+/*
+ * 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.mdbsessionpoolclear.bean;
+
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+import javax.ejb.EJBException;
+
+import javax.jms.MessageListener;
+import javax.jms.Message;
+import javax.jms.TextMessage;
+
+import javax.naming.InitialContext;
+
+import org.jboss.logging.Logger;
+
+/**
+ * MessageBeanImpl.java
+ *
+ *
+ * Created: Sat Nov 25 18:07:50 2000
+ *
+ * @author Peter Antman DN <peter.antman at dn.se>
+ * @version
+ */
+
+public class Mdb implements MessageDrivenBean, MessageListener
+{
+ private static final Logger log = Logger.getLogger(Mdb.class);
+
+ private MessageDrivenContext ctx = null;
+
+ public Mdb()
+ {
+ }
+
+ public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
+ {
+ this.ctx = ctx;
+ }
+
+ public void ejbCreate() {}
+
+ public void ejbRemove() {ctx=null;}
+
+ public void onMessage(Message message)
+ {
+ try
+ {
+ InitialContext jndiContext = new InitialContext();
+ TestStatusHome statusHome = (TestStatusHome)jndiContext.lookup("TestStatus");
+ TestStatus status = statusHome.create();
+ int count = status.increment();
+ log.info("**** Mdb got message " + count + " " + ((TextMessage)message).getText());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
+
+
Added: branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatus.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatus.java (rev 0)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatus.java 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,41 @@
+/*
+ * 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.mdbsessionpoolclear.bean;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBObject;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61798 $
+ */
+public interface TestStatus extends EJBObject
+{
+ public int queueFired() throws RemoteException;
+
+ public int increment() throws RemoteException;
+
+ public void clear() throws RemoteException;
+}
Added: branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusBean.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusBean.java (rev 0)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusBean.java 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,68 @@
+/*
+ * 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.mdbsessionpoolclear.bean;
+
+import javax.ejb.CreateException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61798 $
+ */
+public class TestStatusBean implements SessionBean
+{
+ private static final Logger log = Logger.getLogger(TestStatusBean.class);
+
+ public static int queueRan = 0;
+
+ // Constructors --------------------------------------------------
+
+ public TestStatusBean() {}
+
+ public int queueFired()
+ {
+ return queueRan;
+ }
+
+ public int increment()
+ {
+ return ++queueRan;
+ }
+
+ public void clear()
+ {
+ queueRan = 0;
+ }
+
+ // Container callbacks -------------------------------------------
+
+ public void setSessionContext(SessionContext ctx) {}
+ public void ejbCreate() throws CreateException {}
+ public void ejbRemove() {}
+ public void ejbActivate() {}
+ public void ejbPassivate() {}
+}
Added: branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusHome.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusHome.java (rev 0)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusHome.java 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,38 @@
+/*
+ * 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.mdbsessionpoolclear.bean;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 61798 $
+ */
+public interface TestStatusHome extends EJBHome
+{
+ TestStatus create() throws RemoteException, CreateException;
+}
Added: branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java (rev 0)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,191 @@
+/*
+ * 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.mdbsessionpoolclear.test;
+
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.test.mdbsessionpoolclear.bean.TestStatus;
+import org.jboss.test.mdbsessionpoolclear.bean.TestStatusHome;
+import org.jboss.logging.Logger;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.JBossTestSetup;
+
+/**
+ * Sample client for the jboss container.
+ *
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Id: MDBUnitTestCase.java 63518 2007-06-13 22:32:28Z wolfc $
+ */
+public class MDBUnitTestCase extends JBossTestCase
+{
+ private static final Logger log = Logger.getLogger(MDBUnitTestCase.class);
+
+ public MDBUnitTestCase(String name)
+ {
+ super(name);
+ }
+
+
+ public void testMdb() throws Exception
+ {
+ TestStatusHome statusHome = (TestStatusHome) getInitialContext().lookup("TestStatus");
+ TestStatus status = statusHome.create();
+ status.clear();
+
+ QueueConnection cnn = null;
+ QueueSender sender = null;
+ QueueSession session = null;
+
+ Queue queue = (Queue) getInitialContext().lookup("queue/mdbsessionpoolclearQueue");
+ QueueConnectionFactory factory = getQueueConnectionFactory();
+ cnn = factory.createQueueConnection();
+ session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+
+ TextMessage msg = session.createTextMessage("Hello World " + new Date());
+
+ sender = session.createSender(queue);
+ sender.send(msg);
+ session.close();
+ cnn.close();
+
+ Thread.sleep(5 * 1000);
+
+ assertEquals(1, status.queueFired());
+
+ MBeanServerConnection server = getServer();
+
+ ObjectName provider = null;
+ String jmsProvider = System.getProperty("jboss.jms.provider");
+ System.out.println("JMS Provider is " + jmsProvider);
+ if (jmsProvider != null && jmsProvider.equals("mq"))
+ provider = new ObjectName("jboss.mq:service=DestinationManager");
+ else
+ {
+ ObjectName providerQuery = new ObjectName("jboss.j2ee:service=EJB,*");
+ Iterator mbeans = server.queryMBeans(providerQuery, null).iterator();
+ while (provider == null)
+ {
+ ObjectInstance providerInstance = (ObjectInstance)mbeans.next();
+ String name = providerInstance.getObjectName().toString();
+ if (name.contains("Mdb") && !name.contains("plugin"))
+ provider = providerInstance.getObjectName();
+ }
+ }
+
+ Object[] params = {};
+ String[] sig = {};
+ Object success = server.invoke(provider, "stop", params, sig);
+
+ ObjectName jmsContainerInvokerQuery = new ObjectName("jboss.j2ee:binding=my-message-driven-bean,*");
+ Set mbeans = server.queryMBeans(jmsContainerInvokerQuery, null);
+ assertEquals(1, mbeans.size());
+ ObjectInstance jmsContainerInvokerInstance = (ObjectInstance)mbeans.iterator().next();
+ ObjectName jmsContainerInvoker = jmsContainerInvokerInstance.getObjectName();
+ // int numActiveSessions = (Integer)server.getAttribute(jmsContainerInvoker, "NumActiveSessions");
+ // assertEquals(1, numActiveSessions);
+ boolean forceClear = (Boolean)server.getAttribute(jmsContainerInvoker, "ForceClearOnShutdown");
+ assertFalse(forceClear);
+ int forceClearAttempts = (Integer)server.getAttribute(jmsContainerInvoker, "ForceClearAttempts");
+ assertEquals(5, forceClearAttempts);
+ long forceClearOnShutdownInterval = (Long)server.getAttribute(jmsContainerInvoker, "ForceClearOnShutdownInterval");
+ assertEquals(30000, forceClearOnShutdownInterval);
+
+ Thread.sleep(2 * 1000);
+
+ success = server.invoke(provider, "start", params, sig);
+
+ Thread.sleep(60 * 1000);
+
+ // numActiveSessions = (Integer)server.getAttribute(jmsContainerInvoker, "NumActiveSessions");
+ // assertEquals(1, numActiveSessions);
+
+ cnn = factory.createQueueConnection();
+ session = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+
+ msg = session.createTextMessage("Hello World " + new Date());
+
+ sender = session.createSender(queue);
+
+ sender.send(msg);
+ session.close();
+ cnn.close();
+
+ Thread.sleep(10 * 1000);
+
+ assertEquals(2, status.queueFired());
+ }
+
+ protected QueueConnectionFactory getQueueConnectionFactory()
+ throws Exception
+ {
+ try
+ {
+ return (QueueConnectionFactory) getInitialContext().lookup(
+ "ConnectionFactory");
+ } catch (NamingException e)
+ {
+ return (QueueConnectionFactory) getInitialContext().lookup(
+ "java:/ConnectionFactory");
+ }
+ }
+
+ protected InitialContext getInitialContext() throws Exception
+ {
+ return new InitialContext();
+ }
+
+ public static Test suite() throws Exception
+ {
+ TestSuite suite = new TestSuite();
+
+ suite.addTest(new MDBUnitTestCase("testMdb"));
+
+ return new JBossTestSetup(getDeploySetup(suite, "mdbsessionpoolclear.jar"))
+ {
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ // Remove the DLQ messages created by the TxTimeout test
+ getServer().invoke(new ObjectName("jboss.mq.destination:service=Queue,name=DLQ"), "removeAllMessages",
+ new Object[0], new String[0]);
+ }
+ };
+ }
+}
Added: branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/ejb-jar.xml
===================================================================
--- branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/ejb-jar.xml (rev 0)
+++ branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/ejb-jar.xml 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+
+<ejb-jar>
+ <enterprise-beans>
+ <session>
+ <ejb-name>TestStatus</ejb-name>
+ <home>org.jboss.test.mdbsessionpoolclear.bean.TestStatusHome</home>
+ <remote>org.jboss.test.mdbsessionpoolclear.bean.TestStatus</remote>
+ <ejb-class>org.jboss.test.mdbsessionpoolclear.bean.TestStatusBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+
+ <message-driven>
+ <ejb-name>Mdb</ejb-name>
+ <ejb-class>org.jboss.test.mdbsessionpoolclear.bean.Mdb</ejb-class>
+ <transaction-type>Bean</transaction-type>
+ <message-selector></message-selector>
+ <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
+ <message-driven-destination>
+ <destination-type>javax.jms.Queue</destination-type>
+ <subscription-durability>NonDurable</subscription-durability>
+ </message-driven-destination>
+ </message-driven>
+ </enterprise-beans>
+</ejb-jar>
Added: branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml (rev 0)
+++ branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
+
+<jboss>
+ <enterprise-beans>
+ <session>
+ <ejb-name>TestStatus</ejb-name>
+ </session>
+
+ <message-driven>
+ <ejb-name>Mdb</ejb-name>
+ <destination-jndi-name>queue/mdbsessionpoolclearQueue</destination-jndi-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>
+ </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.ejb.plugins.jms.JMSContainerInvoker</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>
Added: branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml
===================================================================
--- branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml (rev 0)
+++ branches/Branch_4_2/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml 2008-04-29 07:38:48 UTC (rev 72858)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=mdbsessionpoolclearQueue">
+ <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+ <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+ <attribute name="SecurityConf">
+ <security>
+ <role name="guest" read="true" write="true"/>
+ <role name="publisher" read="true" write="true" create="false"/>
+ <role name="noacc" read="false" write="false" create="false"/>
+ </security>
+ </attribute>
+ </mbean>
+
+</server>
More information about the jboss-cvs-commits
mailing list