apm-agent-plugins/apm-jms-plugin/apm-jms-jakarta/src/main/java/co/elastic/apm/agent/jms/jakarta/JmsInstrumentationHelper.java [103:173]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public TextHeaderGetter<Message> propertyAccessorGetter() {
        return JmsMessagePropertyAccessor.instance();
    }

    @Override
    public TextHeaderSetter<Message> propertyAccessorSetter() {
        return JmsMessagePropertyAccessor.instance();
    }

    @Override
    public void addDestinationDetails(Destination destination,
                                      String destinationName,
                                      AbstractSpan<?> span) {

        String prefix = null;
        if (destination instanceof Queue) {
            prefix = "queue ";
        } else if (destination instanceof Topic) {
            prefix = "topic ";
        }

        if (prefix != null) {
            span.appendToName(prefix).appendToName(destinationName)
                .getContext().getMessage().withQueue(destinationName);
        }
    }

    @Override
    public long getJMSTimestamp(Message message) throws JMSException {
        return message.getJMSTimestamp();
    }

    @Override
    public boolean isTextMessage(Message message) {
        return message instanceof TextMessage;
    }

    @Override
    public String getText(Message message) throws JMSException {
        return ((TextMessage) message).getText();
    }

    @Override
    public String getJMSMessageID(Message message) throws JMSException {
        return message.getJMSMessageID();
    }

    @Override
    public long getJMSExpiration(Message message) throws JMSException {
        return message.getJMSExpiration();
    }

    @Override
    public Enumeration getPropertyNames(Message message) throws JMSException {
        return message.getPropertyNames();
    }

    @Override
    public Object getObjectProperty(Message message, String propertyName) throws JMSException {
        return message.getObjectProperty(propertyName);
    }

    @Override
    public void setStringProperty(Message message, String propertyName, String value) throws JMSException {
        message.setStringProperty(propertyName, value);
    }

    @Override
    protected Destination getJMSDestination(Message message) throws JMSException {
        return message.getJMSDestination();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



apm-agent-plugins/apm-jms-plugin/apm-jms-javax/src/main/java/co/elastic/apm/agent/jms/javax/JmsInstrumentationHelper.java [101:171]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public TextHeaderGetter<Message> propertyAccessorGetter() {
        return JmsMessagePropertyAccessor.instance();
    }

    @Override
    public TextHeaderSetter<Message> propertyAccessorSetter() {
        return JmsMessagePropertyAccessor.instance();
    }

    @Override
    public void addDestinationDetails(Destination destination,
                                      String destinationName,
                                      AbstractSpan<?> span) {

        String prefix = null;
        if (destination instanceof Queue) {
            prefix = "queue ";
        } else if (destination instanceof Topic) {
            prefix = "topic ";
        }

        if (prefix != null) {
            span.appendToName(prefix).appendToName(destinationName)
                .getContext().getMessage().withQueue(destinationName);
        }
    }

    @Override
    public long getJMSTimestamp(Message message) throws JMSException {
        return message.getJMSTimestamp();
    }

    @Override
    public boolean isTextMessage(Message message) {
        return message instanceof TextMessage;
    }

    @Override
    public String getText(Message message) throws JMSException {
        return ((TextMessage) message).getText();
    }

    @Override
    public String getJMSMessageID(Message message) throws JMSException {
        return message.getJMSMessageID();
    }

    @Override
    public long getJMSExpiration(Message message) throws JMSException {
        return message.getJMSExpiration();
    }

    @Override
    public Enumeration getPropertyNames(Message message) throws JMSException {
        return message.getPropertyNames();
    }

    @Override
    public Object getObjectProperty(Message message, String propertyName) throws JMSException {
        return message.getObjectProperty(propertyName);
    }

    @Override
    public void setStringProperty(Message message, String propertyName, String value) throws JMSException {
        message.setStringProperty(propertyName, value);
    }

    @Override
    protected Destination getJMSDestination(Message message) throws JMSException {
        return message.getJMSDestination();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



