[EJB/JBoss] - Re: MDB 'at most, once' delivery (Ack before onMessage)
by azda
Yes, that's currently the exact configuration of my queue. There are two things I would like to solve:
1.) The processing in my MDB can take a long time. During this time, the provider is holding the unacknowledged message. This probably isn't a big deal, but in my case it doesn't have to, so if there is anything I can do to alleviate that behavior, I would like to do it.
2.) This is the bigger issue, because it is the exact opposite of what I need to happen, and kind of unexpected. In my test, I put a sleep statement in my MDB to simulate long processing. I send five messages to the queue, so five MDB instances start and go to sleep. At that point I crash the server. When the server starts back up, those messages get delivered again (and the MDBs go back to sleep). If that had been my actual application logic, it would be duplicating events, which would be bad.
If this is the behavior, I'll have to check for duplicates anyway, and might as well use Dups-ok-acknowledge.
One thing I didn't check, which I will check tomorrow, is if the redelivered flag is set the second time around. Since I have MaxDeliveryAttempts set to 1, I would have expected it to go to the DLQ in that case.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219694#4219694
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219694
17 years, 1 month
[Security & JAAS/JBoss] - Re: Anyway of removing the MDB username and password from th
by thai777
Hi all, we are trying to remove hardcoding the username and password for the MDB from jboss.xml. Tried as suggested but for some reason the property values aren't being picked up in jboss.xml.
1. deploy/properties-service.xml:
<mbean code="org.jboss.varia.property.SystemPropertiesService"
| name="jboss:type=Service,name=SystemProperties">
|
| <!--
| | Set raw properties file style properties.
| -->
|
| <attribute name="Properties">
|
| username=john
| password=needle
|
| </attribute>
| </mbean>
2. jboss.xml:
<message-driven>
| <ejb-name>SaMDB</ejb-name>
| <destination-jndi-name>queue/TO_SA</destination-jndi-name>
|
| <mdb-user>${username}</mdb-user>
| <mdb-passwd>${password}</mdb-passwd>
|
| <resource-ref>
| <res-ref-name>jms/QCF</res-ref-name>
| <jndi-name>ConnectionFactory</jndi-name>
| </resource-ref>
| </message-driven>
3. <JBOSS_SERVER/common/lib/properties-plugin.jar exists
4. Tried in JBoss version 5.0.0.GA and 5.0.1.GA
5. ${username} has not been evaluated, got the following exception:
javax.jms.JMSSecurityException: User ${username} is NOT authenticated
Any help or leads would be most appreciated.
Thanks,
Thai
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219692#4219692
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219692
17 years, 1 month