This document lists the rules imposed on EJB deployment descriptors and code as per the EJB 2.0 specification.
Note: The EJB Verifier verifies modules and beans developed to the EJB 2.0 specification (including CMP 1.x beans in accordance with the EJB .20 specification). It does not support modules and beans developed to the EJB 1.1 specification.
The EJB Verifier in JDeveloper 9.0.4 implements many of these rules; the remainder should be implemented by 9.0.5. The implemented rules are identified by a filled bullet character, the unimplemented ones by an unfilled bullet character. For example:
There is a fair amount of duplication between rules for session, entity CMP, and entity BMP beans and rules for remote and local homes, etc. Thus, many rules appear multiple times differing only by the specification reference.
Messages are worded to describe the scope of an issue properly. For example, CMP 2.x entity beans must be abstract, but BMP and CMP 1.x entity beans must not. So the message refers to "CMP 2.x entity bean", "BMP entity bean", or "CMP 1.x entity bean", as appropriate. On the other hand, all entity beans must extend javax.ejb.EntityBean, so the message refers only to "entity bean".
Some rules have [warning] appended. These typically flag things that are specifically discouraged by the spec, but not absolutely prohibited. Usually in these cases, the message text contains "should" rather than "must".
Rules are grouped by enclosing DTD element. The paths in parentheses at the end of each rule designate the specific DTD element to which the rule applies, relative to the enclosing DTD element ("." indicates the "enclosing" element itself).
<entity>
, <message-driven>
,
<session>
<class-name>
already declared (ejb-name)
<class-name>
not found in project
(ejb-class)
<name>
already declared
(env-entry/env-entry-name)
<class-name>
must be
primitive wrapper type or String (env-entry/env-entry-type)
<class-name>
(env-entry/env-entry-value)
<name>
already declared
(ejb-ref/ejb-ref-name, ejb-local-ref/ejb-ref-name)
<name>
should be prefixed with
"ejb/" (ejb-ref/ejb-ref-name, ejb-local-ref/ejb-ref-name)
[warning]
<interface>
interface
<class-name>
not found in project (ejb-ref/remote,
ejb-ref/home, ejb-ref/local, ejb-ref/local-home)
<interface>
interface must extend
<class-name>
(ejb-ref/remote, ejb-ref/home, ejb-ref/local,
ejb-ref/local-home)
<name>
assumed to be externally defined
(ejb-ref/ejb-link, ejb-local-ref/ejb-link) [warning]
<name>
already referenced
(resource-ref/res-ref-name)
<class-name>
not found in
project (resource-ref/res-type)
<name>
already referenced
(resource-env-ref/resource-env-ref-name)
<class-name>
not found in
project (resource-env-ref/resource-env-ref-type)
<name>
not valid XML name
(NMTOKEN) (security-identity/run-as/role-name)
<name>
not declared in assembly
descriptor (security-identity/run-as/role-name)
<entity>
, <session>
<interface>
interface <class-name>
not found in project (remote, home, local, local-home)
<name>
not linked to
security role (security-role-ref/role-name)
<name>
not valid XML name
(NMTOKEN) (security-role-ref/role-link)
<name>
not declared in assembly
descriptor (security-role-ref/role-link)
<session>
<message-driven>
<interface>
interface not applicable to
message-driven bean (remote, home, local, local-home)
<entity>
<name>
must be valid Java
identifier (ejb-name, 10.3.13)
<name>
must not be reserved EJB QL
identifier (ejb-name, 11.2.6.1)
<class-name>
not found in project
(prim-key-class)
<entity>
CMP
<name>
must be defined to correspond to
primary key field <name>
(prim-key-class)
<name>
must be public
(prim-key-class)
<name>
must be a CMP field
(primkey-field)
<class-name>
(primkey-field)
<entity>
CMP 2.x
<name>
of CMP 2.x bean not valid XML name
(NMTOKEN) (ejb-name)
<name>
of CMP 2.x bean should not be EJB QL
reserved word (ejb-name, 10.6.14)
<name>
must be valid Java
identifier (abstract-schema-name, 10.3.13)
<name>
should not be reserved
EJB QL identifier (ejb-name, 10.6.14)
<signature>
(.)
<signature>
not found in entity bean
class (query/query-method)
<signature>
not found in entity bean
class (query/query-method)
<name>
must start with lowercase
letter (cmp-field/field-name)
<name>
must be a valid Java
identifier (cmp-field/field-name, 10.3.1)
<entity>
CMP 1.x
<name>
must be defined in
<class-name>
(cmp-field/field-name)
<entity>
BMP
<ejb-relation>
<name>
already used
(ejb-relation-name)
<name>
already used
(ejb-relationship-role/ejb-relationship-role-name)
<name>
not defined
(ejb-relationship-role/relationship-role-source/ejb-name)
<name>
cannot participate in a relationship
because it is not a CMP 2.x entity bean
(ejb-relationship-role/relationship-role-source/ejb-name)
<name>
must be a valid Java
identifier (cmp-field/field-name, 10.3.1)
<signature>
for CMR field
<name>
not found in <class-name>
(ejb-relationship-role/cmr-field/cmr-field-name)
<assembly-descriptor>
<name>
not valid XML name
(NMTOKEN) (security-role/role-name)
<name>
already declared
(security-role/role-name)
<name>
not declared
(method-permission/role-name)
<name>
not known
(method-permission/method/ejb-name,
container-transaction/method/ejb-name, exclude-list/method/ejb-name)
<signature>
must be defined in
<interface-list>
(method-permission/method,
container-transaction/method, exclude-list/method)
<signature>
already assigned transaction
attribute (container-transaction/method)
<unchecked>
overrides security role assignments for
method <signature>
(method-permission/method)
[warning] (.)
<exclude-list>
overrides security role assignments
for method <signature>
(exclude-list/method)
[warning]
<signature>
has no security role assignment
(assembly-descriptor) [warning]
<large-icon>
, <small-icon>
(in
<ejb-jar>
, <entity>
, <message-driven>
, <session>
)
<file>
not found in project (.)
<file>
not a valid GIF or JPEG image (.)
<ejb-client-jar>
<file>
not found in workspace (.)
[warning]
<name>
must not start with
"ejb" (7.10.4)
<signature>
must be
implemented (7.10.5)
<signature>
must be
implemented (7.10.7)
<signature>
must be
implemented (7.10.6)
<signature>
must be
implemented (7.10.8)
<signature>
must correspond to a
create method (7.10.4, 7.10.6)
<class-name>
(7.10.5)
<class-name>
(7.10.7)
<name>
method must not use SessionContext
method <name>
(7.6.1)
<name>
method must not use UserTransaction
method <name>
(7.6.1)
<name>
method must not use enterprise bean
method <name>
(7.6.1)
<name>
method must not use resource manager
method <name>
(7.6.1)
<signature>
must throw <class-name>
thrown by implementing method (7.10.5)
<class-name>
must not be exposed
(7.10.5)
<class-name>
must not be
exposed (7.10.5)
<signature>
must throw RemoteException
(7.10.5)
<signature>
must not derive from both
<class-name>
and <class-name>
(7.10.5)
<name>
must be primitive type or String
(7.10.5)
<signature>
and <signature>
map to the same IDL name (7.10.5)
<class-name>
assumed to be serializable or
otherwise RMI/IIOP compatible (7.10.5) [warning]
<class-name>
must not be exposed
(6.7.2)
<class-name>
must not be
exposed (6.7.2)
<signature>
must return remote interface
<class-name>
(7.10.6)
<signature>
must throw RemoteException
(7.10.6)
<signature>
must throw CreateException
(7.10.6)
<signature>
must throw <class-name>
thrown by implementing ejbCreate method (7.10.6)
<signature>
must not derive from both
<class-name>
and <class-name>
(RMI/IIOP rule) (7.10.6)
<name>
must be primitive type or String
(7.10.6)
<signature>
and <signature>
map to the same IDL name (7.10.6)
<class-name>
assumed to be serializable or
otherwise RMI/IIOP compatible (7.10.6) [warning]
<signature>
must not throw RemoteException
(7.10.7)
<signature>
must throw <class-name>
thrown by implementing method (7.10.7)
<signature>
must not throw RemoteException
(7.10.8)
<signature>
must throw CreateException
(7.10.8)
<signature>
must return local interface
<class-name>
(7.10.8)
<signature>
must throw <class-name>
thrown by implementing ejbCreate method (7.10.8)
<signature>
(or else not implement remote interface)
(10.6.2)
<signature>
(or else not implement local interface)
(10.6.2)
<signature>
must be
implemented (10.6.10)
<signature>
must be implemented
(10.6.12)
<class-name>
(10.6.4)
<signature>
must correspond to a
local or remote home interface create method (10.6.10, 10.6.12)
<signature>
must be
implemented (10.6.5)
<signature>
must correspond to
an ejbCreate method (10.6.5)
<signature>
) method (10.6.5)
<signature>
must correspond to a
local or remote home interface business method (10.6.10, 10.6.12)
<signature>
must not be implemented
(10.6.2)
<signature>
must correspond to
query element in deployment descriptor (10.5.7)
<signature>
must be
implemented (10.6.9)
<signature>
must be
implemented (10.6.11)
<signature>
must be public (10.6.8)
<signature>
must not be final
(10.6.8)
<signature>
must not be static
(10.6.8)
<signature>
return type must be
<class-name>
(10.6.10, 10.6.12)
<signature>
must correspond to a
local or remote interface business method (10.6.10, 10.6.12)
<name>
must not start with
"ejb" (10.6.8)
<name>
accessor
<signature>
(cmp-field/field-name, 10.3.1)
<name>
accessor
<signature>
(cmr-field/field-name, 10.3.1)
<name>
corresponding to CMP field <name>
(cmp-field/field-name, 10.3.1)
<name>
corresponding to CMR field <name>
(10.3.1)
<name>
must not access CMP field (10.5.2)
<name>
must not access CMR field (10.5.2)
<name>
method must not use EntityContext
method <name>
(10.5.5)
<name>
method must not use enterprise bean
method <name>
(10.5.5)
<name>
method must not use resource manager
method <name>
(10.5.5)
<name>
must not set primary key CMP field
(10.3.1)
<signature>
must throw <class-name>
thrown by implementing method (7.10.5)
<class-name>
must not be exposed
(10.3.1)
<class-name>
must not be
exposed (10.3.1)
<signature>
must throw RemoteException
(10.6.9)
<signature>
must not derive from both
<class-name>
and <class-name>
(10.6.9)
<name>
must be primitive type or String
(10.6.9)
<signature>
and <signature>
map to the same IDL name (10.6.9)
<class-name>
assumed to be serializable or
otherwise RMI/IIOP compatible (10.6.9) [warning]
<name>
(10.3.1)
<signature>
(10.3.1)
<signature>
must correspond to query
element in deployment descriptor (10.6.14)
<class-name>
must not be exposed
(10.6.10)
<class-name>
must not be
exposed (10.6.10)
<signature>
must return remote
interface <class-name>
(10.6.10)
<signature>
must throw
CreateException (10.6.10)
<signature>
must throw
<class-name>
thrown by implementing ejbCreate method
(10.6.10)
<signature>
must throw
<class-name>
thrown by implementing ejbPostCreate method
(10.6.10)
<signature>
must return remote
interface <class-name>
or collection thereof
(10.6.10)
<signature>
must throw
FinderException (10.6.10)
<name>
must not start with
"remove" (10.6.10)
<name>
must not start with "ejb"
(10.6.8)
<signature>
must throw RemoteException
(10.6.10)
<signature>
must not derive from both
<class-name>
and <class-name>
(RMI/IIOP rule) (10.6.10)
<name>
must be primitive type or String
(10.6.10)
<signature>
and <signature>
map to the same IDL name (10.6.10)
<class-name>
assumed to be serializable or
otherwise RMI/IIOP compatible (10.6.10) [warning]
<signature>
must not throw RemoteException
(10.6.11)
<signature>
must throw <class-name>
thrown by implementing method (10.6.11)
<name>
(10.3.1) [warning]
<class-name>
) (10.6.12)
<signature>
must correspond to query
element in deployment descriptor (10.6.14)
<signature>
must return local
interface <class-name>
(10.6.12)
<signature>
must throw
CreateException (10.6.12)
<signature>
must throw
<class-name>
thrown by implementing ejbCreate method
(10.6.12)
<signature>
must throw
<class-name>
thrown by implementing ejbPostCreate method
(10.6.12)
<signature>
must return local
interface <class-name>
or collection thereof
(10.6.12)
<signature>
must throw
FinderException (10.6.12)
<name>
must not start with
"remove" (10.6.12)
<name>
must not start with "ejb"
(10.6.8)
<signature>
must not throw RemoteException
(10.6.12)
<class-name>
assumed to be
serializable (10.6.3)
<class-name>
must be public
(10.6.3)
<class-name>
must not be
abstract (10.6.3)
<signature>
(or else not implement remote interface)
(12.2.2)
<signature>
must be
implemented (12.2.9)
<class-name>
(12.2.3)
<signature>
must be
implemented (12.2.4)
<signature>
must correspond to
an ejbCreate method (12.2.4)
<signature>
must be
implemented (12.2.9)
<signature>
must be public (12.2.7)
<signature>
must not be final
(12.2.7)
<signature>
must not be static
(12.2.7)
<signature>
return type must be
<class-name>
(12.2.8, 12.2.10)
<signature>
should not throw
RemoteException (12.2.7) [warning]
<name>
must not start with
"ejb" (12.2.7)
<signature>
(or else not implement local interface)
(12.2.2)
<signature>
must be implemented
(12.2.11)
<signature>
must correspond to a
local or remote home interface create method (12.2.9, 12.2.11)
<signature>
must be implemented
(12.2.9)
<signature>
must be implemented
(12.2.11)
<class-name>
(12.2.5,
12.1.7)
<signature>
must correspond to a
local or remote home interface finder method (12.2.9, 12.2.11)
<signature>
must be implemented
(12.2.9)
<signature>
must be implemented
(12.2.11)
<signature>
must correspond to a
local or remote home interface business method (12.2.9, 12.2.11)
<signature>
must correspond to a
local or remote interface business method (12.2.8, 12.2.10)
<signature>
must be
implemented (12.2.9)
<signature>
must be
implemented (12.2.11)
<name>
must be public
(14.1.1)
<name>
must not be
transient (14.1.1)
<name>
assumed to be
serializable (14.1.1)
<signature>
must correspond to a
remote home interface create method (12.2.9, 12.2.11)
<signature>
must correspond to a
remote interface business method (12.2.8, 12.2.10)
<name>
method must not use EntityContext
method <name>
(10.5.5)
<name>
method must not use enterprise bean
method <name>
(10.5.5)
<name>
method must not use resource manager
method <name>
(10.5.5)
<signature>
must throw <class-name>
thrown by implementing method (12.2.8)
<class-name>
must not be exposed
(12.2.8)
<class-name>
must not be
exposed (12.2.8)
<signature>
must throw RemoteException
(12.2.8)
<signature>
must not derive from both
<class-name>
and <class-name>
(12.2.8)
<name>
must be primitive type or String
(12.2.8)
<signature>
and <signature>
map to the same IDL name (12.2.8)
<class-name>
assumed to be serializable or
otherwise RMI/IIOP compatible (12.2.8) [warning]
<signature>
must return remote
interface <class-name>
(12.2.9)
<signature>
must throw
CreateException (12.2.9)
<signature>
must throw
<class-name>
thrown by implementing ejbCreate method
(12.2.9)
<signature>
must throw
<class-name>
thrown by implementing ejbPostCreate method
(12.2.9)
<signature>
must return remote
interface <class-name>
or collection thereof
(12.2.9)
<signature>
must throw
FinderException (10.6.10)
<signature>
must throw
<class-name>
thrown by implementing ejbFind method
(12.2.9)
<signature>
must throw RemoteException
(12.2.9)
<signature>
must not derive from both
<class-name>
and <class-name>
(12.2.9)
<name>
must be primitive type or String
(12.2.9)
<signature>
and <signature>
map to the same IDL name (12.2.9)
<class-name>
assumed to be serializable or
otherwise RMI/IIOP compatible (12.2.9) [warning]
<class-name>
must not be exposed
(12.2.9)
<class-name>
must not be
exposed (12.2.9)
<name>
must be named "create"
(14.1.8)
<signature>
must not throw RemoteException
(12.2.10)
<signature>
must throw <class-name>
thrown by implementing method (12.2.10)
<signature>
must return local
interface <class-name>
(12.2.11)
<signature>
must throw
CreateException (12.2.11)
<signature>
must throw
<class-name>
thrown by implementing ejbCreate method
(12.2.11)
<signature>
must throw
<class-name>
thrown by implementing ejbPostCreate method
(12.2.11)
<class-name>
) (12.2.10)
<signature>
must return local
interface <class-name>
or collection thereof
(12.2.11)
<signature>
must throw
FinderException (12.2.11)
<signature>
must throw
<class-name>
thrown by implementing ejbFind method
(12.2.11)
<name>
must not start with "ejb"
(12.2.7)
<name>
must not start with
"remove" (12.2.11)
<signature>
must throw
<class-name>
thrown by implementing home method (12.2.11)
<signature>
must not throw RemoteException
(12.2.11)
<class-name>
must be
public (14.1.9)
<class-name>
must have
public no-argument constructor (14.1.9)
<name>
must be public
(14.1.9)
<name>
must not be
static (14.1.9)
<name>
must correspond
to a CMP field (14.1.9)
<class-name>
(15.7.3)
<class-name>
(15.7.4)
<class-name>
(15.7.5)
<name>
method must not use
MessageDrivenContext method <name>
(15.4.3)
<name>
method must not use UserTransaction
method <name>
(15.5.1)
<name>
method must not use enterprise bean
method <name>
(15.5.1)
<name>
method must not use resource manager
method <name>
(15.5.1)
Copyright © 1997, 2004, Oracle. All rights reserved.