|
The ejb.bean tag provides information about the EJB. It is the one compulsory tag
for all EJBs, however not all parameters are applicable for all types of beans,
and some parameters apply differently for different types of beans.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
name
|
text
|
|
Provides the name of the bean that will be used in the ejb-jar.xml
deployment descriptor.
|
true
|
description
|
text
|
|
A description of the bean. Defaults to the first sentence of the
class-level javadoc comment of the bean class.
|
false
|
display-name
|
text
|
|
The display name of the bean.
|
false
|
small-icon
|
text
|
|
The small icon for the bean.
|
false
|
large-icon
|
text
|
|
The large icon for the bean.
|
false
|
generate
|
bool
|
|
Set it to "false" if you want the class be excluded from list of EJBs.
This is useful for abstract EJBs that other EJBs are to derive from. So
you obviously do not want the abstract EJB be wrongly specified in deployment
descriptors as a concrete EJB. Default is "true".
|
false
|
jndi-name
|
text
|
Remote Session and Entity beans
|
Provides the JNDI name of the
bean that will be used in the
vendor specific deployment descriptors.
|
false
|
local-jndi-name
|
text
|
Local Session and Entity beans, EJB 2.0
|
Provides the JNDI name of the bean
that will be used in the vendor
specific deployment descriptors.
It's the JNDI name for the local EJB.
|
false
|
view-type
|
text
|
Session and Entity beans, EJB 2.0
|
Indicates what view-type(s) is(are)
supported by the bean.
Valid options are:
local
remote
both
Default value(s):
"remote" for EJB 1.1 or "both" for EJB 2.0
|
false
|
type
|
text
|
Session and Entity beans
|
Defines the bean's "type".
Valid options are:
CMP
BMP
Stateless
Stateful
Default value(s):
CMP
(for javax.ejb.EntityBean)
Stateless
(for javax.ejb.SessionBean)
|
true
|
transaction-type
|
text
|
Session and Message-driven beans
|
Defines the bean's transaction type.
Valid options are:
Container
Bean
Default value(s):
Container
|
false
|
reentrant
|
bool
|
Entity beans
|
Defines the entity bean's reentrancy.
|
false
|
cmp-version
|
text
|
Entity beans, EJB 2.0
|
Defines the version of the spec
the bean is for CMP.
Valid options are:
1.x
2.x
Default value(s):
1.x
|
false
|
schema
|
text
|
Entity beans, EJB 2.0
|
Defines the abstract schema name for the bean.
|
false
|
primkey-field
|
text
|
Entity beans
|
Defines the primary key field for
the bean as per spec.
|
false
|
use-soft-locking
|
bool
|
Entity beans
|
If true, then generate a public int
version attribute in the auto-generated
concrete class, to form a optimistic
locking mechanism. The value of version
attribute is incremented in ejbStore.
The default is false.
Note: It's applicable to both CMP and BMP, but many containers have optimistic locking
capabilities built-in, so you don't need to worry about it locking issues.
|
false
|
message-selector
|
text
|
Message-driven beans
|
Defines an optional message selector for MDB.
|
false
|
acknowledge-mode
|
text
|
Message-driven beans
|
Defines the acknowledge mode for MDB.
Valid options are:
Auto-acknowledge
Dups-ok-acknowledge
Default value(s):
Auto-acknowledge
|
false
|
destination-type
|
text
|
Message-driven beans
|
Defines the type of destination for MDB.
Valid options are:
javax.jms.Queue
javax.jms.Topic
Default value(s):
javax.jms.Queue
|
false
|
subscription-durability
|
text
|
Message-driven beans
|
Defines the durability of messages
for MDB as per EJB 2.0 spec
Valid options are:
Durable
NonDurable
Default value(s):
Durable
|
false
|
remote-business-interface
|
text
|
Session and Entity beans
|
Defines the remote business interface
for the bean. If present, ejb.interface-method
tags are not required, instead the remote interface will extend the business interface.
The business interface must declare all methods as throwing RemoteException as per the
business interface pattern.
|
false
|
local-business-interface
|
text
|
Session and Entity beans
|
Defines the local business interface for the bean. Similar to remote-business-interface,
but the interface does not need to declare RemoteException in the throws clause.
|
false
|
Defines the data access object of an entity bean. If the <dao/> subtask is
included, then DAO interfaces will be generated for any entity beans
containing this tag, unless a generate="false" parameter is present.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
class
|
text
|
|
The fully qualified name of the DAO interface. If
absent the interface name will be determined using
the pattern and package parameters.
|
false
|
pattern
|
text
|
|
Define the pattern (using {0} for the EJB name) to
be used for constructing the unqualified (package
specific) name of the DAO interface.
|
false
|
package
|
text
|
|
Define the package the DAO interface is in
(generated or not). Use <packageSubstitution/> to
configure which package the interface should end
up in.
|
false
|
generate
|
bool
|
|
Indicate if the DAO interface should be generated.
Defaults to true.
|
false
|
impl-class
|
text
|
|
The fully qualified name of a class which
implements the DAO interface. If present, then
generated code for obtaining a DAO will just
create a new instance of this class.
|
false
|
impl-jndi
|
text
|
|
Indicates a JNDI environment reference which will
contain a String that is the fully qualified name of
a class implementing the DAO interface. If present,
then generated code for obtaining a DAO will look
up this reference, then create a new instance of the
class whose name is found there. This allows the
actual implementation class to be determined at
runtime.
|
false
|
create-methods
|
text
|
|
Indicate if create methods should be automatically
included in the DAO interface. Defaults to true.
|
false
|
finder-methods
|
text
|
|
Indicate if finder methods should be automatically
included in the DAO interface. Defaults to true.
|
false
|
Defines configuration attributes used for data object generation. Applicable only for
Entity beans.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
extends
|
text
|
|
Declare which class the generated bulk data class should
extend. Default is "java.lang.Object". The class must be
java.io.Serializable. This is useful if you want to add some
methods that should always be available in bulk data objects.
|
false
|
Defines an EJB reference to a bean which will be packaged in a different
ejb jar file. Applicable to all types of EJBs.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
view-type
|
text
|
|
The view type of the referenced bean. Legal values are local and remote.
Valid options are:
local
remote
|
true
|
link
|
text
|
|
Defines an ejb-link to the referenced EJB. The value of the ejb-link
element is the name of the target enterprise bean. (It is the name defined in the ejb-name element
of the target enterprise bean.) The target enterprise bean can be in any ejb-jar file in the
same J2EE application as the referencing application component.
|
false
|
ref-name
|
text
|
|
The name that the referenced bean will be referred to
by. For example, to refer to the bean Customer as
java:comp/env/ejb/Customer name should be
ejb/Customer. Defaults to ejb/[ejb-name], where
[ejb-name] is the named of the referenced bean
(Customer) prefixed by "ejb/".
|
true
|
ejb-name
|
text
|
|
The name that the referenced bean will be referred to
by. For example, to refer to the bean Customer as
java:comp/env/ejb/Customer name should be
ejb/Customer. Defaults to ejb/[ejb-name], where
[ejb-name] is the named of the referenced bean
(Customer) prefixed by "ejb/". Deprecated. Use ref-name instead.
|
false
|
type
|
text
|
|
The type of EJB being referenced.
Valid options are:
Entity
Session
Default value(s):
Entity
|
true
|
home
|
text
|
|
The fully qualified class name of the home interface of the referenced bean.
|
true
|
business
|
text
|
|
The fully qualified class name of the business interface (local or remote
interface) of the referenced bean.
|
true
|
remote
|
text
|
|
(Deprecated). Synonym for 'business' parameter. Only works if the view-type is 'remote'
|
false
|
Defines an EJB-reference. Applicable to all EJB types. Attention: you have
to import the referred class (the ejbdoclet one) even your EJB does not need it.
to the bean with EJB-name [ejb-name]. ref-name is optional and if not
specified then the reference name is [ejb-name] prefixed by a ejb/
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
ejb-name
|
text
|
|
The name of the EJB being referenced.
|
true
|
view-type
|
text
|
|
The view type that the reference uses.
Valid options are:
local
remote
Default value(s):
remote
|
true
|
ref-name
|
text
|
|
The name that the referenced bean will be
referred to by. For example, to refer to the bean
Customer as java:comp/env/ejb/Customer name
should be ejb/Customer. Defaults to
ejb/[ejb-name], where [ejb-name] is the named of
the referenced bean (Customer) prefixed by
"ejb/".
|
false
|
Defines an environment entry for an EJB.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
name
|
text
|
|
The name of the env-entry
|
true
|
description
|
text
|
|
Optional description of the env-entry
|
false
|
type
|
text
|
|
The type of the env-entry, eg
java.lang.String. Supported types outlined in
the EJB spec.
"type" is optional, the default is java.lang.String.
Valid options are:
java.lang.Boolean
java.lang.Byte
java.lang.Character
java.lang.String
java.lang.Short
java.lang.Integer
java.lang.Long
java.lang.Float
java.lang.Double
Default value(s):
java.lang.String
|
false
|
value
|
text
|
|
The value of the env-entry
|
false
|
Defines a finder method for the home interface. An entity bean may have zero or more
ejb.finder tags.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
view-type
|
text
|
|
To restrict the home interface in witch the finder will be defined.
Valid options are:
local
remote
both
Default value(s):
both
|
false
|
description
|
text
|
|
Description of the finder
|
false
|
signature
|
text
|
|
Defines the signature of the
method. E.g.. "java.util.Collection
findAll()". The return type in the
signature must be fully qualified.
|
true
|
unchecked
|
bool
|
Entity beans, EJB 2.0
|
Flags the finder as having
unchecked permission.
If present, role-name must be
omitted
|
false
|
role-name
|
text
|
|
A comma-separated list of roles that can invoke this finder method.
|
false
|
query
|
text
|
Entity beans, EJB 2.0
|
EJB-QL query for the finder.
|
false
|
result-type-mapping
|
text
|
Entity beans, EJB 2.0
|
Result type mapping (indicates the return type) for the finder
method.
Valid options are:
none
Local
Remote
Default value(s):
none
|
false
|
transaction-type
|
text
|
|
Indicates the transaction type attribute sets to the method.
|
false
|
method-intf
|
text
|
|
Indicates the interface (Home or
LocalHome) for which the finder
permissions should be set. If the
permissions should apply to both
Home or LocalHome interfaces,
this parameter should not be
specified.
Valid options are:
Home
LocalHome
Default value(s):
Home
|
false
|
The @ejb.home tag provides information about an Entity or Session
Bean's home interface. All parameters are applicable to both Entity and Session beans.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
extends
|
text
|
|
Declare which interface the generated
home interface should extend. Default is
"javax.ejb.EJBHome".
|
false
|
local-extends
|
text
|
Session and Entity beans, EJB 2.0
|
Declare which interface the generated
local home interface should extend.
Default is "javax.ejb.EJBLocalHome".
|
false
|
generate
|
bool
|
|
Which home interfaces should be
generated. Defaults to true.
Valid options are:
true
false
Default value(s):
true
|
false
|
remote-class
|
text
|
|
The fully qualified name of the remote
home interface.
|
false
|
local-class
|
text
|
Session and Entity beans, EJB 2.0
|
The fully qualified name of the local
home interface.
|
false
|
remote-pattern
|
text
|
|
The pattern to be used in determining the
unqualified name of the remote home
interface - only used if remote-class is
not present.
|
false
|
local-pattern
|
text
|
Session and Entity beans, EJB 2.0
|
The pattern to be used in determining the
unqualified name of the local home
interface - only used if local-class is
not present.
|
false
|
pattern
|
text
|
|
The pattern to be used in determining the
unqualified name of either local or
remote home interfaces. Used where
-class and -pattern tags are absent for the
bean.
|
false
|
remote-package
|
text
|
|
The package the remote home interface
should be in - only used where
remote-class is not present. Use
<packageSubstitution/> to configure
which package the interface should end
up in.
|
false
|
local-package
|
text
|
|
The package the local home interface
should be in - only used where
local-class is not present. Use
<packageSubstitution/> to configure
which package the interface should end
up in.
|
false
|
package
|
text
|
|
The package the home interfaces to be
placed in - only used where
-class or -package is not present. Use
<packageSubstitution/> to configure
which package the interface should end
up in.
|
false
|
The @ejb.interface tag provides information about an Entity or
Session Bean's component interfaces (remote and/or local). It is not
applicable to Message-driven beans. All parameters are applicable to both
Entity and Session beans.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
extends
|
text
|
|
Declare which interface the generated
remote interface should extend. Default is
"javax.ejb.EJBObject".
|
false
|
local-extends
|
text
|
Session and Entity beans, EJB 2.0
|
Declare which interface the generated local
interface should extend. Default is
"javax.ejb.EJBLocalObject".
|
false
|
generate
|
text
|
|
Which interfaces should be generated.
Defaults to true.
Valid options are:
true
false
Default value(s):
local,remote
|
false
|
remote-class
|
text
|
|
The fully qualified name of the remote
interface.
|
false
|
local-class
|
text
|
Session and Entity beans, EJB 2.0
|
The fully qualified name of the local
interface.
|
false
|
remote-pattern
|
text
|
|
The pattern to be used in determining the
unqualified name of the remote interface -
only used if remote-class is not present.
|
false
|
local-pattern
|
text
|
Session and Entity beans, EJB 2.0
|
The pattern to be used in determining the
unqualified name of the local interface -
only used if local-class is not present.
|
false
|
pattern
|
text
|
|
The pattern to be used in determining the
unqualified name of either local or remote
interfaces. Used where -class and -pattern
tags are absent for the bean.
|
false
|
remote-package
|
text
|
|
The package the remote interface should be
in - only used where remote-class is not
present. Use <packageSubstitution/> to
configure which package the interface
should end up in.
|
false
|
local-package
|
text
|
Session and Entity beans, EJB 2.0
|
The package the local interface should be in
- only used where local-class is not
present. Use
<packageSubstitution/> to configure which
package the interface should end up in.
|
false
|
package
|
text
|
|
The package for the interfaces to be placed
in. Only used where -class and -package
are not present. Use
<packageSubstitution/> to configure which
package the interface should end up in.
|
false
|
The @ejb.persistence tag provides information about the persistence
of a CMP Entity bean.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
table-name
|
text
|
|
Declare the table to which the CMP will
be mapped. If table-name is not specified, the name of the class will be used,
and it will be up to the container to create the tables.
|
false
|
Defines the primary key of an entity bean. If the <entitypk/> subtask is
included, then primary key classes will be generated for all entity beans
unless a generate="false" parameter is present, or the primary class is in the
java.lang package.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
class
|
text
|
|
The fully qualified name of the primary key
class. If absent the primary key class name will
be determined using the pattern and package
parameters.
|
false
|
pattern
|
text
|
|
Define the pattern (using {0} for the EJB name)
to be used for constructing the unqualified
(package specific) name of the primary key
class.
|
false
|
package
|
text
|
|
Define the package the pk class is in (generated
or not). Use <packageSubstitution/> to
configure which package the PK class should
end up in.
|
false
|
generate
|
bool
|
|
Indicate if the primary key class should be
generated. Defaults to true.
|
false
|
extends
|
text
|
|
Define which class the generated pk must
extend.
|
false
|
implements
|
text
|
|
Define which interface the generated pk must
implement.
|
false
|
role-name
|
text
|
|
A comma-separated list of roles that can
execute findByPrimaryKey
|
false
|
unchecked
|
bool
|
Entity beans, EJB 2.0
|
Flags the PK-finder as having unchecked
permission. If present, role-name
must be omitted
|
false
|
method-intf
|
text
|
|
Indicates the interface (Home or LocalHome)
for which the findByPrimaryKey permissions
should be set. Applies only if role-name or
unchecked is specified. If the permissions
should apply to both Home or LocalHome
interfaces, this parameter should not be
specified.
Valid options are:
Home
LocalHome
Default value(s):
Home
|
false
|
Defines a resource environment reference with the name name to a resource
of type type.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
name
|
text
|
|
The name of the resource.
|
true
|
type
|
text
|
|
The type of the resource.
|
true
|
Defines a resource reference with the name res-ref-name to a resource of type
res-type, and the authentication is done by the one specified in res-auth.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
res-ref-name
|
text
|
|
The name of the environment entry used in the enterprise bean's code.
|
true
|
res-type
|
text
|
|
The resource type.
|
true
|
res-auth
|
text
|
|
The resource authentication type.
Valid options are:
Container
Application
Default value(s):
Container
|
true
|
res-sharing-scope
|
text
|
|
The resource sharing scope
Valid options are:
Shareable
Unshareable
Default value(s):
Shareable
|
false
|
jndi-name
|
text
|
|
The physical jndi-name of the resource. Note: it currently is used only in 1-2
of the app server modules, but those modules will also support this consolidated standard tag soon.
|
false
|
The security-identity element specifies whether the caller's security
identity is to be used for the execution of the methods of the enterprise bean
or whether a specific run-as identity is to be used. It contains an optional
description and a specification of the security identity to be used.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
description
|
text
|
|
The description of the security identity.
|
false
|
use-caller-identity
|
bool
|
|
The use-caller-identity element
specifies that the caller's security
identity be used as the security identity
for the execution of the enterprise
bean's methods.
|
false
|
run-as
|
text
|
|
The run-as element specifies the run-as
identity to be used for the execution of
the methods of an enterprise bean. It
contains an optional description, and the
name of a security role.
|
false
|
Defines a security role reference with the name role-name to a security
role link named role-link.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
role-name
|
text
|
|
The name of the role reference
|
true
|
role-link
|
text
|
|
The name of the role link.
|
true
|
This tag is optional, and lets you define whether or not a util class should be
generated, and whether to use the logical component name (java:comp/env)
or the physical JNDI name to do the lookup. If this tag is not specified, the
util class will be generated using logical lookups (provided the <utilobject/>
subtask is used)
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
generate
|
text
|
|
false or no will omit the
generation of the util class.
logical will generate a util class
that uses the component name
for lookup, and physical will
generate a class that uses the
JNDI name for lookups. Default
is logical.
Valid options are:
false
no
logical
physical
Default value(s):
logical
|
true
|
Definition for ValueObjects that follow the TransferObject pattern
from http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html.
ValueObjects can 'link' to other obejcts (of a relation) in two ways:
aggregation and composition. Aggregation means that the other object is
loosely coupled, while in Composition, the other object is 'embedded'.
Note that aggregation and composition are mutually exclusive.
See also http://xdoclet.sourceforge.net/valueobjects.html for more info.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
name
|
text
|
|
The name for this value object. The name will be used to form
the generated class name. Using the default pattern, for example,
if name is 'User', an 'UserValue' class will be generated.
|
false
|
match
|
text
|
|
An identifier that can be used to select groups of attributes to
be included in this value object. You can repeat this identifier
in the method-level @ejb.value-object tag to add a property to
a value object. You can use '*' as an special value, indicating
that all entity properties will be included in this value object.
|
false
|
extends
|
text
|
|
The name of the class the generated value object class should extends,
if any.
|
false
|
implements
|
text
|
|
A comma-separated list of interfaces the generated value object should
implements, if any. Please note that xdoclet won't generated methods
to implement these interfaces, so use this only if the interfaces doesn't
contains any methods, or if the value object superclass (indicated in the
'extends' parameter already implements all interface methods.
|
false
|
abstract
|
bool
|
|
Set if this ValueObject is intended to be an abstract object which other ValueObjects extend.
|
false
|
This tag is optional and allows generation of session facade EJB for
entity bean. Facade EJB will provide all finder and creation methods to
outside, and also all data setting methods for data and value objects.
Finder methods will return collections of data or value objects instead of
remote interfaces.
Facade bean will connect to ejb using local ( if generated ) or remote
interfaces.
Resulting bean needs processing by xdoclet together with all ejb classes.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
name
|
text
|
|
Name of generated facade ejb. Default is {0}Facade
|
false
|
description
|
text
|
|
A description of the bean. Defaults to the first sentence of the
class-level javadoc comment of the bean class.
|
false
|
display-name
|
text
|
|
The display name of the bean.
|
false
|
small-icon
|
text
|
|
The small icon for the bean.
|
false
|
large-icon
|
text
|
|
The large icon for the bean.
|
false
|
jndi-name
|
text
|
Remote Session and Entity beans
|
Provides the JNDI name of the
bean that will be used in the
vendor specific deployment descriptors.
|
false
|
local-jndi-name
|
text
|
|
Provides the JNDI name of the bean
that will be used in the vendor
specific deployment descriptors.
It's the JNDI name for the local EJB.
|
false
|
view-type
|
text
|
|
Indicates what view-type(s) is(are)
supported by the bean.
Valid options are:
local
remote
both
Default value(s):
remote
|
false
|
type
|
text
|
|
Defines the bean's "type".
Valid options are:
Stateless
Stateful
Default value(s):
Stateless
|
true
|
transaction-type
|
text
|
|
Defines the bean's transaction type.
Valid options are:
Container
Bean
Default value(s):
Container
|
false
|
Generate remote facade class for entity beans.
This class will provide convenient view on session bean
and perform all the necesary lookups.
Session Bean methods marked with @ejb.facade-method
will be included and transparently proxied.
Generated class name will follow pattern: {0}Remote
Mark a persistent field containing a reference to another entity bean as being
aggregated in this bean. The data object will contain accessor methods for the
aggregated entity's data object instead of a reference to the entity itself. The
aggregated entity will also be removed when this entity is removed. For
example, aggregates are useful for sending graphs of data to the client. This is
only applicable to entity beans and has no parameters.
The method is an ejbCreate method and will be included in the home
interface. It is applicable to Session and Entity beans. In Stateless Session
beans the ejbCreate will be created if it is not in the code.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
view-type
|
text
|
|
Optionally specify which view-type the method will be exposed in.
Valid options are:
local
remote
Default value(s):
remote
|
false
|
Define this method as a home method (e.g. its name is "ejbHomefoo", and
the corresponding home method should be defined in the home interface).
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
view-type
|
text
|
|
Optionally specify which view-type the
method will be exposed in.
Valid options are:
local
remote
Default value(s):
local
|
false
|
Declare in which interface (local/remote) this method must appear. If the
view-type parameter is absent then the method will be added to whatever
component interfaces are defined in @ejb.bean.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
view-type
|
text
|
|
Optionally specify which view-type the
method will be exposed in. The value
"local" or "both" is only applicable to
EJB 2.0 beans.
Valid options are:
local
remote
both
Default value(s):
remote
|
false
|
Defines the transactional behaviour for this method. Applicable to methods
with @ejb.create-method and @ejb.interface-method tags. When used on class level applies
to all interface methods cumulatively.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
role-name
|
text
|
|
Comma-separated list of roles allowed to call this
method
|
false
|
unchecked
|
bool
|
Entity beans, EJB 2.0
|
Flags the method as having unchecked
permission. If present, role-name
must be omitted
|
false
|
The @ejb.persistence tag provides information about the persistence
of a CMP Entity bean's fields.
Use this for methods with the following patterns:
public abstract Foo getX();
public abstract boolean isX();
public abstract void setX(Foo newVal);
This will create the CMP field "X" in the generated CMP layer of type
"Foo", and concrete implementations of the getX/setX methods. For BMP,
it will generate getX/setX methods that keep track of a dirty flag (so that
ejbStore is only called if necessary). If the type is boolean it is ok to have
the get method prefixed "is" instead of "get". If you don't define the setter
method, no setter method is generated for the concrete BMP/CMP class
(concrete CMP class is generated only if EJB 1.1 or EJB 2.0 but using CMP
1.x). This is useful for cases where for example nothing is set
programmatically but via external sources such as a stored procedure.
Applicable for entity beans.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
column-name
|
text
|
|
Declare the column-name to which the CMP
field will be mapped.
|
false
|
jdbc-type
|
text
|
|
Declare the JDBC Type. Its value must be one
of the fields of java.sql.Types (e.g. BIT,
CHAR...). This jdbc type will be used by the
CMP provider to determine which method to
call on PreparedStatement and ResultSet for
INSERT / UPDATE / SELECT queries.
Valid options are:
ARRAY
BIGINT
BINARY
BIT
BLOB
BOOLEAN
CHAR
CLOB
DATALINK
DATE
DECIMAL
DISTINCT
DOUBLE
FLOAT
INTEGER
JAVA_OBJECT
LONGVARBINARY
LONGVARCHAR
NULL
NUMERIC
OTHER
REAL
REF
SMALLINT
STRUCT
TIME
TIMESTAMP
TINYINT
VARBINARY
VARCHAR
Default value(s):
VARCHAR
|
false
|
sql-type
|
text
|
|
Declare the actual type of the field in the
database. This value will only be used when the
CMP container creates your table (if possible).
|
false
|
read-only
|
bool
|
|
Indicates that a field is read-only.
|
false
|
Deprecated. Use the ejb.persistence tag instead.
Use this for methods with the following pattern: public abstract Foo getX().
This will denote the persistent field "X" as a primary key field, which will
be included in the generated primary key class. Must be used with the
persistent-field tag. This tag is only valid for EntityBeans. It has no
parameters.
Defines a relationship between Entity beans.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
name
|
text
|
|
Name of the relation. For bidirectional relationships, specify the same name on both sides.
|
true
|
role-name
|
text
|
|
Name of the relationship role.
|
true
|
cascade-delete
|
text
|
|
Indicates whether or not the app server should perform cascade deletes. If yes, specify cascade-delete="yes".
|
false
|
target-ejb
|
text
|
|
Name of the EJB on the other side of the relation. Should *only* occur if the relation is unidirectional.
|
false
|
target-role-name
|
text
|
|
Name of the relationship role on the other side of the relation. Should *only* occur if the relation is unidirectional.
|
false
|
target-cascade-delete
|
text
|
|
Indicates whether or not the app server should perform cascade deletes for the other side of the relation. If yes, specify cascade-delete="yes". Should *only* occur if the relation is unidirectional.
|
false
|
target-multiple
|
text
|
|
If this EJB represents a many-side of the other side of the relation, specify target-multiple="yes". If not, just don't use this parameter, or specify "no". Should *only* occur if the relation is unidirectional.
|
false
|
Defines a select method. This tag is placed on the ejbSelect methods.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
query
|
text
|
|
EJB-QL query for the select method.
|
true
|
result-type-mapping
|
text
|
|
Result type mapping for the select method.
Valid options are:
none
Local
Remote
Default value(s):
none
|
false
|
Defines the transactional behaviour for this method. Applicable to methods
with @ejb.create-method and @ejb.interface-method tags.
If used on class level applies to all interface methods unless overridden
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
type
|
text
|
|
Define the type of transactional behaviour.
Valid options are:
NotSupported
Supports
Required
RequiresNew
Mandatory
Never
Default value(s):
Supports
|
true
|
The method is a call to a data access object; the method will be included in
the DAO interface, and the EJB's generated subclass will contain a call to
the DAO's method.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
name
|
text
|
|
Optionally specify the method's name in the DAO (it
need not be the same as the calling method in the EJB).
If not specified, the default is the usual interface
equivalent of the method's name (i.e. generally the
same, but ejbFindByX becomes findByX etc.)
|
false
|
Please write usage description!!!!!
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
match
|
text
|
|
Repeat here the 'match' attribute declared in a class-level @ejb.value-object
tag to link this property to the declared value object.
|
false
|
compose
|
text
|
|
Tell XDoclet which should be the type of items contained in the multi valued
property. This should be a fully qualified class name.
|
false
|
compose-name
|
text
|
|
Tell XDoclet how the accessor methods to this property in the value object
should be called. The value of this parameter should be the method name,
sans get or set.
|
false
|
aggregate
|
text
|
|
Tell XDoclet which should be the type of items contained in the multi valued
property. This should be a fully qualified class name.
|
false
|
aggregate-name
|
text
|
|
Tell XDoclet how the accessor methods to this property in the value object
should be called. The value of this parameter should be the method name,
sans get or set
|
false
|
members
|
text
|
|
The class of the local or remote interface of the associated or composed bean.
|
false
|
members-name
|
text
|
|
The Bean Name of the associated or composed Bean.
|
false
|
relation
|
text
|
|
This tells XDoclet that this property can be updated outside of the scope
of this value object, so the generated method should always retrieve the
property value. For relations, this is a no brainer: always include the
relation="external" parameter.
|
false
|
type
|
text
|
|
On a multi-valued property, indicates the type of the collection returned
by the EJB property accessor. This should be set to 'Collection' or 'Set'
in all multi-valued properties.
Valid options are:
Collection
Set
|
false
|
Marks session bean method for inclusion in remote facade.
Parameter
|
Type
|
Applicability
|
Description
|
Mandatory
|
invalidate
|
bool
|
|
Mark this method as invalidating. Remote Facade will fire
callbacks and zap caches. Use on methods which change ejb
or create/remove entities. NOTE: setting this to true will have no effect for
facade methods which cache their result.
|
false
|
cache
|
bool
|
|
Setup result caching for this method result. No effect on void methods.
|
false
|
immutable
|
bool
|
|
If value is immutable it will be never invalidated. No effect on void methods.
|
false
|
|