-
15. Re: Durable messages and MDB with selector
jaikiran May 19, 2010 8:57 AM (in response to ataylor)Andy Taylor wrote:
for some reason your MDB's are being deployed twice each (see below)
can you double check you ear or provide buildable src.
13:12:50,164 INFO [EJBContainer] STARTED EJB: org.hornetq.test.mdb.DurableNoSelectorMDB ejbName: DurableNoSelectorMDB
13:12:50,566 INFO [EJBContainer] STARTED EJB: org.hornetq.test.mdb.DurableNoSelectorMDB ejbName: DurableNoSelector
13:12:51,025 INFO [EJBContainer] STARTED EJB: org.hornetq.test.mdb.DurableSelectorMDB ejbName: DurableSelectorMDB
13:12:51,330 INFO [EJBContainer] STARTED EJB: org.hornetq.test.mdb.DurableSelectorMDB ejbName: DurableSelectorThe deployment contains a ejb-jar.xml with:
<?xml version="1.0" encoding="ISO-8859-1"?> <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"> <enterprise-beans> <message-driven> <ejb-name>DurableSelector</ejb-name> <ejb-class>org.hornetq.test.mdb.DurableSelectorMDB</ejb-class> </message-driven> <message-driven> <ejb-name>DurableNoSelector</ejb-name> <ejb-class>org.hornetq.test.mdb.DurableNoSelectorMDB</ejb-class> </message-driven> </enterprise-beans> </ejb-jar>
So the same MDB is being mapped twice to two different names. For example, the MDB class DurableNoSelectorMDB is once deployed as an EJB with the name DurableNoSelectorMDB through annotations and once through the ejb-jar.xml with a different name DurableNoSelector.
Looking at the ejb-jar.xml, I guess Daniel can just get rid of that file altogether.
-
16. Re: Durable messages and MDB with selector
ataylor May 19, 2010 9:07 AM (in response to jaikiran)could u fix your ear and retest and confirm either way if it is still an issue
-
17. Re: Durable messages and MDB with selector
dfisher May 19, 2010 10:33 AM (in response to ataylor)My apologies for the bad config.
I removed the ejb-jar.xml and confirmed each MDB is only deployed once.
See the attached ear.
I'm still seeing messages lost for the durable subscription with the selector.
-
test-mdb.ear 5.9 KB
-
-
18. Re: Durable messages and MDB with selector
ataylor May 20, 2010 8:53 AM (in response to dfisher)This is now fixed in trunk.
The issue was that we were recreating the subscription queue every time when we shouldnt only when the selector changed. Feel free to test trunk now.
FYI remember that if you do change the selector this will basically re create the subscription as new and only receive messages from that point in time.
thanks for the heads up on this and providing s a test that we can actually use, be great if everyone did this
-
19. Re: Durable messages and MDB with selector
dfisher May 20, 2010 10:49 AM (in response to ataylor)Confirmed the fix using r9249.
Thanks everyone.