mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3177 - use slf4j instead of jcl
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1069405 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a204c793b2
commit
8bf987b134
|
@ -83,7 +83,7 @@
|
||||||
<include>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</include>
|
<include>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
|
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
|
||||||
<include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</include>
|
<include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec</include>
|
||||||
<include>commons-logging:commons-logging-api</include>
|
<include>org.slf4j:slf4j-api</include>
|
||||||
</includes>
|
</includes>
|
||||||
</artifactSet>
|
</artifactSet>
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,8 @@
|
||||||
<!-- Required Dependencies -->
|
<!-- Required Dependencies -->
|
||||||
<!-- =============================== -->
|
<!-- =============================== -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>commons-logging-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.camel</groupId>
|
<groupId>org.apache.camel</groupId>
|
||||||
|
@ -157,6 +157,11 @@
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>log4j</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>log4j</artifactId>
|
||||||
|
|
|
@ -37,8 +37,8 @@ import org.apache.camel.Endpoint;
|
||||||
import org.apache.camel.component.jms.JmsEndpoint;
|
import org.apache.camel.component.jms.JmsEndpoint;
|
||||||
import org.apache.camel.component.jms.JmsQueueEndpoint;
|
import org.apache.camel.component.jms.JmsQueueEndpoint;
|
||||||
import org.apache.camel.util.ObjectHelper;
|
import org.apache.camel.util.ObjectHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper bean which populates a {@link CamelContext} with ActiveMQ Queue endpoints
|
* A helper bean which populates a {@link CamelContext} with ActiveMQ Queue endpoints
|
||||||
|
@ -47,7 +47,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @org.apache.xbean.XBean
|
* @org.apache.xbean.XBean
|
||||||
*/
|
*/
|
||||||
public class CamelEndpointLoader implements CamelContextAware {
|
public class CamelEndpointLoader implements CamelContextAware {
|
||||||
private static final transient Log LOG = LogFactory.getLog(CamelEndpointLoader.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(CamelEndpointLoader.class);
|
||||||
private CamelContext camelContext;
|
private CamelContext camelContext;
|
||||||
private EnhancedConnection connection;
|
private EnhancedConnection connection;
|
||||||
private ConnectionFactory connectionFactory;
|
private ConnectionFactory connectionFactory;
|
||||||
|
|
|
@ -36,12 +36,12 @@ import org.apache.camel.impl.DefaultConsumer;
|
||||||
import org.apache.camel.impl.DefaultEndpoint;
|
import org.apache.camel.impl.DefaultEndpoint;
|
||||||
import org.apache.camel.impl.DefaultExchange;
|
import org.apache.camel.impl.DefaultExchange;
|
||||||
import org.apache.camel.impl.DefaultProducer;
|
import org.apache.camel.impl.DefaultProducer;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class JournalEndpoint extends DefaultEndpoint {
|
public class JournalEndpoint extends DefaultEndpoint {
|
||||||
|
|
||||||
private static final transient Log LOG = LogFactory.getLog(JournalEndpoint.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(JournalEndpoint.class);
|
||||||
|
|
||||||
private final File directory;
|
private final File directory;
|
||||||
private final AtomicReference<DefaultConsumer> consumer = new AtomicReference<DefaultConsumer>();
|
private final AtomicReference<DefaultConsumer> consumer = new AtomicReference<DefaultConsumer>();
|
||||||
|
|
|
@ -28,8 +28,8 @@ import org.apache.camel.CamelContext;
|
||||||
import org.apache.camel.ProducerTemplate;
|
import org.apache.camel.ProducerTemplate;
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
import org.apache.camel.builder.RouteBuilder;
|
||||||
import org.apache.camel.impl.DefaultCamelContext;
|
import org.apache.camel.impl.DefaultCamelContext;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class AMQ2611Test extends TestCase {
|
public class AMQ2611Test extends TestCase {
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class AMQ2611Test extends TestCase {
|
||||||
|
|
||||||
private static final String QUEUE_NAME = "test.queue";
|
private static final String QUEUE_NAME = "test.queue";
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(AMQ2611Test.class);
|
private static final Logger log = LoggerFactory.getLogger(AMQ2611Test.class);
|
||||||
|
|
||||||
private BrokerService brokerService = null;
|
private BrokerService brokerService = null;
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ import org.apache.camel.component.mock.MockEndpoint;
|
||||||
import org.apache.camel.ProducerTemplate;
|
import org.apache.camel.ProducerTemplate;
|
||||||
import org.apache.camel.impl.DefaultProducerTemplate;
|
import org.apache.camel.impl.DefaultProducerTemplate;
|
||||||
import org.apache.camel.spring.SpringTestSupport;
|
import org.apache.camel.spring.SpringTestSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +41,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
*/
|
*/
|
||||||
public class CamelJmsTest extends SpringTestSupport {
|
public class CamelJmsTest extends SpringTestSupport {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(CamelJmsTest.class);
|
private static final Logger LOG = LoggerFactory.getLogger(CamelJmsTest.class);
|
||||||
|
|
||||||
protected String expectedBody = "<hello>world!</hello>";
|
protected String expectedBody = "<hello>world!</hello>";
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ import org.apache.activemq.ActiveMQConnectionFactory;
|
||||||
import org.apache.activemq.RedeliveryPolicy;
|
import org.apache.activemq.RedeliveryPolicy;
|
||||||
import org.apache.activemq.command.ActiveMQQueue;
|
import org.apache.activemq.command.ActiveMQQueue;
|
||||||
import org.apache.camel.CamelContext;
|
import org.apache.camel.CamelContext;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
|
import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
|
||||||
|
@ -38,7 +38,7 @@ import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTest
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
public class CamelRedeliveryTest extends AbstractJUnit38SpringContextTests {
|
public class CamelRedeliveryTest extends AbstractJUnit38SpringContextTests {
|
||||||
private static final transient Log LOG = LogFactory.getLog(CamelRedeliveryTest.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(CamelRedeliveryTest.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected CamelContext camelContext;
|
protected CamelContext camelContext;
|
||||||
|
|
|
@ -34,14 +34,14 @@ import org.apache.activemq.util.ThreadTracker;
|
||||||
import org.apache.camel.CamelContext;
|
import org.apache.camel.CamelContext;
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
import org.apache.camel.builder.RouteBuilder;
|
||||||
import org.apache.camel.impl.DefaultCamelContext;
|
import org.apache.camel.impl.DefaultCamelContext;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
|
|
||||||
// see: https://issues.apache.org/activemq/browse/AMQ-2966
|
// see: https://issues.apache.org/activemq/browse/AMQ-2966
|
||||||
public class CamelVMTransportRoutingTest extends TestCase {
|
public class CamelVMTransportRoutingTest extends TestCase {
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(CamelVMTransportRoutingTest.class);
|
private static final Logger log = LoggerFactory.getLogger(CamelVMTransportRoutingTest.class);
|
||||||
|
|
||||||
private BrokerService broker = null;
|
private BrokerService broker = null;
|
||||||
private TransportConnector connector = null;
|
private TransportConnector connector = null;
|
||||||
|
|
|
@ -33,8 +33,8 @@ import org.apache.activemq.command.ActiveMQQueue;
|
||||||
import org.apache.activemq.command.TransactionId;
|
import org.apache.activemq.command.TransactionId;
|
||||||
import org.apache.activemq.util.Wait;
|
import org.apache.activemq.util.Wait;
|
||||||
import org.apache.camel.spring.SpringTestSupport;
|
import org.apache.camel.spring.SpringTestSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.enhydra.jdbc.pool.StandardXAPoolDataSource;
|
import org.enhydra.jdbc.pool.StandardXAPoolDataSource;
|
||||||
import org.springframework.context.support.AbstractXmlApplicationContext;
|
import org.springframework.context.support.AbstractXmlApplicationContext;
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
@ -43,7 +43,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
* shows broker heuristic rollback (no prepare memory), hence duplicate message delivery
|
* shows broker heuristic rollback (no prepare memory), hence duplicate message delivery
|
||||||
*/
|
*/
|
||||||
public class JmsJdbcXATest extends SpringTestSupport {
|
public class JmsJdbcXATest extends SpringTestSupport {
|
||||||
private static final Log LOG = LogFactory.getLog(JmsJdbcXATest.class);
|
private static final Logger LOG = LoggerFactory.getLogger(JmsJdbcXATest.class);
|
||||||
BrokerService broker = null;
|
BrokerService broker = null;
|
||||||
|
|
||||||
public java.sql.Connection initDb() throws Exception {
|
public java.sql.Connection initDb() throws Exception {
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.apache.camel.EndpointInject;
|
||||||
import org.apache.camel.CamelContext;
|
import org.apache.camel.CamelContext;
|
||||||
import org.apache.camel.Exchange;
|
import org.apache.camel.Exchange;
|
||||||
import org.apache.camel.util.ObjectHelper;
|
import org.apache.camel.util.ObjectHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
|
import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -35,7 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
*/
|
*/
|
||||||
@ContextConfiguration
|
@ContextConfiguration
|
||||||
public class SetHeaderTest extends AbstractJUnit38SpringContextTests {
|
public class SetHeaderTest extends AbstractJUnit38SpringContextTests {
|
||||||
private static final transient Log LOG = LogFactory.getLog(SetHeaderTest.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(SetHeaderTest.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected CamelContext camelContext;
|
protected CamelContext camelContext;
|
||||||
|
|
|
@ -33,14 +33,14 @@ import org.apache.camel.builder.RouteBuilder;
|
||||||
import org.apache.camel.component.jms.JmsMessage;
|
import org.apache.camel.component.jms.JmsMessage;
|
||||||
import org.apache.camel.component.mock.AssertionClause;
|
import org.apache.camel.component.mock.AssertionClause;
|
||||||
import org.apache.camel.component.mock.MockEndpoint;
|
import org.apache.camel.component.mock.MockEndpoint;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class ActiveMQJmsHeaderRouteTest extends ContextTestSupport {
|
public class ActiveMQJmsHeaderRouteTest extends ContextTestSupport {
|
||||||
private static final transient Log LOG = LogFactory.getLog(ActiveMQJmsHeaderRouteTest.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQJmsHeaderRouteTest.class);
|
||||||
|
|
||||||
protected Object expectedBody = "<time>" + new Date() + "</time>";
|
protected Object expectedBody = "<time>" + new Date() + "</time>";
|
||||||
protected ActiveMQQueue replyQueue = new ActiveMQQueue("test.reply.queue");
|
protected ActiveMQQueue replyQueue = new ActiveMQQueue("test.reply.queue");
|
||||||
|
|
|
@ -32,14 +32,14 @@ import org.apache.camel.Message;
|
||||||
import org.apache.camel.builder.RouteBuilder;
|
import org.apache.camel.builder.RouteBuilder;
|
||||||
import org.apache.camel.component.mock.AssertionClause;
|
import org.apache.camel.component.mock.AssertionClause;
|
||||||
import org.apache.camel.component.mock.MockEndpoint;
|
import org.apache.camel.component.mock.MockEndpoint;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class ActiveMQReplyToHeaderUsingConverterTest extends ContextTestSupport {
|
public class ActiveMQReplyToHeaderUsingConverterTest extends ContextTestSupport {
|
||||||
private static final transient Log LOG = LogFactory.getLog(ActiveMQReplyToHeaderUsingConverterTest.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQReplyToHeaderUsingConverterTest.class);
|
||||||
protected Object expectedBody = "<time>" + new Date() + "</time>";
|
protected Object expectedBody = "<time>" + new Date() + "</time>";
|
||||||
protected String replyQueueName = "queue://test.my.reply.queue";
|
protected String replyQueueName = "queue://test.my.reply.queue";
|
||||||
protected String correlationID = "ABC-123";
|
protected String correlationID = "ABC-123";
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.apache.camel.Endpoint;
|
||||||
import org.apache.camel.impl.DefaultCamelContext;
|
import org.apache.camel.impl.DefaultCamelContext;
|
||||||
import org.apache.camel.spi.BrowsableEndpoint;
|
import org.apache.camel.spi.BrowsableEndpoint;
|
||||||
import org.apache.camel.util.CamelContextHelper;
|
import org.apache.camel.util.CamelContextHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows that we can see the queues inside ActiveMQ via Camel
|
* Shows that we can see the queues inside ActiveMQ via Camel
|
||||||
|
@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport {
|
public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport {
|
||||||
private static final transient Log LOG = LogFactory.getLog(AutoExposeQueuesInCamelTest.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(AutoExposeQueuesInCamelTest.class);
|
||||||
|
|
||||||
protected ActiveMQQueue sampleQueue = new ActiveMQQueue("foo.bar");
|
protected ActiveMQQueue sampleQueue = new ActiveMQQueue("foo.bar");
|
||||||
protected ActiveMQTopic sampleTopic = new ActiveMQTopic("cheese");
|
protected ActiveMQTopic sampleTopic = new ActiveMQTopic("cheese");
|
||||||
|
|
|
@ -39,14 +39,14 @@ import org.apache.camel.builder.RouteBuilder;
|
||||||
import org.apache.camel.component.jms.JmsConstants;
|
import org.apache.camel.component.jms.JmsConstants;
|
||||||
import org.apache.camel.component.mock.AssertionClause;
|
import org.apache.camel.component.mock.AssertionClause;
|
||||||
import org.apache.camel.component.mock.MockEndpoint;
|
import org.apache.camel.component.mock.MockEndpoint;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class InvokeRequestReplyUsingJmsReplyToHeaderTest extends ContextTestSupport {
|
public class InvokeRequestReplyUsingJmsReplyToHeaderTest extends ContextTestSupport {
|
||||||
private static final transient Log LOG = LogFactory.getLog(ActiveMQReplyToHeaderUsingConverterTest.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQReplyToHeaderUsingConverterTest.class);
|
||||||
protected String replyQueueName = "queue://test.reply";
|
protected String replyQueueName = "queue://test.reply";
|
||||||
protected Object correlationID = "ABC-123";
|
protected Object correlationID = "ABC-123";
|
||||||
protected Object groupID = "GROUP-XYZ";
|
protected Object groupID = "GROUP-XYZ";
|
||||||
|
|
|
@ -35,12 +35,12 @@ import javax.jms.TextMessage;
|
||||||
|
|
||||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||||
import org.apache.activemq.command.ActiveMQQueue;
|
import org.apache.activemq.command.ActiveMQQueue;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public final class Producer {
|
public final class Producer {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(Producer.class);
|
private static final Logger LOG = LoggerFactory.getLogger(Producer.class);
|
||||||
|
|
||||||
private Producer() {
|
private Producer() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,8 @@
|
||||||
<!-- Required Dependencies -->
|
<!-- Required Dependencies -->
|
||||||
<!-- =============================== -->
|
<!-- =============================== -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>commons-logging-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
@ -193,8 +193,8 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>commons-logging</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -268,11 +268,6 @@
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jmock</groupId>
|
<groupId>org.jmock</groupId>
|
||||||
<artifactId>jmock-junit4</artifactId>
|
<artifactId>jmock-junit4</artifactId>
|
||||||
|
|
|
@ -97,8 +97,8 @@ import org.apache.activemq.util.IntrospectionSupport;
|
||||||
import org.apache.activemq.util.JMSExceptionSupport;
|
import org.apache.activemq.util.JMSExceptionSupport;
|
||||||
import org.apache.activemq.util.LongSequenceGenerator;
|
import org.apache.activemq.util.LongSequenceGenerator;
|
||||||
import org.apache.activemq.util.ServiceSupport;
|
import org.apache.activemq.util.ServiceSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class ActiveMQConnection implements Connection, TopicConnection, QueueConnection, StatsCapable, Closeable, StreamConnection, TransportListener, EnhancedConnection {
|
public class ActiveMQConnection implements Connection, TopicConnection, QueueConnection, StatsCapable, Closeable, StreamConnection, TransportListener, EnhancedConnection {
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
|
||||||
public static final String DEFAULT_PASSWORD = ActiveMQConnectionFactory.DEFAULT_PASSWORD;
|
public static final String DEFAULT_PASSWORD = ActiveMQConnectionFactory.DEFAULT_PASSWORD;
|
||||||
public static final String DEFAULT_BROKER_URL = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;
|
public static final String DEFAULT_BROKER_URL = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ActiveMQConnection.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQConnection.class);
|
||||||
private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator();
|
private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator();
|
||||||
|
|
||||||
public final ConcurrentHashMap<ActiveMQTempDestination, ActiveMQTempDestination> activeTempDestinations = new ConcurrentHashMap<ActiveMQTempDestination, ActiveMQTempDestination>();
|
public final ConcurrentHashMap<ActiveMQTempDestination, ActiveMQTempDestination> activeTempDestinations = new ConcurrentHashMap<ActiveMQTempDestination, ActiveMQTempDestination>();
|
||||||
|
|
|
@ -59,8 +59,8 @@ import org.apache.activemq.transaction.Synchronization;
|
||||||
import org.apache.activemq.util.Callback;
|
import org.apache.activemq.util.Callback;
|
||||||
import org.apache.activemq.util.IntrospectionSupport;
|
import org.apache.activemq.util.IntrospectionSupport;
|
||||||
import org.apache.activemq.util.JMSExceptionSupport;
|
import org.apache.activemq.util.JMSExceptionSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A client uses a <CODE>MessageConsumer</CODE> object to receive messages
|
* A client uses a <CODE>MessageConsumer</CODE> object to receive messages
|
||||||
|
@ -108,7 +108,7 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ActiveMQMessageConsumer.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQMessageConsumer.class);
|
||||||
protected final Scheduler scheduler;
|
protected final Scheduler scheduler;
|
||||||
protected final ActiveMQSession session;
|
protected final ActiveMQSession session;
|
||||||
protected final ConsumerInfo info;
|
protected final ConsumerInfo info;
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
package org.apache.activemq;
|
package org.apache.activemq;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the prefetch message policies for different types of consumers
|
* Defines the prefetch message policies for different types of consumers
|
||||||
|
@ -35,7 +35,7 @@ public class ActiveMQPrefetchPolicy extends Object implements Serializable {
|
||||||
public static final int DEFAULT_INPUT_STREAM_PREFETCH=100;
|
public static final int DEFAULT_INPUT_STREAM_PREFETCH=100;
|
||||||
public static final int DEFAULT_TOPIC_PREFETCH = MAX_PREFETCH_SIZE;
|
public static final int DEFAULT_TOPIC_PREFETCH = MAX_PREFETCH_SIZE;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ActiveMQPrefetchPolicy.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQPrefetchPolicy.class);
|
||||||
|
|
||||||
private int queuePrefetch;
|
private int queuePrefetch;
|
||||||
private int queueBrowserPrefetch;
|
private int queueBrowserPrefetch;
|
||||||
|
|
|
@ -88,8 +88,8 @@ import org.apache.activemq.transaction.Synchronization;
|
||||||
import org.apache.activemq.usage.MemoryUsage;
|
import org.apache.activemq.usage.MemoryUsage;
|
||||||
import org.apache.activemq.util.Callback;
|
import org.apache.activemq.util.Callback;
|
||||||
import org.apache.activemq.util.LongSequenceGenerator;
|
import org.apache.activemq.util.LongSequenceGenerator;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <P>
|
* <P>
|
||||||
|
@ -196,7 +196,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
||||||
void afterDelivery(ActiveMQSession session, Message msg);
|
void afterDelivery(ActiveMQSession session, Message msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ActiveMQSession.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQSession.class);
|
||||||
private final Scheduler scheduler;
|
private final Scheduler scheduler;
|
||||||
private final ThreadPoolExecutor connectionExecutor;
|
private final ThreadPoolExecutor connectionExecutor;
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.apache.activemq.command.MessageDispatch;
|
||||||
import org.apache.activemq.thread.Task;
|
import org.apache.activemq.thread.Task;
|
||||||
import org.apache.activemq.thread.TaskRunner;
|
import org.apache.activemq.thread.TaskRunner;
|
||||||
import org.apache.activemq.util.JMSExceptionSupport;
|
import org.apache.activemq.util.JMSExceptionSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A utility class used by the Session for dispatching messages asynchronously
|
* A utility class used by the Session for dispatching messages asynchronously
|
||||||
|
@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @see javax.jms.Session
|
* @see javax.jms.Session
|
||||||
*/
|
*/
|
||||||
public class ActiveMQSessionExecutor implements Task {
|
public class ActiveMQSessionExecutor implements Task {
|
||||||
private static final Log LOG = LogFactory.getLog(ActiveMQSessionExecutor.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQSessionExecutor.class);
|
||||||
|
|
||||||
private final ActiveMQSession session;
|
private final ActiveMQSession session;
|
||||||
private final MessageDispatchChannel messageQueue;
|
private final MessageDispatchChannel messageQueue;
|
||||||
|
|
|
@ -27,11 +27,11 @@ import org.apache.activemq.command.DataStructure;
|
||||||
import org.apache.activemq.command.DestinationInfo;
|
import org.apache.activemq.command.DestinationInfo;
|
||||||
import org.apache.activemq.command.MessageAck;
|
import org.apache.activemq.command.MessageAck;
|
||||||
import org.apache.activemq.command.MessageDispatch;
|
import org.apache.activemq.command.MessageDispatch;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class AdvisoryConsumer implements ActiveMQDispatcher {
|
public class AdvisoryConsumer implements ActiveMQDispatcher {
|
||||||
private static final transient Log LOG = LogFactory.getLog(AdvisoryConsumer.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(AdvisoryConsumer.class);
|
||||||
|
|
||||||
int deliveredCounter;
|
int deliveredCounter;
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@ import org.apache.activemq.command.XATransactionId;
|
||||||
import org.apache.activemq.transaction.Synchronization;
|
import org.apache.activemq.transaction.Synchronization;
|
||||||
import org.apache.activemq.util.JMSExceptionSupport;
|
import org.apache.activemq.util.JMSExceptionSupport;
|
||||||
import org.apache.activemq.util.LongSequenceGenerator;
|
import org.apache.activemq.util.LongSequenceGenerator;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A TransactionContext provides the means to control a JMS transaction. It
|
* A TransactionContext provides the means to control a JMS transaction. It
|
||||||
|
@ -65,7 +65,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class TransactionContext implements XAResource {
|
public class TransactionContext implements XAResource {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(TransactionContext.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TransactionContext.class);
|
||||||
|
|
||||||
// XATransactionId -> ArrayList of TransactionContext objects
|
// XATransactionId -> ArrayList of TransactionContext objects
|
||||||
private final static ConcurrentHashMap<TransactionId, List<TransactionContext>> ENDED_XA_TRANSACTION_CONTEXTS = new ConcurrentHashMap<TransactionId, List<TransactionContext>>();
|
private final static ConcurrentHashMap<TransactionId, List<TransactionContext>> ENDED_XA_TRANSACTION_CONTEXTS = new ConcurrentHashMap<TransactionId, List<TransactionContext>>();
|
||||||
|
|
|
@ -34,8 +34,8 @@ import org.apache.activemq.state.ProducerState;
|
||||||
import org.apache.activemq.usage.Usage;
|
import org.apache.activemq.usage.Usage;
|
||||||
import org.apache.activemq.util.IdGenerator;
|
import org.apache.activemq.util.IdGenerator;
|
||||||
import org.apache.activemq.util.LongSequenceGenerator;
|
import org.apache.activemq.util.LongSequenceGenerator;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This broker filter handles tracking the state of the broker for purposes of
|
* This broker filter handles tracking the state of the broker for purposes of
|
||||||
|
@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class AdvisoryBroker extends BrokerFilter {
|
public class AdvisoryBroker extends BrokerFilter {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AdvisoryBroker.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AdvisoryBroker.class);
|
||||||
private static final IdGenerator ID_GENERATOR = new IdGenerator();
|
private static final IdGenerator ID_GENERATOR = new IdGenerator();
|
||||||
|
|
||||||
protected final ConcurrentHashMap<ConnectionId, ConnectionInfo> connections = new ConcurrentHashMap<ConnectionId, ConnectionInfo>();
|
protected final ConcurrentHashMap<ConnectionId, ConnectionInfo> connections = new ConcurrentHashMap<ConnectionId, ConnectionInfo>();
|
||||||
|
|
|
@ -34,8 +34,8 @@ import org.apache.activemq.command.ActiveMQTopic;
|
||||||
import org.apache.activemq.command.ConsumerId;
|
import org.apache.activemq.command.ConsumerId;
|
||||||
import org.apache.activemq.command.ConsumerInfo;
|
import org.apache.activemq.command.ConsumerInfo;
|
||||||
import org.apache.activemq.command.RemoveInfo;
|
import org.apache.activemq.command.RemoveInfo;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object which can be used to listen to the number of active consumers
|
* An object which can be used to listen to the number of active consumers
|
||||||
|
@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class ConsumerEventSource implements Service, MessageListener {
|
public class ConsumerEventSource implements Service, MessageListener {
|
||||||
private static final Log LOG = LogFactory.getLog(ConsumerEventSource.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ConsumerEventSource.class);
|
||||||
|
|
||||||
private final Connection connection;
|
private final Connection connection;
|
||||||
private final ActiveMQDestination destination;
|
private final ActiveMQDestination destination;
|
||||||
|
|
|
@ -35,8 +35,8 @@ import org.apache.activemq.command.ActiveMQTempQueue;
|
||||||
import org.apache.activemq.command.ActiveMQTempTopic;
|
import org.apache.activemq.command.ActiveMQTempTopic;
|
||||||
import org.apache.activemq.command.ActiveMQTopic;
|
import org.apache.activemq.command.ActiveMQTopic;
|
||||||
import org.apache.activemq.command.DestinationInfo;
|
import org.apache.activemq.command.DestinationInfo;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper class which keeps track of the Destinations available in a broker and allows you to listen to them
|
* A helper class which keeps track of the Destinations available in a broker and allows you to listen to them
|
||||||
|
@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class DestinationSource implements MessageListener {
|
public class DestinationSource implements MessageListener {
|
||||||
private static final Log LOG = LogFactory.getLog(ConsumerEventSource.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ConsumerEventSource.class);
|
||||||
private AtomicBoolean started = new AtomicBoolean(false);
|
private AtomicBoolean started = new AtomicBoolean(false);
|
||||||
private final Connection connection;
|
private final Connection connection;
|
||||||
private Session session;
|
private Session session;
|
||||||
|
|
|
@ -34,8 +34,8 @@ import org.apache.activemq.command.ActiveMQTopic;
|
||||||
import org.apache.activemq.command.ProducerId;
|
import org.apache.activemq.command.ProducerId;
|
||||||
import org.apache.activemq.command.ProducerInfo;
|
import org.apache.activemq.command.ProducerInfo;
|
||||||
import org.apache.activemq.command.RemoveInfo;
|
import org.apache.activemq.command.RemoveInfo;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object which can be used to listen to the number of active consumers
|
* An object which can be used to listen to the number of active consumers
|
||||||
|
@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: 359679 $
|
* @version $Revision: 359679 $
|
||||||
*/
|
*/
|
||||||
public class ProducerEventSource implements Service, MessageListener {
|
public class ProducerEventSource implements Service, MessageListener {
|
||||||
private static final Log LOG = LogFactory.getLog(ProducerEventSource.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ProducerEventSource.class);
|
||||||
|
|
||||||
private final Connection connection;
|
private final Connection connection;
|
||||||
private final ActiveMQDestination destination;
|
private final ActiveMQDestination destination;
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.broker;
|
package org.apache.activemq.broker;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A useful base class for implementing broker plugins.
|
* A useful base class for implementing broker plugins.
|
||||||
|
@ -25,7 +25,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public abstract class BrokerPluginSupport extends MutableBrokerFilter implements BrokerPlugin {
|
public abstract class BrokerPluginSupport extends MutableBrokerFilter implements BrokerPlugin {
|
||||||
private static final Log LOG = LogFactory.getLog(BrokerPluginSupport.class);
|
private static final Logger LOG = LoggerFactory.getLogger(BrokerPluginSupport.class);
|
||||||
public BrokerPluginSupport() {
|
public BrokerPluginSupport() {
|
||||||
super(null);
|
super(null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,15 +20,15 @@ import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.3 $
|
* @version $Revision: 1.3 $
|
||||||
*/
|
*/
|
||||||
public class BrokerRegistry {
|
public class BrokerRegistry {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(BrokerRegistry.class);
|
private static final Logger LOG = LoggerFactory.getLogger(BrokerRegistry.class);
|
||||||
private static final BrokerRegistry INSTANCE = new BrokerRegistry();
|
private static final BrokerRegistry INSTANCE = new BrokerRegistry();
|
||||||
|
|
||||||
private final Object mutex = new Object();
|
private final Object mutex = new Object();
|
||||||
|
|
|
@ -92,8 +92,8 @@ import org.apache.activemq.transport.TransportServer;
|
||||||
import org.apache.activemq.transport.vm.VMTransportFactory;
|
import org.apache.activemq.transport.vm.VMTransportFactory;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.activemq.util.*;
|
import org.apache.activemq.util.*;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
/**
|
/**
|
||||||
* Manages the lifecycle of an ActiveMQ Broker. A BrokerService consists of a
|
* Manages the lifecycle of an ActiveMQ Broker. A BrokerService consists of a
|
||||||
* number of transport connectors, network connectors and a bunch of properties
|
* number of transport connectors, network connectors and a bunch of properties
|
||||||
|
@ -107,7 +107,7 @@ public class BrokerService implements Service {
|
||||||
public static final String DEFAULT_PORT = "61616";
|
public static final String DEFAULT_PORT = "61616";
|
||||||
public static final String LOCAL_HOST_NAME;
|
public static final String LOCAL_HOST_NAME;
|
||||||
public static final String DEFAULT_BROKER_NAME = "localhost";
|
public static final String DEFAULT_BROKER_NAME = "localhost";
|
||||||
private static final Log LOG = LogFactory.getLog(BrokerService.class);
|
private static final Logger LOG = LoggerFactory.getLogger(BrokerService.class);
|
||||||
private static final long serialVersionUID = 7353129142305630237L;
|
private static final long serialVersionUID = 7353129142305630237L;
|
||||||
private boolean useJmx = true;
|
private boolean useJmx = true;
|
||||||
private boolean enableStatistics = true;
|
private boolean enableStatistics = true;
|
||||||
|
@ -412,7 +412,7 @@ public class BrokerService implements Service {
|
||||||
|
|
||||||
public void masterFailed() {
|
public void masterFailed() {
|
||||||
if (shutdownOnMasterFailure) {
|
if (shutdownOnMasterFailure) {
|
||||||
LOG.fatal("The Master has failed ... shutting down");
|
LOG.error("The Master has failed ... shutting down");
|
||||||
try {
|
try {
|
||||||
stop();
|
stop();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -893,7 +893,7 @@ public class BrokerService implements Service {
|
||||||
}
|
}
|
||||||
return systemUsage;
|
return systemUsage;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.fatal("Cannot create SystemUsage", e);
|
LOG.error("Cannot create SystemUsage", e);
|
||||||
throw new RuntimeException("Fatally failed to create SystemUsage" + e.getMessage());
|
throw new RuntimeException("Fatally failed to create SystemUsage" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ import org.apache.activemq.broker.region.Destination;
|
||||||
import org.apache.activemq.broker.region.Region;
|
import org.apache.activemq.broker.region.Region;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.activemq.state.ProducerState;
|
import org.apache.activemq.state.ProducerState;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds internal state in the broker for a MessageProducer
|
* Holds internal state in the broker for a MessageProducer
|
||||||
|
@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class ProducerBrokerExchange {
|
public class ProducerBrokerExchange {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ProducerBrokerExchange.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ProducerBrokerExchange.class);
|
||||||
private ConnectionContext connectionContext;
|
private ConnectionContext connectionContext;
|
||||||
private Destination regionDestination;
|
private Destination regionDestination;
|
||||||
private Region region;
|
private Region region;
|
||||||
|
|
|
@ -40,8 +40,8 @@ import org.apache.activemq.transaction.Transaction;
|
||||||
import org.apache.activemq.transaction.XATransaction;
|
import org.apache.activemq.transaction.XATransaction;
|
||||||
import org.apache.activemq.util.IOExceptionSupport;
|
import org.apache.activemq.util.IOExceptionSupport;
|
||||||
import org.apache.activemq.util.WrappedException;
|
import org.apache.activemq.util.WrappedException;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This broker filter handles the transaction related operations in the Broker
|
* This broker filter handles the transaction related operations in the Broker
|
||||||
|
@ -51,7 +51,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class TransactionBroker extends BrokerFilter {
|
public class TransactionBroker extends BrokerFilter {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(TransactionBroker.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TransactionBroker.class);
|
||||||
|
|
||||||
// The prepared XA transactions.
|
// The prepared XA transactions.
|
||||||
private TransactionStore transactionStore;
|
private TransactionStore transactionStore;
|
||||||
|
|
|
@ -94,17 +94,17 @@ import org.apache.activemq.util.IntrospectionSupport;
|
||||||
import org.apache.activemq.util.MarshallingSupport;
|
import org.apache.activemq.util.MarshallingSupport;
|
||||||
import org.apache.activemq.util.ServiceSupport;
|
import org.apache.activemq.util.ServiceSupport;
|
||||||
import org.apache.activemq.util.URISupport;
|
import org.apache.activemq.util.URISupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import static org.apache.activemq.thread.DefaultThreadPools.getDefaultTaskRunnerFactory;
|
import static org.apache.activemq.thread.DefaultThreadPools.getDefaultTaskRunnerFactory;
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.8 $
|
* @version $Revision: 1.8 $
|
||||||
*/
|
*/
|
||||||
public class TransportConnection implements Connection, Task, CommandVisitor {
|
public class TransportConnection implements Connection, Task, CommandVisitor {
|
||||||
private static final Log LOG = LogFactory.getLog(TransportConnection.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TransportConnection.class);
|
||||||
private static final Log TRANSPORTLOG = LogFactory.getLog(TransportConnection.class.getName() + ".Transport");
|
private static final Logger TRANSPORTLOG = LoggerFactory.getLogger(TransportConnection.class.getName() + ".Transport");
|
||||||
private static final Log SERVICELOG = LogFactory.getLog(TransportConnection.class.getName() + ".Service");
|
private static final Logger SERVICELOG = LoggerFactory.getLogger(TransportConnection.class.getName() + ".Service");
|
||||||
// Keeps track of the broker and connector that created this connection.
|
// Keeps track of the broker and connector that created this connection.
|
||||||
protected final Broker broker;
|
protected final Broker broker;
|
||||||
protected final TransportConnector connector;
|
protected final TransportConnector connector;
|
||||||
|
|
|
@ -40,8 +40,8 @@ import org.apache.activemq.transport.discovery.DiscoveryAgent;
|
||||||
import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
|
import org.apache.activemq.transport.discovery.DiscoveryAgentFactory;
|
||||||
import org.apache.activemq.util.ServiceStopper;
|
import org.apache.activemq.util.ServiceStopper;
|
||||||
import org.apache.activemq.util.ServiceSupport;
|
import org.apache.activemq.util.ServiceSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @org.apache.xbean.XBean
|
* @org.apache.xbean.XBean
|
||||||
|
@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class TransportConnector implements Connector, BrokerServiceAware {
|
public class TransportConnector implements Connector, BrokerServiceAware {
|
||||||
|
|
||||||
final Log LOG = LogFactory.getLog(TransportConnector.class);
|
final Logger LOG = LoggerFactory.getLogger(TransportConnector.class);
|
||||||
|
|
||||||
protected CopyOnWriteArrayList<TransportConnection> connections = new CopyOnWriteArrayList<TransportConnection>();
|
protected CopyOnWriteArrayList<TransportConnection> connections = new CopyOnWriteArrayList<TransportConnection>();
|
||||||
protected TransportStatusDetector statusDector;
|
protected TransportStatusDetector statusDector;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
import org.apache.activemq.Service;
|
import org.apache.activemq.Service;
|
||||||
import org.apache.activemq.ThreadPriorities;
|
import org.apache.activemq.ThreadPriorities;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to provide information on the status of the Connection
|
* Used to provide information on the status of the Connection
|
||||||
|
@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: 1.5 $
|
* @version $Revision: 1.5 $
|
||||||
*/
|
*/
|
||||||
public class TransportStatusDetector implements Service, Runnable {
|
public class TransportStatusDetector implements Service, Runnable {
|
||||||
private static final Log LOG = LogFactory.getLog(TransportStatusDetector.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TransportStatusDetector.class);
|
||||||
private TransportConnector connector;
|
private TransportConnector connector;
|
||||||
private Set<TransportConnection> collectionCandidates = new CopyOnWriteArraySet<TransportConnection>();
|
private Set<TransportConnection> collectionCandidates = new CopyOnWriteArraySet<TransportConnection>();
|
||||||
private AtomicBoolean started = new AtomicBoolean(false);
|
private AtomicBoolean started = new AtomicBoolean(false);
|
||||||
|
|
|
@ -26,8 +26,8 @@ import org.apache.activemq.broker.region.Subscription;
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ConsumerId;
|
import org.apache.activemq.command.ConsumerId;
|
||||||
import org.apache.activemq.command.ConsumerInfo;
|
import org.apache.activemq.command.ConsumerInfo;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monitors for client connections that may fail to another broker - but this
|
* Monitors for client connections that may fail to another broker - but this
|
||||||
|
@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class ConnectionSplitBroker extends BrokerFilter{
|
public class ConnectionSplitBroker extends BrokerFilter{
|
||||||
private static final Log LOG = LogFactory.getLog(ConnectionSplitBroker.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ConnectionSplitBroker.class);
|
||||||
private List<ConsumerInfo>networkConsumerList = new ArrayList<ConsumerInfo>();
|
private List<ConsumerInfo>networkConsumerList = new ArrayList<ConsumerInfo>();
|
||||||
public ConnectionSplitBroker(Broker next) {
|
public ConnectionSplitBroker(Broker next) {
|
||||||
super(next);
|
super(next);
|
||||||
|
|
|
@ -48,8 +48,8 @@ import org.apache.activemq.command.TransactionInfo;
|
||||||
import org.apache.activemq.transport.MutexTransport;
|
import org.apache.activemq.transport.MutexTransport;
|
||||||
import org.apache.activemq.transport.ResponseCorrelator;
|
import org.apache.activemq.transport.ResponseCorrelator;
|
||||||
import org.apache.activemq.transport.Transport;
|
import org.apache.activemq.transport.Transport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Message Broker which passes messages to a slave
|
* The Message Broker which passes messages to a slave
|
||||||
|
@ -58,7 +58,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class MasterBroker extends InsertableMutableBrokerFilter {
|
public class MasterBroker extends InsertableMutableBrokerFilter {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(MasterBroker.class);
|
private static final Logger LOG = LoggerFactory.getLogger(MasterBroker.class);
|
||||||
private Transport slave;
|
private Transport slave;
|
||||||
private AtomicBoolean started = new AtomicBoolean(false);
|
private AtomicBoolean started = new AtomicBoolean(false);
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@ import org.apache.activemq.transport.TransportFactory;
|
||||||
import org.apache.activemq.util.IdGenerator;
|
import org.apache.activemq.util.IdGenerator;
|
||||||
import org.apache.activemq.util.ServiceStopper;
|
import org.apache.activemq.util.ServiceStopper;
|
||||||
import org.apache.activemq.util.ServiceSupport;
|
import org.apache.activemq.util.ServiceSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connects a Slave Broker to a Master when using <a
|
* Connects a Slave Broker to a Master when using <a
|
||||||
|
@ -56,7 +56,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class MasterConnector implements Service, BrokerServiceAware {
|
public class MasterConnector implements Service, BrokerServiceAware {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(MasterConnector.class);
|
private static final Logger LOG = LoggerFactory.getLogger(MasterConnector.class);
|
||||||
private BrokerService broker;
|
private BrokerService broker;
|
||||||
private URI remoteURI;
|
private URI remoteURI;
|
||||||
private URI localURI;
|
private URI localURI;
|
||||||
|
|
|
@ -19,8 +19,8 @@ package org.apache.activemq.broker.jmx;
|
||||||
import org.apache.activemq.broker.region.Subscription;
|
import org.apache.activemq.broker.region.Subscription;
|
||||||
import org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy;
|
import org.apache.activemq.broker.region.policy.AbortSlowConsumerStrategy;
|
||||||
import org.apache.activemq.broker.region.policy.SlowConsumerEntry;
|
import org.apache.activemq.broker.region.policy.SlowConsumerEntry;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.management.ObjectName;
|
import javax.management.ObjectName;
|
||||||
import javax.management.openmbean.CompositeType;
|
import javax.management.openmbean.CompositeType;
|
||||||
|
@ -31,7 +31,7 @@ import javax.management.openmbean.TabularType;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class AbortSlowConsumerStrategyView implements AbortSlowConsumerStrategyViewMBean {
|
public class AbortSlowConsumerStrategyView implements AbortSlowConsumerStrategyViewMBean {
|
||||||
private static final Log LOG = LogFactory.getLog(AbortSlowConsumerStrategyView.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbortSlowConsumerStrategyView.class);
|
||||||
private ManagedRegionBroker broker;
|
private ManagedRegionBroker broker;
|
||||||
private AbortSlowConsumerStrategy strategy;
|
private AbortSlowConsumerStrategy strategy;
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
package org.apache.activemq.broker.jmx;
|
package org.apache.activemq.broker.jmx;
|
||||||
|
|
||||||
import org.apache.activemq.broker.util.*;
|
import org.apache.activemq.broker.util.*;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
@ -38,7 +38,7 @@ public class AnnotatedMBean extends StandardMBean {
|
||||||
|
|
||||||
private static final Map<String, Class<?>> primitives = new HashMap<String, Class<?>>();
|
private static final Map<String, Class<?>> primitives = new HashMap<String, Class<?>>();
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog("org.apache.activemq.audit");
|
private static final Logger LOG = LoggerFactory.getLogger("org.apache.activemq.audit");
|
||||||
|
|
||||||
private static boolean audit;
|
private static boolean audit;
|
||||||
private static AuditLogService auditLog;
|
private static AuditLogService auditLog;
|
||||||
|
|
|
@ -48,11 +48,11 @@ import org.apache.activemq.command.Message;
|
||||||
import org.apache.activemq.filter.BooleanExpression;
|
import org.apache.activemq.filter.BooleanExpression;
|
||||||
import org.apache.activemq.filter.MessageEvaluationContext;
|
import org.apache.activemq.filter.MessageEvaluationContext;
|
||||||
import org.apache.activemq.selector.SelectorParser;
|
import org.apache.activemq.selector.SelectorParser;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class DestinationView implements DestinationViewMBean {
|
public class DestinationView implements DestinationViewMBean {
|
||||||
private static final Log LOG = LogFactory.getLog(DestinationViewMBean.class);
|
private static final Logger LOG = LoggerFactory.getLogger(DestinationViewMBean.class);
|
||||||
protected final Destination destination;
|
protected final Destination destination;
|
||||||
protected final ManagedRegionBroker broker;
|
protected final ManagedRegionBroker broker;
|
||||||
|
|
||||||
|
|
|
@ -71,11 +71,11 @@ import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.activemq.util.JMXSupport;
|
import org.apache.activemq.util.JMXSupport;
|
||||||
import org.apache.activemq.util.ServiceStopper;
|
import org.apache.activemq.util.ServiceStopper;
|
||||||
import org.apache.activemq.util.SubscriptionKey;
|
import org.apache.activemq.util.SubscriptionKey;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class ManagedRegionBroker extends RegionBroker {
|
public class ManagedRegionBroker extends RegionBroker {
|
||||||
private static final Log LOG = LogFactory.getLog(ManagedRegionBroker.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ManagedRegionBroker.class);
|
||||||
private final ManagementContext managementContext;
|
private final ManagementContext managementContext;
|
||||||
private final ObjectName brokerObjectName;
|
private final ObjectName brokerObjectName;
|
||||||
private final Map<ObjectName, DestinationView> topics = new ConcurrentHashMap<ObjectName, DestinationView>();
|
private final Map<ObjectName, DestinationView> topics = new ConcurrentHashMap<ObjectName, DestinationView>();
|
||||||
|
|
|
@ -25,8 +25,8 @@ import org.apache.activemq.thread.TaskRunnerFactory;
|
||||||
import org.apache.activemq.transport.Transport;
|
import org.apache.activemq.transport.Transport;
|
||||||
import org.apache.activemq.util.IOExceptionSupport;
|
import org.apache.activemq.util.IOExceptionSupport;
|
||||||
import org.apache.activemq.util.JMXSupport;
|
import org.apache.activemq.util.JMXSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import javax.management.ObjectName;
|
import javax.management.ObjectName;
|
||||||
|
@ -37,7 +37,7 @@ import javax.management.ObjectName;
|
||||||
* @version $Revision: 1.1 $
|
* @version $Revision: 1.1 $
|
||||||
*/
|
*/
|
||||||
public class ManagedTransportConnection extends TransportConnection {
|
public class ManagedTransportConnection extends TransportConnection {
|
||||||
private static final Log LOG = LogFactory.getLog(ManagedTransportConnection.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ManagedTransportConnection.class);
|
||||||
|
|
||||||
private final ManagementContext managementContext;
|
private final ManagementContext managementContext;
|
||||||
private final ObjectName connectorName;
|
private final ObjectName connectorName;
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
package org.apache.activemq.broker.jmx;
|
package org.apache.activemq.broker.jmx;
|
||||||
|
|
||||||
import org.apache.activemq.Service;
|
import org.apache.activemq.Service;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.management.*;
|
import javax.management.*;
|
||||||
import javax.management.remote.JMXConnectorServer;
|
import javax.management.remote.JMXConnectorServer;
|
||||||
|
@ -46,7 +46,7 @@ public class ManagementContext implements Service {
|
||||||
* Default activemq domain
|
* Default activemq domain
|
||||||
*/
|
*/
|
||||||
public static final String DEFAULT_DOMAIN = "org.apache.activemq";
|
public static final String DEFAULT_DOMAIN = "org.apache.activemq";
|
||||||
private static final Log LOG = LogFactory.getLog(ManagementContext.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ManagementContext.class);
|
||||||
private MBeanServer beanServer;
|
private MBeanServer beanServer;
|
||||||
private String jmxDomainName = DEFAULT_DOMAIN;
|
private String jmxDomainName = DEFAULT_DOMAIN;
|
||||||
private boolean useMBeanServer = true;
|
private boolean useMBeanServer = true;
|
||||||
|
|
|
@ -44,15 +44,15 @@ import org.apache.activemq.filter.DestinationMap;
|
||||||
import org.apache.activemq.security.SecurityContext;
|
import org.apache.activemq.security.SecurityContext;
|
||||||
import org.apache.activemq.thread.TaskRunnerFactory;
|
import org.apache.activemq.thread.TaskRunnerFactory;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.14 $
|
* @version $Revision: 1.14 $
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractRegion implements Region {
|
public abstract class AbstractRegion implements Region {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AbstractRegion.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbstractRegion.class);
|
||||||
|
|
||||||
protected final Map<ActiveMQDestination, Destination> destinations = new ConcurrentHashMap<ActiveMQDestination, Destination>();
|
protected final Map<ActiveMQDestination, Destination> destinations = new ConcurrentHashMap<ActiveMQDestination, Destination>();
|
||||||
protected final DestinationMap destinationMap = new DestinationMap();
|
protected final DestinationMap destinationMap = new DestinationMap();
|
||||||
|
|
|
@ -34,12 +34,12 @@ import org.apache.activemq.filter.LogicExpression;
|
||||||
import org.apache.activemq.filter.MessageEvaluationContext;
|
import org.apache.activemq.filter.MessageEvaluationContext;
|
||||||
import org.apache.activemq.filter.NoLocalExpression;
|
import org.apache.activemq.filter.NoLocalExpression;
|
||||||
import org.apache.activemq.selector.SelectorParser;
|
import org.apache.activemq.selector.SelectorParser;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public abstract class AbstractSubscription implements Subscription {
|
public abstract class AbstractSubscription implements Subscription {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AbstractSubscription.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbstractSubscription.class);
|
||||||
protected Broker broker;
|
protected Broker broker;
|
||||||
protected ConnectionContext context;
|
protected ConnectionContext context;
|
||||||
protected ConsumerInfo info;
|
protected ConsumerInfo info;
|
||||||
|
|
|
@ -27,14 +27,14 @@ import org.apache.activemq.broker.ConnectionContext;
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.thread.TaskRunnerFactory;
|
import org.apache.activemq.thread.TaskRunnerFactory;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractTempRegion extends AbstractRegion {
|
public abstract class AbstractTempRegion extends AbstractRegion {
|
||||||
private static final Log LOG = LogFactory.getLog(TempQueueRegion.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TempQueueRegion.class);
|
||||||
|
|
||||||
private Map<CachedDestination, Destination> cachedDestinations = new HashMap<CachedDestination, Destination>();
|
private Map<CachedDestination, Destination> cachedDestinations = new HashMap<CachedDestination, Destination>();
|
||||||
private final boolean doCacheTempDestinations;
|
private final boolean doCacheTempDestinations;
|
||||||
|
|
|
@ -35,7 +35,7 @@ import org.apache.activemq.store.MessageStore;
|
||||||
import org.apache.activemq.usage.MemoryUsage;
|
import org.apache.activemq.usage.MemoryUsage;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.activemq.usage.Usage;
|
import org.apache.activemq.usage.Usage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.12 $
|
* @version $Revision: 1.12 $
|
||||||
|
@ -600,7 +600,7 @@ public abstract class BaseDestination implements Destination {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract Log getLog();
|
protected abstract Logger getLog();
|
||||||
|
|
||||||
public void setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy) {
|
public void setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy) {
|
||||||
this.slowConsumerStrategy = slowConsumerStrategy;
|
this.slowConsumerStrategy = slowConsumerStrategy;
|
||||||
|
|
|
@ -40,12 +40,12 @@ import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.activemq.usage.Usage;
|
import org.apache.activemq.usage.Usage;
|
||||||
import org.apache.activemq.usage.UsageListener;
|
import org.apache.activemq.usage.UsageListener;
|
||||||
import org.apache.activemq.util.SubscriptionKey;
|
import org.apache.activemq.util.SubscriptionKey;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class DurableTopicSubscription extends PrefetchSubscription implements UsageListener {
|
public class DurableTopicSubscription extends PrefetchSubscription implements UsageListener {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(DurableTopicSubscription.class);
|
private static final Logger LOG = LoggerFactory.getLogger(DurableTopicSubscription.class);
|
||||||
private final ConcurrentHashMap<MessageId, Integer> redeliveredMessages = new ConcurrentHashMap<MessageId, Integer>();
|
private final ConcurrentHashMap<MessageId, Integer> redeliveredMessages = new ConcurrentHashMap<MessageId, Integer>();
|
||||||
private final ConcurrentHashMap<ActiveMQDestination, Destination> destinations = new ConcurrentHashMap<ActiveMQDestination, Destination>();
|
private final ConcurrentHashMap<ActiveMQDestination, Destination> destinations = new ConcurrentHashMap<ActiveMQDestination, Destination>();
|
||||||
private final SubscriptionKey subscriptionKey;
|
private final SubscriptionKey subscriptionKey;
|
||||||
|
|
|
@ -41,8 +41,8 @@ import org.apache.activemq.command.Response;
|
||||||
import org.apache.activemq.thread.Scheduler;
|
import org.apache.activemq.thread.Scheduler;
|
||||||
import org.apache.activemq.transaction.Synchronization;
|
import org.apache.activemq.transaction.Synchronization;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A subscription that honors the pre-fetch option of the ConsumerInfo.
|
* A subscription that honors the pre-fetch option of the ConsumerInfo.
|
||||||
|
@ -51,7 +51,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public abstract class PrefetchSubscription extends AbstractSubscription {
|
public abstract class PrefetchSubscription extends AbstractSubscription {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(PrefetchSubscription.class);
|
private static final Logger LOG = LoggerFactory.getLogger(PrefetchSubscription.class);
|
||||||
protected final Scheduler scheduler;
|
protected final Scheduler scheduler;
|
||||||
|
|
||||||
protected PendingMessageCursor pending;
|
protected PendingMessageCursor pending;
|
||||||
|
|
|
@ -71,8 +71,8 @@ import org.apache.activemq.transaction.Synchronization;
|
||||||
import org.apache.activemq.usage.Usage;
|
import org.apache.activemq.usage.Usage;
|
||||||
import org.apache.activemq.usage.UsageListener;
|
import org.apache.activemq.usage.UsageListener;
|
||||||
import org.apache.activemq.util.BrokerSupport;
|
import org.apache.activemq.util.BrokerSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Queue is a List of MessageEntry objects that are dispatched to matching
|
* The Queue is a List of MessageEntry objects that are dispatched to matching
|
||||||
|
@ -81,7 +81,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: 1.28 $
|
* @version $Revision: 1.28 $
|
||||||
*/
|
*/
|
||||||
public class Queue extends BaseDestination implements Task, UsageListener {
|
public class Queue extends BaseDestination implements Task, UsageListener {
|
||||||
protected static final Log LOG = LogFactory.getLog(Queue.class);
|
protected static final Logger LOG = LoggerFactory.getLogger(Queue.class);
|
||||||
protected final TaskRunnerFactory taskFactory;
|
protected final TaskRunnerFactory taskFactory;
|
||||||
protected TaskRunner taskRunner;
|
protected TaskRunner taskRunner;
|
||||||
private final ReentrantReadWriteLock consumersLock = new ReentrantReadWriteLock();
|
private final ReentrantReadWriteLock consumersLock = new ReentrantReadWriteLock();
|
||||||
|
@ -294,7 +294,7 @@ public class Queue extends BaseDestination implements Task, UsageListener {
|
||||||
try {
|
try {
|
||||||
messages.addMessageLast(message);
|
messages.addMessageLast(message);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.fatal("Failed to add message to cursor", e);
|
LOG.error("Failed to add message to cursor", e);
|
||||||
}
|
}
|
||||||
}finally {
|
}finally {
|
||||||
messagesLock.writeLock().unlock();
|
messagesLock.writeLock().unlock();
|
||||||
|
@ -1405,7 +1405,7 @@ public class Queue extends BaseDestination implements Task, UsageListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error(e);
|
LOG.error(e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2057,7 +2057,7 @@ public class Queue extends BaseDestination implements Task, UsageListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Log getLog() {
|
protected Logger getLog() {
|
||||||
return LOG;
|
return LOG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,8 @@ import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ActiveMQMessage;
|
import org.apache.activemq.command.ActiveMQMessage;
|
||||||
import org.apache.activemq.command.ConsumerId;
|
import org.apache.activemq.command.ConsumerId;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queue dispatch policy that determines if a message can be sent to a subscription
|
* Queue dispatch policy that determines if a message can be sent to a subscription
|
||||||
|
@ -37,7 +37,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class QueueDispatchSelector extends SimpleDispatchSelector {
|
public class QueueDispatchSelector extends SimpleDispatchSelector {
|
||||||
private static final Log LOG = LogFactory.getLog(QueueDispatchSelector.class);
|
private static final Logger LOG = LoggerFactory.getLogger(QueueDispatchSelector.class);
|
||||||
private Subscription exclusiveConsumer;
|
private Subscription exclusiveConsumer;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,12 @@ import org.apache.activemq.command.ConsumerInfo;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.activemq.command.MessageAck;
|
import org.apache.activemq.command.MessageAck;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class QueueSubscription extends PrefetchSubscription implements LockOwner {
|
public class QueueSubscription extends PrefetchSubscription implements LockOwner {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(QueueSubscription.class);
|
private static final Logger LOG = LoggerFactory.getLogger(QueueSubscription.class);
|
||||||
|
|
||||||
public QueueSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info) throws InvalidSelectorException {
|
public QueueSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info) throws InvalidSelectorException {
|
||||||
super(broker,usageManager, context, info);
|
super(broker,usageManager, context, info);
|
||||||
|
|
|
@ -67,8 +67,8 @@ import org.apache.activemq.util.IdGenerator;
|
||||||
import org.apache.activemq.util.InetAddressUtil;
|
import org.apache.activemq.util.InetAddressUtil;
|
||||||
import org.apache.activemq.util.LongSequenceGenerator;
|
import org.apache.activemq.util.LongSequenceGenerator;
|
||||||
import org.apache.activemq.util.ServiceStopper;
|
import org.apache.activemq.util.ServiceStopper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routes Broker operations to the correct messaging regions for processing.
|
* Routes Broker operations to the correct messaging regions for processing.
|
||||||
|
@ -77,7 +77,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class RegionBroker extends EmptyBroker {
|
public class RegionBroker extends EmptyBroker {
|
||||||
public static final String ORIGINAL_EXPIRATION = "originalExpiration";
|
public static final String ORIGINAL_EXPIRATION = "originalExpiration";
|
||||||
private static final Log LOG = LogFactory.getLog(RegionBroker.class);
|
private static final Logger LOG = LoggerFactory.getLogger(RegionBroker.class);
|
||||||
private static final IdGenerator BROKER_ID_GENERATOR = new IdGenerator();
|
private static final IdGenerator BROKER_ID_GENERATOR = new IdGenerator();
|
||||||
|
|
||||||
protected final DestinationStatistics destinationStatistics = new DestinationStatistics();
|
protected final DestinationStatistics destinationStatistics = new DestinationStatistics();
|
||||||
|
@ -861,7 +861,7 @@ public class RegionBroker extends EmptyBroker {
|
||||||
try {
|
try {
|
||||||
return getBrokerService().getBroker();
|
return getBrokerService().getBroker();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.fatal("Trying to get Root Broker " + e);
|
LOG.error("Trying to get Root Broker " + e);
|
||||||
throw new RuntimeException("The broker from the BrokerService should not throw an exception");
|
throw new RuntimeException("The broker from the BrokerService should not throw an exception");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ActiveMQTempDestination;
|
import org.apache.activemq.command.ActiveMQTempDestination;
|
||||||
import org.apache.activemq.store.MessageStore;
|
import org.apache.activemq.store.MessageStore;
|
||||||
import org.apache.activemq.thread.TaskRunnerFactory;
|
import org.apache.activemq.thread.TaskRunnerFactory;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Queue is a List of MessageEntry objects that are dispatched to matching
|
* The Queue is a List of MessageEntry objects that are dispatched to matching
|
||||||
|
@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: 1.28 $
|
* @version $Revision: 1.28 $
|
||||||
*/
|
*/
|
||||||
public class TempQueue extends Queue{
|
public class TempQueue extends Queue{
|
||||||
private static final Log LOG = LogFactory.getLog(TempQueue.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TempQueue.class);
|
||||||
private final ActiveMQTempDestination tempDest;
|
private final ActiveMQTempDestination tempDest;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,14 +26,14 @@ import org.apache.activemq.command.ConsumerInfo;
|
||||||
import org.apache.activemq.command.MessageDispatchNotification;
|
import org.apache.activemq.command.MessageDispatchNotification;
|
||||||
import org.apache.activemq.thread.TaskRunnerFactory;
|
import org.apache.activemq.thread.TaskRunnerFactory;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.7 $
|
* @version $Revision: 1.7 $
|
||||||
*/
|
*/
|
||||||
public class TempQueueRegion extends AbstractTempRegion {
|
public class TempQueueRegion extends AbstractTempRegion {
|
||||||
private static final Log LOG = LogFactory.getLog(TempQueueRegion.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TempQueueRegion.class);
|
||||||
private final BrokerService brokerService;
|
private final BrokerService brokerService;
|
||||||
|
|
||||||
public TempQueueRegion(RegionBroker broker, BrokerService brokerService, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
|
public TempQueueRegion(RegionBroker broker, BrokerService brokerService, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
|
||||||
|
|
|
@ -24,15 +24,15 @@ import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ConsumerInfo;
|
import org.apache.activemq.command.ConsumerInfo;
|
||||||
import org.apache.activemq.thread.TaskRunnerFactory;
|
import org.apache.activemq.thread.TaskRunnerFactory;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.7 $
|
* @version $Revision: 1.7 $
|
||||||
*/
|
*/
|
||||||
public class TempTopicRegion extends AbstractTempRegion {
|
public class TempTopicRegion extends AbstractTempRegion {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(TempTopicRegion.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TempTopicRegion.class);
|
||||||
|
|
||||||
public TempTopicRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
|
public TempTopicRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory,
|
||||||
DestinationFactory destinationFactory) {
|
DestinationFactory destinationFactory) {
|
||||||
|
|
|
@ -52,8 +52,8 @@ import org.apache.activemq.thread.TaskRunnerFactory;
|
||||||
import org.apache.activemq.thread.Valve;
|
import org.apache.activemq.thread.Valve;
|
||||||
import org.apache.activemq.transaction.Synchronization;
|
import org.apache.activemq.transaction.Synchronization;
|
||||||
import org.apache.activemq.util.SubscriptionKey;
|
import org.apache.activemq.util.SubscriptionKey;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Topic is a destination that sends a copy of a message to every active
|
* The Topic is a destination that sends a copy of a message to every active
|
||||||
|
@ -62,7 +62,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: 1.21 $
|
* @version $Revision: 1.21 $
|
||||||
*/
|
*/
|
||||||
public class Topic extends BaseDestination implements Task {
|
public class Topic extends BaseDestination implements Task {
|
||||||
protected static final Log LOG = LogFactory.getLog(Topic.class);
|
protected static final Logger LOG = LoggerFactory.getLogger(Topic.class);
|
||||||
private final TopicMessageStore topicStore;
|
private final TopicMessageStore topicStore;
|
||||||
protected final CopyOnWriteArrayList<Subscription> consumers = new CopyOnWriteArrayList<Subscription>();
|
protected final CopyOnWriteArrayList<Subscription> consumers = new CopyOnWriteArrayList<Subscription>();
|
||||||
protected final Valve dispatchValve = new Valve(true);
|
protected final Valve dispatchValve = new Valve(true);
|
||||||
|
@ -662,7 +662,7 @@ public class Topic extends BaseDestination implements Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Log getLog() {
|
protected Logger getLog() {
|
||||||
return LOG;
|
return LOG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,14 @@ import org.apache.activemq.thread.TaskRunnerFactory;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.activemq.util.LongSequenceGenerator;
|
import org.apache.activemq.util.LongSequenceGenerator;
|
||||||
import org.apache.activemq.util.SubscriptionKey;
|
import org.apache.activemq.util.SubscriptionKey;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: 1.12 $
|
* @version $Revision: 1.12 $
|
||||||
*/
|
*/
|
||||||
public class TopicRegion extends AbstractRegion {
|
public class TopicRegion extends AbstractRegion {
|
||||||
private static final Log LOG = LogFactory.getLog(TopicRegion.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TopicRegion.class);
|
||||||
protected final ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription> durableSubscriptions = new ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription>();
|
protected final ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription> durableSubscriptions = new ConcurrentHashMap<SubscriptionKey, DurableTopicSubscription>();
|
||||||
private final LongSequenceGenerator recoveredDurableSubIdGenerator = new LongSequenceGenerator();
|
private final LongSequenceGenerator recoveredDurableSubIdGenerator = new LongSequenceGenerator();
|
||||||
private final SessionId recoveredDurableSubSessionId = new SessionId(new ConnectionId("OFFLINE"), recoveredDurableSubIdGenerator.getNextSequenceId());
|
private final SessionId recoveredDurableSubSessionId = new SessionId(new ConnectionId("OFFLINE"), recoveredDurableSubIdGenerator.getNextSequenceId());
|
||||||
|
|
|
@ -38,12 +38,12 @@ import org.apache.activemq.command.MessagePull;
|
||||||
import org.apache.activemq.command.Response;
|
import org.apache.activemq.command.Response;
|
||||||
import org.apache.activemq.transaction.Synchronization;
|
import org.apache.activemq.transaction.Synchronization;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class TopicSubscription extends AbstractSubscription {
|
public class TopicSubscription extends AbstractSubscription {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(TopicSubscription.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TopicSubscription.class);
|
||||||
private static final AtomicLong CURSOR_NAME_COUNTER = new AtomicLong(0);
|
private static final AtomicLong CURSOR_NAME_COUNTER = new AtomicLong(0);
|
||||||
|
|
||||||
protected PendingMessageCursor matched;
|
protected PendingMessageCursor matched;
|
||||||
|
|
|
@ -22,15 +22,15 @@ import org.apache.activemq.broker.region.MessageReference;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.activemq.command.MessageId;
|
import org.apache.activemq.command.MessageId;
|
||||||
import org.apache.activemq.store.MessageRecoveryListener;
|
import org.apache.activemq.store.MessageRecoveryListener;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store based cursor
|
* Store based cursor
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor implements MessageRecoveryListener {
|
public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor implements MessageRecoveryListener {
|
||||||
private static final Log LOG = LogFactory.getLog(AbstractStoreCursor.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbstractStoreCursor.class);
|
||||||
protected final Destination regionDestination;
|
protected final Destination regionDestination;
|
||||||
private final PendingList batchList;
|
private final PendingList batchList;
|
||||||
private Iterator<MessageReference> iterator = null;
|
private Iterator<MessageReference> iterator = null;
|
||||||
|
|
|
@ -36,8 +36,8 @@ import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.activemq.usage.Usage;
|
import org.apache.activemq.usage.Usage;
|
||||||
import org.apache.activemq.usage.UsageListener;
|
import org.apache.activemq.usage.UsageListener;
|
||||||
import org.apache.activemq.wireformat.WireFormat;
|
import org.apache.activemq.wireformat.WireFormat;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.kahadb.util.ByteSequence;
|
import org.apache.kahadb.util.ByteSequence;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ import org.apache.kahadb.util.ByteSequence;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class FilePendingMessageCursor extends AbstractPendingMessageCursor implements UsageListener {
|
public class FilePendingMessageCursor extends AbstractPendingMessageCursor implements UsageListener {
|
||||||
static final Log LOG = LogFactory.getLog(FilePendingMessageCursor.class);
|
static final Logger LOG = LoggerFactory.getLogger(FilePendingMessageCursor.class);
|
||||||
private static final AtomicLong NAME_COUNT = new AtomicLong();
|
private static final AtomicLong NAME_COUNT = new AtomicLong();
|
||||||
protected Broker broker;
|
protected Broker broker;
|
||||||
private final PListStore store;
|
private final PListStore store;
|
||||||
|
|
|
@ -21,8 +21,8 @@ import org.apache.activemq.broker.region.Queue;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.activemq.command.MessageId;
|
import org.apache.activemq.command.MessageId;
|
||||||
import org.apache.activemq.store.MessageStore;
|
import org.apache.activemq.store.MessageStore;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* persist pending messages pending message (messages awaiting dispatch to a
|
* persist pending messages pending message (messages awaiting dispatch to a
|
||||||
|
@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: 474985 $
|
* @version $Revision: 474985 $
|
||||||
*/
|
*/
|
||||||
class QueueStorePrefetch extends AbstractStoreCursor {
|
class QueueStorePrefetch extends AbstractStoreCursor {
|
||||||
private static final Log LOG = LogFactory.getLog(QueueStorePrefetch.class);
|
private static final Logger LOG = LoggerFactory.getLogger(QueueStorePrefetch.class);
|
||||||
private final MessageStore store;
|
private final MessageStore store;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.apache.activemq.broker.region.Subscription;
|
||||||
import org.apache.activemq.broker.region.Topic;
|
import org.apache.activemq.broker.region.Topic;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* persist pending messages pending message (messages awaiting dispatch to a
|
* persist pending messages pending message (messages awaiting dispatch to a
|
||||||
|
@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class StoreDurableSubscriberCursor extends AbstractPendingMessageCursor {
|
public class StoreDurableSubscriberCursor extends AbstractPendingMessageCursor {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(StoreDurableSubscriberCursor.class);
|
private static final Logger LOG = LoggerFactory.getLogger(StoreDurableSubscriberCursor.class);
|
||||||
private static final int UNKNOWN = -1;
|
private static final int UNKNOWN = -1;
|
||||||
private final String clientId;
|
private final String clientId;
|
||||||
private final String subscriberName;
|
private final String subscriberName;
|
||||||
|
|
|
@ -21,8 +21,8 @@ import org.apache.activemq.broker.region.MessageReference;
|
||||||
import org.apache.activemq.broker.region.Queue;
|
import org.apache.activemq.broker.region.Queue;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store based Cursor for Queues
|
* Store based Cursor for Queues
|
||||||
|
@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class StoreQueueCursor extends AbstractPendingMessageCursor {
|
public class StoreQueueCursor extends AbstractPendingMessageCursor {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(StoreQueueCursor.class);
|
private static final Logger LOG = LoggerFactory.getLogger(StoreQueueCursor.class);
|
||||||
private final Broker broker;
|
private final Broker broker;
|
||||||
private int pendingCount;
|
private int pendingCount;
|
||||||
private final Queue queue;
|
private final Queue queue;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import org.apache.activemq.command.MessageId;
|
||||||
import org.apache.activemq.filter.MessageEvaluationContext;
|
import org.apache.activemq.filter.MessageEvaluationContext;
|
||||||
import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
|
import org.apache.activemq.filter.NonCachedMessageEvaluationContext;
|
||||||
import org.apache.activemq.store.TopicMessageStore;
|
import org.apache.activemq.store.TopicMessageStore;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* persist pendingCount messages pendingCount message (messages awaiting disptach
|
* persist pendingCount messages pendingCount message (messages awaiting disptach
|
||||||
|
@ -33,7 +33,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
class TopicStorePrefetch extends AbstractStoreCursor {
|
class TopicStorePrefetch extends AbstractStoreCursor {
|
||||||
private static final Log LOG = LogFactory.getLog(TopicStorePrefetch.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TopicStorePrefetch.class);
|
||||||
private final TopicMessageStore store;
|
private final TopicMessageStore store;
|
||||||
private final String clientId;
|
private final String clientId;
|
||||||
private final String subscriberName;
|
private final String subscriberName;
|
||||||
|
|
|
@ -29,8 +29,8 @@ import org.apache.activemq.broker.region.Subscription;
|
||||||
import org.apache.activemq.command.ConsumerControl;
|
import org.apache.activemq.command.ConsumerControl;
|
||||||
import org.apache.activemq.thread.Scheduler;
|
import org.apache.activemq.thread.Scheduler;
|
||||||
import org.apache.activemq.transport.InactivityIOException;
|
import org.apache.activemq.transport.InactivityIOException;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abort slow consumers when they reach the configured threshold of slowness, default is slow for 30 seconds
|
* Abort slow consumers when they reach the configured threshold of slowness, default is slow for 30 seconds
|
||||||
|
@ -39,7 +39,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class AbortSlowConsumerStrategy implements SlowConsumerStrategy, Runnable {
|
public class AbortSlowConsumerStrategy implements SlowConsumerStrategy, Runnable {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AbortSlowConsumerStrategy.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbortSlowConsumerStrategy.class);
|
||||||
|
|
||||||
private String name = "AbortSlowConsumerStrategy@" + hashCode();
|
private String name = "AbortSlowConsumerStrategy@" + hashCode();
|
||||||
private Scheduler scheduler;
|
private Scheduler scheduler;
|
||||||
|
|
|
@ -18,8 +18,8 @@ package org.apache.activemq.broker.region.policy;
|
||||||
|
|
||||||
import org.apache.activemq.ActiveMQMessageAudit;
|
import org.apache.activemq.ActiveMQMessageAudit;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A strategy for choosing which destination is used for dead letter queue
|
* A strategy for choosing which destination is used for dead letter queue
|
||||||
|
@ -28,7 +28,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: 426366 $
|
* @version $Revision: 426366 $
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractDeadLetterStrategy implements DeadLetterStrategy {
|
public abstract class AbstractDeadLetterStrategy implements DeadLetterStrategy {
|
||||||
private static final Log LOG = LogFactory.getLog(AbstractDeadLetterStrategy.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AbstractDeadLetterStrategy.class);
|
||||||
private boolean processNonPersistent = false;
|
private boolean processNonPersistent = false;
|
||||||
private boolean processExpired = true;
|
private boolean processExpired = true;
|
||||||
private ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
|
private ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
|
||||||
|
|
|
@ -31,8 +31,8 @@ import org.apache.activemq.broker.region.group.MessageGroupHashBucketFactory;
|
||||||
import org.apache.activemq.broker.region.group.MessageGroupMapFactory;
|
import org.apache.activemq.broker.region.group.MessageGroupMapFactory;
|
||||||
import org.apache.activemq.filter.DestinationMapEntry;
|
import org.apache.activemq.filter.DestinationMapEntry;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an entry in a {@link PolicyMap} for assigning policies to a
|
* Represents an entry in a {@link PolicyMap} for assigning policies to a
|
||||||
|
@ -43,7 +43,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class PolicyEntry extends DestinationMapEntry {
|
public class PolicyEntry extends DestinationMapEntry {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(PolicyEntry.class);
|
private static final Logger LOG = LoggerFactory.getLogger(PolicyEntry.class);
|
||||||
private DispatchPolicy dispatchPolicy;
|
private DispatchPolicy dispatchPolicy;
|
||||||
private SubscriptionRecoveryPolicy subscriptionRecoveryPolicy;
|
private SubscriptionRecoveryPolicy subscriptionRecoveryPolicy;
|
||||||
private boolean sendAdvisoryIfNoConsumers;
|
private boolean sendAdvisoryIfNoConsumers;
|
||||||
|
|
|
@ -25,8 +25,8 @@ import org.apache.activemq.broker.region.Subscription;
|
||||||
import org.apache.activemq.command.ConsumerId;
|
import org.apache.activemq.command.ConsumerId;
|
||||||
import org.apache.activemq.command.ConsumerInfo;
|
import org.apache.activemq.command.ConsumerInfo;
|
||||||
import org.apache.activemq.filter.MessageEvaluationContext;
|
import org.apache.activemq.filter.MessageEvaluationContext;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dispatch policy that ignores lower priority duplicate network consumers,
|
* dispatch policy that ignores lower priority duplicate network consumers,
|
||||||
|
@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class PriorityNetworkDispatchPolicy extends SimpleDispatchPolicy {
|
public class PriorityNetworkDispatchPolicy extends SimpleDispatchPolicy {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(PriorityNetworkDispatchPolicy.class);
|
private static final Logger LOG = LoggerFactory.getLogger(PriorityNetworkDispatchPolicy.class);
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatch(MessageReference node,
|
public boolean dispatch(MessageReference node,
|
||||||
MessageEvaluationContext msgContext,
|
MessageEvaluationContext msgContext,
|
||||||
|
|
|
@ -34,8 +34,8 @@ import org.apache.activemq.command.MessageId;
|
||||||
import org.apache.activemq.command.ProducerId;
|
import org.apache.activemq.command.ProducerId;
|
||||||
import org.apache.activemq.command.SessionId;
|
import org.apache.activemq.command.SessionId;
|
||||||
import org.apache.activemq.util.IdGenerator;
|
import org.apache.activemq.util.IdGenerator;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This implementation of {@link SubscriptionRecoveryPolicy} will perform a user
|
* This implementation of {@link SubscriptionRecoveryPolicy} will perform a user
|
||||||
|
@ -46,7 +46,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class QueryBasedSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
|
public class QueryBasedSubscriptionRecoveryPolicy implements SubscriptionRecoveryPolicy {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(QueryBasedSubscriptionRecoveryPolicy.class);
|
private static final Logger LOG = LoggerFactory.getLogger(QueryBasedSubscriptionRecoveryPolicy.class);
|
||||||
|
|
||||||
private MessageQuery query;
|
private MessageQuery query;
|
||||||
private final AtomicLong messageSequence = new AtomicLong(0);
|
private final AtomicLong messageSequence = new AtomicLong(0);
|
||||||
|
|
|
@ -21,8 +21,8 @@ import java.util.List;
|
||||||
import org.apache.activemq.broker.region.MessageReference;
|
import org.apache.activemq.broker.region.MessageReference;
|
||||||
import org.apache.activemq.broker.region.Subscription;
|
import org.apache.activemq.broker.region.Subscription;
|
||||||
import org.apache.activemq.filter.MessageEvaluationContext;
|
import org.apache.activemq.filter.MessageEvaluationContext;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple dispatch policy that sends a message to every subscription that
|
* Simple dispatch policy that sends a message to every subscription that
|
||||||
|
@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class RoundRobinDispatchPolicy implements DispatchPolicy {
|
public class RoundRobinDispatchPolicy implements DispatchPolicy {
|
||||||
static final Log LOG = LogFactory.getLog(RoundRobinDispatchPolicy.class);
|
static final Logger LOG = LoggerFactory.getLogger(RoundRobinDispatchPolicy.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param node
|
* @param node
|
||||||
|
|
|
@ -25,8 +25,8 @@ import org.apache.activemq.broker.region.DestinationInterceptor;
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ActiveMQTopic;
|
import org.apache.activemq.command.ActiveMQTopic;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates <a href="http://activemq.org/site/mirrored-queues.html">Mirrored
|
* Creates <a href="http://activemq.org/site/mirrored-queues.html">Mirrored
|
||||||
|
@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @org.apache.xbean.XBean
|
* @org.apache.xbean.XBean
|
||||||
*/
|
*/
|
||||||
public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware {
|
public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware {
|
||||||
private static final transient Log LOG = LogFactory.getLog(MirroredQueue.class);
|
private static final transient Logger LOG = LoggerFactory.getLogger(MirroredQueue.class);
|
||||||
private String prefix = "VirtualTopic.Mirror.";
|
private String prefix = "VirtualTopic.Mirror.";
|
||||||
private String postfix = "";
|
private String postfix = "";
|
||||||
private boolean copyMessage = true;
|
private boolean copyMessage = true;
|
||||||
|
|
|
@ -31,8 +31,8 @@ import javax.jms.MessageFormatException;
|
||||||
import org.apache.activemq.util.IdGenerator;
|
import org.apache.activemq.util.IdGenerator;
|
||||||
import org.apache.activemq.util.ServiceStopper;
|
import org.apache.activemq.util.ServiceStopper;
|
||||||
import org.apache.activemq.util.ServiceSupport;
|
import org.apache.activemq.util.ServiceSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.kahadb.index.BTreeIndex;
|
import org.apache.kahadb.index.BTreeIndex;
|
||||||
import org.apache.kahadb.journal.Location;
|
import org.apache.kahadb.journal.Location;
|
||||||
import org.apache.kahadb.page.Transaction;
|
import org.apache.kahadb.page.Transaction;
|
||||||
|
@ -41,7 +41,7 @@ import org.apache.kahadb.util.LongMarshaller;
|
||||||
import org.apache.kahadb.util.VariableMarshaller;
|
import org.apache.kahadb.util.VariableMarshaller;
|
||||||
|
|
||||||
class JobSchedulerImpl extends ServiceSupport implements Runnable, JobScheduler {
|
class JobSchedulerImpl extends ServiceSupport implements Runnable, JobScheduler {
|
||||||
private static final Log LOG = LogFactory.getLog(JobSchedulerImpl.class);
|
private static final Logger LOG = LoggerFactory.getLogger(JobSchedulerImpl.class);
|
||||||
final JobSchedulerStore store;
|
final JobSchedulerStore store;
|
||||||
private final AtomicBoolean running = new AtomicBoolean();
|
private final AtomicBoolean running = new AtomicBoolean();
|
||||||
private String name;
|
private String name;
|
||||||
|
|
|
@ -31,8 +31,8 @@ import java.util.Map.Entry;
|
||||||
import org.apache.activemq.util.IOHelper;
|
import org.apache.activemq.util.IOHelper;
|
||||||
import org.apache.activemq.util.ServiceStopper;
|
import org.apache.activemq.util.ServiceStopper;
|
||||||
import org.apache.activemq.util.ServiceSupport;
|
import org.apache.activemq.util.ServiceSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.kahadb.index.BTreeIndex;
|
import org.apache.kahadb.index.BTreeIndex;
|
||||||
import org.apache.kahadb.journal.Journal;
|
import org.apache.kahadb.journal.Journal;
|
||||||
import org.apache.kahadb.journal.Location;
|
import org.apache.kahadb.journal.Location;
|
||||||
|
@ -46,7 +46,7 @@ import org.apache.kahadb.util.StringMarshaller;
|
||||||
import org.apache.kahadb.util.VariableMarshaller;
|
import org.apache.kahadb.util.VariableMarshaller;
|
||||||
|
|
||||||
public class JobSchedulerStore extends ServiceSupport {
|
public class JobSchedulerStore extends ServiceSupport {
|
||||||
static final Log LOG = LogFactory.getLog(JobSchedulerStore.class);
|
static final Logger LOG = LoggerFactory.getLogger(JobSchedulerStore.class);
|
||||||
private static final int DATABASE_LOCKED_WAIT_DELAY = 10 * 1000;
|
private static final int DATABASE_LOCKED_WAIT_DELAY = 10 * 1000;
|
||||||
|
|
||||||
public static final int CLOSED_STATE = 1;
|
public static final int CLOSED_STATE = 1;
|
||||||
|
|
|
@ -37,12 +37,12 @@ import org.apache.activemq.util.IdGenerator;
|
||||||
import org.apache.activemq.util.LongSequenceGenerator;
|
import org.apache.activemq.util.LongSequenceGenerator;
|
||||||
import org.apache.activemq.util.TypeConversionSupport;
|
import org.apache.activemq.util.TypeConversionSupport;
|
||||||
import org.apache.activemq.wireformat.WireFormat;
|
import org.apache.activemq.wireformat.WireFormat;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.apache.kahadb.util.ByteSequence;
|
import org.apache.kahadb.util.ByteSequence;
|
||||||
|
|
||||||
public class SchedulerBroker extends BrokerFilter implements JobListener {
|
public class SchedulerBroker extends BrokerFilter implements JobListener {
|
||||||
private static final Log LOG = LogFactory.getLog(SchedulerBroker.class);
|
private static final Logger LOG = LoggerFactory.getLogger(SchedulerBroker.class);
|
||||||
private static final IdGenerator ID_GENERATOR = new IdGenerator();
|
private static final IdGenerator ID_GENERATOR = new IdGenerator();
|
||||||
private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator();
|
private final LongSequenceGenerator messageIdGenerator = new LongSequenceGenerator();
|
||||||
private final AtomicBoolean started = new AtomicBoolean();
|
private final AtomicBoolean started = new AtomicBoolean();
|
||||||
|
|
|
@ -29,8 +29,8 @@ import org.apache.activemq.ActiveMQConnectionFactory;
|
||||||
import org.apache.activemq.Service;
|
import org.apache.activemq.Service;
|
||||||
import org.apache.activemq.advisory.AdvisorySupport;
|
import org.apache.activemq.advisory.AdvisorySupport;
|
||||||
import org.apache.activemq.util.ServiceStopper;
|
import org.apache.activemq.util.ServiceStopper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An agent which listens to commands on a JMS destination
|
* An agent which listens to commands on a JMS destination
|
||||||
|
@ -39,7 +39,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @org.apache.xbean.XBean
|
* @org.apache.xbean.XBean
|
||||||
*/
|
*/
|
||||||
public class CommandAgent implements Service, ExceptionListener {
|
public class CommandAgent implements Service, ExceptionListener {
|
||||||
private static final Log LOG = LogFactory.getLog(CommandAgent.class);
|
private static final Logger LOG = LoggerFactory.getLogger(CommandAgent.class);
|
||||||
|
|
||||||
private String brokerUrl = "vm://localhost";
|
private String brokerUrl = "vm://localhost";
|
||||||
private String username;
|
private String username;
|
||||||
|
|
|
@ -28,14 +28,14 @@ import javax.jms.TextMessage;
|
||||||
|
|
||||||
import org.apache.activemq.command.ActiveMQTextMessage;
|
import org.apache.activemq.command.ActiveMQTextMessage;
|
||||||
import org.apache.activemq.util.FactoryFinder;
|
import org.apache.activemq.util.FactoryFinder;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @version $Revision: $
|
* @version $Revision: $
|
||||||
*/
|
*/
|
||||||
public class CommandMessageListener implements MessageListener {
|
public class CommandMessageListener implements MessageListener {
|
||||||
private static final Log LOG = LogFactory.getLog(CommandMessageListener.class);
|
private static final Logger LOG = LoggerFactory.getLogger(CommandMessageListener.class);
|
||||||
|
|
||||||
private Session session;
|
private Session session;
|
||||||
private MessageProducer producer;
|
private MessageProducer producer;
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.broker.util;
|
package org.apache.activemq.broker.util;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class DefaultAuditLog implements AuditLog {
|
public class DefaultAuditLog implements AuditLog {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog("org.apache.activemq.audit");
|
private static final Logger LOG = LoggerFactory.getLogger("org.apache.activemq.audit");
|
||||||
|
|
||||||
public void log(AuditLogEntry entry) {
|
public void log(AuditLogEntry entry) {
|
||||||
LOG.info(entry.toString());
|
LOG.info(entry.toString());
|
||||||
|
|
|
@ -42,8 +42,8 @@ import org.apache.activemq.command.Response;
|
||||||
import org.apache.activemq.command.SessionInfo;
|
import org.apache.activemq.command.SessionInfo;
|
||||||
import org.apache.activemq.command.TransactionId;
|
import org.apache.activemq.command.TransactionId;
|
||||||
import org.apache.activemq.usage.Usage;
|
import org.apache.activemq.usage.Usage;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple Broker intercepter which allows you to enable/disable logging.
|
* A simple Broker intercepter which allows you to enable/disable logging.
|
||||||
|
@ -53,7 +53,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(LoggingBrokerPlugin.class);
|
private static final Logger LOG = LoggerFactory.getLogger(LoggingBrokerPlugin.class);
|
||||||
|
|
||||||
private boolean logAll = false;
|
private boolean logAll = false;
|
||||||
private boolean logMessageEvents = false;
|
private boolean logMessageEvents = false;
|
||||||
|
@ -78,7 +78,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log all Events that go through the Plugin
|
* Logger all Events that go through the Plugin
|
||||||
*/
|
*/
|
||||||
public void setLogAll(boolean logAll) {
|
public void setLogAll(boolean logAll) {
|
||||||
this.logAll = logAll;
|
this.logAll = logAll;
|
||||||
|
@ -89,7 +89,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log Events that are related to message processing
|
* Logger Events that are related to message processing
|
||||||
*/
|
*/
|
||||||
public void setLogMessageEvents(boolean logMessageEvents) {
|
public void setLogMessageEvents(boolean logMessageEvents) {
|
||||||
this.logMessageEvents = logMessageEvents;
|
this.logMessageEvents = logMessageEvents;
|
||||||
|
@ -100,7 +100,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log Events that are related to connections and sessions
|
* Logger Events that are related to connections and sessions
|
||||||
*/
|
*/
|
||||||
public void setLogConnectionEvents(boolean logConnectionEvents) {
|
public void setLogConnectionEvents(boolean logConnectionEvents) {
|
||||||
this.logConnectionEvents = logConnectionEvents;
|
this.logConnectionEvents = logConnectionEvents;
|
||||||
|
@ -111,7 +111,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log Events that are related to transaction processing
|
* Logger Events that are related to transaction processing
|
||||||
*/
|
*/
|
||||||
public void setLogTransactionEvents(boolean logTransactionEvents) {
|
public void setLogTransactionEvents(boolean logTransactionEvents) {
|
||||||
this.logTransactionEvents = logTransactionEvents;
|
this.logTransactionEvents = logTransactionEvents;
|
||||||
|
@ -122,7 +122,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log Events that are related to Consumers
|
* Logger Events that are related to Consumers
|
||||||
*/
|
*/
|
||||||
public void setLogConsumerEvents(boolean logConsumerEvents) {
|
public void setLogConsumerEvents(boolean logConsumerEvents) {
|
||||||
this.logConsumerEvents = logConsumerEvents;
|
this.logConsumerEvents = logConsumerEvents;
|
||||||
|
@ -133,7 +133,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log Events that are related to Producers
|
* Logger Events that are related to Producers
|
||||||
*/
|
*/
|
||||||
public void setLogProducerEvents(boolean logProducerEvents) {
|
public void setLogProducerEvents(boolean logProducerEvents) {
|
||||||
this.logProducerEvents = logProducerEvents;
|
this.logProducerEvents = logProducerEvents;
|
||||||
|
@ -144,7 +144,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log Events that are normally internal to the broker
|
* Logger Events that are normally internal to the broker
|
||||||
*/
|
*/
|
||||||
public void setLogInternalEvents(boolean logInternalEvents) {
|
public void setLogInternalEvents(boolean logInternalEvents) {
|
||||||
this.logInternalEvents = logInternalEvents;
|
this.logInternalEvents = logInternalEvents;
|
||||||
|
@ -558,7 +558,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
buf.append(") Session(");
|
buf.append(") Session(");
|
||||||
buf.append(subs.getConsumerInfo().getConsumerId().getSessionId());
|
buf.append(subs.getConsumerInfo().getConsumerId().getSessionId());
|
||||||
buf.append(")");
|
buf.append(")");
|
||||||
LOG.info(buf);
|
LOG.info(buf.toString());
|
||||||
}
|
}
|
||||||
super.slowConsumer(context, destination, subs);
|
super.slowConsumer(context, destination, subs);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,8 @@ package org.apache.activemq.broker.util;
|
||||||
import org.apache.activemq.broker.BrokerPluginSupport;
|
import org.apache.activemq.broker.BrokerPluginSupport;
|
||||||
import org.apache.activemq.broker.ProducerBrokerExchange;
|
import org.apache.activemq.broker.ProducerBrokerExchange;
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Broker interceptor which updates a JMS Client's timestamp on the message
|
* A Broker interceptor which updates a JMS Client's timestamp on the message
|
||||||
|
@ -45,7 +45,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class TimeStampingBrokerPlugin extends BrokerPluginSupport {
|
public class TimeStampingBrokerPlugin extends BrokerPluginSupport {
|
||||||
private static final Log LOG = LogFactory.getLog(TimeStampingBrokerPlugin.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TimeStampingBrokerPlugin.class);
|
||||||
/**
|
/**
|
||||||
* variable which (when non-zero) is used to override
|
* variable which (when non-zero) is used to override
|
||||||
* the expiration date for messages that arrive with
|
* the expiration date for messages that arrive with
|
||||||
|
|
|
@ -21,8 +21,8 @@ import java.util.Map;
|
||||||
|
|
||||||
import org.apache.activemq.broker.BrokerPluginSupport;
|
import org.apache.activemq.broker.BrokerPluginSupport;
|
||||||
import org.apache.activemq.command.MessageDispatch;
|
import org.apache.activemq.command.MessageDispatch;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The TraceBrokerPathPlugin can be used in a network of Brokers. Each Broker
|
* The TraceBrokerPathPlugin can be used in a network of Brokers. Each Broker
|
||||||
|
@ -38,7 +38,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
public class TraceBrokerPathPlugin extends BrokerPluginSupport {
|
public class TraceBrokerPathPlugin extends BrokerPluginSupport {
|
||||||
|
|
||||||
private String stampProperty = "BrokerPath";
|
private String stampProperty = "BrokerPath";
|
||||||
private static final Log LOG = LogFactory.getLog(TraceBrokerPathPlugin.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TraceBrokerPathPlugin.class);
|
||||||
|
|
||||||
public String getStampProperty() {
|
public String getStampProperty() {
|
||||||
return stampProperty;
|
return stampProperty;
|
||||||
|
|
|
@ -55,8 +55,8 @@ import org.apache.activemq.util.ByteArrayOutputStream;
|
||||||
import org.apache.activemq.util.ByteSequence;
|
import org.apache.activemq.util.ByteSequence;
|
||||||
import org.apache.activemq.wireformat.WireFormat;
|
import org.apache.activemq.wireformat.WireFormat;
|
||||||
import org.apache.activemq.wireformat.WireFormatFactory;
|
import org.apache.activemq.wireformat.WireFormatFactory;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Broker interceptor which allows you to trace all operations to a UDP
|
* A Broker interceptor which allows you to trace all operations to a UDP
|
||||||
|
@ -67,7 +67,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class UDPTraceBrokerPlugin extends BrokerPluginSupport {
|
public class UDPTraceBrokerPlugin extends BrokerPluginSupport {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(UDPTraceBrokerPlugin.class);
|
private static final Logger LOG = LoggerFactory.getLogger(UDPTraceBrokerPlugin.class);
|
||||||
protected WireFormat wireFormat;
|
protected WireFormat wireFormat;
|
||||||
protected WireFormatFactory wireFormatFactory;
|
protected WireFormatFactory wireFormatFactory;
|
||||||
protected int maxTraceDatagramSize = 1024 * 4;
|
protected int maxTraceDatagramSize = 1024 * 4;
|
||||||
|
|
|
@ -21,8 +21,8 @@ import java.io.PrintWriter;
|
||||||
|
|
||||||
import org.apache.activemq.broker.Broker;
|
import org.apache.activemq.broker.Broker;
|
||||||
import org.apache.activemq.broker.BrokerFilter;
|
import org.apache.activemq.broker.BrokerFilter;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Useful base class
|
* Useful base class
|
||||||
|
@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: $
|
* @version $Revision: $
|
||||||
*/
|
*/
|
||||||
public abstract class DotFileInterceptorSupport extends BrokerFilter {
|
public abstract class DotFileInterceptorSupport extends BrokerFilter {
|
||||||
private final Log log = LogFactory.getLog(DotFileInterceptorSupport.class);
|
private final Logger log = LoggerFactory.getLogger(DotFileInterceptorSupport.class);
|
||||||
|
|
||||||
private String file;
|
private String file;
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ package org.apache.activemq.command;
|
||||||
|
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
import org.apache.activemq.ActiveMQConnection;
|
import org.apache.activemq.ActiveMQConnection;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @openwire:marshaller
|
* @openwire:marshaller
|
||||||
|
@ -27,7 +27,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public abstract class ActiveMQTempDestination extends ActiveMQDestination {
|
public abstract class ActiveMQTempDestination extends ActiveMQDestination {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ActiveMQTempDestination.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQTempDestination.class);
|
||||||
protected transient ActiveMQConnection connection;
|
protected transient ActiveMQConnection connection;
|
||||||
protected transient String connectionId;
|
protected transient String connectionId;
|
||||||
protected transient int sequenceId;
|
protected transient int sequenceId;
|
||||||
|
|
|
@ -24,8 +24,8 @@ import javax.jms.JMSException;
|
||||||
import org.apache.activemq.filter.BooleanExpression;
|
import org.apache.activemq.filter.BooleanExpression;
|
||||||
import org.apache.activemq.filter.MessageEvaluationContext;
|
import org.apache.activemq.filter.MessageEvaluationContext;
|
||||||
import org.apache.activemq.util.JMSExceptionSupport;
|
import org.apache.activemq.util.JMSExceptionSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @openwire:marshaller code="91"
|
* @openwire:marshaller code="91"
|
||||||
|
@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
public class NetworkBridgeFilter implements DataStructure, BooleanExpression {
|
public class NetworkBridgeFilter implements DataStructure, BooleanExpression {
|
||||||
|
|
||||||
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.NETWORK_BRIDGE_FILTER;
|
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.NETWORK_BRIDGE_FILTER;
|
||||||
static final Log LOG = LogFactory.getLog(NetworkBridgeFilter.class);
|
static final Logger LOG = LoggerFactory.getLogger(NetworkBridgeFilter.class);
|
||||||
|
|
||||||
private BrokerId networkBrokerId;
|
private BrokerId networkBrokerId;
|
||||||
private int networkTTL;
|
private int networkTTL;
|
||||||
|
|
|
@ -24,15 +24,15 @@ import javax.jms.JMSException;
|
||||||
|
|
||||||
import org.apache.activemq.command.Message;
|
import org.apache.activemq.command.Message;
|
||||||
import org.apache.activemq.util.JMSExceptionSupport;
|
import org.apache.activemq.util.JMSExceptionSupport;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to evaluate an XPath Expression in a JMS selector.
|
* Used to evaluate an XPath Expression in a JMS selector.
|
||||||
*/
|
*/
|
||||||
public final class XPathExpression implements BooleanExpression {
|
public final class XPathExpression implements BooleanExpression {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(XPathExpression.class);
|
private static final Logger LOG = LoggerFactory.getLogger(XPathExpression.class);
|
||||||
private static final String EVALUATOR_SYSTEM_PROPERTY = "org.apache.activemq.XPathEvaluatorClassName";
|
private static final String EVALUATOR_SYSTEM_PROPERTY = "org.apache.activemq.XPathEvaluatorClassName";
|
||||||
private static final String DEFAULT_EVALUATOR_CLASS_NAME = XalanXPathEvaluator.class.getName();
|
private static final String DEFAULT_EVALUATOR_CLASS_NAME = XalanXPathEvaluator.class.getName();
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ import javax.naming.Reference;
|
||||||
import javax.naming.StringRefAddr;
|
import javax.naming.StringRefAddr;
|
||||||
import javax.naming.spi.ObjectFactory;
|
import javax.naming.spi.ObjectFactory;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts objects implementing JNDIStorable into a property fields so they can
|
* Converts objects implementing JNDIStorable into a property fields so they can
|
||||||
|
@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class JNDIReferenceFactory implements ObjectFactory {
|
public class JNDIReferenceFactory implements ObjectFactory {
|
||||||
|
|
||||||
static Log log = LogFactory.getLog(JNDIReferenceFactory.class);
|
static Logger log = LoggerFactory.getLogger(JNDIReferenceFactory.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This will be called by a JNDIprovider when a Reference is retrieved from
|
* This will be called by a JNDIprovider when a Reference is retrieved from
|
||||||
|
|
|
@ -37,8 +37,8 @@ import javax.naming.NotContextException;
|
||||||
import javax.naming.OperationNotSupportedException;
|
import javax.naming.OperationNotSupportedException;
|
||||||
import javax.naming.Reference;
|
import javax.naming.Reference;
|
||||||
import javax.naming.spi.NamingManager;
|
import javax.naming.spi.NamingManager;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A read-only Context <p/> This version assumes it and all its subcontext are
|
* A read-only Context <p/> This version assumes it and all its subcontext are
|
||||||
|
@ -62,7 +62,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class ReadOnlyContext implements Context, Serializable {
|
public class ReadOnlyContext implements Context, Serializable {
|
||||||
private static final Log LOG = LogFactory.getLog(ReadOnlyContext.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ReadOnlyContext.class);
|
||||||
public static final String SEPARATOR = "/";
|
public static final String SEPARATOR = "/";
|
||||||
protected static final NameParser NAME_PARSER = new NameParserImpl();
|
protected static final NameParser NAME_PARSER = new NameParserImpl();
|
||||||
private static final long serialVersionUID = -5754338187296859149L;
|
private static final long serialVersionUID = -5754338187296859149L;
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.apache.activemq.kaha.StoreLocation;
|
||||||
import org.apache.activemq.kaha.impl.data.Item;
|
import org.apache.activemq.kaha.impl.data.Item;
|
||||||
import org.apache.activemq.kaha.impl.index.IndexItem;
|
import org.apache.activemq.kaha.impl.index.IndexItem;
|
||||||
import org.apache.activemq.kaha.impl.index.IndexManager;
|
import org.apache.activemq.kaha.impl.index.IndexManager;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A container of roots for other Containers
|
* A container of roots for other Containers
|
||||||
|
@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
class IndexRootContainer {
|
class IndexRootContainer {
|
||||||
|
|
||||||
protected static final Marshaller ROOT_MARSHALLER = Store.OBJECT_MARSHALLER;
|
protected static final Marshaller ROOT_MARSHALLER = Store.OBJECT_MARSHALLER;
|
||||||
private static final Log LOG = LogFactory.getLog(IndexRootContainer.class);
|
private static final Logger LOG = LoggerFactory.getLogger(IndexRootContainer.class);
|
||||||
|
|
||||||
protected IndexItem root;
|
protected IndexItem root;
|
||||||
protected IndexManager indexManager;
|
protected IndexManager indexManager;
|
||||||
|
|
|
@ -44,8 +44,8 @@ import org.apache.activemq.kaha.impl.index.IndexItem;
|
||||||
import org.apache.activemq.kaha.impl.index.IndexManager;
|
import org.apache.activemq.kaha.impl.index.IndexManager;
|
||||||
import org.apache.activemq.kaha.impl.index.RedoStoreIndexItem;
|
import org.apache.activemq.kaha.impl.index.RedoStoreIndexItem;
|
||||||
import org.apache.activemq.util.IOHelper;
|
import org.apache.activemq.util.IOHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store Implementation
|
* Store Implementation
|
||||||
|
@ -64,7 +64,7 @@ public class KahaStore implements Store {
|
||||||
//according to the String javadoc, all constant strings are interned so this will be the same object throughout the vm
|
//according to the String javadoc, all constant strings are interned so this will be the same object throughout the vm
|
||||||
//and we can use it as a monitor for the lockset.
|
//and we can use it as a monitor for the lockset.
|
||||||
private final static String LOCKSET_MONITOR = PROPERTY_PREFIX + ".Lock.Monitor";
|
private final static String LOCKSET_MONITOR = PROPERTY_PREFIX + ".Lock.Monitor";
|
||||||
private static final Log LOG = LogFactory.getLog(KahaStore.class);
|
private static final Logger LOG = LoggerFactory.getLogger(KahaStore.class);
|
||||||
|
|
||||||
private final File directory;
|
private final File directory;
|
||||||
private final String mode;
|
private final String mode;
|
||||||
|
|
|
@ -40,8 +40,8 @@ import org.apache.activemq.kaha.impl.async.DataFileAppender.WriteKey;
|
||||||
import org.apache.activemq.thread.Scheduler;
|
import org.apache.activemq.thread.Scheduler;
|
||||||
import org.apache.activemq.util.ByteSequence;
|
import org.apache.activemq.util.ByteSequence;
|
||||||
import org.apache.activemq.util.IOHelper;
|
import org.apache.activemq.util.IOHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class AsyncDataManager {
|
||||||
public static final int DEFAULT_CLEANUP_INTERVAL = 1000 * 30;
|
public static final int DEFAULT_CLEANUP_INTERVAL = 1000 * 30;
|
||||||
public static final int PREFERED_DIFF = 1024 * 512;
|
public static final int PREFERED_DIFF = 1024 * 512;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(AsyncDataManager.class);
|
private static final Logger LOG = LoggerFactory.getLogger(AsyncDataManager.class);
|
||||||
protected Scheduler scheduler;
|
protected Scheduler scheduler;
|
||||||
|
|
||||||
protected final Map<WriteKey, WriteCommand> inflightWrites = new ConcurrentHashMap<WriteKey, WriteCommand>();
|
protected final Map<WriteKey, WriteCommand> inflightWrites = new ConcurrentHashMap<WriteKey, WriteCommand>();
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.util.List;
|
||||||
|
|
||||||
import org.apache.activemq.thread.Scheduler;
|
import org.apache.activemq.thread.Scheduler;
|
||||||
import org.apache.activemq.util.ByteSequence;
|
import org.apache.activemq.util.ByteSequence;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An AsyncDataManager that works in read only mode against multiple data directories.
|
* An AsyncDataManager that works in read only mode against multiple data directories.
|
||||||
|
@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class ReadOnlyAsyncDataManager extends AsyncDataManager {
|
public class ReadOnlyAsyncDataManager extends AsyncDataManager {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ReadOnlyAsyncDataManager.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ReadOnlyAsyncDataManager.class);
|
||||||
private final ArrayList<File> dirs;
|
private final ArrayList<File> dirs;
|
||||||
|
|
||||||
public ReadOnlyAsyncDataManager(final ArrayList<File> dirs) {
|
public ReadOnlyAsyncDataManager(final ArrayList<File> dirs) {
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.apache.activemq.kaha.impl.index.IndexItem;
|
||||||
import org.apache.activemq.kaha.impl.index.IndexLinkedList;
|
import org.apache.activemq.kaha.impl.index.IndexLinkedList;
|
||||||
import org.apache.activemq.kaha.impl.index.IndexManager;
|
import org.apache.activemq.kaha.impl.index.IndexManager;
|
||||||
import org.apache.activemq.kaha.impl.index.VMIndexLinkedList;
|
import org.apache.activemq.kaha.impl.index.VMIndexLinkedList;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of a ListContainer
|
* Implementation of a ListContainer
|
||||||
|
@ -40,7 +40,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public abstract class BaseContainerImpl {
|
public abstract class BaseContainerImpl {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(BaseContainerImpl.class);
|
private static final Logger LOG = LoggerFactory.getLogger(BaseContainerImpl.class);
|
||||||
protected IndexItem root;
|
protected IndexItem root;
|
||||||
protected IndexLinkedList indexList;
|
protected IndexLinkedList indexList;
|
||||||
protected IndexManager indexManager;
|
protected IndexManager indexManager;
|
||||||
|
|
|
@ -34,8 +34,8 @@ import org.apache.activemq.kaha.impl.DataManager;
|
||||||
import org.apache.activemq.kaha.impl.data.Item;
|
import org.apache.activemq.kaha.impl.data.Item;
|
||||||
import org.apache.activemq.kaha.impl.index.IndexItem;
|
import org.apache.activemq.kaha.impl.index.IndexItem;
|
||||||
import org.apache.activemq.kaha.impl.index.IndexManager;
|
import org.apache.activemq.kaha.impl.index.IndexManager;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of a ListContainer
|
* Implementation of a ListContainer
|
||||||
|
@ -44,7 +44,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public class ListContainerImpl extends BaseContainerImpl implements ListContainer {
|
public class ListContainerImpl extends BaseContainerImpl implements ListContainer {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(ListContainerImpl.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ListContainerImpl.class);
|
||||||
protected Marshaller marshaller = Store.OBJECT_MARSHALLER;
|
protected Marshaller marshaller = Store.OBJECT_MARSHALLER;
|
||||||
|
|
||||||
public ListContainerImpl(ContainerId id, IndexItem root, IndexManager indexManager,
|
public ListContainerImpl(ContainerId id, IndexItem root, IndexManager indexManager,
|
||||||
|
|
|
@ -40,8 +40,8 @@ import org.apache.activemq.kaha.impl.index.IndexManager;
|
||||||
import org.apache.activemq.kaha.impl.index.VMIndex;
|
import org.apache.activemq.kaha.impl.index.VMIndex;
|
||||||
import org.apache.activemq.kaha.impl.index.hash.HashIndex;
|
import org.apache.activemq.kaha.impl.index.hash.HashIndex;
|
||||||
import org.apache.activemq.util.IOHelper;
|
import org.apache.activemq.util.IOHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of a MapContainer
|
* Implementation of a MapContainer
|
||||||
|
@ -50,7 +50,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*/
|
*/
|
||||||
public final class MapContainerImpl extends BaseContainerImpl implements MapContainer {
|
public final class MapContainerImpl extends BaseContainerImpl implements MapContainer {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(MapContainerImpl.class);
|
private static final Logger LOG = LoggerFactory.getLogger(MapContainerImpl.class);
|
||||||
protected Index index;
|
protected Index index;
|
||||||
protected Marshaller keyMarshaller = Store.OBJECT_MARSHALLER;
|
protected Marshaller keyMarshaller = Store.OBJECT_MARSHALLER;
|
||||||
protected Marshaller valueMarshaller = Store.OBJECT_MARSHALLER;
|
protected Marshaller valueMarshaller = Store.OBJECT_MARSHALLER;
|
||||||
|
|
|
@ -32,8 +32,8 @@ import org.apache.activemq.kaha.impl.DataManager;
|
||||||
import org.apache.activemq.kaha.impl.index.RedoStoreIndexItem;
|
import org.apache.activemq.kaha.impl.index.RedoStoreIndexItem;
|
||||||
import org.apache.activemq.util.IOExceptionSupport;
|
import org.apache.activemq.util.IOExceptionSupport;
|
||||||
import org.apache.activemq.util.IOHelper;
|
import org.apache.activemq.util.IOHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages DataFiles
|
* Manages DataFiles
|
||||||
|
@ -47,7 +47,7 @@ public final class DataManagerImpl implements DataManager {
|
||||||
public static final byte REDO_ITEM_TYPE = 2;
|
public static final byte REDO_ITEM_TYPE = 2;
|
||||||
public static final long MAX_FILE_LENGTH = 1024 * 1024 * 32;
|
public static final long MAX_FILE_LENGTH = 1024 * 1024 * 32;
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(DataManagerImpl.class);
|
private static final Logger LOG = LoggerFactory.getLogger(DataManagerImpl.class);
|
||||||
private static final String NAME_PREFIX = "data-";
|
private static final String NAME_PREFIX = "data-";
|
||||||
|
|
||||||
private final File directory;
|
private final File directory;
|
||||||
|
|
|
@ -24,8 +24,8 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
import org.apache.activemq.kaha.impl.DataManager;
|
import org.apache.activemq.kaha.impl.DataManager;
|
||||||
import org.apache.activemq.util.IOHelper;
|
import org.apache.activemq.util.IOHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optimized Store reader
|
* Optimized Store reader
|
||||||
|
@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
public final class IndexManager {
|
public final class IndexManager {
|
||||||
|
|
||||||
public static final String NAME_PREFIX = "index-";
|
public static final String NAME_PREFIX = "index-";
|
||||||
private static final Log LOG = LogFactory.getLog(IndexManager.class);
|
private static final Logger LOG = LoggerFactory.getLogger(IndexManager.class);
|
||||||
private final String name;
|
private final String name;
|
||||||
private File directory;
|
private File directory;
|
||||||
private File file;
|
private File file;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import java.util.Map;
|
||||||
import org.apache.activemq.kaha.IndexMBean;
|
import org.apache.activemq.kaha.IndexMBean;
|
||||||
import org.apache.activemq.kaha.Marshaller;
|
import org.apache.activemq.kaha.Marshaller;
|
||||||
import org.apache.activemq.kaha.StoreEntry;
|
import org.apache.activemq.kaha.StoreEntry;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Index implementation using a HashMap
|
* Index implementation using a HashMap
|
||||||
|
@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* @version $Revision: 1.2 $
|
* @version $Revision: 1.2 $
|
||||||
*/
|
*/
|
||||||
public class VMIndex implements Index, IndexMBean {
|
public class VMIndex implements Index, IndexMBean {
|
||||||
private static final Log LOG = LogFactory.getLog(VMIndex.class);
|
private static final Logger LOG = LoggerFactory.getLogger(VMIndex.class);
|
||||||
private IndexManager indexManager;
|
private IndexManager indexManager;
|
||||||
private Map<Object, StoreEntry> map = new HashMap<Object, StoreEntry>();
|
private Map<Object, StoreEntry> map = new HashMap<Object, StoreEntry>();
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ import org.apache.activemq.util.DataByteArrayInputStream;
|
||||||
import org.apache.activemq.util.DataByteArrayOutputStream;
|
import org.apache.activemq.util.DataByteArrayOutputStream;
|
||||||
import org.apache.activemq.util.IOHelper;
|
import org.apache.activemq.util.IOHelper;
|
||||||
import org.apache.activemq.util.LRUCache;
|
import org.apache.activemq.util.LRUCache;
|
||||||
import org.apache.commons.logging.Log;
|
import org.slf4j.Logger;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BTree implementation
|
* BTree implementation
|
||||||
|
@ -46,7 +46,7 @@ public class HashIndex implements Index, HashIndexMBean {
|
||||||
public static final int DEFAULT_LOAD_FACTOR;
|
public static final int DEFAULT_LOAD_FACTOR;
|
||||||
private static final int LOW_WATER_MARK=1024*16;
|
private static final int LOW_WATER_MARK=1024*16;
|
||||||
private static final String NAME_PREFIX = "hash-index-";
|
private static final String NAME_PREFIX = "hash-index-";
|
||||||
private static final Log LOG = LogFactory.getLog(HashIndex.class);
|
private static final Logger LOG = LoggerFactory.getLogger(HashIndex.class);
|
||||||
private final String name;
|
private final String name;
|
||||||
private File directory;
|
private File directory;
|
||||||
private File file;
|
private File file;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue