[jboss-cvs] JBossAS SVN: r72860 - in trunk/testsuite: imports/sections and 7 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 29 04:38:52 EDT 2008


Author: jesper.pedersen
Date: 2008-04-29 04:38:51 -0400 (Tue, 29 Apr 2008)
New Revision: 72860

Added:
   trunk/testsuite/imports/sections/mdbsessionpoolclear.xml
   trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/
   trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/
   trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/Mdb.java
   trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatus.java
   trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusBean.java
   trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusHome.java
   trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/
   trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java
   trunk/testsuite/src/resources/mdbsessionpoolclear/
   trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/
   trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/ejb-jar.xml
   trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml
   trunk/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml
Modified:
   trunk/testsuite/imports/test-jars.xml
Log:
[JBAS-5485] Add mdbsessionpoolclear testcase

Added: trunk/testsuite/imports/sections/mdbsessionpoolclear.xml
===================================================================
--- trunk/testsuite/imports/sections/mdbsessionpoolclear.xml	                        (rev 0)
+++ trunk/testsuite/imports/sections/mdbsessionpoolclear.xml	2008-04-29 08:38:51 UTC (rev 72860)
@@ -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: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml	2008-04-29 07:44:12 UTC (rev 72859)
+++ trunk/testsuite/imports/test-jars.xml	2008-04-29 08:38:51 UTC (rev 72860)
@@ -52,6 +52,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"/>
@@ -140,6 +141,7 @@
         _jars-marshal,
         _jars-marshaliiop,
         _jars-mdb,
+        _jars-mdbsessionpoolclear,
         _jars-messagedriven,
         _jars-naming,
         _jars-perf,

Added: trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/Mdb.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/Mdb.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/Mdb.java	2008-04-29 08:38:51 UTC (rev 72860)
@@ -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: trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatus.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatus.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatus.java	2008-04-29 08:38:51 UTC (rev 72860)
@@ -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: trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusBean.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusBean.java	2008-04-29 08:38:51 UTC (rev 72860)
@@ -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: trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusHome.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusHome.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/bean/TestStatusHome.java	2008-04-29 08:38:51 UTC (rev 72860)
@@ -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: trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/mdbsessionpoolclear/test/MDBUnitTestCase.java	2008-04-29 08:38:51 UTC (rev 72860)
@@ -0,0 +1,210 @@
+/*
+  * 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;
+      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 mbeansSet = server.queryMBeans(jmsContainerInvokerQuery, null);
+      assertEquals(1, mbeansSet.size());
+      ObjectInstance jmsContainerInvokerInstance = (ObjectInstance)mbeansSet.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"));
+
+      Test wrapper = new JBossTestSetup(suite)
+      {
+         protected void setUp() throws Exception
+         {
+            super.setUp();
+            deploy("mdbsessionpoolclear.jar");
+         }
+
+         protected void tearDown() throws Exception
+         {
+            super.tearDown();
+
+            // Remove the DLQ messages
+            try
+            {
+               getServer().invoke(
+                  new ObjectName("jboss.messaging.destination:service=Queue,name=DLQ"),
+                  "removeAllMessages", new Object[0], new String[0]);
+            }
+            catch (Exception ignored)
+            {
+               getLog().warn("unable to clear dlq", ignored);
+            }
+
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            try
+            {
+               undeploy("mdbsessionpoolclear.jar");
+            }
+            catch (Exception ignored)
+            {
+               getLog().warn("Unable to undeploy mdbsessionpoolclear.jar", ignored);
+            }
+         }
+      };
+
+      return wrapper;
+   }
+}

Added: trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/ejb-jar.xml
===================================================================
--- trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/ejb-jar.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/ejb-jar.xml	2008-04-29 08:38:51 UTC (rev 72860)
@@ -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: trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml
===================================================================
--- trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/mdbsessionpoolclear/META-INF/jboss.xml	2008-04-29 08:38:51 UTC (rev 72860)
@@ -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: trunk/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml
===================================================================
--- trunk/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/mdbsessionpoolclear/mdbsessionpoolclear-jbm-service.xml	2008-04-29 08:38:51 UTC (rev 72860)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+   
+  <mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=mdbsessionpoolclearQueue" xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+    <depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+
+</server>




More information about the jboss-cvs-commits mailing list