Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2013-03-05T15:19:15Z by aandrzej
Veluri
Veluri
31 Posts
ACCEPTED ANSWER

Pinned topic Custom DAO

‏2013-01-09T21:25:19Z |
We are planning to use CUSTOM DAO instead of JPAWRITER Pattern ..

Does Compute Grid Frame work Support custom DAO?

Is there any restrictions or limitations?

Thank you
Updated on 2013-03-05T15:19:15Z at 2013-03-05T15:19:15Z by aandrzej
  • sspavan
    sspavan
    60 Posts
    ACCEPTED ANSWER

    Re: Custom DAO

    ‏2013-01-12T20:32:30Z  in response to Veluri
    If you use a custom DAO instead of JPAWriterPattern then you would be responsible for transaction rollback/commit.

    Thank you
    Pavan
  • aandrzej
    aandrzej
    1 Post
    ACCEPTED ANSWER

    Re: Custom DAO

    ‏2013-03-05T15:19:15Z  in response to Veluri
    Hello Pavan

    Just to provide a little more background. We are thinking about reusing in some cases business components implemented as stateless session beans and call them from within batch job steps. Those business components may depend on DAOs (also stateless session beans) that use container managed JPA entity manager. The business components methods will have TransactionAttribute.REQUIRED applied to be able to execute in the context of existing transaction or create new transaction context if one does not exist.

    We assume that if batch job step locates and calls such business component, its logic will execute within the context of the same transaction that batch job step executes. Are we correct here or does job step logic execute outside of any transaction? If the latter then new transaction context should be created when our business component is called. Do you see any fundamental issues with such approach?

    Regards,
    Andrzej