You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2013/07/12 16:12:37 UTC

svn commit: r1502569 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/CustomServiceFactory.scala apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleCustomServiceDTO.java

Author: chirino
Date: Fri Jul 12 14:12:36 2013
New Revision: 1502569

URL: http://svn.apache.org/r1502569
Log:
Fixing bug to allow adding custom broker services.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/CustomServiceFactory.scala
    activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleCustomServiceDTO.java

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/CustomServiceFactory.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/CustomServiceFactory.scala?rev=1502569&r1=1502568&r2=1502569&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/CustomServiceFactory.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/CustomServiceFactory.scala Fri Jul 12 14:12:36 2013
@@ -54,8 +54,8 @@ object SimpleCustomServiceFactory extend
 
   def create(broker: Broker, dto: CustomServiceDTO): Service = dto match {
     case dto:SimpleCustomServiceDTO =>
-      if( dto.getClass != classOf[CustomServiceDTO] ) {
-        // don't process sub classes of CustomServiceDTO
+      if( dto.getClass != classOf[SimpleCustomServiceDTO] ) {
+        // don't process sub classes of SimpleCustomServiceDTO
         return null;
       }
 

Modified: activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleCustomServiceDTO.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleCustomServiceDTO.java?rev=1502569&r1=1502568&r2=1502569&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleCustomServiceDTO.java (original)
+++ activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/SimpleCustomServiceDTO.java Fri Jul 12 14:12:36 2013
@@ -74,4 +74,12 @@ public class SimpleCustomServiceDTO exte
         result = 31 * result + (other != null ? other.hashCode() : 0);
         return result;
     }
+
+    @Override
+    public String toString() {
+        return "SimpleCustomServiceDTO{" +
+                "id='" + id + '\'' +
+                ", kind='" + kind + '\'' +
+                '}';
+    }
 }
\ No newline at end of file