Skip to content
Advertisement

WLS 12.1.3 in Linux – a message is not getting listened to by a consumer

I have deployed the code as a WAR file in WebLogic Server (WLS) 12.1.3 where I am sending a message from a Producer and the messages are consumed by the below code. The application is deployed as a WAR file in WLS server in Windows and it is listening, but the same WAR file is deployed with same version of 12.1.3 WLS in Linux.

I am able to see the message count in the Queue Monitoring, but the message is not being listened to by the application. How can I track the application is reading the messages on the Linux server and there isn’t any update in log files?

@MessageDriven(mappedName = "jms/jjQueue", activationConfig = {
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
})

public class JMSMessageConsumer implements MessageListener {

    private final static Logger LOGGER = Logger.getLogger(JMSMessageConsumer.class);

    public JMSMessageConsumer() {
    }

    @Override
    public void onMessage(Message message) {
        if (message instanceof TextMessage) {
            try {

                String mess = ((TextMessage) message).getText();

                LOGGER.info("Message Received >> " + mess);
            }
            catch (JMSException e) {
                LOGGER.info("Error in exception" + e);
            }
        }

    }
}

I found in my Windows for the JMSMessageConsumer in WLS there is running cound, but in Linux it is showing as “This EJB is not currently active on any running server.” How can I make it active in WLS as I have deployed this application as a WAR file. How can I make it active?

Advertisement

Answer

I didn’t start the service in WLS. After starting the service, it was working fine.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement