EJBVerification
See also JPAVerification
Implemented
| Assertion | Description | Priority |
|---|---|---|
| HasNoArgConstructor | 1 | |
| SBSuperClassisNotSB | A session bean must not extend another session bean. | 1 1 |
| BeanImplementsBI | In EJB 3.0, it is recommended that a bean class implements its business interface. That way, user does not have to worry about method matching, compiler will take care of that... | 1 1 |
| PublicConstructor | 1 | |
| BMnotPartOfRBIandLBI | The invocation semantics of a remote business method is very different from that of a local business method. For this reason, when a session bean has remote as well as local business method, there should not be any method common to both the interfaces. example below is an incorrect use case: Remote public interface I1 { void foo();}, Local public interface I2 { void foo();}, Stateless public class Foo implements I1, I2 { ... } | 1 1 |
| WSisSLSB | if a class is part of ejb-jar and is annotated as @WebService, then it must be designated as a stateless session bean. A stateful session bean can not be annotated as WebService. | 1 |
| BeanHasDifferentLBIandRBI | The same business interface cannot be both a local and a remote business interface of the bean | 2 |
| NonAbstractClass | 3 | |
| NonFinalClass | 2 | |
| PublicClass | 3 | |
| LocalAnnotatedBeanHasLBI | If a session bean is annotated as @Local, then it must have a local business interface. | 3 |
| RemoteAnnotatedBeanHasRBI | If a session bean is annotated as @Remote, then it must have a remote business interface. | 3 |
| SessionSynchImplementedBySFSBOnly | Only stateful session bean(SFSB) can implement SessionSynchronization i/f. | 3 |
| ValueNotSpecifiedForRemoteAnnotationInterface | If an interface is annotated with @Remote, then value attribute must not be specified. In other words, if value is specified for @Remote, then it must be annotating a class (not an interface). | 3 |
Pending
| Assertion | Description | Priority |
|---|---|---|
| BeanUsesLBIasLBI | It is also an error if @Local is specified both on the bean class and on the referenced interface and the values differ. | 3 |
| BeanUsesRBIasRBI | It is also an error if @Remote is specified both on the bean class and on the referenced interface and the values differ. | 3 |
| BIDoesNotExtendsEJBObject | bean interface cannot extend EJBObject | 3 |
| LBIdoesNotExtendRemote | Local business interface should not extend java.rmi.Remote. This is because, java.rmi.Remote is a marker interface used to designate an interface as remote interface. Since a local business interface can not be used as a remote business interface, it is useless for such an interafce to extend java.rmi.Remote. | 3 |
| NoFinalizeMethod | 3 | |
| SFSBdoesNotImplementTimedObject | Timers cannot be created for stateful session beans. It may be supported in future version of the spec, but not now. | 3 |
| TopLevelClass | 3 | |
| BMandRemoteExceptionWarning | The throws clause should not include the java.rmi.RemoteException. The methods of the business interface may only throw the java.rmi.RemoteException if the interface extends java.rmi.Remote. | 3 |

