jndi and names etc has always been tricky, so I'm not sure there is an easy 'fix'. If this is just the thing, you are lucky ;-)
Yes, you can until some jbpm4 issues are fixed (see JIRA), extend JtaTransaction and in the contructed set the userTransactionJndiName property to the java:comp one.
Also created a new "CorrectedTransactionBinding" class which is the same as TransactionBinding in jbpm4 but which passes for the JtaTransaction the extended class above to the ObjectDescriptor
then make a copy of the jbpm.wire.bindings.xml as such it is first in classpath (WEB-INF/classes f.e.) and change the regular TransactionBinding to your "CorrectedTransactionBinding".
You would expect you could use jbpm.user.bindings.xml but that currently won't work :-(
Its not the most optimal solution but at least is much better then changing the jbpm4 codebase each time after an upgrade.
That's exactly i've been looking for
;-) I would have (temporarily) changed in in the source ..... LOL. And I should also have mentioned that indeed there are some issues and once those are fixed patching is not needed.
And now I forgot to add: providing the real patches will be welcomed :-)