• 2 replies
  • Latest Post - ‏2013-03-05T15:19:15Z by aandrzej
31 Posts

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
    60 Posts

    Re: Custom DAO

    If you use a custom DAO instead of JPAWriterPattern then you would be responsible for transaction rollback/commit.

    Thank you
  • aandrzej
    1 Post

    Re: Custom DAO

    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?