Skip to content

Commit ac6472f

Browse files
committed
Add a Jakarta JMS Appender apache#2295
1 parent c654a8b commit ac6472f

File tree

1 file changed

+2
-12
lines changed
  • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/mom/jakarta

1 file changed

+2
-12
lines changed

log4j-core/src/main/java/org/apache/logging/log4j/core/appender/mom/jakarta/JmsManager.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ private Destination createDestination(final JndiManager jndiManager) throws Nami
378378
* @return A new JMS message containing the provided object.
379379
* @throws JMSException if the JMS provider fails to create this message due to some internal error.
380380
*/
381-
public Message createMessage(final Serializable object) throws JMSException {
381+
private Message createMessage(final Serializable object) throws JMSException {
382382
if (object instanceof String) {
383383
return this.session.createTextMessage((String) object);
384384
} else if (object instanceof org.apache.logging.log4j.message.MapMessage) {
@@ -393,16 +393,6 @@ private void createMessageAndSend(final LogEvent event, final Serializable seria
393393
messageProducer.send(message);
394394
}
395395

396-
/**
397-
* Creates a MessageConsumer on this Destination using the current Session.
398-
*
399-
* @return A MessageConsumer on this Destination.
400-
* @throws JMSException if the session fails to create a consumer due to some internal error.
401-
*/
402-
public MessageConsumer createMessageConsumer() throws JMSException {
403-
return this.session.createConsumer(this.destination);
404-
}
405-
406396
/**
407397
* Creates a MessageProducer on this Destination using the current Session.
408398
*
@@ -413,7 +403,7 @@ public MessageConsumer createMessageConsumer() throws JMSException {
413403
* @return A MessageProducer on this Destination.
414404
* @throws JMSException if the session fails to create a MessageProducer due to some internal error.
415405
*/
416-
public MessageProducer createMessageProducer(final Session session, final Destination destination)
406+
private MessageProducer createMessageProducer(final Session session, final Destination destination)
417407
throws JMSException {
418408
return session.createProducer(destination);
419409
}

0 commit comments

Comments
 (0)