[jboss-dev-forums] [Design of JBoss jBPM] - Enterprise subproject and EJB spec level
jeffdelong
do-not-reply at jboss.com
Mon Oct 30 23:25:11 EST 2006
Tom,
I was looking over the enterprise subproject and noticing that the EJB are "old-school" EJB2 beans. I think that given JBoss leadership in EJB3, we should consider updating these beans to EJB3. We can use annotations, and get rid of the ejb-jar.xml files as well.
Also there is a comment in CommandListenerBean,
} catch (Exception e) {
e.printStackTrace();
// TODO add a retry mechanism or verify how this can be configured in the MDB itself
throw new JbpmException("command "+command+" couldn't be executed", e);
}
If the bean is deployed with transaction-attribute required (which is the default), then the container should automatically rollback the transaction if a system exception is thrown, which will cause the JMS Server to retry the message for some configurable number of tries, and then place the message on the DLQ.
You can also catch non-system exception (e.g., an ObjectNotFoundException, InvalidStateException, etc), and invoke setRollbackOnly on the messageDrivenContext, i.e.,
messageDrivenContext.setRollbackOnly();
Jeff
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981947#3981947
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981947
More information about the jboss-dev-forums
mailing list