@jboss Class Level Tag Usage

@jboss.cache-invalidation (0..1)

Tells the container to emit cache invalidation messages when these entities are changed. NOTE! You must ensure the entity is deployed in a container configured or in validation. (i.e. has org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor configured in its interceptor stack.)

Applies to: Only valid for CMP 2.x Beans

Parameter Type Applicability Description Mandatory
value text Defines the behaviour of the invalidator: true enables it for commit options A and D, True forces invalidation on all commit options.

Default value(s):

true
false

@jboss.cache-invalidation-config (0..1)

Configure the behaviour of jboss cache invalidation. NOTE! The defaults mentioned are not manifested in the output, they are JBoss's behaviour cited here for convenience.

Applies to: Only valid for CMP 2.x Beans

Parameter Type Applicability Description Mandatory
invalidation-manager-name text The JMX ObjectName of the InvalidationManager to use.

Default value(s):

jboss.cache:service=InvalidationManager
false
invalidation-group-name text The name of an invalidationgroup to which this entity belongs.

Default value(s):

The EntityBean's name
false

@jboss.cluster-config (0..1)

Sets JBoss clustering configuration, overriding the default container on a per-EJB basis. The defaults mentioned here are not actual XDoclet behavior but rather JBoss defaults cited here for convenience.

Applies to: Only valid for EJB's marked as clustered.

Parameter Type Applicability Description Mandatory
partition-name text Sets the name of the JBoss Cluster Partition in which this EJB is to be deployed. false
home-policy text Sets the algorithm used for home load balancing policy, i.e. <code>&lt;home-load-balance-policy&gt;</code> in jboss.xml. More in JBoss clustering docs...

Default value(s):

org.jboss.ha.framework.interfaces.RoundRobin
false
bean-policy text Sets the algorithm used for bean load balancing policy, i.e. <code>&lt;bean-load-balance-policy&gt;</code> in jboss.xml. More in JBoss clustering docs...

Default value(s):

org.jboss.ha.framework.interfaces.RoundRobin
false
state-manager text Only relevant for Stateful SessionBeans Sets the JNDI name used for looking up the clustered session state manager. i.e. <code>&lt;session-state-manager-jndi-name&gt;</code> in jboss.xml. More in JBoss clustering docs...

Default value(s):

/HASessionState/Default
false

@jboss.clustered (0..1)

Marks the EJB as clustered in jboss.xml deployment descriptor

Applies to: Only valid for Session- and Entity- EJB's

Parameter Type Applicability Description Mandatory
cluster bool Used to turn on/off clustering.

Default value(s):

true
false

@jboss.cmp-field (0..1)

Will define a <cmp-field> element for a field of a cmp-field of ejb-jar.xml. This is used for dependant objects fields mapping, see @jboss.not-persisted-field. Example:

Applies to: Applicable to EJBs using JAWS CMP.

Parameter Type Applicability Description Mandatory
field-name text The name of the field true
column-name text The name of the column. true

@jboss.container-configuration (0..1)

The name of the container configuration to use for the bean. Applicable to all types of EJBs.

Applies to: All EJB types

Parameter Type Applicability Description Mandatory
name text Defines the container configuration for the bean. true

@jboss.declared-sql (0..*)

Configures a custom query (defined by @ejb.finder) by defining explicitly declared sql fragments to be added to the SQL generated by JBossCMP engine (Requires JBoss 3+).

Applies to: Applicable to Entity beans with at least one custom finder.

Parameter Type Applicability Description Mandatory
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
description text Description of this custom query. false
distinct bool If true JBossCMP will add the DISTINCT keyword to the generated select clause. The default is to use DISTINCT if method returns a java.util.Set.

Default value(s):

false
false
ejb-name text The ejb-name of the entity that will be selected. Required if ejbSelect method. false
field-name text field-name can only be present if 'ejb-name' is The name of the cmp-field that will be selected from the specified entity. Default is to select the entire entity. false
alias text The alias that will be used for the main select table. Default is ejb-name. false
from text Declares additional SQL to append to the generated from clause. Example: &lt;from&gt;, FullAddressEJB as a&lt;/from&gt; false
where text Declares the where clause for the query. Example: &lt;where&gt;TITLE={0} OR ARTIST={0} OR TYPE={0} OR NOTES={0}&lt;/where&gt; false
order text Declares the order clause for the query. Example: &lt;order&gt;TITLE&lt;/order&gt; false
other text Declares the other sql that is appended to the end of a query. Example: &lt;other&gt;LIMIT 100 OFFSET 200&lt;/other&gt; false
strategy text Specifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
false
page-size int Specifies the number of entities that will be read in a single read-ahead load query. false
eager-load-group text Contains the name of the load group that will eager loaded for this entity. false

@jboss.depends (0..*)

The name of an JMX ObjectName on which the bean depends. Applicable to all types of EJBs.

Applies to: All EJB types.

Parameter Type Applicability Description Mandatory
name text Defines the JMX ObjectName to which the bean depends on. true

@jboss.destination-jndi-name (0..1)

Defines JNDI name of the Queue/Topic used my the MDB.

Applies to: Applicable to MDB

Parameter Type Applicability Description Mandatory
name text The name of the destination. true

@jboss.ejb-local-ref (0..*)

Sets the JNDI name of a locally referenced bean that is not contained in the same application.

Parameter Type Applicability Description Mandatory
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
jndi-name text The JNDI name of the bean. true

@jboss.ejb-ref-jndi (0..*)

Sets the JNDI name of a referenced bean. There must be an @ejb.ejb-ref tag too which points to the referenced bean.

Parameter Type Applicability Description Mandatory
ref-name text Define the name of the bean reference. true
jndi-name text true

@jboss.entity-command (0..1)

Supplies information about an entity-command used to create the entity bean.

Applies to: CMP entity bean.

Parameter Type Applicability Description Mandatory
name text The command name. true
class text The command class. false

@jboss.entity-command-attribute (0..*)

Supplies information about an entity-command used to create the entity bean.

Applies to: CMP entity bean with a @jboss.entity-command tag.

Parameter Type Applicability Description Mandatory
name text The attribute name. true
value text The attribute value. true

@jboss.finder-query (0..*)

Assign custom query to finder named "findFoo". An @ejb.finder tag for the named finder must also be present

Applies to: Applicable to Entity beans using JAWS CMP.

Parameter Type Applicability Description Mandatory
name text The name of the finder. true
query text The query for the finder. See JAWS documentation for finder query syntax. true
order text The order for the finder results. false
read-ahead bool Indicate if the query should have read-ahead.

Default value(s):

true
false

@jboss.method-attributes (0..*)

Allows for the specification of non-standard attributes for the named method(s). For JBoss 3.0 this tag can only appear once, for 3.2 and later there can be multiple occurrences.

Parameter Type Applicability Description Mandatory
pattern text A complete method name or a pattern consisting of an initial match followed by '*'. true
read-only bool Flags method(s) as read only. The named method(s) will never trigger a store.

Default value(s):

false
false

@jboss.persistence (0..1)

The @jboss.persistence tag provides information about the persistence of a CMP Entity bean.

Applies to: CMP entity bean

Parameter Type Applicability Description Mandatory
datasource text The jndi-name used to lookup the datasource. false
datasource-mapping text The name of the type mapping that will be used for this datasource. false
create-table bool Should the persistence manager attempt to create tables if they are not present? false
remove-table bool Should the persistence manager attempt to remove tables during shutdown? false
post-table-create text Only used for JBoss 3.2 Arbitrary SQL code to execute directly after the database table is created. The code is only executed if create-table is true and the table did not previously exist. false
read-only bool Is the entity read-only? false
read-time-out int Specifies the amount of time that a read-only entity is considered valid (milliseconds). false
row-locking bool Should select statements the SELECT ... FOR UPDATE syntax? false
pk-constraint bool Should a primary key constraint be added when creating tables? false
list-cache-max int Specifies the number of simultaneous queries that can be tracked by the cache for an entity. false
fetch-size int Specifies the number of entities to read in one round-trip to the underlying datastore. false
table-name text Specifies the name of the table this entity should be persisted to. false

@jboss.query (0..*)

Configures a custom query (defined by @ejb.finder) for the JBossCMP engine (Requires JBoss 3+).

Applies to: Applicable to Entity beans with at least one custom finder.

Parameter Type Applicability Description Mandatory
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
description text Description of this custom query. false
query text JBossQL query which overrides the EJB-QL specified in the EJB deployment descriptor. JBossQL is a superset of EJB-QL. false
dynamic bool Dynamic JBossQL query. The JBossQL is passed to the query and compiled on the fly. false
strategy text Specifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
false
page-size int Specifies the number of entities that will be read in a single read-ahead load query. false
eager-load-group text Contains the name of the load group that will eager loaded for this entity. false

@jboss.read-ahead (0..1)

Specifies the read ahead strategy for this Entity bean. Applicable to Entity beans using JBossCMP persistence engine.

Applies to: Applicable to Entity beans using JBossCMP persistence engine.

Parameter Type Applicability Description Mandatory
strategy text Specifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
true
page-size int Specifies the number of entities that will be read in a single read-ahead load query. false
eager-load-group text Contains the name of the load group that will eager loaded for this entity. false

@jboss.read-only (0..1)

Mark bean as read-only. This will avoid ejbStore calls.

Applies to: Entity beans

Parameter Type Applicability Description Mandatory
read-only bool Declare the bean as read only.

Default value(s):

true
true

@jboss.resource-env-ref (0..*)

The resource-env-ref element gives a mapping between the "code name" of a env resource (res-ref-name, provided by the Bean Developer) and its deployed JNDI name.

Applies to: Used in Entity, MessageDriven, and Session beans.

Parameter Type Applicability Description Mandatory
resource-env-ref-name text The resource-env-ref-name element gives the "code name" of a resource. It is provided by the Bean Developer. true
jndi-name text The jndi name to which the reference should link. true

@jboss.resource-manager (0..*)

Parameter Type Applicability Description Mandatory
res-man-name text Define the name of the resource manager. true
res-man-jndi-name text Define the jndi name of the resource manager. true

@jboss.resource-ref (0..*)

The resource-ref element gives a mapping between the "code name" of a resource (res-ref-name, provided by the Bean Developer) and its "xml name" (resource-name, provided by the Application Assembler). If no resource-ref is provided, jboss will assume that "xml-name" = "code name".

Applies to: Used in Entity, MessageDriven, and Session beans.

Parameter Type Applicability Description Mandatory
res-ref-name text The res-ref-name element gives the "code name" of a resource. It is provided by the Bean Developer. See resource-managers for the actual configuration of the resource. true
resource-name text The resource-name element gives the "xml name" of the resource. It is provided by the Application Assembler. See resource-managers for the actual configuration of the resource. false
jndi-name text The jndi name to which the reference should link. false
res-url text The res-url element is the "runtime jndi name" as a url of the resource. It is provided by the Deployer. false

@jboss.security-proxy (0..1)

The security-proxy gives the class name of the security proxy implementation. This may be an instance of org.jboss.security.SecurityProxy, or an just an object that implements methods in the home or remote interface of an EJB without implementating any common interface.

Applies to: All EJB types

Parameter Type Applicability Description Mandatory
name text Defines the security-proxy for the bean. true

@jboss.service (0..*)

Configures the generation of -service.xml files for JBoss

Applies to: Valid only for JMX MBeans

Parameter Type Applicability Description Mandatory
servicefile text The prefix that will be prepended to the generated -service.xml file name. For example, if servicefile="test", the generated file will be called test-service.xml. Please note that you must include at least one @jboss.service servicefile="xxx" in your MBean, or generation will fail.

Default value(s):

none
false
classpath text A directory to use as codebase for this service classpath. This parameter may be used in conjunction with the 'archives' parameter to form the service classpath.

Default value(s):

none
false
archives text Individual filenames that should be used to construct the service classpath. This parameter should nevercome alone in a '@jboss.service' tag, but should always come together with the 'classpath' attribute.

Default value(s):

*
false

@jboss.subscriber (0..1)

Provide information about accessing the Message Provider

Applies to: Applicable to MDB

Parameter Type Applicability Description Mandatory
name text User to access the message provider. false
password text Password to access the message provider. false
client-id text Identifies the Client. false
subscription-id text Identifies the (durable) subsripition that will be used. false

@jboss.unknown-pk (0..1)

Supplies information about the unkown primary key. At least the class should be supplied, with optional column name, JDBC and SQL types.

Parameter Type Applicability Description Mandatory
class text The unknown PK class true
readonly bool Hint to treat the PK as read-only false
read-time-out int The read timeout value for the PK field false
column-name text The name of the PK column in the DB table false
jdbc-type text The JDBC type for the PK column. Should be specified together with sql-type false
sql-type text The SQL type for the PK column. Should be specified together with jdbc-type false
auto-increment bool Set if the PK field is autoincremented by the database false

@jboss Method Level Tag Usage

@jboss.column-name (0..1)

Declares the column name to which the CMP field will be mapped.

Applies to: EJB entity bean fields. On the persistent fields getter methods

Parameter Type Applicability Description Mandatory
name text The column name. true

@jboss.dvc-property (0..1)

Declare field as dependent value class.

Parameter Type Applicability Description Mandatory
name text Name of the property being configured. In a dependent-value-class element this must match a JavaBean property of the class. In a cmp-field element this must match a flattened propety of the dependent-value-class field type. true
column-name text The name of the column that will hold the data for this field. false
not-null bool false
sql-type text SQL-Type of this field false
jdbc-type text JDBC-Type of this field false

@jboss.jdbc-type (0..1)

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.

Applies to: EJB entity bean fields. On the persistent fields getter methods

Parameter Type Applicability Description Mandatory
type text A valid JDBC type.
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
true

@jboss.method-attributes (0..1)

Allows for the specification of non-standard attributes for the method. Can only be used with JBoss 3.2 and later, for 3.0 use the class-level tag.

Parameter Type Applicability Description Mandatory
read-only bool Flags the method as read only. Such a method will never trigger a store.

Default value(s):

false
false

@jboss.not-persisted-field (0..1)

Applies to: Applicable to Entity beans using JAWS CMP on method level

@jboss.persistence (0..1)

The @jboss.persistence tag provides information about the persistence of a CMP field.

Applies to: CMP entity bean fields. On the persistent fields getter methods.

Parameter Type Applicability Description Mandatory
read-only bool Is the field read-only? false
read-time-out int Specifies the amount of time that a read-only field is considered valid (milliseconds). false
not-null bool Should null values be allowed? false
auto-increment bool Only used in 3.2 and later Should the field be auto-incremented by the database? false
dbindex bool Only used in 3.2 Should a DB-index be created for this field? false
check-dirty-after-get bool Only used from 3.2.3 on Whether an SQL update should be performed after this field has been retrieved via a get* method. false

@jboss.relation (0..*)

Used to customize the relationships via jbosscmp-jdbc.xml for JBoss 3.0. NOTE: If you replace jboss.relation with jboss.target-relation, you can modify the blind side of a unidirectional relationship (someone fix this wording)

Applies to: CMR field

Parameter Type Applicability Description Mandatory
fk-constraint bool Flag to indicate if a foreign key constraint should be placed on the relation column.

Default value(s):

true
false
related-pk-field text Name of the pk field of the 1- end of the relationship that this foreign key constraint applies to. Required for support of complex primary keys in the 1- end of the relation. (Corresponds to field-name in jbosscmp-jdbc.xml) true
fk-column text Name of the column that should be used for foreign key mapping. (Corresponds to column-name in jbosscmp-jdbc.xml) true
jdbc-type text the jdbc type of the related pk-field false
sql-type text the sql type of the related pk-field false
dbindex bool Only used in 3.2 Should a DB-index be created for this field? false

@jboss.relation-mapping (0..1)

Use jboss.relation-mapping="relation-table" to force the use of a relation table mapping in a relationship even when the relation is not M-N.

Applies to: CMR field

Parameter Type Applicability Description Mandatory
style text relation-table to be of any use
Valid options are:

relation-table
false

@jboss.relation-read-ahead (0..*)

Used to customize the read-ahead component of relationships via jbosscmp-jdbc.xml for JBoss 3.0. NOTE: If you replace jboss.relation-read-ahead with jboss.target-relation-read-ahead, you can modify the blind side of a unidirectional relationship.

Applies to: CMR field

Parameter Type Applicability Description Mandatory
strategy text Specifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
true
page-size int Specifies the number of entities that will be read in a single read-ahead load query. false
eager-load-group text Contains the name of the load group that will eager loaded for this entity. false

@jboss.relation-table (0..1)

Tells the JBoss persistence manager to use a relation table for managing entity relationships.

Applies to: CMR field

Parameter Type Applicability Description Mandatory
table-name text The name of the relation table. false
datasource text The datasource to place the relation table in. false
datasource-mapping text The name of the type mapping that will be used for this datasource. false
create-table bool Should the persistence manager attempt to create tables if they are not present? false
remove-table bool Should the persistence manager attempt to remove tables during shutdown? false
row-locking bool Should select statements the SELECT ... FOR UPDATE syntax? false
pk-constraint bool Should a primary key constraint be added when creating tables? false

@jboss.sql-type (0..1)

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).

Applies to: EJB entity bean fields. On the persistent fields getter methods

Parameter Type Applicability Description Mandatory
type text The database-specific SQL type. true

@jboss.target-relation (0..*)

Used to customize the relationships via jbosscmp-jdbc.xml for JBoss 3.0. This tag should be used to modify the blind side of the relation in an unidirectional relationship. Aside from this, it's exactly the same as @jboss.relation.

Applies to: CMR field

Parameter Type Applicability Description Mandatory
fk-constraint bool Flag to indicate if a foreign key constraint should be placed on the relation column.

Default value(s):

true
false
related-pk-field text Name of the pk field of the 1- end of the relationship that this foreign key constraint applies to. Required for support of complex primary keys in the 1- end of the relation. (Corresponds to field-name in jbosscmp-jdbc.xml) true
fk-column text Name of the column that should be used for foreign key mapping. (Corresponds to column-name in jbosscmp-jdbc.xml) true