@jboss Class Level Tag Usage

@jboss.audit (0..1)

Indicate that all audit information (created-by, created-time, updated-by, update-time) should be saved in the entity with columns provided by the container. This tag is mutually exclusive with the other jboss.audit-* tags

@jboss.audit-created-by (0..1)

Store the created-by info for this entity bean. This tag is mutually exclusive with the jboss.audit tag.

ParameterTypeApplicabilityDescriptionMandatory
field-nametext The field, the created-by information should be stored in. false
column-nametext The column, the created-by information should be stored in. false
jdbc-typetextThe jdbc type. Needs to be given together with the sql-typefalse
sql-typetextThe sql type. Needs to be given together with the jdbc typefalse

@jboss.audit-created-time (0..1)

Store the created-time info for this entity bean. This tag is mutually exclusive with the jboss.audit tag.

ParameterTypeApplicabilityDescriptionMandatory
field-nametext The field, the created-time information should be stored in. false
column-nametext The column, the created-time information should be stored in. false
jdbc-typetextThe jdbc type. Needs to be given together with the sql-typefalse
sql-typetextThe sql type. Needs to be given together with the jdbc typefalse

@jboss.audit-updated-by (0..1)

Store the updated-by info for this entity bean. This tag is mutually exclusive with the jboss.audit tag.

ParameterTypeApplicabilityDescriptionMandatory
field-nametext The field, the updated-by information should be stored in. false
column-nametext The column, the updated-by information should be stored in. false
jdbc-typetextThe jdbc type. Needs to be given together with the sql-typefalse
sql-typetextThe sql type. Needs to be given together with the jdbc typefalse

@jboss.audit-updated-time (0..1)

Store the updated-time info for this entity bean. This tag is mutually exclusive with the jboss.audit tag.

ParameterTypeApplicabilityDescriptionMandatory
field-nametext The field, the updated-time information should be stored in. false
column-nametext The column, the updated-time information should be stored in. false
jdbc-typetextThe jdbc type. Needs to be given together with the sql-typefalse
sql-typetextThe sql type. Needs to be given together with the jdbc typefalse

@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

ParameterTypeApplicabilityDescriptionMandatory
valuetext 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

ParameterTypeApplicabilityDescriptionMandatory
invalidation-manager-nametext The JMX ObjectName of the InvalidationManager to use.

Default value(s):

jboss.cache:service=InvalidationManager
false
invalidation-group-nametext 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.

ParameterTypeApplicabilityDescriptionMandatory
partition-nametext Sets the name of the JBoss Cluster Partition in which this EJB is to be deployed. false
home-policytext 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-policytext 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-managertextOnly 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

ParameterTypeApplicabilityDescriptionMandatory
clusterbool 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.

ParameterTypeApplicabilityDescriptionMandatory
field-nametextThe name of the fieldtrue
column-nametextThe 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

ParameterTypeApplicabilityDescriptionMandatory
nametextDefines 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.

ParameterTypeApplicabilityDescriptionMandatory
signaturetext Defines the signature of the method. E.g.. "java.util.Collection findAll()". The return type in the signature must be fully qualified. true
descriptiontextDescription of this custom query.false
distinctbool 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-nametext The ejb-name of the entity that will be selected. Required if ejbSelect method. false
field-nametextfield-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
aliastext The alias that will be used for the main select table. Default is ejb-name. false
fromtext Declares additional SQL to append to the generated from clause. Example: &lt;from&gt;, FullAddressEJB as a&lt;/from&gt; false
wheretext 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
ordertext Declares the order clause for the query. Example: &lt;order&gt;TITLE&lt;/order&gt; false
othertext 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
strategytextSpecifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
false
page-sizeintSpecifies the number of entities that will be read in a single read-ahead load query.false
eager-load-grouptextContains 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. Also applicable to servlets where the dependency is on WAR-level. (JBoss 3.2+).

Applies to: All EJB types.

ParameterTypeApplicabilityDescriptionMandatory
nametextDefines the JMX ObjectName to which the bean depends on. In the servlet case, this dependency is on WAR-level.true

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

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

Applies to: Applicable to MDB

ParameterTypeApplicabilityDescriptionMandatory
nametextThe 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.

ParameterTypeApplicabilityDescriptionMandatory
ref-nametext 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-nametextThe 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.

ParameterTypeApplicabilityDescriptionMandatory
ref-nametextDefine the name of the bean reference.true
jndi-nametexttrue

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

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

Applies to: CMP entity bean.

ParameterTypeApplicabilityDescriptionMandatory
nametext The command name. true
classtext 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.

ParameterTypeApplicabilityDescriptionMandatory
nametext The attribute name. true
valuetext 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.

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the finder.true
querytextThe query for the finder. See JAWS documentation for finder query syntax.true
ordertextThe order for the finder results.false
read-aheadboolIndicate 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.

ParameterTypeApplicabilityDescriptionMandatory
patterntextA complete method name or a pattern consisting of an initial match followed by '*'.true
read-onlyboolFlags method(s) as read only. The named method(s) will never trigger a store.

Default value(s):

false
false
transaction-timeouttext The transaction timeout in seconds (overriding the default timeout). This will only work for Required (where the method starts the transaction) and RequiresNew. The special value of 0 (zero) uses the default timeout configured on jboss:service=TransactionManager NOTE: any subsequent use of RequiresNew that is not explicitly overridden will use this value. false

@jboss.persistence (0..1)

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

Applies to: CMP entity bean

ParameterTypeApplicabilityDescriptionMandatory
datasourcetext The jndi-name used to lookup the datasource. false
datasource-mappingtext The name of the type mapping that will be used for this datasource. false
create-tablebool Should the persistence manager attempt to create tables if they are not present? false
alter-tablebool Should the persistence manager attempt to alter tables if they have changed? false
remove-tablebool Should the persistence manager attempt to remove tables during shutdown? false
post-table-createtextOnly 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-onlybool Is the entity read-only? false
read-time-outint Specifies the amount of time that a read-only entity is considered valid (milliseconds). false
row-lockingbool Should select statements the SELECT ... FOR UPDATE syntax? false
pk-constraintbool Should a primary key constraint be added when creating tables? false
list-cache-maxint Specifies the number of simultaneous queries that can be tracked by the cache for an entity. false
fetch-sizeint Specifies the number of entities to read in one round-trip to the underlying datastore. false
table-nametext Specifies the name of the table this entity should be persisted to. false

@jboss.port-component (0..*)

Specify webservices port-components

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the porttrue
uritextThe uri of the port in the form /web-context-root/portfalse
auth-methodtextThe auth mechanism of the webservice
Valid options are:

BASIC

CLIENT-CERT
false
transport-guaranteetextSpecification of the transport security between client and server
Valid options are:

NONE

INTEGRAL

CONFIDENTIAL
false

@jboss.query (0..*)

Configures a custom query (defined by @ejb.finder) for the JBossCMP engine (Requires JBoss 3+). Note that you still need the @ejb.finder with signature and query attributes. If they are not present, then container will complain at deploy time.

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

ParameterTypeApplicabilityDescriptionMandatory
signaturetext Defines the signature of the method. E.g.. "java.util.Collection findAll()". The return type in the signature must be fully qualified. true
descriptiontextDescription of this custom query.false
querytext JBossQL query which overrides the EJB-QL specified in the EJB deployment descriptor. JBossQL is a superset of EJB-QL. false
dynamicbool Dynamic JBossQL query. The JBossQL is passed to the query and compiled on the fly. false
strategytextSpecifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
false
page-sizeintSpecifies the number of entities that will be read in a single read-ahead load query.false
eager-load-grouptextContains the name of the load group that will eager loaded for this entity.false
ql-compilertextFully qualified name of QL compiler implementation class.false
lazy-resultset-loadingbool Is relevant only for multi-object queries. Allowed values are true and false. If true, ResultSet will be read on demand, i.e. when user iterates through the collection. If false, user is given completely initialized result, i.e. when user got the result ResultSet is read till the end and closed. 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.

ParameterTypeApplicabilityDescriptionMandatory
strategytextSpecifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
true
page-sizeintSpecifies the number of entities that will be read in a single read-ahead load query.false
eager-load-grouptextContains 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

ParameterTypeApplicabilityDescriptionMandatory
read-onlyboolDeclare the bean as read only.

Default value(s):

true
true

@jboss.resource-adapter (0..1)

sets the rar used in JCA 1.5 message inflow

Applies to: Applicable for JBoss 4.0 message-driven beans

ParameterTypeApplicabilityDescriptionMandatory
nametext The name of the rar used in JCA 1.5 message inflow (i.e."jms-ra.rar" or "myapp.ear#myconnector.rar" for embedded rars) 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.

ParameterTypeApplicabilityDescriptionMandatory
resource-env-ref-nametextThe resource-env-ref-name element gives the "code name" of a resource. It is provided by the Bean Developer.true
jndi-nametextThe jndi name to which the reference should link.true

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

ParameterTypeApplicabilityDescriptionMandatory
res-man-nametextDefine the name of the resource manager.true
res-man-jndi-nametextDefine 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.

ParameterTypeApplicabilityDescriptionMandatory
res-ref-nametextThe 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-nametextThe 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-nametextThe jndi name to which the reference should link.false
res-urltextThe 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

ParameterTypeApplicabilityDescriptionMandatory
nametextDefines 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

ParameterTypeApplicabilityDescriptionMandatory
servicefiletext 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
classpathtext 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
archivestext 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

ParameterTypeApplicabilityDescriptionMandatory
nametextUser for the jms connection that delivers messages.false
passwordtextPassword for the jms connection.false
client-idtextIdentifies the Client.false
subscription-idtextIdentifies the (durable) subscripition for the topic 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.

ParameterTypeApplicabilityDescriptionMandatory
classtextThe unknown PK classtrue
readonlyboolHint to treat the PK as read-onlyfalse
read-time-outintThe read timeout value for the PK fieldfalse
column-nametextThe name of the PK column in the DB tablefalse
jdbc-typetextThe JDBC type for the PK column. Should be specified together with sql-typefalse
sql-typetextThe SQL type for the PK column. Should be specified together with jdbc-typefalse
auto-incrementboolSet if the PK field is autoincremented by the databasefalse

@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

ParameterTypeApplicabilityDescriptionMandatory
nametextThe column name.true

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

Declare field as dependent value class.

ParameterTypeApplicabilityDescriptionMandatory
nametext 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-nametext The name of the column that will hold the data for this field. false
not-nullboolfalse
sql-typetextSQL-Type of this field. Must be used together with jdbc-type.false
jdbc-typetextJDBC-Type of this field. Must be used together with sql-type.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

ParameterTypeApplicabilityDescriptionMandatory
typetextA 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.

ParameterTypeApplicabilityDescriptionMandatory
read-onlyboolFlags the method as read only. Such a method will never trigger a store.

Default value(s):

false
false
transaction-timeouttext The transaction timeout in seconds (overriding the default timeout). This will only work for Required (where the method starts the transaction) and RequiresNew. The special value of 0 (zero) uses the default timeout configured on jboss:service=TransactionManager NOTE: any subsequent use of RequiresNew that is not explicitly overridden will use this value. 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.

ParameterTypeApplicabilityDescriptionMandatory
read-onlybool Is the field read-only? false
read-time-outint Specifies the amount of time that a read-only field is considered valid (milliseconds). false
not-nullbool Should null values be allowed? false
auto-incrementboolOnly used in 3.2 and later Should the field be auto-incremented by the database? false
dbindexboolOnly used in 3.2 Should a DB-index be created for this field? false
check-dirty-after-getboolOnly 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.query (0..*)

Configures a custom query for a select method for the JBossCMP engine (Requires JBoss 3+). Note that you still need an empty @ejb.select tag. If it is not present, then container will complain at deploy time.

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

ParameterTypeApplicabilityDescriptionMandatory
descriptiontextDescription of this custom query.false
querytext JBossQL query which overrides the EJB-QL specified in the EJB deployment descriptor. JBossQL is a superset of EJB-QL. false
dynamicbool Dynamic JBossQL query. The JBossQL is passed to the query and compiled on the fly. false
strategytextSpecifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
false
page-sizeintSpecifies the number of entities that will be read in a single read-ahead load query.false
eager-load-grouptextContains the name of the load group that will eager loaded for this entity.false
ql-compilertextFully qualified name of QL compiler implementation class.false
lazy-resultset-loadingbool Is relevant only for multi-object queries. Allowed values are true and false. If true, ResultSet will be read on demand, i.e. when user iterates through the collection. If false, user is given completely initialized result, i.e. when user got the result ResultSet is read till the end and closed. 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

ParameterTypeApplicabilityDescriptionMandatory
fk-constraintboolFlag to indicate if a foreign key constraint should be placed on the relation column.

Default value(s):

true
false
related-pk-fieldtext 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-columntext Name of the column that should be used for foreign key mapping. (Corresponds to column-name in jbosscmp-jdbc.xml) true
jdbc-typetextThe jdbc type of the related pk-field. Must be used together with sql-type.false
sql-typetextThe sql type of the related pk-field. Must be used together with jdbc-type.false
dbindexboolOnly used in 3.2 and later Should a DB-index be created for this field? false
batch-cascade-deletebool The batch-cascade-delete element specifies that, this side of the relationship should be batch deleted with one SQL statement of the form DELETE FROM <related-table> WHERE <foreign-key> = ? The presense of cascade-delete element in ejb-jar.xml for the matching ejb-relationship-role is mandatory (see @ejb.relation).

Default value(s):

false
false
read-onlybool Is the relation read-only?

Default value(s):

false
false
read-time-outtext Specifies the ammount of time that a read-only field is considered valid (milliseconds). 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

ParameterTypeApplicabilityDescriptionMandatory
styletextrelation-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

ParameterTypeApplicabilityDescriptionMandatory
strategytextSpecifies the strategy used to read-ahead data in queries.
Valid options are:

none

on-load

on-find
true
page-sizeintSpecifies the number of entities that will be read in a single read-ahead load query.false
eager-load-grouptextContains 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

ParameterTypeApplicabilityDescriptionMandatory
table-nametextThe name of the relation table.false
datasourcetextThe datasource to place the relation table in.false
datasource-mappingtextThe name of the type mapping that will be used for this datasource.false
create-tableboolShould the persistence manager attempt to create tables if they are not present?false
alter-tableboolShould the persistence manager attempt to alter tables if they have changed?false
remove-tableboolShould the persistence manager attempt to remove tables during shutdown?false
row-lockingboolShould select statements the SELECT ... FOR UPDATE syntax?false
pk-constraintboolShould 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

ParameterTypeApplicabilityDescriptionMandatory
typetextThe 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

ParameterTypeApplicabilityDescriptionMandatory
fk-constraintboolFlag to indicate if a foreign key constraint should be placed on the relation column.

Default value(s):

true
false
related-pk-fieldtext 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-columntext Name of the column that should be used for foreign key mapping. (Corresponds to column-name in jbosscmp-jdbc.xml) true
jdbc-typetext The jdbc type. Needs to be given together with the sql-type false
sql-typetext The sql type. Needs to be given together with the jdbc type false

@jboss Field Level Tag Usage