Maven dependencies for Transaction & OSGiUtils

Avatar

Avatar

sivaprasadreddy

Avatar

sivaprasadreddy

sivaprasadreddy

13-10-2017

Hi All,

I'm following below forms resource and referring PDF Generator Service section on the page.

AEM 6.2 Forms Help | Using AEM Document Services Programmatically

I see the below piece of code. But I couldn't find package names/dependencies for Transaction & OSGiUtils class. 

Transaction tx = OSGiUtils.getTransactionManager().getTransaction();

    // Begin transaction

    if (tx == null)

        OSGiUtils.getTransactionManager().begin();

Please advise.

Thanks

Siva

View Entire Topic

Avatar

Avatar

shafiuddinm1989

Avatar

shafiuddinm1989

shafiuddinm1989

24-10-2019

Is this issue ever resolved? I tried this piece of code

import javax.transaction.TransactionManager;

import javax.transaction.Transaction;

TransactionManager tmx = new TransactionManager();Maven dependencies for Transaction & OSGiUtils

Transaction tx = tmx.getTransaction();

    // Begin transaction

    if (tx == null)

    tmx.begin();

Still there is error saying, Cannot instantiate the type TransactionManager