Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Configuration Reference
The elements (defined by tags) of an XML document can include attributes, other elements, or both. The sections below include tables that describe those elements. In the Members column, element names are between < and > characters. Table 7-1 describes the meaning of the symbols in the Use column in the tables that describe an element’s members.
Symbol in Use column | Meaning |
---|---|
Nothing | The tag or attribute is required by the parent tag. |
? | The element or attribute can be omitted. |
* | The element can be present zero or more times within the parent element. |
+ | The element must be present at least once within the parent element. |
This chapter contains the following sections:
Elements of the Component-Managed Persistence Configuration File describes the XML elements and attributes of the
CMPConfiguration.xml
file.Elements of the Transaction Manager Configuration File describes the XML elements and attributes of the
TransactionManagerConfiguration.xml
file.Elements of the Container Configuration File describes the XML elements and attributes of the
OpenEJBConfiguration.xml
file.
Elements of the Component-Managed Persistence Configuration File
The DTD for the CMPConfiguration.xml
file is located at http://castor.exolab.org/mapping.dtd, and is shown in Listing 7-1.
Listing 7-1 DTD for CMPConfiguration.xml
<?xml version="1.0" encoding="UTF-8"?> |
<!ELEMENT mapping ( description?, include*, class*, key-generator* )> |
<!ELEMENT include EMPTY> |
<!ATTLIST include |
href CDATA #REQUIRED> |
<!ELEMENT class ( description?, cache-type?, map-to?, field+ )> |
<!ATTLIST class |
name ID #REQUIRED |
extends IDREF #IMPLIED |
depends IDREF #IMPLIED |
identity CDATA #IMPLIED |
access ( read-only | shared | exclusive | db-locked ) "shared" |
key-generator IDREF #IMPLIED > |
<!ELEMENT cache-type EMPTY> |
<!ATTLIST cache-type |
type ( none | count-limited | time-limited | unlimited ) "count-limited" |
capacity NMTOKEN #IMPLIED> |
<!ELEMENT map-to EMPTY> |
<!ATTLIST map-to |
table NMTOKEN #IMPLIED |
xml NMTOKEN #IMPLIED |
ns-uri NMTOKEN #IMPLIED |
ns-prefix NMTOKEN #IMPLIED |
ldap-dn NMTOKEN #IMPLIED |
ldap-oc NMTOKEN #IMPLIED> |
<!ELEMENT field ( description?, sql?, bind-xml?, ldap? )> |
<!ATTLIST field |
name NMTOKEN #REQUIRED |
type NMTOKEN #IMPLIED |
required ( true | false ) "false" |
direct ( true | false ) "false" |
lazy ( true | false ) "false" |
get-method NMTOKEN #IMPLIED |
set-method NMTOKEN #IMPLIED |
create-method NMTOKEN #IMPLIED |
collection ( array | vector | hashtable | collection | set | map ) #IMPLIED> |
<!ELEMENT sql EMPTY> |
<!ATTLIST sql |
name NMTOKEN #IMPLIED |
type CDATA #IMPLIED |
many-key NMTOKEN #IMPLIED |
many-table NMTOKEN #IMPLIED |
dirty ( check | ignore ) "check"> |
<!ELEMENT bind-xml EMPTY> |
<!ATTLIST bind-xml |
name NMTOKEN #IMPLIED |
type NMTOKEN #IMPLIED |
matches NMTOKEN #IMPLIED |
node ( attribute | element | text ) #IMPLIED> |
<!ELEMENT ldap EMPTY> |
<!ATTLIST ldap |
name NMTOKEN #IMPLIED> |
<!ELEMENT key-generator ( param* )> |
<!ATTLIST key-generator |
name CDATA #REQUIRED |
alias CDATA #IMPLIED> |
<!ELEMENT param EMPTY> |
<!ATTLIST param |
name CDATA #REQUIRED |
value CDATA #REQUIRED> |
<!ELEMENT description ( #PCDATA )> |
The following sections describe the elements of the CMPConfiguration.xml
file.
bind-xml element
The attribute or element name and XML schema must be specified for all XML-dependent fields. The node
attribute indicates whether the field maps to an attribute, another tag, or the textual content of this element. Only simple types (primitives, date, string, and so on) can be used for attribute values. In addition, only one field can be specified as the content model in a given object. Table 7-2 describes this element’s members.
Member | Use | Description |
---|---|---|
| ? | Table-column name. |
| ? | |
| ? | |
| ? | Value: |
cache-type element
This element tells the container how to cache instances of this enterprise bean. Table 7-3 describes the members of this element.
Member | Use | Description |
---|---|---|
| Value: | |
| ? | The maximum number of instances of this bean the container is to create. |
class element
This element describes the mapping between a Java class (enterprise bean implementation) and an SQL table, an XML element, an LDAP entry, or any other engine. To map a class into LDAP, you must specify an identity field.
A class is specified by its fully qualified name; for example, com.my.ejb.Person
. If a class extends another class for which a mapping file exists, you should use the extends
attribute to include the class being extended. Do not use the extends
attribute to describe class inheritance that is not reflected in any mapping.
The class mapping specifies each field in the class that is mapped to a table column. Fields that are not mapped are not stored, read, or otherwise processed. Table 7-4 describes this element’s members.
Member | Use | Description |
---|---|---|
| Class name. | |
| ? | Implied by the persistence manager. It’s the name of the class this class extends. Used only if this class extends another class for which mapping information is provided. |
| ? | Implied by the persistence manager. |
| ? | Implied by the persistence manager. |
| Value: | |
| ? | Name or alias of the key generator to use. Use only for classes with single-property, numeric ID fields. If your class uses a compound primary key or the primary key contains strings, you must use a custom key generator; that is, the bean itself must create the primary-key values. See key-generator element. |
| ? | Optional class description. |
| ? | See cache-type element. |
| ? | Used if the name of the element this class maps to is not the same as the name of the class. By default, the persistence manager infers the name of the element from the name of the class. For example, a class named |
| + | Describes the properties of an enterprise bean. See field element. |
field element
This element specifies the mapping between a field in an enterprise bean’s and an SQL table column, an XML element or attribute, an LDAP attribute, and so on. Table 7-5 describes its members.
Member | Use | Description |
---|---|---|
| Name of the enterprise bean’s field being mapped. | |
| ? | Java type of the field. For example, |
| ? | Value: |
| ? | Value: |
| ? | Value: |
| ? | Implied by the persistence manager. |
| ? | Implied by the persistence manager. |
| ? | Implied by the persistence manager. |
| ? | Value: |
| ? | Optional field description. |
| ? | See sql element. |
| ? | See bind-xml element. |
| ? | See ldap element. |
The mapping is specified from the perspective of the bean’s implementation class. The field name is required even if no such field exists in the class in order to support field references. A field is an abstraction of an enterprise bean’s property: It can refer to a property directly (by mapping to a public
instance variable that is not static
or transient
) or indirectly by using accessor methods.
Unless specified otherwise, the persistence manager accesses the field through get methods and set methods, whose names are derived from the field name. For example, for a field called lastName
, the accessors String getName()
and void setName(String)
are used. Collection fields require only a get method, except an array requires both a get and a set method. If the accessors are specified through the get-method
and set-method
attributes, the persistence manager accesses the field only through those methods. The methods must be public
and not static
.
If the direct
attribute is true
, the field is accessed directly. The field must be public
, not static
, and not transient
.
The type
attribute indicates the type of the instance variable being mapped or the type of each element in a collection. You can use fully qualified class names or a short name, as Table 7-6 illustrates.
Short name | Fully qualified name |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If the field is a collection, you specify the collection type through the collection
attribute and the type of each element of the collection through the type
attribute. Use the following table to determine the appropriate value for the collection
attribute.
Collection attribute value | Type of collection | Default implementation |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The “Default implementation” column indicates the type used when the object holding the collection is null
and needs to be instantiated. For hashtable
and map
collections, the persistence manager adds an object with the put(Object, Object)
method: The object added is both the key and the value.
Table 7-5 describes the members of the field
element.
key-generator element
This element specifies parameters for the key generator (if needed). For example, to obtain sequential values from the table SEQTAB, use
<key-generator name="SEQUENCE"> |
<param name="table" value="SEQTAB"> |
<param name="global" value="0"> |
</key-generator> |
<class key-generator="SEQUENCE"> |
... |
</class> |
If you have to use several key generators of the same type for the same data store, use aliases:
<key-generator name="SEQUENCE" alias="seq1"> |
<param name="table" value="SEQTAB"> |
<param name="global" value="0"> |
</key-generator> |
<key-generator name="SEQUENCE" alias="seq2"> |
<param name="table" value="SEQGLOBAL"> |
<param name="global" value="1"> |
</key-generator> |
<class key-generator="seq2"> |
... |
</class> |
Table 7-8 describes the members of the key-generator
element.
Member | Use | Description |
---|---|---|
| Sequence-table name. | |
| ? | Additional identifier for the key generator. |
| * |
Table 7-9 lists the key-generator names supported in the persistence manager.
Name | Description |
---|---|
| MAX generic algorithm: |
| HIGH/LOW generic algorithm. |
| UUID generic algorithm. |
| Supports auto-increase identity fields in Sybase ASE/ASA, MS SQL Server, MySQL, and Hypersonic SQL. |
| Supports the SEQUENCE algorithm in Oracle, PostgreSQL, Interbase, and SAP DB. |
ldap element
This element contains field mapping information for fields mapped to LDAP resources. Table 7-10 describes its members.
Member | Use | Description |
---|---|---|
| ? | LDAP-resource name. |
map-to element
This element specifies the mapping between an enterprise bean and an SQL table. Table 7-11 describes the element’s members.
Members | Use | Description |
---|---|---|
| ? | SQL table name. |
| ? | |
| ? | |
| ? | |
| ? | |
| ? |
mapping element
This element is the root element of the entire file. It defines a collection of class mappings. Its members are described in Table 7-12.
Member | Use | Description |
---|---|---|
| ? | Optional description of the mapping. |
| * | Used to include other mappings in this mapping. The tag’s sole member is the |
| * | See class element. |
| * |
param element
This element is used to provide named parameters to the containing element. Table 7-13 describes the members of this element.
Member | Use | Description |
---|---|---|
| Parameter name. | |
| Parameter value. |
sql element
This element provides field mapping information that is relevant only for fields mapped to SQL tables. The type can be the proper Java-class type returned by the JDBC driver or the SQL type without precision; for example, "java.math.BigDecimal
" or "numeric"
. However, the type could contain the parameter for the SQL-to-Java type convertors in square brackets; for example, "char[01]
" for false=0
, true=1
conversion from the boolean
Java type to the char
SQL type. Table 7-14 describes this element’s members.
Member | Use | Description |
---|---|---|
| ? | Table-column name. |
| ? | SQL type of the column. |
| ? | |
| ? | |
| ? | Value: |
Elements of the Transaction Manager Configuration File
The following sections describe the elements of the TransactionManagerConfiguration.xml
file.
config element
The config
element provides the configuration for a JDBC data source. Table 7-15 describes its members.
Member | Use | Description |
---|---|---|
| Server name. | |
| Port number. | |
| ? | Database name. |
| ? | Driver type. Value: |
| User ID. | |
| Password. |
connector element
The connector
element specifies a database-connection factory. Table 7-16 describes its members.
Member | Use | Description |
---|---|---|
| Connector name. | |
| Connector JAR filename. | |
| ? | Paths to additional JAR files and dependent files. |
| ? | See config element. |
| ? | See limits element. |
dataSource element
The dataSource
element contains a specification for a JDBC data source. Table 7-17 describes the members of this element.
Member | Use | Description |
---|---|---|
| Data-source name. | |
| Data-source JAR filename. | |
| ? | Paths to additional JAR files and dependent files. |
| Class name of the data-source implementation. | |
| ? | See config element. |
| ? | See limits element. |
domain element
The domain
element is the root element of the entire file. Table 7-18 describes the members of this element.
Member | Use | Description |
---|---|---|
| Domain name. | |
| ? | Maximum number of open transactions allowed. |
| ? | Default timeout (in seconds) for transactions. |
| ? | See resources element. |
limits element
The limits
element provides resource limits for a data source or a connector. Table 7-19 describes its members.
Member | Use | Description |
---|---|---|
| ? | Maximum number of connections allowed. |
| ? | Minimum number of connections allowed. |
| ? | Initial pool size. |
| ? | Maximum period (in seconds) to retain open connections. |
| ? | Maximum timeout (in seconds) to wait for a new connection. |
| ? | Turns tracing on (" |
resources element
The resources
element is the top-level element of a list of JDBC data sources and JCA connectors. Table 7-20 describes the members of this element.
Member | Use | Description |
---|---|---|
| * | See dataSource element. |
| * | See connector element. |
Elements of the Container Configuration File
The DTD for the deployment configuration file, openejb_config.dtd
, is stored in /System/Library/WebObjects/JavaApplications/OpenEJBTool.woa/Contents/Resources
. The DTD is also added to the Resources group of an enterprise-bean–client application project. The file is shown in Listing 7-2 . (You must never edit this file.)
Listing 7-2 DTD for OpenEJBConfiguration.xml
<?xml encoding="US-ASCII"?> |
<!ELEMENT entity-bean (description?, display-name?, small-icon?,large-icon?, |
ejb-deployment-id, home, remote, ejb-class, persistence-type, prim-key-class, reentrant, |
cmp-field-name*, primkey-field?, jndi-enc?, security-role-ref*, query*)> |
<!ELEMENT query (description?, method, query-statement)> |
<!ELEMENT query-statement (#PCDATA)> |
<!ELEMENT entity-container (class-name?, codebase?, description?, display-name?, container-name, properties?, entity-bean+)> |
<!ELEMENT codebase (#PCDATA)> |
<!ELEMENT class-name (#PCDATA)> |
<!ELEMENT cmp-field-name (#PCDATA)> |
<!ELEMENT connection-manager (connection-manager-id, class-name,properties?)> |
<!ELEMENT connectors (connector*, connection-manager+)> |
<!ELEMENT connector (connector-id, connection-manager-id, managed-connection-factory)> |
<!ELEMENT connector-id (#PCDATA)> |
<!ELEMENT connection-manager-id (#PCDATA)> |
<!ELEMENT containers (stateful-session-container|stateless-session-container|entity-container)+> |
<!ELEMENT container-name (#PCDATA)> |
<!ELEMENT container-system (containers, security-role*, method-permission*, method-transaction*)> |
<!ELEMENT description (#PCDATA)> |
<!ELEMENT display-name (#PCDATA)> |
<!ELEMENT ejb-class (#PCDATA)> |
<!ELEMENT ejb-deployment-id (#PCDATA)> |
<!ELEMENT ejb-ref-name (#PCDATA)> |
<!ELEMENT home (#PCDATA)> |
<!ELEMENT env-entry (env-entry-name, env-entry-type, env-entry-value)> |
<!ELEMENT env-entry-name (#PCDATA)> |
<!ELEMENT env-entry-type (#PCDATA)> |
<!ELEMENT env-entry-value (#PCDATA)> |
<!ELEMENT facilities (intra-vm-server, remote-jndi-contexts?, connectors?, services)> |
<!ELEMENT remote-jndi-contexts (jndi-context+)> |
<!ELEMENT jndi-context (jndi-context-id, properties)> |
<!ELEMENT jndi-context-id (#PCDATA)> |
<!ELEMENT ejb-ref (ejb-ref-name, home, ejb-ref-location)> |
<!ELEMENT ejb-ref-location (ejb-deployment-id | (remote-ref-name, jndi-context-id))> |
<!ELEMENT remote-ref-name (#PCDATA)> |
<!ELEMENT factory-class (#PCDATA)> |
<!ELEMENT intra-vm-server (proxy-factory, codebase?, properties?)> |
<!ELEMENT jndi-enc (env-entry*, ejb-ref*, resource-ref*)> |
<!ELEMENT large-icon (#PCDATA)> |
<!ELEMENT logical-role-name (#PCDATA)> |
<!ELEMENT managed-connection-factory (class-name, properties?)> |
<!ELEMENT method (description?, ejb-deployment-id?, method-intf?, method-name, method-params?)> |
<!ELEMENT method-intf (#PCDATA)> |
<!ELEMENT method-name (#PCDATA)> |
<!ELEMENT method-param (#PCDATA)> |
<!ELEMENT method-params (method-param*)> |
<!ELEMENT method-permission (description?, role-name+, method+)> |
<!ELEMENT method-transaction (description?, method+, trans-attribute)> |
<!ELEMENT openejb (container-system, facilities)> |
<!ELEMENT persistence-type (#PCDATA) > |
<!ELEMENT physical-role-name (#PCDATA)> |
<!ELEMENT prim-key-class (#PCDATA)> |
<!ELEMENT primkey-field (#PCDATA)> |
<!ELEMENT properties (property+)> |
<!ELEMENT property (property-name, property-value)> |
<!ELEMENT property-name (#PCDATA)> |
<!ELEMENT property-value (#PCDATA)> |
<!ELEMENT proxy-factory (#PCDATA)> |
<!ELEMENT reentrant (#PCDATA)> |
<!ELEMENT role-mapping (logical-role-name+, physical-role-name+)> |
<!ELEMENT role-name (#PCDATA)> |
<!ELEMENT role-link (#PCDATA)> |
<!ELEMENT remote (#PCDATA)> |
<!ELEMENT res-auth (#PCDATA)> |
<!ELEMENT res-id (#PCDATA)> |
<!ELEMENT res-ref-name (#PCDATA)> |
<!ELEMENT res-type (#PCDATA)> |
<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth, (res-id | properties | connector-id))> |
<!ELEMENT resource (description?, res-id, properties)> |
<!ELEMENT security-role (description?, role-name)> |
<!ELEMENT security-role-ref (description?, role-name, role-link)> |
<!ELEMENT security-service (description?, display-name?, service-name, factory-class, codebase?,properties?, role-mapping*)> |
<!ELEMENT security-service-name (#PCDATA)> |
<!ELEMENT services (security-service, transaction-service)> |
<!ELEMENT service-name (#PCDATA)> |
<!ELEMENT small-icon (#PCDATA)> |
<!ELEMENT stateful-bean (description?, display-name?, small-icon?,large-icon?, ejb-deployment-id, home, remote, ejb-class, transaction-type, jndi-enc?, security-role-ref*)> |
<!ELEMENT stateless-bean (description?, display-name?, small-icon?,large-icon?, ejb-deployment-id, home, remote, ejb-class, transaction-type, jndi-enc?, security-role-ref*)> |
<!ELEMENT stateful-session-container (codebase?, description?, display-name?, container-name, properties?, stateful-bean+)> |
<!ELEMENT stateless-session-container (codebase?, description?, display-name?, container-name, properties?, stateless-bean+)> |
<!ELEMENT transaction-service (description?, display-name?, service-name, factory-class, codebase?, properties?) > |
<!ELEMENT transaction-service-name (#PCDATA)> |
<!ELEMENT transaction-type (#PCDATA)> |
<!ELEMENT trans-attribute (#PCDATA)> |
The following sections describe the elements of the OpenEJBConfiguration.xml
file.
connection-manager element
This element specifies a connection manager. Table 7-21 describes its members.
Member | Use | Description |
---|---|---|
| Name of the connection manager. | |
| Class name of the data source. | |
| Properties required by the data source. |
connector element
This element defines a connector. Table 7-22 describes its members.
Member | Use | Description |
---|---|---|
| Name of the connector. | |
| Specifies a connection manager. See connection-manager element. | |
| * |
connectors element
This element encloses connectors or connection managers. Table 7-23 describes its members.
Member | Use | Description |
---|---|---|
| * | See connector element. |
| + |
container-system element
This element delimits the container configuration section of the deployment configuration file. Table 7-24 describes its members.
Member | Use | Description |
---|---|---|
| See dataSource element. | |
| + | See connector element. |
| + | Assigns a logical role to methods of the enterprise beans defined in the |
| + | Specifies a method’s transaction attribute. |
containers element
This element encloses containers for the three types of enterprise beans: stateless session beans, stateful session beans, and entity beans. Table 7-25 describes its members.
Member | Use | Description |
---|---|---|
| + | At least one of these items must be present. |
ejb-ref element
This element defines a reference to a bean so that the bean can be accessed using JNDI calls. Table 7-26 describes its members.
Member | Use | Description |
---|---|---|
| JNDI name for the bean. For example, | |
| Home interface of the bean. For example, | |
|
ejb-ref-location element
This element identifies a bean through its name (using its <ejb-deployment-id>
member) or through its remote interface and JNDI context ID. Table 7-27 describes its members.
Member | Use | Description |
---|---|---|
| Either |
entity-bean element
This element defines an entity session bean. Table 7-28 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description for the bean. |
| ? | |
| ? | |
| ? | |
| Name of the bean. | |
| Home interface (for example, | |
| Remote interface (for example, | |
| Implementation class (for example, | |
| Value: | |
| Fully qualified class name of the primary key. | |
| Value: | |
| * | Container-managed–persistence field name. |
| ? | Primary-key field name. |
| ? | See jndi-enc element. |
| * | |
| * | Specifies a query for a finder method. |
entity-container element
This element defines an entity-bean container and encloses the definition of entity beans. Table 7-29 describes its members.
Member | Use | Description |
---|---|---|
| ? | |
| ? | Description of the container. |
| ? | |
| Name for the container. | |
| ? | Used to tell the container how to handle instances of entity beans. See properties element. |
| + | Entity bean definitions. See entity-bean element. |
env-entry element
This element defines an environment variable and its value (which can be accessed by other beans through JNDI). Table 7-30 describes its members.
Member | Use | Description |
---|---|---|
| Name of the variable. | |
| Java type of the variable. | |
| Value for the variable. |
facilities element
This element specifies the runtime environment: proxy-generation attributes, remote JNDI contexts, data-store connections, and J2EE services. You should not change the information within <facilities>
and </facilities>
tags. Table 7-31 describes its members.
Member | Use | Description |
---|---|---|
| ||
| ? | |
| ? | |
|
jndi-context element
This element defines one external JNDI context to be used by the application. Table 7-32 describes its members.
Member | Use | Description |
---|---|---|
| Name of the JNDI context. | |
| Required properties. |
jndi-enc element
This element encloses naming information so that this bean can be located through JNDI. Table 7-33 describes the members of the jndi-enc
element.
Member | Use | Description |
---|---|---|
| * | |
| * | Defines a reference to this bean. See ejb-ref element. |
| * | Defines the bean’s data source. See resource-ref element. |
intra-vm-server element
This element specifies the dynamic factory proxy to use to create client proxies of the real EJB objects. Table 7-34 describes its member.
Member | Use | Description |
---|---|---|
| Dynamic proxy factory. Values: |
managed-connection-factory element
This element defines a managed-connection factory. Table 7-35 describes its members.
Member | Use | Description |
---|---|---|
| Class name of the data source. | |
| ? | Properties required by the data source. |
method element
This element specifies a home or remote interface method of an enterprise bean. Table 7-36 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description for the method. |
| ? | Must specify the ID (name) of one of the enterprise beans declared in the |
| ? | Value: |
| Specifies the method name. | |
| ? | Identifies a single method among multiple methods with an overloaded method name. If the method takes no input arguments, this element can be empty or omitted. |
These are examples of the three possible styles of the method
element’s syntax:
Referring to all the methods (home interfaces and remote interfaces) defined within the
<container-system>
tag:<method>
<method-name>*</method-name>
</method>
Referring to a specific method defined within the
<container-system>
tag:<method>
<method-name>METHOD</method-name>
</method>
Referring to a single method within a set of methods (home interfaces and remote interfaces) with an overloaded name:
<method>
<method-name>METHOD</method-name>
<method-params>
<method-param>PARAM-1</method-param>
<method-param>PARAM-2</method-param>
...
<method-param>PARAM-n</method-param>
</method-params>
</method>
method-params element
This element is used when further identification of a method is needed due to method-name overloading. Table 7-37 describes its members.
Member | Use | Description |
---|---|---|
| * | Fully qualified Java type. Specify arrays by following the array element’s type with one or more pairs of square brackets (for example, |
method-permission element
This element maps security roles to methods. Table 7-38 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description for the method permission. |
| + | Logical role name corresponding to a |
| + | See method element. |
method-transaction element
This element specifies how the container manages transaction scopes when delegating a method invocation to an enterprise bean’s implementation class. Table 7-39 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description for the method and the transaction. |
| + | Methods to apply the transaction type to. |
| Value: |
openejb element
This is the root tag of the deployment configuration file. Table 7-40 describes its members.
Member | Use | Description |
---|---|---|
| ||
| See facilities element. |
properties element
This element encloses a set of property-value definitions. Table 7-41 describes its members.
Member | Use | Description |
---|---|---|
| See property element. |
property element
This element encloses a property-value definition. Table 7-42 describes its members.
Member | Use | Description |
---|---|---|
| The name of the property. | |
| The value for the property. |
query element
This element can be used to declare a query statement and bind it to a specific finder method. The value can be retrieved using the org.openejb.core.DeploymentInfo.getQuery
method. Table 7-43 describes this element’s members.
Member | Use | Description |
---|---|---|
| ? | Description for the query. |
| The | |
| * | SQL statement. |
remote-jndi-contexts element
This element groups external JNDI contexts. Table 7-44 describes its members.
Member | Use | Description |
---|---|---|
| + | See jndi-context element. |
resource element
This element defines a resource. Table 7-45 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description for the resource. |
| Maps this resource to a | |
| See properties element. |
resource-ref element
This element specifies a reference to an external resource. Table 7-46 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description for the resource. |
| Specifies the name of a resource manager connection-factory reference (for example, | |
| Specifies the type of the data source, that is, the Java class or interface expected to be implemented by the data-store engine; for example, | |
| Value: | |
| You can map this resource reference to a resource, a connector, or to a set of properties. |
This is an example of a <resource-ref>
definition using properties:
<resource-ref> |
<res-ref-name>comp/env/jdbc/Employee</res-ref-name> |
<res-type>javax.sql.DataSource</res-type> |
<res-auth>Container</res-auth> |
<properties> |
<property> |
<property-name>url</property-name> |
<property-value>jdbc:odbc:orders</property-value> |
</property> |
<property> |
<property-name>username</property-name> |
<property-value>Admin</property-value> |
</property> |
<property> |
<property-name>password</property-name> |
<property-value></property-value> |
</property> |
</properties> |
</resource-ref> |
role-mapping element
This element maps a logical security role to a physical security role. Table 7-47 describes its members.
Member | Use | Description |
---|---|---|
| + | Logical security-role name. |
| + | Physical security-role name. |
security-role element
This element defines a logical role name. Table 7-48 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description of the logical role. |
| Logical role name; for example, |
security-role-ref element
This element specifies a security-role reference. Table 7-49 describes its members
Member | Use | Description |
---|---|---|
| ? | Description of the security role. |
| Security-role name used in code. It must be the String used as the argument in the invocation of the | |
| Name of a security role ( |
security-service element
This element defines a security service. Table 7-50 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description of the service. |
| ? | |
| ? | Name of the service. |
| Name of the factory class for the service. | |
| ? | |
| ? | Properties needed by the service. |
| + | See role-mapping element. |
services element
This element encloses services used by the container. Table 7-51 describes its members.
Member | Use | Description |
---|---|---|
| Description of the services. | |
| * |
stateful-bean element
This element defines a stateful session bean. Table 7-52 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description for the bean. |
| ? | |
| ? | |
| ? | |
| Name of the bean; for example, | |
| Home interface; for example, | |
| Remote interface; for example, | |
| Implementation class; for example, | |
| Value: | |
| ? | See jndi-enc element. |
| * |
stateful-session-container element
This element defines a stateful session bean container and encloses the definitions of stateful session beans. Table 7-53 describes its members.
Member | Use | Description |
---|---|---|
| ? | |
| ? | Description of the container. |
| ? | |
| Name for the container. | |
| ? | Used to tell the container how to handle instances of stateful session beans. See properties element. |
| + | Stateful bean definitions. See stateful-bean element. |
stateless-bean element
This element defines a stateless session bean. Table 7-54 describes its members.
Member | Use | Description |
---|---|---|
| ? | |
| ? | |
| ? | |
| ? | |
| Name of the bean. | |
| Home interface; for example, | |
| Remote interface; for example, | |
| Implementation class; for example, | |
| Value: | |
| ? | See jndi-enc element. |
| * |
stateless-session-container element
This element defines a stateless session bean container and encloses the definitions of stateless session beans. Table 7-55 describes its members.
Member | Use | Description |
---|---|---|
| ? | |
| ? | Description of the container. |
| ? | |
| ||
| ? | Used to tell the container how to handle instances of stateless session beans. See properties element. |
| + | Stateless bean definitions. See stateless-bean element. |
transaction-service element
This element defines a transaction service. Table 7-56 describes its members.
Member | Use | Description |
---|---|---|
| ? | Description of the transaction service. |
| ? | |
| Name of the transaction service. | |
| Name of the factory class for the service. | |
| ? | |
| ? | Properties needed by the service. |
Copyright © 2001, 2004 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2004-10-05