added the ability to connect to a broker running in the same class loader (but not the same Spring context)

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@517686 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2007-03-13 13:23:57 +00:00
parent 274a951901
commit 3e09007cc1
1 changed files with 36 additions and 0 deletions

View File

@ -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();
}
}