[Design of Messaging on JBoss (Messaging/JBoss)] - rolled back messages delivered twice.
by ataylor
The scenario is this:
I have a pool of MDB's, the MDB basically just calls ctx.setRollbackOnly(). This just calls rollback after onMessage. The rollback flushes any pending acks and then calls rollback on the server. The message is then obviously added back to the queue and delivered again.
Heres some debug i caught:
1 adding ref 1295696329288188257 for session 10
| 2 ClientSessionImpl.acknowledge 1295696329288188257
| 3 acking 1295696329288188257 for session 10
| 4 polled ref 1295696329288188257 for session 10
| 5 adding ref 1295696329288188257 for session 21
| 6 clearing ref 1295696329288188257 for 21
| 7 adding ref 1295696329288188257 for session 15
| 8 ClientSessionImpl.acknowledge 1295696329288188257
| 9 acking 1295696329288188257 for session 15
| 10 ClientSessionImpl.acknowledge 1295696329288188257
| 11 acking 1295696329288188257 for session 21
|
|
|
You can see the message being added, the client acknowledging it and then the server acking then the consumer polling it from deliveringRefs during the cancelRefs method.
The problem occurs between steps 5 and 6 i think. After the message has been redelivered from session 10 it is added to session 21, in the meantime however the consumer from session 21 is also rolling back a different message (I havent shown this debug for clarity) and during this the message is also canceled from session 21 even tho the client hasn't received it yet. The message is the added to session 15 and handled correctly by it but the original client for session 21 still receives it and tries to acknowledge it. You can see the last 4 lines showing the message being delivered twice.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213615#4213615
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213615
15 years, 2 months
[Design of Management Features on JBoss] - JBAS-6285, platform mbeans managed components
by scott.stark@jboss.org
I finally got the platform mbeans integrated into the profile service management view and merged into the 5_x branch. Numerous issues in the jboss-managed project showed up that had to be addressed. These are all part of the 2.1.0.CR2 release which is now being used by jbossas 5_x.
The biggest potential change is that the SimpleMetaType now has a notion of primitive types. The following final objects have been added:
| public static final SimpleMetaType BOOLEAN_PRIMITIVE;
| public static final SimpleMetaType BYTE_PRIMITIVE;
| public static final SimpleMetaType CHARACTER_PRIMITIVE;
| public static final SimpleMetaType DOUBLE_PRIMITIVE;
| public static final SimpleMetaType FLOAT_PRIMITIVE;
| public static final SimpleMetaType INTEGER_PRIMITIVE;
| public static final SimpleMetaType LONG_PRIMITIVE;
| public static final SimpleMetaType SHORT_PRIMITIVE;
|
These are created by using the corresponding primitive class name, for example, "int" for the int.class. The SimpleValueSupport class has new type safe wrap(...) static methods that allow one to create SimpleValues of the given primitive SimpleMetaTypes.
Although the types are different, the java.lang.* and primitive version of a given SimpleValue do compare to be the same, even though their types are not equal.
The addition of primitive types was needed to be able to properly resolve the signature of ManagedOpertions whose underlying java method used primitives as is the case for most of the platform mbean operations.
Let me know if there are any issues with this change in the embedded jopr project.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213595#4213595
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4213595
15 years, 2 months