You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2007/03/13 14:23:58 UTC
svn commit: r517686 -
/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
Author: jstrachan
Date: Tue Mar 13 06:23:57 2007
New Revision: 517686
URL: http://svn.apache.org/viewvc?view=rev&rev=517686
Log:
added the ability to connect to a broker running in the same class loader (but not the same Spring context)
Added:
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java (with props)
Added: activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java?view=auto&rev=517686
==============================================================================
--- activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java (added)
+++ activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java Tue Mar 13 06:23:57 2007
@@ -0,0 +1,36 @@
+/**
+ *
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.web;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.BrokerRegistry;
+
+/**
+ * A facade for the broker in the same JVM and ClassLoader
+ *
+ * @version $Revision$
+ */
+public class SingletonBrokerFacade extends LocalBrokerFacade {
+ public SingletonBrokerFacade() {
+ super(findSingletonBroker());
+ }
+
+ protected static BrokerService findSingletonBroker() {
+ return BrokerRegistry.getInstance().findFirst();
+ }
+}
Propchange: activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
------------------------------------------------------------------------------
svn:mime-type = text/plain