[jboss-svn-commits] JBL Code SVN: r35219 - in labs/jbossesb/branches/JBESB_4_9_CP/product: rosetta/src/org/jboss/soa/esb/listeners/jca and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Sep 21 15:25:57 EDT 2010


Author: tfennelly
Date: 2010-09-21 15:25:56 -0400 (Tue, 21 Sep 2010)
New Revision: 35219

Added:
   labs/jbossesb/branches/JBESB_4_9_CP/product/rosetta/src/org/jboss/soa/esb/listeners/jca/HornetQActivationMapper.java
Modified:
   labs/jbossesb/branches/JBESB_4_9_CP/product/install/conf/jbossesb-properties.xml
Log:
https://jira.jboss.org/browse/JBESB-3441
Add activation mapper for hornetq-ra.rar

Modified: labs/jbossesb/branches/JBESB_4_9_CP/product/install/conf/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/install/conf/jbossesb-properties.xml	2010-09-21 16:17:30 UTC (rev 35218)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/install/conf/jbossesb-properties.xml	2010-09-21 19:25:56 UTC (rev 35219)
@@ -123,6 +123,7 @@
     </properties>
     <properties name="jca">
         <property name="org.jboss.soa.esb.jca.activation.mapper.jms-ra.rar" value="org.jboss.soa.esb.listeners.jca.JBossActivationMapper"/>
+        <!-- property name="org.jboss.soa.esb.jca.activation.mapper.jms-ra.rar" value="org.jboss.soa.esb.listeners.jca.HornetQActivationMapper"/ -->
         <property name="org.jboss.soa.esb.jca.activation.mapper.wmq.jmsra.rar" value="org.jboss.soa.esb.listeners.jca.WMQActivationMapper"/>
     </properties>
 

Added: labs/jbossesb/branches/JBESB_4_9_CP/product/rosetta/src/org/jboss/soa/esb/listeners/jca/HornetQActivationMapper.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_9_CP/product/rosetta/src/org/jboss/soa/esb/listeners/jca/HornetQActivationMapper.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_9_CP/product/rosetta/src/org/jboss/soa/esb/listeners/jca/HornetQActivationMapper.java	2010-09-21 19:25:56 UTC (rev 35219)
@@ -0,0 +1,104 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.soa.esb.listeners.jca;
+
+import java.util.Map;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+
+import org.jboss.soa.esb.ConfigurationException;
+
+
+/**
+ * Activation mapper implementation for HornetQ.
+ *
+ * @author <a href="tom.fennelly at jboss.com">Tom Fennelly</a>
+ */
+public class HornetQActivationMapper implements ActivationMapper
+{
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param name The destination name.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setDestination(final Map<String, String> activationConfig, final String name)
+        throws ConfigurationException
+    {
+        activationConfig.put("destination", name) ;
+    }
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param providerAdapterJNDI The provider adapter JNDI value or null is not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI)
+        throws ConfigurationException
+    {
+    	// Not relevant to HornetQ.  See org.hornetq.ra.inflow.HornetQActivationSpec class source.
+    }
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param queue True if specifying a JMS Queue, false is specifying a JMS Topic.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setDestinationType(final Map<String, String> activationConfig, final boolean queue)
+        throws ConfigurationException
+    {
+        activationConfig.put("destinationType", queue ? Queue.class.getName() :Topic.class.getName()) ;
+    }
+    
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param messageSelector The message selector or null if not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector)
+        throws ConfigurationException
+    {
+        if (messageSelector != null)
+        {
+            activationConfig.put("messageSelector", messageSelector) ;
+        }
+    }
+
+    /**
+     * Initialise the destination name in the activation configuration.
+     * @param activationConfig The current activation configuration.
+     * @param maxThreads The maximum thread value or null if not specified.
+     * @throws ConfigurationException For invalid configuration.
+     */
+    public void setMaxThreads(final Map<String, String> activationConfig, final Integer maxThreads)
+        throws ConfigurationException
+    {
+        if (maxThreads != null)
+        {
+            activationConfig.put("maxSession", maxThreads.toString()) ;
+        }
+    }
+}


Property changes on: labs/jbossesb/branches/JBESB_4_9_CP/product/rosetta/src/org/jboss/soa/esb/listeners/jca/HornetQActivationMapper.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF



More information about the jboss-svn-commits mailing list