JBoss Community

Re: Commit transaction after each service task?

created by Mauricio Salatino in jBPM - View the full discussion

Hi Richard,

No I didn't mean creating a new thread.. because if the JVM crash you will loose that thread.

You SHOULD NOT DO THAT! :) (I'm not screaming with the capital letters.. it's just to emphazise it)

 

I was suggesting  something like:

public void executeWorkItem(final WorkItem workItem, final WorkItemManager manager) {

       

                      

     // SEND A Message to a QUEUE which will be processed by another component

     // SEND THE WORKITEM ID AS PAYLOAD OF THE MESSAGE AND ALSO THE SESSION ID

    // SO THE OTHER COMPONENT CAN RELOAD THE SESSION AND CONTINUE THE EXECUTION with        manager.completeWorkItem(workItem.getId(), results);

    

}

 

Cheers

Reply to this message by going to Community

Start a new discussion in jBPM at Community