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

js.transaction.Mutable Maven / Gradle / Ivy

The newest version!
package js.transaction;

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

/**
 * Force mutable transaction on particular method inside a {@link Immutable} managed class. This annotation can be used
 * only for transactional managed methods. It is considered a bug if attempt to use mutable annotation on a
 * non-transactional method.
 * 

* As one can observe from sample code below, mutable annotation has no parameters. * *

 * @Transactional
 * @Immutable
 * class DaoImpl implements Dao {
 * 	...   
 * 	@Mutable
 * 	void saveUser(User user) {
 * 	} 		   
 * }
 * 
* * In above sample all public DAO methods are transactional and immutable. Anyway, saveUser method is * explicitly marked as mutable since it does alter database content. * * @author Iulian Rotaru * @version final */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Mutable { }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy