這裏總結自己常用的,沒用到的,或不常用以後再繼續補充
1.Local
When used on the bean class, declares the local business interface(s) for a session bean.
2.Remote
Declares the remote business interface(s) for a session bean.
爲會話 Bean 聲明遠程業務接口。用在接口上時,將該接口指定爲遠程業務接口。在這種情況下,不提供任何 value()。
3.Stateful
Component-defining annotation for a stateful session bean.
4.Stateless
Component-defining annotation for a stateless session bean.
5.Timeout
Designates a method on a stateless session bean class or message driven bean class that should receive EJB timer expirations for that bean.
6.TransactionAttribute
When applied at the TYPE-level, designates the default transaction attribute for all business methods of the session or message driven bean.
7.Interceptors
Declares an ordered list of interceptors for a class or method.
8.Lock
Declares a concurrency lock for a method of a singleton bean with container-managed concurrency.
9.Schedule(排程器)
Schedule a timer for automatic creation with a timeout schedule based on a cron-like time expression.
10.Startup
Mark a Singleton for eager loading during application initialization.
標記一個單例在應用初始化期間
11.ConcurrencyManagement
Declares a Singleton or Stateful session bean's concurrency management type.
@Startup
@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
@Lock(LockType.WRITE)
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
@Stateless
@Local(LawsuitService.class)
@TransactionAttribute(TransactionAttributeType.SUPPORTS)