# $Id: EJB11Messages.properties,v 1.3 2002/07/04 16:55:20 lqd Exp $ # # Spec Violation Messages for the EJB 1.1 Bean Verifier # # # CHAPTER 6. Session Bean Component Contract # # # Section 6.5.: Protocol between a session bean instance and its container # # Section 6.5.1.: The required SessionBean interface 6.5.1 = Session bean does not implement the required SessionBean interface. # Section 6.5.3.: The optional SessionSychronization interface 6.5.3.a = A stateless Session bean must not implement the SessionSynchronization interface. 6.5.3.b = Only a stateful Session bean with container-managed transaction demarcation may implement the SessionSynchronization interface. # Section 6.5.5.: Session bean's ejbCreate( ... ) methods 6.5.5 = Session bean does not define the required ejbCreate method. # # Section 6.6.: STATEFUL Session Bean State Diagram # # Section 6.6.1: Operations allowed in the methods of a stateful session bean # class 6.6.1 = A bean with bean-managed transaction demarcation cannot implement the SessionSynchronization interface. # # Section 6.8.: Stateless session beans # 6.8.a = The home interface of a stateless session bean must have one create method that takes no arguments. 6.8.b = The create method of a stateless session bean home interface must return the session bean's remote interface. 6.8.c = There can be only one create method in the home interface of a stateless session bean. # # Section 6.10.: The responsibilities of the bean provider # # Section 6.10.2.: Session bean class 6.10.2.a = Session bean class must be defined as public. 6.10.2.b = Session bean class must not be final. 6.10.2.c = Session bean class must not be abstract. 6.10.2.d = Session bean class must have a public constructor that takes no arguments. 6.10.2.e = The class must not define the finalize() method. # Section 6.10.3.: ejbCreate methods 6.10.3.a = The ejbCreate(...) method of a session bean class must be declared as public. 6.10.3.b = The ejbCreate(...) method of a session bean class must not be declared as final or static. 6.10.3.c = The return type of an ejbCreate(...) method must be void. 6.10.3.d = The method arguments of an ejbCreate(...) method must be legal types for RMI/IIOP. # Section 6.10.5: Session bean's remote interface 6.10.5.a = The remote interface must extend the javax.ejb.EJBObject interface. 6.10.5.b = The method arguments in the remote interface must be of valid types for RMI/IIOP. 6.10.5.c = The method return values in the remote interface must be of valid types for RMI/IIOP. 6.10.5.d = The methods in the remote interface must include java.rmi.RemoteException in their throws clause. 6.10.5.e = 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. 6.10.5.f = The methods defined in the remote interface must have a matching method in the bean's class with the same return type. 6.10.5.g = 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 6.10.6: Session bean's home interface 6.10.6.a = A session bean's home interface must extend the javax.ejb.EJBHome interface. 6.10.6.b = The method arguments in the home interface must be of valid types for RMI/IIOP. 6.10.6.c = The method return values in the home interface must be of valid types for RMI/IIOP. 6.10.6.d = The methods in the home interface must include java.rmi.RemoteException in their throws clause. 6.10.6.e = A session bean's home interface must define one or more create(...) methods. 6.10.6.f = Each create(...) method in the session bean's home interface must have a matching ejbCreate(...) method in the session bean's class. 6.10.6.g = The return type for a create(...) method must be the session bean's remote interface type. 6.10.6.h = 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. 6.10.6.i = The throws clause of a create(...) method must include the javax.ejb.CreateException. # # CHAPTER 9. Entity Bean Component Contract # # # Section 9.2.: Responsibilities of the Enterprise Bean Provider # # Section 9.2.2.: Enterprise bean class 9.2.2.a = The entity bean's class must implement, directly or indirectly, the javax.ejb.EntityBean interface. 9.2.2.b = The entity bean class must be defined as public. 9.2.2.c = The entity bean class must not be defined as abstract. 9.2.2.d = The entity bean class must not be defined as final. 9.2.2.e = The entity bean class must define a public constructor that takes no arguments. 9.2.2.f = The entity bean class must not define the finalize() method. # Section 9.2.3.: ejbCreate methods 9.2.3.a = The ejbCreate(...) method of an entity bean class must be declared as public. 9.2.3.b = The ejbcreate(...) method of an entity bean class must not be declared as final or static. 9.2.3.c = The return type of an ejbCreate(...) method must be the entity bean's primary key type. 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. # Section 9.2.4.: ejbPostCreate methods 9.2.4.a = For each ejbCreate(...) method, the entity bean class must define a matching ejbPostCreate(...) method. 9.2.4.b = The ejbPostCreate(...) method must be declared as public. 9.2.4.c = The ejbPostCreate(...) method must not be declared as static. 9.2.4.d = The ejbPostCreate(...) method must not be declared as final. 9.2.4.e = The ejbPostCreate(...) method must return void. # Section 9.2.5.: ejbFind methods 9.2.5.a = Every entity bean must define the ejbFindByPrimaryKey method. 9.2.5.b = The return type of the ejbFindByPrimaryKey method must be the primary key type. 9.2.5.c = The ejbFindByPrimaryKey method must be a single-object finder. 9.2.5.d = A finder method must be declared as public. 9.2.5.e = A finder method must not be declared as final. 9.2.5.f = A finder method must not be declared as static. 9.2.5.g = The method argument types of a finder method must be legal types for RMI/IIOP. 9.2.5.h = The finder method return type must be either the entity bean's primary key type or an instance of the Enumeration or the Collection interface. # Section 9.2.7.: Entity bean's remote interface 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 # Section 9.2.8.: Entity bean's home interface 9.2.8.a = Entity bean's home interface must extend the javax.ejb.EJBHome interface. 9.2.8.b = The method arguments in the home interface must be of valid types for RMI/IIOP. 9.2.8.c = The method return values in the home interface must be of valid types for RMI/IIOP. 9.2.8.d = The methods in the home interface must include java.rmi.RemoteException in their throws clause. 9.2.8.e = Each method defined in the entity bean's home interface must be either create or finder method. 9.2.8.f = Each create(...) method in the entity bean's home interface must have a matching ejbCreate(...) method in the entity bean's class. 9.2.8.g = The return type for a create(...) method must be the entity bean's remote interface type. 9.2.8.h = 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. 9.2.8.i = The throws clause of a create(...) method must include the javax.ejb.CreateException. 9.2.8.j = Each finder method must match one of the ejbFind methods defined in the entity bean class. 9.2.8.k = 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). 9.2.8.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. 9.2.8.m = The throws clause of a finder method must include the javax.ejb.FinderException. # Section 9.2.9.: Entity bean's primary key class 9.2.9.a = The primary key class must be a legal Value Type in RMI-IIOP. 9.2.9.b = The primary key class must override equals(). 9.2.9.c = The primary key class must override hashCode(). # # Section 9.4.7.: primary key type # # Section 9.4.7.1.: Primary key that maps to a single field in the # entity bean class 9.4.7.1.a = Only CMP entity beans may use the primkey-field element. 9.4.7.1.b = The primkey-field element must name a public field in the bean implementation class. 9.4.7.1.c = The type of the field named in the primkey-field element must match the class in the prim-key-class element. 9.4.7.1.d = The field named in the primkey-field element must also be a container-managed field. # Section 9.4.7.2.: Primary key that maps to multiple fields in the # entity bean class 9.4.7.2.a = The primary key class must be public. 9.4.7.2.b = All fields in the primary key class must be public. 9.4.7.2.c = At least one field in the primary key class must be non-static. # # CHAPTER 16. Deployment Descriptor # # Section 16.2.: Bean Provider's responsibilities 16.2.b = The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods. 16.2.c = The Bean Provider must specify the fully-qualified name of the enterprise bean's home interface in the home element. 16.2.d = The Bean Provider must specify the fully-qualified name of the enterprise bean's remote interface in the remote element. 16.2.e = The Bean Provider must specify the fully-qualified name of the enterprise bean's primary key class in the prim-key-class element. # Section 16.5.: Deployment Descriptor DTD 16.5.a = An entity bean requires a primary key class (prim-key-class tag).