I'm trying to get message by GlassFish MDB and external Apache ActiveMQ. And when i use just simple clients(first sends, second receives) for send message through broker everything is okay. But when i use MDB nothing happens.
So, my setup for GlassFish:
Resource Adapter Configs:
- Resource Adapter Name: activemq-rar-5.9.0
- ServerUrl: tcp://localhost:61616
- Password: defaultPassword
- UserName: defaultUser
- UseInboundSession: false
- Clientid: glassFish
Connector Connection Pools:
- Pool Name: jmsConnectionPool
- Resource Adapter: activemq-rar-5.9.0
- Connection Definition: javax.jms.ConnectionFactory
- All other default
Admin Object Resource:
- JNDI Name: jmsTopic
- Resource Adapter: activemq-rar-5.9.0
- Resource Type: javax.jms.Topic
- PhysicalName: sTopic
MDB:
@MessageDriven(mappedName="jmsTopic")
public class JMSReceiver implements MessageListener {
private static final Log log = LogFactory.getLog(JMSReceiver.class);
@Override
public void onMessage(Message message) {
System.out.println("Arrived: "+message);
log.info("Arrived: " + message);
}
}
glassfish-ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
When I send message into topic with name `sTopic` from my client i see in ActiveMQ admin panel that messages were arrived, but i don't see any message about it in GlassFish server log.
Also, I found this warning in log:
MNTG0201:Flashlight listener registration failed for listener class : com.sun.ejb.monitoring.stats.MessageDrivenBeanStatsProvider , will retry later
So, what do i do wrong?