All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dynamicextensionsalfresco.annotations.Transactional Maven / Gradle / Ivy

Go to download

Adds an OSGi container to alfresco repository supporting dynamic code reloading, classpath isolation and a bunch of other useful features

There is a newer version: 3.1.0
Show newest version
package com.github.dynamicextensionsalfresco.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.alfresco.repo.transaction.RetryingTransactionHelper;

/**
 * Indicates methods that are run within a transaction using the given settings. This annotation removes the boilerplate
 * for invoking {@link RetryingTransactionHelper}. 

Spring AOP limitations

*

* The underlying implementation relies on Spring AOP and thus the transactional advice is subject to the following * limitations: *

    *
  • The annotation can only be applied to public instance methods. The implementation logs a warning if it * finds the annotation on a non-public method. *
  • Client code must invoke @Transactional methods on Spring-supplied beans directly. Transactional * logic should be factored out to public methods of a separate bean. *
  • Method calls that are internal to the bean will bypass the transactional advice. *
* * @author Laurens Fridael * @see RetryingTransactionHelper#doInTransaction(org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback, * boolean, boolean) */ @Target({ ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) public @interface Transactional { /** * Specifies if the operation should be run within a read-only transaction. * * @return */ boolean readOnly() default false; /** * Indicates if the operation requires a new transaction. * * @return */ boolean requiresNew() default false; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy