activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1237328 - /activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolFactory.scala
Date Sun, 29 Jan 2012 16:31:03 GMT
Author: chirino
Date: Sun Jan 29 16:31:03 2012
New Revision: 1237328

URL: http://svn.apache.org/viewvc?rev=1237328&view=rev
Log:
Fixes APLO-144 : Display a warning about the Openwire protocol still being experimental when
it's first used.

Modified:
    activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolFactory.scala

Modified: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolFactory.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolFactory.scala?rev=1237328&r1=1237327&r2=1237328&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolFactory.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/OpenwireProtocolFactory.scala
Sun Jan 29 16:31:03 2012
@@ -22,6 +22,7 @@ import org.apache.activemq.apollo.broker
 import OpenwireConstants._
 import org.apache.activemq.apollo.broker.protocol.{ProtocolCodecFactory, Protocol, ProtocolFactory}
 import org.fusesource.hawtbuf.Buffer
+import org.apache.activemq.apollo.util.Log
 
 /**
  * <p>
@@ -47,7 +48,7 @@ object OpenwireProtocolFactory extends P
  *
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
  */
-object OpenwireProtocol extends OpenwireProtocolCodecFactory with Protocol {
+object OpenwireProtocol extends OpenwireProtocolCodecFactory with Protocol with Log {
 
   def createProtocolHandler = new OpenwireProtocolHandler
 
@@ -58,6 +59,11 @@ object OpenwireProtocol extends Openwire
   def decode(message: MessageRecord) = {
     OpenwireCodec.decode(message)
   }
+
+  lazy val log_exerimental_warning = {
+    warn("The OpenWire protocol implementation is still experimental and not recommended
for production use.  Production users should use ActiveMQ instead.")
+    null
+  }
 }
 
 /**
@@ -71,7 +77,10 @@ class OpenwireProtocolCodecFactory exten
 
   def id = PROTOCOL
 
-  def createProtocolCodec() = new OpenwireCodec();
+  def createProtocolCodec() = {
+    OpenwireProtocol.log_exerimental_warning
+    new OpenwireCodec();
+  }
 
   def isIdentifiable() = true
 



Mime
View raw message