Creates JBoss-specific deployment descriptors (jboss.xml and jaws.xml files) for EJB beans.
Attribute | Description | Required |
version | The version of JBoss. Supported versions are 2.4 and 3.0. | No, default is "2.4". |
debug | Debug flag for jaws.xml. | No, default is "false" |
xmlencoding | The encoding of the ejb-jar.xml file. | No, default is "UTF-8" |
typemapping | The type-mapping for JAWS. | No, default is "Hypersonic SQL" |
datasource | The datasource for JAWS. | No, default is "java:/DefaultDS" |
destdir | Destination directory for output JBoss-specific deployment descriptor files. | No, default is destdir parameter of ejbdoclet task |
mergedir | Merge directory where ejbdoclet looks for files to be merged with generated files. | No, required, if the merge feature used |
validateXml | Validates the generated xml files according to the DTD file contained inside xdoclet.jar. | No, default is false |
Merge File Name | Description | Required |
---|---|---|
jboss-resource-managers.xml | The file where JBoss resource managers are defined. See resource-managers in jboss.xml. | No |
jboss-{0}.xml | The file where per-bean settings are defined.
{0}designates the EJB name. See elements under <enterprise-beans> in
jboss.xml. |
No |
jaws-db-settings-{0}.xml | The file where per-bean JAWS database settings are defined.
{0}designates the EJB name. See elements under <enterprise-beans> in
jaws.xml. |
No |
jaws-{0}.xml | The file where per-bean JAWS CMP settings are defined.
{0}designates the EJB name. See <cmp-field> in jaws.xml. |
No |
jboss-security.xml | The file where security domain setting is defined | No |
jboss-container.xml | The file where container configurations are defined | No |
Remember you should preserve the package directory structure in mergedir. If the bean is test.bank.AccountBean then jboss-Account.xml should be located at test/bank directory in mergedir.
Merge File Name | Description | Required |
jaws-db-settings-{0}.xml | The file where per-bean jaws settings are defined {0} designates EJB name | No |
jaws-{0}.xml | The file where per-field jaws settings are defined {0} designates EJB name | No |
jboss-security.xml | The file where security settings for the beans are defined (security domain etc.) | No |
jboss-{0}.xml | The file where per-bean jboss settings are defined ( jndi names, resource refs etc. ). {0} designates EJB name | No |
jboss-resource-managers.xml | The file where resource managers are defined | No |
jboss-container.xml | The file where resource container configurations are defined | No |
The name of the container configuration to use for the bean. Applicable to all types of EJBs.
Parameter | Usage |
[name]: String | Defines the container configuration for the bean. |
Mark bean as read-only. This will avoid ejbStore calls.
Parameter | Usage |
[read-only]: "true" | "false" | Declare the bean as read only. |
Sets the JNDI name of a referenced bean. For example:
@jboss:ejb-ref-jndi Bar foo/Bar
There must be an @ejb:ejb-ref
tag too
which points to the referenced bean.
Parameter | Usage |
[ref-name]: String | Define the name of the bean reference. |
[jndi-name]: String | Define the jndi-name of the referenced bean. |
Sets multiple resource managers in jboss.xml. For example:
@jboss:resource-manager org.jboss.ejb.deployment.MailResource mail/EasyNetMail Mail
Parameter | Usage |
[res-ref-name]: String | Define the resource reference name. |
[resource-name]: String | Define the name of the resource. |
Parameter | Usage |
[res-man-class]: String | Define the class of the resource manager |
[res-man-name]: String | Define the name of the resource manager. |
[res-man-jndi-name]: String | Define the jndi name of the resource manager. |
The table to be used by this bean is called table-name. Applicable to entity beans using JAWS for CMP.
Parameter | Usage |
[table-name]: String | Define the name of the table for the bean. |
Parameter | Usage |
[create]: "true" | "false" | Create the table if it does not already exist. |
Parameter | Usage |
[remove]: "true" | "false" | Create the table if it does not already exist. |
Use tuned updates (i.e. minimize data stored on ejbStore). Applicable to entity beans using JAWS for CMP.
Parameter | Usage |
[tune]: "true" | "false" | Apply tuned updates. |
Time out for read-only beans. The state of the bean will be reloaded from the database after the time out. Applicable to entity beans using JAWS for CMP.
Parameter | Usage |
[time-out]: integer (in seconds) | Define the time out interval for transactions. |
Assign custom query to finder named "findFoo". An @ejb:finder
tag for the
named finder must also be present. Example:
@jboss:finder-query name="findFoo" query="foo = {1}" order="foo,bar"
Applicable to Entity beans using JAWS CMP.
Parameter | Usage |
[name]:String | The name of the finder. |
[query]:String | The query for the finder. See JAWS documentation for finder query syntax. |
[order]:String | The order for the finder results. |
[read-ahead]:(true|false) | Optional, if provided, should be true or false to indicate if the query should have read-ahead. |
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:
@jboss:cmp-field field-name="sitePk.pk" column-name="site"
Applicable to EJBs using JAWS CMP.
Parameter | Usage |
[field-name]: String | The name of the field |
[column-name]: String | The name of the column. |
Defines JNDI name of the Queue/Topic used my the MDB. Applicable to MDB. Example:
@jboss:destination-jndi-name name="queue/testQueue"
Parameter | Usage |
[name]: String | The name of the destination. |
The column name for the CMP field in the table where this bean will be persisted. Applicable to Entity EJBs using JAWS CMP.
Parameter | Usage |
[name]: String | Define the name of the column for the field. |
The SQL type for the column where this CMP field will be persisted. See your database's documentation for a list of valid types. Example:
@jboss:sql-type VARCHAR(10)
Parameter | Usage |
[type]: String | Define the name of the sql type for the field. |
The JDBC type for the column where this CMP field will be persisted. See the javadoc for "java.sql.Types" for a list of valid types. Applicable to Entity beans using CMP through JAWS.
Parameter | Usage |
type: String | The jdbc type of the field. |
Means the field does not have to be stored in the database. It
will appear in ejb-jar.xml but not in jaws.xml. Used for a dependant
object that is not mapped as Object to the database, but instead
exploded by its attributes. See @jboss:cmp-field
. Applicable to
Entity beans using JAWS CMP. This tag has no parameters.
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)
Parameter | Usage |
fk-constraint: (true|false*) | Flag to indicate if a foreign key constraint should be placed on the relation column. |
related-pk-field: (String) | 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) |
fk-column: (String) | Name of the column that should be used for foreign key mapping. (Corresponds to column-name in jbosscmp-jdbc.xml) |