Well there is really very little common code to factor out of the bean; most of the common
code is in the org.jbpm.command package. So another approach would just be to add a second
set of beans that were EJB3 compliant.
I'm not sure I see how this command pattern is working however. I can't see how
the instance variables on the command classes get instantiated. For example, how would:
long taskInstanceId = 0;
String transitionName = null;
get set in the TaskInstanceEndCommand? There are no setter methods on the object, nor a
non-default constructor that sets them (I must be missing something here).
I have another question about this pattern. The commands are currently limited in the
amount of data they provide. So for example, if I wanted to update some contextVariables
as part of completing the TaskInstance, I would basically write my own command, say
TaskInstanceUpdateAndEnd?
In answer to your questions:
You don't need to add the transaction-attribute of required since it is the default,
so how you have the ejb-jar.xml currently will provide the desired behavior. However, to
be explicit, you would add
<transaction-attribute>required</transaction-attribute> to the assembly
descriptor portion of the ejb-jar.xml.
Yes, non-RuntimeExceptions.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982137#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...