[wildfly-dev] discussion about JSR352 Batch and JPA
Clebert Suconic
csuconic at redhat.com
Wed Sep 18 14:24:33 EDT 2013
Maybe I'm getting late on the conversation.. wouldn't JMS also apply into Transactional batching?
On Sep 18, 2013, at 1:43 PM, Jason Greene <jason.greene at redhat.com> wrote:
>
> On Sep 18, 2013, at 7:54 AM, Scott Marlow <smarlow at redhat.com> wrote:
>
>> What are the requirements for supporting Batch section 11.6 [1]? From
>> looking at JSR352, I get that each "chunk" has its own JTA transaction.
>> I previously had heard that we only supported starting the transaction
>> from the application processing code (via UserTransaction) but I think
>> the Batch container/runtime should start a JTA transaction for each
>> "chunk" that is processed. What are we really doing for managing the
>> JTA transactions for batch?
>>
>>
>> REGULAR CHUNK PROCESSING & JPA
>>
>>
>> For the JPA support for regular chunk processing [1], the following will
>> give a new underlying persistence context per chunk (jta tx):
>>
>> @PersistenceContext(unitName = "chunkNonpartitionedAZTT4443334")
>> EntityManager em;
>>
>
> That won't work because the same block of code is executed in parallel from 2 different threads. Each chunk needs a clean entity manager.
>
>
> --
> Jason T. Greene
> WildFly Lead / JBoss EAP Platform Architect
> JBoss, a division of Red Hat
>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
More information about the wildfly-dev
mailing list