# $Id: EJB20Messages.properties,v 1.3.2.5 2002/12/12 12:58:35 lqd Exp $ # # Spec Violation Messages for the EJB 2.0 Bean Verifier # # # CHAPTER 7. Session Bean Component Contract # # # Section 7.5.: Protocol between a session bean instance and its container # # Section 7.5.3.: The optional SessionSynchronization interface 7.5.3.a = A stateless Session bean must not implement the SessionSynchronization interface. 7.5.3.b = Only a stateful Session bean with container-managed transaction demarcation may implement the SessionSynchronization interface. # # Section 7.6.: STATEFUL Session Bean State Diagram # # Section 7.6.1.: Operations allowed in the methods of a stateful session bean # class 7.6.1 = A bean with bean-managed transaction demarcation cannot implement the SessionSynchronization interface. # # Section 7.10.: The responsibilities of the bean provider # # Section 7.10.1.: Classes and interfaces 7.10.1 = The session bean must implement either a remote home and remote, or a local home and a local interface. # Section 7.10.2.: Session bean class 7.10.2.a = A Session bean must implement, directly or indirectly, the javax.ejb.SessionBean interface. 7.10.2.b1 = Session bean class must be defined as public. 7.10.2.b2 = Session bean class must not be final. 7.10.2.b3 = Session bean class must not be abstract. 7.10.2.c = Session bean class must have a public constructor that takes no arguments. 7.10.2.d = The class must not define the finalize() method. # Section 7.10.3.: ejbCreate methods 7.10.3 = A Session bean must define at least one ejbCreate method. 7.10.3.b = The ejbCreate(...) method of a session bean class must be declared as public. 7.10.3.c = The ejbCreate(...) method of a session bean class must not be declared as final or static. 7.10.3.d = The return type of an ejbCreate(...) method must be void. 7.10.3.e = The method arguments of an ejbCreate(...) method must be legal types for RMI/IIOP. # Section 7.10.5.: Session bean's remote interface 7.10.5.a = The remote interface must extend the javax.ejb.EJBObject interface. 7.10.5.b1 = The method arguments in the remote interface must be of valid types for RMI/IIOP. 7.10.5.b2 = The method return values in the remote interface must be of valid types for RMI/IIOP. 7.10.5.b3 = The methods in the remote interface must include java.rmi.RemoteException in their throws clause. 7.10.5.d1 = The methods defined in the remote interface must have a matching method in the bean's class with the same name and same number and types of arguments. 7.10.5.d2 = The methods defined in the remote interface must have a matching method in the bean's class with the same return type. 7.10.5.d3 = All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the remote interface. # Section 7.10.6.: Session bean's remote home interface 7.10.6.a = A session bean's home interface must extend the javax.ejb.EJBHome interface. 7.10.6.b1 = The method arguments in the home interface must be of valid types for RMI/IIOP. 7.10.6.b2 = The method return values in the home interface must be of valid types for RMI/IIOP. 7.10.6.b3 = The methods in the home interface must include java.rmi.RemoteException in their throws clause. 7.10.6.d1 = A session bean's remote home interface must define one or more create(...) methods. 7.10.6.d2 = A stateless session bean must define exactly one create() method with no arguments. 7.10.6.e = Each create(...) method in the session bean's home interface must have a matching ejbCreate(...) method in the session bean's class. 7.10.6.f = The return type for a create(...) method must be the session bean's remote interface type. 7.10.6.g = All the exceptions defined in the throws clause of the matching ejbCreate(...) method of the enterprise bean class must be included in the throws clause of a matching create(...) method. 7.10.6.h = The throws clause of a create(...) method must include the javax.ejb.CreateException. # Section 7.10.7.: Session bean's local interface 7.10.7.a = The local interface must extend the javax.ejb.EJBLocalObject interface. 7.10.7.b = The methods in the local interface must not include java.rmi.RemoteException in their throws clause. 7.10.7.d1 = The methods defined in the local interface must have a matching method in the bean's class with the same name and same number and types of arguments. 7.10.7.d2 = The methods defined in the local interface must have a matching method in the bean's class with the same return type. 7.10.7.d3 = All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the local interface. # Section 7.10.8.: Session bean's local home interface 7.10.8.a = A session bean's local home interface must extend the javax.ejb.EJBLocalHome interface. 7.10.8.b = The methods in the local home interface must not include java.rmi.RemoteException in their throws clause. 7.10.8.d1 = A session bean's local home interface must define one or more create(...) methods. 7.10.8.d2 = The local home interface of a stateless session bean must have one create method that takes no arguments. 7.10.8.e = Each create(...) method in the session bean's local home interface must have a matching ejbCreate(...) method in the session bean's class. 7.10.8.f = The return type for a create(...) method must be the session bean's local interface type. 7.10.8.g = All the exceptions defined in the throws clause of the matching ejbCreate(...) method of the enterprise bean class must be included in the throws clause of a matching create(...) method. 7.10.8.h = The throws clause of a create(...) method must include the javax.ejb.CreateException. # # CHAPTER 9. Client View of an Entity # # # Section 9.2.: Remote Clients # # Section 9.2.3.: 9.2.3.d = The method arguments of an ejbCreate(...) method must be legal types for RMI/IIOP. 9.2.3.e = The return value type of an ejbCreate(...) method must be legal type for RMI/IIOP. 9.2.5.g = The method argument types of a finder method must be legal types for RMI/IIOP. 9.2.7.a = Entity bean's remote interface must extend the javax.ejb.EJBObject interface. 9.2.7.b = The method arguments in the remote interface must be of valid types for RMI/IIOP. 9.2.7.c = The method return values in the remote interface must be of valid types for RMI/IIOP. 9.2.7.d = The methods in the remote interface must include java.rmi.RemoteException in their throws clause. 9.2.7.e = For each method defined in the remote interface, there must be a matching method in the entity bean's class that has the same name and argument types. 9.2.7.f = For each method defined in the remote interface, there must be a matching method in the entity bean's class that has the same return type. 9.2.7.g = All the exceptions defined in the throws clause of a matching method in the entity bean's class must be defined in the throws clause of the method of the remote interface. 9.2.7.h = The exceptions thrown by methods in the remote interface must be valid types for RMI/IIOP 9.2.9.a = The primary key class must be a legal Value Type in RMI-IIOP. # # CHAPTER 10. Entity Bean Component Contract for Container-Managed Persistence # 10.5.6 = Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor. 10.5.7 = Every select method must be associated with a query element in the deployment descriptor. # Section 10.6.: Repsonsibilities of the Enterprise Bean Provider # # Section 10.6.1.: Classes and interfaces 10.6.1 = The Bean Provider must provide a remote interface and a remote home interface or a local interface and a local home interface for the bean. 10.6.1.a = The Bean Provider must provide a primary key class. # Section 10.6.2.: Enterprise bean class 10.6.2.a = The entity bean's class must implement, directly or indirectly, the javax.ejb.EntityBean interface. 10.6.2.b = The entity bean class must be defined as public and abstract. 10.6.2.c = The entity bean class must define a public constructor that takes no arguments. 10.6.2.d = The entity bean class must not define the finalize() method. 10.6.2.g = The entity bean class must define a get accessor for each CMP field. 10.6.2.h = The entity bean class must define a set accessor for each CMP field. 10.6.2.i = CMP entity beans may not define the implementation of a finder. 10.6.2.j = CMP entity beans may not define the implementation of a finder. # Section 10.6.4.: ejbCreate methods 10.6.4.b = The ejbCreate(...) method of an entity bean class must be declared as public. 10.6.4.c = The ejbcreate(...) method of an entity bean class must not be declared as final or static. 10.6.4.d = The return type of an ejbCreate(...) method must be the entity bean's primary key type. 10.6.4.f = The return value type of an ejbCreate(...) method must be legal type for RMI/IIOP. 10.6.4.g = The throws clause must define the javax.ejb.CreateException. # Section 10.6.5.: ejbPostCreate methods 10.6.5.a = For each ejbCreate(...) method, the entity bean class must define a matching ejbPostCreate(...) method. 10.6.5.b = The ejbPostCreate(...) method must be declared as public. 10.6.5.c = The ejbPostCreate(...) method must not be declared as static. 10.6.5.d = The ejbPostCreate(...) method must not be declared as final. 10.6.5.e = The ejbPostCreate(...) method must return void. # Section 10.6.6.: ejbHome methods 10.6.6.a = Home methods of an entity bean class must be declared as public. 10.6.6.b = Home methods of an entity bean class must not be declared static. 10.6.6.c = Home methods of an entity bean class must not define java.rmi.RemoteException. # Section 10.6.7.: ejbSelect methods 10.6.7.a = Select methods of an entity bean class must be declared as public. 10.6.7.b = Select methods of an entity bean class must be declared abstract. 10.6.7.c = Select methods of an entity bean class must define javax.ejb.FinderException in their throws clause. # Section 10.6.10.: Entity bean's remote home interface 10.6.10.a = The return type for a find method must be the entity bean's remote interface type (single-object finder) or a collection thereof (for a multi-object finder). 10.6.10.b = The throws clause of a finder method must include the javax.ejb.FinderException. # Section 10.6.13.: Entity bean's primary key class 10.6.13.a = The Bean Provider must specify a primary key class in the deployment descriptor. 10.6.13.b = The primary key type must be a legal Value Type in RMI-IIOP. 10.6.13.c = The class must provide suitable implementation of the equals(Object other) method. 10.6.13.d = The class must provide suitable implementation of the hashCode() method. # Section 10.8.: Primary Keys # Section 10.8.1.: Primary Key that maps to a single field in the entity # bean class 10.8.1.a = The type of the primkey-field must match the primary key class. 10.8.1.b = The primkey-field must be one of the CMP fields of the entity bean. # Section 10.8.2.: Primary key that maps to multiple fields in the entity # bean class 10.8.2.a = The primary key class must be public, and must have a public constructor with no arguments. # # CHAPTER 12. Entity Bean Component Contract for Bean-Managed Persistence # # Section 12.2.: Responsibilities of the Enterprise Bean Provider # # Section 12.2.1.: Classes and interfaces 12.2.1 = The Bean Provider must provide a remote interface and a remote home interface or a local interface and a local home interface for the bean. 12.2.1.a = The bean provider must specify the fully-qualified name of the primary key class for the entity bean. # Section 12.2.2.: Enterprise bean class 12.2.2.a = The class must implement, directly or indirectly, the javax.ejb.EntityBean interface. 12.2.2.b = The class must be defined as public and must not be abstract. 12.2.2.c = The class must not be defined as final. 12.2.2.d = The class must define a public constructor that takes no arguments. 12.2.2.e = The class must not define the finalize() method # Section 12.2.3.: ejbCreate methods 12.2.3.a = The method must be declared as public. 12.2.3.b = The method must not be declared as final or static. 12.2.3.c = The return type must be the entity bean's primary key type. # Section 12.2.4.: ejbPostCreate methods 12.2.4.a = For each ejbCreate(...) method, the entity bean class must define a matching ejbPostCreate(...) method. 12.2.4.b = The method must be declared as public. 12.2.4.c = The method must not be declared as final or static. 12.2.4.d = The return type must be void. # Section 12.2.5.: ejbFind methods 12.2.5.a = A finder method must be declared as public. 12.2.5.b = The method must not be declared as final or static. 12.2.5.d = The return type of a finder method must be the entity bean's primary key type, or a collection of primary keys (see Specification Section 12.1.7) 12.2.5.e = Every entity bean must define the ejbFindByPrimaryKey method. 12.2.5.e1 = The result type for the ejbFindByPrimaryKey method must be the primary key type. 12.2.5.e2 = The ejbFindByPrimaryKey method must be a single-object finder. # Section 12.2.9.: Entity Bean's remote home interface 12.2.9.a = Entity bean's home interface must extend the javax.ejb.EJBHome interface. 12.2.9.b1 = The method arguments defined in an Entity beans home interface MUST be legal types for RMI/IIOP. 12.2.9.b2 = The method return types defined in an Entity beans home interface MUST be legal types for RMI/IIOP. 12.2.9.b3 = Methods defined in an Entity beans home interface MUST include the java.rmi.RemoteException in their throws clause. 12.2.9.d = Each create(...) method in the entity bean's home interface must have a matching ejbCreate(...) method in the entity bean's class. 12.2.9.e = The return type for a create(...) method must be the entity bean's remote interface type. 12.2.9.f = All the exceptions defined in the throws clause of the matching ejbCreate(...) and ejbPostCreate(...) methods of the enterprise bean class must be included in the throws clause of a matching create(...) method. 12.2.9.g = The throws clause of a create(...) method must include the javax.ejb.CreateException. 12.2.9.h = Each finder method must match one of the ejbFind methods defined in the entity bean class. 12.2.9.j = The return type for a find method must be the entity bean's remote interface type (single-object finder) or a collection thereof (for a multi-object finder). 12.2.9.k = All the exceptions defined in the throws clause of an ejbFind method of the entity bean class must be included in the throws clause of the matching find method of the home interface. 12.2.9.l = The throws clause of a finder method must include the javax.ejb.FinderException. 12.2.9.m = Each home method must match a method defined in the entity bean class. # Section 12.2.10.: Entity bean's local interface 12.2.10.a = Entity bean's local interface must extend the javax.ejb.EJBLocalObject interface. 12.2.10.b = The methods in the local interface must not include java.rmi.RemoteException in their throws clause. 12.2.10.c = For each method defined in the local interface, there must be a matching method in the entity bean's class that has the same name and argument types. 12.2.10.d = For each method defined in the remote interface, there must be a matching method in the entity bean's class that has the same return type. 12.2.10.e = All the exceptions defined in the throws clause of a matching method in the entity bean's class must be defined in the throws clause of the method of the local interface. # Section 12.2.11.: Entity bean's local home interface 12.2.11.a = The Entity bean's local home interface must extend the javax.ejb.EJBLocalHome interface. 12.2.11.b = The methods in the local home interface must not include java.rmi.RemoteException in their throws clause. 12.2.11.e = Each create(...) method in the entity bean's local home interface must have a matching ejbCreate(...) method in the entity bean's class. 12.2.11.f = The return type for a create(...) method must be the entity bean's local interface type. 12.2.11.g = All the exceptions defined in the throws clause of the matching ejbCreate(...) and ejbPostCreate(...) methods of the enterprise bean class must be included in the throws clause of a matching create(...) method. 12.2.11.h = The throws clause of a create(...) method must include the javax.ejb.CreateException. 12.2.11.i = Each finder method must match one of the ejbFind methods defined in the entity bean class. 12.2.11.j = The return type for a find method must be the entity bean's local interface type (single-object finder) or a collection thereof (for a multi-object finder). 12.2.11.k = The throws clause of a finder method must include the javax.ejb.FinderException. 12.2.11.l = All the exceptions defined in the throws clause of an ejbFind method of the entity bean class must be included in the throws clause of the matching find method of the home interface. 12.2.11.m = Each local home method must match a method defined in the entity bean class. # Section 12.2.12.: Entity bean's primary key class 12.2.12.a = The Bean Provider must specify a primary key class in the deployment descriptor. 12.2.12.b = The primary key type must be a legal Value Type in RMI-IIOP. 12.2.12.c = The class must provide suitable implementation of the equals(Object other) method. 12.2.12.d = The class must provide suitable implementation of the hashCode() method. # # CHAPTER 15. Message-driven Bean Component Contract # # # Section 15.7.: The responsibilities of the bean provider # # Section 15.7.2.: Message-driven bean class 15.7.2.a = A message driven bean must implement, directly or indirectly, the javax.ejb.MessageDrivenBean interface. 15.7.2.b = A message driven bean must implement, directly or indirectly, the javax.jms.MessageListener interface. 15.7.2.c1 = The message driven bean class must be defined as public. 15.7.2.c2 = The message driven bean class must not be final. 15.7.2.c3 = The message driven bean class must not be abstract. 15.7.2.d = The message driven bean class must have a public constructor that takes no arguments. 15.7.2.e = The message driven bean must not define the finalize() method. # Section 15.7.3.: ejbCreate method 15.7.3.a = The message driven bean must declare one ejbCreate() method. 15.7.3.b = The ejbCreate() method must be declared as public. 15.7.3.c = The ejbCreate() method must not be declared as final or static. 15.7.3.d = The ejbCreate() method return type must be void. 15.7.3.e = The ejbCreate() method must have no arguments. 15.7.3.f = The ejbCreate() method must define no application exceptions. # Section 15.7.4.: onMessage method 15.7.4.a = The message driven bean must declare one onMessage() method. 15.7.4.b = The onMessage() method must be declared as public. 15.7.4.c = The onMessage() method must not be declared as final or static. 15.7.4.e = The onMessage() method must take a single argument of type javax.jms.Message. 15.7.4.f = The onMessage() method must define no application exceptions. # Section 15.7.5.: ejbRemove method 15.7.5.a = The message driven bean must declare one ejbRemove() method. 15.7.5.b = The ejbRemove() method must be declared as public. 15.7.5.c = The ejbRemove() method must not be declared as final or static. 15.7.5.d = The ejbRemove() method return type must be void. 15.7.5.e = The ejbRemove() method must have no arguments. 15.7.5.f = The ejbRemove() method must define no application exceptions. # # CHAPTER 22. Deployment Descriptor # 22.2.b = The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the element. 22.2.c = The bean provider must specify the fully-qualified name of the enterprise bean's remote home interface, if any, in the element. 22.2.d = The bean provider must specify the fully-qualified name of the enterprise bean's remote interface, if any, in the element. 22.2.e = The bean provider must specify the fully-qualified name of the enterprise bean's local home interface, if any, in the element. 22.2.f = The bean provider must specify the fully-qualified name of the enterprise bean's local interface, if any, in the element. # # dd: Comments from deployment descriptor # dd.a = A BMP bean must not include the element in its deployment descriptor. # # jb: JavaBeans Specification violation (getter/setter methods) # jb.7.1.a = set accessor methods must return 'void' jb.7.1.b = get accessor methods must not return 'void'