I need to write a deployer extension where my requirement is to get the publish transaction id.

I tried with the following way:

public static String getTransactionId()
    ContentDeliveryKernel contentDeliveryKernel = null;
    try {
        contentDeliveryKernel = KernelFactory.getInstance().getKernel();
        TransactionManager tm = contentDeliveryKernel.getComponent(TransactionManager.class);
        Map<String, Long> activeTrans = tm.getActiveTransactions();
        if(activeTrans != null && !activeTrans.isEmpty())
            Object keys[] = activeTrans.keySet().toArray();
            String rawTransId = (String)keys[0];
            return cleanupPackageId(rawTransId);
    } catch (TridionLifecycleException ex) {
        return null;

    return null;

But I am getting a stack overflow error after deployment on following line: contentDeliveryKernel = KernelFactory.getInstance().getKernel();

If anybody knows a better way to get a published transaction id then it would be helpful.

I am using sites 9.1.

  • Following is the stack trace: Oct 25, 2021 at 7:33
  • Is it a deployer extension or storage extension?
    – Velmurugan
    Oct 26, 2021 at 7:12

1 Answer 1


It is pretty easy. You have the following page for deployer extension sample:


Plus, the override methods in deployer extensions receive TransportPackage which has method getTransactionId()

    public void process(TransportPackage data) throws ProcessingException {
        try {
            ProcessorInstructions processorInstructions = data.getProcessorInstructions();
            TCMURI transactionID = data.getTransactionId();

        } catch (Exception exception) {
        } finally {
            LOGGER.debug("**PageUndeployer process end**");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.