Those interfaces are only provided for use by the server implementation, i.e. JBoss. They are not designed to be used by you. If you want to filter messages, use a message selector. There are plenty of examples out there on receiving messages without employing a MDB.
Could you point me to some of this examples, please.
1) Create a JMS TopicConnecton
2) Create a JMS TopicSession
3) Register a message subscription via TopicSession.createSubscriber(topic, selector, local)
**) note the use of the message selector
4) Receive messages using the TopicSubscriber.receive()
Note: if you create a durable subscriber, remember to "unsubscribe()" when it is no longer needed.
Thank you very much.
The one think I can't understand it's why my cache in this situation still recieves messages. I don't mean that my onMessage() method being called, but when I look at profiling statistics for my test code I see that most part of time it's took to read from soket in JMS listerning thread even if no messages was received. So why it's so, where is performance? I don't need my cache recieve unneeded messages ever.