I am looking for a pattern where an Stateless Session Bean break up a large transaction into multiple transactions and allow the broken up transactions to be executed simultaneously. I am sure this is common problem to speed up the execution of a single large transaction. Is there a J2EE pattern or EJB pattern for it. Since EJB's can't create threads, I am wondering how can this be handled?
I am brainstorming here so I am not sure if this would work, but what about using MDB the returns confirmation if sub-transactions succeed.
so the main EJB starts sending messages to different MDBs and check the confirmation of each.
but this sounds like your EJB will be doing a lot of management on its own, in other words you won't utilize services provided by the container properly like transactions. Don't you think?
I thought ejb might provide out of box solution, but probably not so. In case your solution I would have to build message.How would I get confirmation from mdbs unless mdbs send the confirmation back on bus and another mdb listens to it and somehow notified the master sslb. This sounds a lot of work to solve what I think is common problem.
I was looking into worker manager Api. It could very well solve this problem but I am still checking into it.