This inspection checks for each usage of a Seam annotation if it appears on a valid component type.
All Seam annotations are only allowed for classes that are Seam components (except for @Around, @Within, @DataBinderClass and @DataSelectorClass).
Additionally many annotations are only valid for specific component types. Most importantly Entity Beans do not support bijection, context demaracation or transaction demarcation.
More specifically these are the allowed component types for each Seam
annotation:
| Type | Annotation | Stateless Session Bean | Stateful Session Bean | Entity Bean | Java Bean |
|---|---|---|---|---|---|
| Component Definition | @Name | X | X | X | X |
| @Scope | X | X | X | X | |
| @Role | X | X | X | X | |
| @Roles | X | X | X | X | |
| @Intercept | X | X | X | X | |
| @JndiName | X | X | |||
| @Startup | X | X | X | X | |
| Bijection | @In | X | X | X | |
| @Out | X | X | X | ||
| @Unwrap | X | X | X | ||
| @Factory | X | X | X | ||
| @Logger | X | X | X | ||
| @RequestParameter | X | X | X | ||
| Lifecycle | @Create | X | X | ||
| @Destroy | X | X | |||
| @Observer | X | X | X | X | |
| Context Demarcation | @Begin | X | X | X | |
| @BeginTask | X | X | X | ||
| @End | X | X | X | ||
| @EndTask | X | X | X | ||
| @StartTask | X | X | X | ||
| @ResumeProcess | X | X | X | ||
| @CreateProcess | X | X | X | ||
| Transaction Demarcation | @Transactional | X | |||
| @Rollback | X | X | X | ||
| Validation | @IfInvalid | X | X | X | |
| Remoting | @Remote | X on local interface | X on local interface | X | |
| JSF Data Table | @DataModel | X | X | X | |
| @DataModelIndex | X | X | X | ||
| @DataModelSelection | X | X | X | ||
| Data Binding | @DataBinderClass | X | |||
| @DataSelectorClass | X |