I’m quite new in JavaEE and trying to deal with JMS stuff. Here is the MessageBean that implement MessageListener and Override onMessage where I consequently try to receive message from Queue My code snippet:
@Override
public void onMessage(Message message) {
try{
System.out.println(message.getBody(String.class));
}catch(JMSException e){
System.err.println(e.toString());
}
}
But unfortunately there is an compiling error that method getBody cannot be resolved and marked as red in IntelliJ. Help me figure out. Thanks in advance