<orion/> subtask

orion

Creates Orion-specific deployment descriptors (orion-ejb-jar.xml) for EJB beans.

Parameters

Attribute Description Required
xmlencoding The encoding of the ejb-jar.xml file. No, default is "UTF-8"
destdir Destination directory for output Orion-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
deploymentVersion Orion deployment version. No, default is "1.5.2"
validateXml Validates the generated xml file according to the DTD file contained inside xdoclet.jar. No, default is false

Merge Points

Merge File Name Description Required
orion-{0}.xml The file where per-bean orion settings are defined. {0}designates the EJB name. See <blabla-deployment> elements in orion-ejb-jar.xml. No
orion-{0}-attributes.xml The file where per-bean deployment attributes are defined. {0}designates the EJB name. See attributes of <blabla-deployment> elements in orion-ejb-jar.xml. The file is a series of name=value lines, such as call-timeout/copy-by-value/etc for a session-deployment. No, Yes if you want to set some deployment attributes for a bean.
orion-{0}-settings.xml The file where per-bean deployment settings are defined. {0}designates the EJB name. See nested elements of <blabla-deployment> elements in orion-ejb-jar.xml. The file is the body of a <blabla-deployment>. You can use this file instead of puting @orion:blabla tags in your sources if you feel more comfortable or you think the settings are more deployment-oriented, so better expressible as a separate file. No
orion-assembly-descriptor.xml The file where assembly/security role mappings are defined. See <assembly-descriptor> in orion-ejb-jar.xml. No, but nothing automatically generated

Remember you should preserve the package directory structure in mergedir. If the bean is test.bank.AccountBean then orion-Account.xml should be located at test/bank directory in mergedir.

Class level Tags

@orion:bean

All parameters of <session-deployment/>, <entity-deployment/> and <message-driven-deployment/> are placed under this class level tag.

Parameter Usage
[call-timeout]: Integer The time (long millis in hex) to wait for an EJB if it is busy (before throwing a RemoteException, treating it as a deadlock). 0 equals "forever" and is the default. Applicable to session and entity beans.
[copy-by-value]: Boolean Whether or not to copy (clone) all the incoming/outgoing parameters in EJB calls. Set this to 'false' if you're certain your application doesn't assume copy-by-value semantics for a speed-up. The default is 'true'. Applicable to session and entity beans.
[location]: String The JNDI-name this bean will be bound to. Applicable to session and entity beans.
[max-tx-retries]: Integer The number of times to retry a transaction that was rolled back due to system-level failures. The default is 0, i.e. no retries. Applicable to session and entity beans.
[persistence-filename]: String Path to file where sessions are stored across restarts. Applicable to session beans.
[timeout]: String Inactivity timeout in seconds. If the value is zero or negative timeouts will be disabled. Applicable to session beans.
[clustering-schema]: String The name of the data-source used if using container-managed persistence. Applicable to entity beans.
[data-source]: String The name of the data-source used if using container-managed persistence. Applicable to entity beans.
[exclusive-write-access]: Boolean Whether or not the EJB-server has exclusive write (update) access to the database backend. If it does it will speed up common bean operations and enable better caching. The default is true. Applicable to entity beans.
[instance-cache-timeout]: Integer The amount of time in seconds that an entity is to be kept in the instance (assigned to an identity) state, specifying 'never' retains the entities forever. The default is 60. Applicable to entity beans.
[isolation]: String Specifies the isolation-level for database actions. The valid values are 'serializable', 'uncommitted', 'committed', 'repeatable_read'. Applicable to entity beans.
[max-instances]: Integer The number of maximum instances to be kept instantiated or pooled. The default is infinite. Applicable to entity beans.
[pool-cache-timeout]: Integer The amount of time in seconds that an entity is to be kept in the "pooled" (unassigned) state, specifying 'never' retains the entities forever. The default is 60. Applicable to entity beans.
[table]: String The name of the table in the database if using container-managed persistence. Applicable to entity beans.
[validity-timeout]: Integer The maximum amount of time (in millis) that an entity is valid in the cache (before being reloaded). Useful for loosely coupled environments where rare updates from legacy systems occur. This attribute is only valid when exclusive-write-access="true" (the default). Applicable to entity beans.
[cache-timeout]: Integer The number of seconds before a cached instance can be timed out. Can be set to 'never' to never time out or to 0 (zero) to never cache. The default is 60. Applicable to message driven beans.
[connection-factory-location]: String The JNDI location of the connection factory to use. Applicable to message driven beans.
[destination-location]: String The JNDI location of the destination (queue/topic) to use. Applicable to message driven beans.
[max-instances]: Integer The maximum number of bean instances to instantiate. The default is -1, which implies an infinite number. Applicable to message driven beans.
[min-instances]: Integer The minimum number of bean instances to instantiate. The set amount will be instantiated at startup, and there will always be at least the set amount of instances active. The default is 0 (none). Applicable to message driven beans.

Method level Tags

@orion:persistence

Defines persistence settings for a persistent fields. Persistent fields are public getter methods. Applicable to Entity EJBs using CMP and all dependent objects. <orion/> sub-task loops over all persistent fields of the bean and sets up cmp-field-mapping and other needed elements for the field. If the persistent field is an EJB, EJBHome or a dependent serializable object it also loops over fields of that object and applies settings depending on the class type (whether it's EJB/EJBHome, depdendent object, whether the type is a collection and so on). Refer to orion-ejb-jar.xml for more details.

Parameter Usage
[name]: String Define the name of the column for the field.
[ejb-reference-home]: String Applicable to persistent fields that are one of types javax.ejb.EJBObject, javax.ejb.EJBLocalObject, javax.ejb.EJBHome, javax.ejb.EJBLocalHome. It sets the value of ejb-reference-home attribute of cmp-field-mapping element for that persistent field.
[persistence-name]: String Applicable to persistent fields that are one of types javax.ejb.EJBObject, javax.ejb.EJBLocalObject, javax.ejb.EJBHome, javax.ejb.EJBLocalHome. It sets the value of persistence-name attribute of cmp-field-mapping element for that persistent field.
[sql-type]: String Applicable to persistent fields that are one of types javax.ejb.EJBObject, javax.ejb.EJBLocalObject, javax.ejb.EJBHome, javax.ejb.EJBLocalHome. It sets the value of persistence-type attribute of cmp-field-mapping element for that persistent field.
[home]: String Applicable to persistent fields that are one of types javax.ejb.EJBObject, javax.ejb.EJBLocalObject, javax.ejb.EJBHome, javax.ejb.EJBLocalHome. It sets the value of home attribute of entity-ref element for that persistent field.
[table-name]: String Applicable to persistent fields that are one of types java.util.List, java.util.Vector, java.util.Collection, java.util.Set, java.util.Map, java.util.Hashtable and java.util.Properties. It sets the value of table attribute of the corresponding blabla-mapping element for that persistent field.
[type]: String Applicable to persistent fields that are one of types java.util.List, java.util.Vector, java.util.Collection, java.util.Set, java.util.Map, java.util.Hashtable and java.util.Properties. It sets the value of table attribute of primkey-mapping or value-mapping element for that persistent field.
[immutable]: boolean Applicable to persistent fields that are one of types java.util.List, java.util.Vector, java.util.Collection, java.util.Set, java.util.Map, java.util.Hashtable and java.util.Properties. It sets the value of immutable attribute of value-mapping element for that persistent field.
[key-type]: String Applicable to persistent fields that are one of types java.util.Map, java.util.Hashtable and java.util.Properties. It sets the value of key-type attribute of map-key-mapping element inside map-mapping element for that persistent field.
[field-persistence-manager]: String Sets up a field-persistence-manager element and sets the class attribute of the field-persistence-manager element to the class name specified. Properties for the persistence manager can be specified by putting one or more @orion:field-persistence-manager-property tags for the persistent field.

@orion:field-persistence-manager-property

If @orion:persistence field-persistence-manager specified and there's some properties for the persistence manager, specify it as one or more @orion:field-persistence-manager-property tags for the persistent field.

Parameter Usage
[name]: String The name of the property.
[value]: String The value of the property.

@ejb:finder

Defines Orion-specific finder settings for a finder method. Applicable to @ejb:finder class level tags of Entity EJBs using CMP.

Parameter Usage
[orion-query]: String Define the query for the finder. Depending on the value of orion-query-is-partial parameter the query can be complete or partial. Orion's queries are in a proprietary format, for instance "$1 = $myField AND $myOtherField > 5" which is a partial query, specifying only the WHERE clause of a SQL SELECT statement.
[orion-query-is-partial]: boolean Specifies whether the query string is complete or partial.