mirror of https://github.com/apache/activemq.git
This allow spring 2.0 to work with xbean-2.5
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@427613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6b03bd3f9b
commit
4c1cc956cc
|
@ -34,13 +34,10 @@ import org.apache.commons.logging.LogFactory;
|
||||||
public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
|
|
||||||
private Log log = LogFactory.getLog(LoggingBrokerPlugin.class);
|
private Log log = LogFactory.getLog(LoggingBrokerPlugin.class);
|
||||||
private Log sendLog;
|
private Log sendLog = LogFactory.getLog(LoggingBrokerPlugin.class.getName()+".Send");
|
||||||
private Log ackLog;
|
private Log ackLog = LogFactory.getLog(LoggingBrokerPlugin.class.getName()+".Ack");
|
||||||
|
|
||||||
public void send(ConnectionContext context, Message messageSend) throws Exception {
|
public void send(ConnectionContext context, Message messageSend) throws Exception {
|
||||||
if (sendLog == null) {
|
|
||||||
sendLog = createLog("Send");
|
|
||||||
}
|
|
||||||
if (sendLog.isInfoEnabled()) {
|
if (sendLog.isInfoEnabled()) {
|
||||||
sendLog.info("Sending: " + messageSend);
|
sendLog.info("Sending: " + messageSend);
|
||||||
}
|
}
|
||||||
|
@ -48,9 +45,6 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void acknowledge(ConnectionContext context, MessageAck ack) throws Exception {
|
public void acknowledge(ConnectionContext context, MessageAck ack) throws Exception {
|
||||||
if (ackLog == null) {
|
|
||||||
ackLog = createLog("Ack");
|
|
||||||
}
|
|
||||||
if (ackLog.isInfoEnabled()) {
|
if (ackLog.isInfoEnabled()) {
|
||||||
ackLog.info("Acknowledge: " + ack);
|
ackLog.info("Acknowledge: " + ack);
|
||||||
}
|
}
|
||||||
|
@ -83,14 +77,4 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
this.sendLog = sendLog;
|
this.sendLog = sendLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implementation methods
|
|
||||||
// -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Lazily creates a new child log
|
|
||||||
*/
|
|
||||||
protected Log createLog(String name) {
|
|
||||||
return LogFactory.getLog(log.toString() + "." + name);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
http\://activemq.org/config/1.0=org.apache.xbean.spring.context.v2.XBeanNamespaceHandler
|
4
pom.xml
4
pom.xml
|
@ -131,6 +131,8 @@
|
||||||
<module>activemq-web-console</module>
|
<module>activemq-web-console</module>
|
||||||
<module>activemq-optional</module>
|
<module>activemq-optional</module>
|
||||||
<module>maven-bundle-plugin</module>
|
<module>maven-bundle-plugin</module>
|
||||||
|
<module>maven-gram-plugin</module>
|
||||||
|
<module>activemq-openwire-generator</module>
|
||||||
<module>assembly</module>
|
<module>assembly</module>
|
||||||
<module>activeio</module>
|
<module>activeio</module>
|
||||||
<!--module>activemq-systest</module -->
|
<!--module>activemq-systest</module -->
|
||||||
|
@ -943,6 +945,6 @@
|
||||||
<xmlbeans-version>2.0.0-beta1</xmlbeans-version>
|
<xmlbeans-version>2.0.0-beta1</xmlbeans-version>
|
||||||
<xmlpull-version>1.1.3.4d_b4_min</xmlpull-version>
|
<xmlpull-version>1.1.3.4d_b4_min</xmlpull-version>
|
||||||
<xstream-version>1.1.2</xstream-version>
|
<xstream-version>1.1.2</xstream-version>
|
||||||
<xbean-version>2.5</xbean-version>
|
<xbean-version>2.6-SNAPSHOT</xbean-version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue