activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r565398 - in /activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra: ActiveMQActivationSpec.java MessageActivationSpec.java
Date Mon, 13 Aug 2007 16:24:30 GMT
Author: jstrachan
Date: Mon Aug 13 09:24:29 2007
New Revision: 565398

URL: http://svn.apache.org/viewvc?view=rev&rev=565398
Log:
rolled back the previously applied patch for MessageActivationSpec and re-created the interface
from scratch by pulling up all the public getters/methods from the original ActiveMQActivationSpec
class to ensure we have the correct license headers etc

Modified:
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java

Modified: activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java?view=diff&rev=565398&r1=565397&r2=565398
==============================================================================
--- activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
(original)
+++ activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
Mon Aug 13 09:24:29 2007
@@ -140,7 +140,7 @@
         }
     }
 
-    private boolean isValidUseRAManagedTransaction(List<String> errorMessages) {
+    public boolean isValidUseRAManagedTransaction(List<String> errorMessages) {
         try {
             new Boolean(noLocal);
             return true;
@@ -151,7 +151,7 @@
         return false;
     }
 
-    private boolean isValidNoLocal(List<String> errorMessages) {
+    public boolean isValidNoLocal(List<String> errorMessages) {
         try {
             new Boolean(noLocal);
             return true;
@@ -162,7 +162,7 @@
         return false;
     }
 
-    private boolean isValidMessageSelector(List<String> errorMessages) {
+    public boolean isValidMessageSelector(List<String> errorMessages) {
         try {
             if (!isEmpty(messageSelector)) {
                 new SelectorParser().parse(messageSelector);
@@ -174,7 +174,7 @@
         }
     }
 
-    private boolean isValidMaxSessions(List<String> errorMessages) {
+    public boolean isValidMaxSessions(List<String> errorMessages) {
         try {
             if (Integer.parseInt(maxSessions) > 0) {
                 return true;
@@ -186,7 +186,7 @@
         return false;
     }
 
-    private boolean isValidMaxMessagesPerSessions(List<String> errorMessages) {
+    public boolean isValidMaxMessagesPerSessions(List<String> errorMessages) {
         try {
             if (Integer.parseInt(maxMessagesPerSessions) > 0) {
                 return true;
@@ -198,7 +198,7 @@
         return false;
     }
 
-    private boolean isValidMaxMessagesPerBatch(List<String> errorMessages) {
+    public boolean isValidMaxMessagesPerBatch(List<String> errorMessages) {
         try {
             if (Integer.parseInt(maxMessagesPerBatch) > 0) {
                 return true;
@@ -210,7 +210,7 @@
         return false;
     }
 
-    private boolean isValidEnableBatch(List<String> errorMessages) {
+    public boolean isValidEnableBatch(List<String> errorMessages) {
         try {
             new Boolean(enableBatch);
             return true;
@@ -221,9 +221,6 @@
         return false;
     }
 
-    /**
-     * @see javax.resource.spi.ResourceAdapterAssociation#getResourceAdapter()
-     */
     public ResourceAdapter getResourceAdapter() {
         return resourceAdapter;
     }
@@ -247,9 +244,6 @@
     // Java Bean getters and setters for this ActivationSpec class.
     //
     // ///////////////////////////////////////////////////////////////////////
-    /**
-     * @return Returns the destinationType.
-     */
     public String getDestinationType() {
         if (!isEmpty(destinationType)) {
             return destinationType;
@@ -264,9 +258,6 @@
         this.destinationType = destinationType;
     }
 
-    /**
-     * 
-     */
     public String getPassword() {
         if (!isEmpty(password)) {
             return password;
@@ -281,9 +272,6 @@
         this.password = password;
     }
 
-    /**
-     * 
-     */
     public String getUserName() {
         if (!isEmpty(userName)) {
             return userName;
@@ -298,9 +286,6 @@
         this.userName = userName;
     }
 
-    /**
-     * @return Returns the messageSelector.
-     */
     public String getMessageSelector() {
         if (!isEmpty(messageSelector)) {
             return messageSelector;
@@ -315,9 +300,6 @@
         this.messageSelector = messageSelector;
     }
 
-    /**
-     * @return Returns the noLocal.
-     */
     public String getNoLocal() {
         return noLocal;
     }
@@ -331,9 +313,6 @@
         }
     }
 
-    /**
-     * 
-     */
     public String getAcknowledgeMode() {
         if (!isEmpty(acknowledgeMode)) {
             return acknowledgeMode;
@@ -348,9 +327,6 @@
         this.acknowledgeMode = acknowledgeMode;
     }
 
-    /**
-     * 
-     */
     public String getClientId() {
         if (!isEmpty(clientId)) {
             return clientId;
@@ -365,9 +341,6 @@
         this.clientId = clientId;
     }
 
-    /**
-     * 
-     */
     public String getDestination() {
         if (!isEmpty(destination)) {
             return destination;
@@ -382,9 +355,6 @@
         this.destination = destination;
     }
 
-    /**
-     * 
-     */
     public String getSubscriptionDurability() {
         if (!isEmpty(subscriptionDurability)) {
             return subscriptionDurability;
@@ -399,9 +369,6 @@
         this.subscriptionDurability = subscriptionDurability;
     }
 
-    /**
-     * 
-     */
     public String getSubscriptionName() {
         if (!isEmpty(subscriptionName)) {
             return subscriptionName;
@@ -416,7 +383,7 @@
         this.subscriptionName = subscriptionName;
     }
 
-    private boolean isValidSubscriptionName(List<String> errorMessages) {
+    public boolean isValidSubscriptionName(List<String> errorMessages) {
         if (!isDurableSubscription() ? true : subscriptionName != null && subscriptionName.trim().length()
> 0) {
             return true;
         }
@@ -424,7 +391,7 @@
         return false;
     }
 
-    private boolean isValidClientId(List<String> errorMessages) {
+    public boolean isValidClientId(List<String> errorMessages) {
         if (!isDurableSubscription() ? true : clientId != null && clientId.trim().length()
> 0) {
             return true;
         }
@@ -432,14 +399,11 @@
         return false;
     }
 
-    /**
-     * 
-     */
     public boolean isDurableSubscription() {
         return DURABLE_SUBSCRIPTION.equals(subscriptionDurability);
     }
 
-    private boolean isValidSubscriptionDurability(List<String> errorMessages) {
+    public boolean isValidSubscriptionDurability(List<String> errorMessages) {
         // subscriptionDurability only applies to Topics
         if (DURABLE_SUBSCRIPTION.equals(subscriptionDurability) && getDestinationType()
!= null && !Topic.class.getName().equals(getDestinationType())) {
             errorMessages.add("subscriptionDurability cannot be set to: " + DURABLE_SUBSCRIPTION
+ " when destinationType is set to " + Queue.class.getName()
@@ -453,7 +417,7 @@
         return false;
     }
 
-    private boolean isValidAcknowledgeMode(List<String> errorMessages) {
+    public boolean isValidAcknowledgeMode(List<String> errorMessages) {
         if (AUTO_ACKNOWLEDGE_MODE.equals(acknowledgeMode) || DUPS_OK_ACKNOWLEDGE_MODE.equals(acknowledgeMode))
{
             return true;
         }
@@ -461,7 +425,7 @@
         return false;
     }
 
-    private boolean isValidDestinationType(List<String> errorMessages) {
+    public boolean isValidDestinationType(List<String> errorMessages) {
         if (Queue.class.getName().equals(destinationType) || Topic.class.getName().equals(destinationType))
{
             return true;
         }
@@ -469,7 +433,7 @@
         return false;
     }
 
-    private boolean isValidDestination(List<String> errorMessages) {
+    public boolean isValidDestination(List<String> errorMessages) {
         if (!(destination == null || destination.equals(""))) {
             return true;
         }
@@ -477,7 +441,7 @@
         return false;
     }
 
-    private boolean isEmpty(String value) {
+    public boolean isEmpty(String value) {
         return value == null || "".equals(value.trim());
     }
 
@@ -547,9 +511,6 @@
         }
     }
 
-    /**
-     * 
-     */
     public String getMaxSessions() {
         return maxSessions;
     }
@@ -563,9 +524,6 @@
         }
     }
 
-    /**
-     * 
-     */
     public String getUseRAManagedTransaction() {
         return useRAManagedTransaction;
     }
@@ -579,16 +537,10 @@
         }
     }
 
-    /**
-     * 
-     */
     public int getMaxMessagesPerSessionsIntValue() {
         return Integer.parseInt(maxMessagesPerSessions);
     }
 
-    /**
-     * 
-     */
     public int getMaxSessionsIntValue() {
         return Integer.parseInt(maxSessions);
     }
@@ -597,9 +549,6 @@
         return Boolean.valueOf(useRAManagedTransaction).booleanValue();
     }
 
-    /**
-     * 
-     */
     public boolean getNoLocalBooleanValue() {
         return Boolean.valueOf(noLocal).booleanValue();
     }
@@ -638,9 +587,6 @@
         }
     }
 
-    /**
-     * 
-     */
     public short getBackOffMultiplier() {
         if (redeliveryPolicy == null) {
             return 0;
@@ -648,9 +594,6 @@
         return redeliveryPolicy.getBackOffMultiplier();
     }
 
-    /**
-     * 
-     */
     public long getInitialRedeliveryDelay() {
         if (redeliveryPolicy == null) {
             return 0;
@@ -658,9 +601,6 @@
         return redeliveryPolicy.getInitialRedeliveryDelay();
     }
 
-    /**
-     * 
-     */
     public int getMaximumRedeliveries() {
         if (redeliveryPolicy == null) {
             return 0;
@@ -668,9 +608,6 @@
         return redeliveryPolicy.getMaximumRedeliveries();
     }
 
-    /**
-     * 
-     */
     public boolean isUseExponentialBackOff() {
         if (redeliveryPolicy == null) {
             return false;
@@ -707,14 +644,11 @@
     }
 
     // don't use getter to avoid causing introspection errors in containers
-    /**
-     * 
-     */
     public RedeliveryPolicy redeliveryPolicy() {
         return redeliveryPolicy;
     }
 
-    protected RedeliveryPolicy lazyCreateRedeliveryPolicy() {
+    public RedeliveryPolicy lazyCreateRedeliveryPolicy() {
         if (redeliveryPolicy == null) {
             redeliveryPolicy = new RedeliveryPolicy();
         }

Modified: activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java?view=diff&rev=565398&r1=565397&r2=565398
==============================================================================
--- activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java
(original)
+++ activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageActivationSpec.java
Mon Aug 13 09:24:29 2007
@@ -1,137 +1,129 @@
 /**
- * $Header$
  *
- * Broker Office ESPECIAL (Release) - org.apache.activemq.ra
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Copyright (C) 2005-2007 Norvax, Inc.
- * All Rights Reserved
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Norvax, Inc.; the contents
- * of this file may not be disclosed to third parties, copied or duplicated
- * in any form, in whole or in part, without the prior written permission of
- * Norvax, Inc. The copyright notice above does not evidence any actual or
- * intended publication of such source code.
- * 
- * Permission is hereby granted solely to the licensee for use of this source
- * code in its unaltered state. This source code may not be modified by
- * licensee except under direction of Norvax, Inc. Neither may this source
- * code be given under any circumstances to non-licensees in any form,
- * including source or binary. Modification of this source constitutes breach
- * of contract, which voids any potential pending support responsibilities by
- * Norvax, Inc. Divulging the exact or paraphrased contents of this source
- * code to unlicensed parties either directly or indirectly constitutes
- * violation of federal and international copyright and trade secret laws, and
- * will be duly prosecuted to the fullest extent permitted under law.
- * 
- * This software is provided by Norvax, Inc. ``as is'' and any express or
- * implied warranties, including, but not limited to, the implied warranties
- * of merchantability and fitness for a particular purpose are disclaimed. In
- * no event shall the regents or contributors be liable for any direct,
- * indirect, incidental, special, exemplary, or consequential damages
- * (including, but not limited to, procurement of substitute goods or
- * services; loss of use, data, or profits; or business interruption) however
- * caused and on any theory of liability, whether in contract, strict
- * liability, or tort (including negligence or otherwise) arising in any way
- * out of the use of this software, even if advised of the possibility of such
- * damage.
- * 
- **/
-
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.activemq.ra;
 
-import javax.resource.spi.ActivationSpec;
-
 import org.apache.activemq.RedeliveryPolicy;
 
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ActivationSpec;
+import java.util.List;
+
 /**
- * Description: Description goes here.
- * 
- * @author <a href="mailto:cstach@norvax.com">Christopher G. Stach II</a>
- * @version $Revision$ $Date$
- * @since 0.1
+ * @version $Revision: 1.1 $
  */
 public interface MessageActivationSpec extends ActivationSpec {
+    boolean isValidUseRAManagedTransaction(List<String> errorMessages);
 
-    /**
-     */
-    String getClientId();
+    boolean isValidNoLocal(List<String> errorMessages);
+
+    boolean isValidMessageSelector(List<String> errorMessages);
+
+    boolean isValidMaxSessions(List<String> errorMessages);
+
+    boolean isValidMaxMessagesPerSessions(List<String> errorMessages);
+
+    boolean isValidMaxMessagesPerBatch(List<String> errorMessages);
+
+    boolean isValidEnableBatch(List<String> errorMessages);
 
     /**
+     * @see javax.resource.spi.ResourceAdapterAssociation#getResourceAdapter()
      */
-    boolean isDurableSubscription();
+    ResourceAdapter getResourceAdapter();
 
     /**
+     * @return Returns the destinationType.
      */
+    String getDestinationType();
+
     String getPassword();
 
-    /**
-     */
     String getUserName();
 
     /**
+     * @return Returns the messageSelector.
      */
-    RedeliveryPolicy redeliveryPolicy();
+    String getMessageSelector();
 
     /**
+     * @return Returns the noLocal.
      */
+    String getNoLocal();
+
+    String getAcknowledgeMode();
+
+    String getClientId();
+
+    String getDestination();
+
+    String getSubscriptionDurability();
+
     String getSubscriptionName();
 
-    /**
-     */
-    String getMessageSelector();
+    boolean isValidSubscriptionName(List<String> errorMessages);
 
-    /**
-     */
-    int getMaxMessagesPerSessionsIntValue();
+    boolean isValidClientId(List<String> errorMessages);
 
-    /**
-     */
-    boolean getNoLocalBooleanValue();
+    boolean isDurableSubscription();
 
-    /**
-     */
-    String getDestinationType();
+    boolean isValidSubscriptionDurability(List<String> errorMessages);
 
-    /**
-     */
-    String getDestination();
+    boolean isValidAcknowledgeMode(List<String> errorMessages);
 
-    /**
-     */
-    int getMaxSessionsIntValue();
+    boolean isValidDestinationType(List<String> errorMessages);
+
+    boolean isValidDestination(List<String> errorMessages);
+
+    boolean isEmpty(String value);
 
-    /**
-     *
-     */
     int getAcknowledgeModeForSession();
 
-    /**
-     *
-     */
     String getMaxMessagesPerSessions();
 
-    /**
-     *
-     */
+    String getMaxSessions();
+
+    String getUseRAManagedTransaction();
+
+    int getMaxMessagesPerSessionsIntValue();
+
+    int getMaxSessionsIntValue();
+
     boolean isUseRAManagedTransactionEnabled();
 
-    /**
-     *
-     */
+    boolean getNoLocalBooleanValue();
+
     String getEnableBatch();
 
-    /**
-     *
-     */
     boolean getEnableBatchBooleanValue();
 
-    /**
-     *
-     */
     int getMaxMessagesPerBatchIntValue();
 
-    /**
-     *
-     */
     String getMaxMessagesPerBatch();
+
+    short getBackOffMultiplier();
+
+    long getInitialRedeliveryDelay();
+
+    int getMaximumRedeliveries();
+
+    boolean isUseExponentialBackOff();
+
+    RedeliveryPolicy redeliveryPolicy();
+
+    RedeliveryPolicy lazyCreateRedeliveryPolicy();
 }



Mime
View raw message