[Design of the JBoss EJB Container] - Re: Message redelivery from non transacted MDBs
by weston.price@jboss.com
Correct.
Technically, there is nothing to *force* us to redeliver the message in the case of a non specified transaction context (ie BMT, CMT NotSupported). All specs are at best ambiguous, and at worst, completely ingnorant of this subject. However, a customer requirement (not supported by me mind you) came up and this *feature* was added to the JCA adapter. This change initially was added in HEAD and then aggressively, and stupidly might I add, backported to multiple branches on the 4.x line.
After the dust cleared I went back in HEAD and reworked some of it to be more performant and easier to understand. I haven't backported these changes yet.
So, the long and short of it:
If you want redelivery in the case of BMT, CMT NotSupported you
a) Have to use JCA
b) Are encouraged, if at all possible, to use the current implementation in HEAD.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001033#4001033
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001033
19 years, 2 months
[Design of the JBoss EJB Container] - Message redelivery from non transacted MDBs
by timfox
Using JBoss-4.0.5.GA.
If I throw a RuntimeException from inside the onMessage method of a MDB set to tx NotSupported, then redelivery does not occur.
The EJB2 spec is pretty silent about what should occur (17.6.3.1, 17.6.3.2) and only really says that redeliver should occur if the onMessage is running in a tx context.
For the analogous case of a RuntimeException thrown from a non MDB (straightforward jms MessageListener) onMessage method with ack mode of AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE, then the JMS 1.1 spec is pretty clear that redelivery should be immediately attempted.
It seems to me that the current MDB container behaviour is a bit weird, since you end up with messages remaining unacked in the connection consumers session until the mdb container is redeployed.
A better and more intuitive behaviour IMHO would be to attempt to redeliver the message x times then put it in the DLQ. Then at least the user can do something with it. Otherwise it is effectively lost.
I would have thought that if the EJB spec is silent about one aspect of MDB delivery behaviour we should fall back to what's specified in the JMS spec, rather than do something completely different.
Or perhaps there's a good reason why redelivery isn't attempted in this situation that I haven't thought about.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001004#4001004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001004
19 years, 2 months
[Design of POJO Server] - Re: bean/mbean integration issue
by adrian@jboss.org
"alesj" wrote : I added DispatchContext interface.
|
This interface is not correct.
PropertyMetaData and ParameterMetaData are POJO specific.
This interface belongs in the dependency module that knows nothing about
POJOs/services.
You need something like the DynamicMBean interface
| Object get(String name) throws Throwable;
| void set(String name, Object value) throws Throwable;
| Object invoke(String name, String[] signature, Object[] parameters) throws Throwable;
|
The kernel/pojo context will turn this into joinpoint invocations on the context's target.
| public Object get(String name) throws Throwable
| {
| KernelController controller = (KernelController) getController();
| Kernel kernel = controller.getKernel();
| KernelConfigurator configurator = kernel.getConfigurator();
|
| Object object = getTarget();
| BeanInfo info = getBeanInfo();
|
| TargetttedJoinpoint joinpoint = configurator.getPropertyGetterJoinpoint(info, name);
| joinpoint.setTarget(object);
| return joinpoint.dispatch();
| }
|
The service context will turn them into mbean invocations, e.g.
| public Object get(String name) throws Throwable
| {
| return serviceController.getMBeanServer().getAttribute(objectName, name);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000931#4000931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000931
19 years, 2 months