<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: openejb_config.dtd,v 1.1.1.1 2002/01/18 23:21:56 dblevins Exp $ -->

<!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*)>

<!--
This can be used by an CMP 1.1 container to declare a query statement and bind it to a specific
finder method.  The value can be retrieved from the org.openejb.core.DeploymentInfo.getQuery( ).
The deployment-id element of the method element is ignored (should not be used).
-->
<!ELEMENT query (description?, method, query-statement)>
<!ELEMENT query-statement (#PCDATA)>

<!ELEMENT entity-container (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?)>

<!--
The method element is used to denote a method of an enterprise bean's
home or remote interface, or a set of methods. The ejb-deployment-id element
must be the id of one of the enterprise beans declared in the
container-system; the optional method-intf element allows to
distinguish between a method with the same signature that is defined in
both the home and remote interface; the method-name element specifies
the method name; and the optional method-params elements identify a
single method among multiple methods with an overloaded method name.

There are three possible styles of the method element syntax:

1. 	<method>
   		<method-name>*</method-name>
	</method>

   This style is used to refer to all the methods of all
   deployments (home and remote interfaces) in a container-system.

2. 	<method>
   		<method-name>METHOD</method-name>
	</method>>

   This style is used to refer to the specified method in all
   deployments in the container-system. If there are multiple methods with
   the same overloaded name (home and remote interfaces), the element of 
   this style refers to all the methods with the overloaded name. 

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

   This style is used to refer to a single method within a set of
   methods (home and remote interfaces) with an overloaded name for all 
   deployments in a container-system. PARAM-1 through PARAM-n are the 
   fully-qualified Java types of the method's input parameters (if the method 
   has no input arguments, the method-params element contains no method-param 
   elements). Arrays are specified by the array element's type, followed by 
   one or more pair of square brackets (e.g. int[][]).

    
   The optainal ejb-deployment-id element can be used to narrow the scope of the 
   declaration to one specific deployment within the container-system.
   If an ejb-deployment-id is not specified, the declaration applies to all 
   matching bean methods (home and remote interface) in all deployments.
   
   The optional method-intf element can be used when it becomes
   necessary to differentiate between a method defined in the home
   interface and a method with the same name and signature that is
   defined in the remote interface.
-->
<!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+)>

<!--
The method-transaction element specifies how the container must
manage transaction scopes for the enterprise bean's method invocations.
The element consists of an optional description, a list of method
elements, and a transaction attribute.The transaction attribute is to
be applied to all the specified methods.

Used in: container-system 
Maps to: container-transaction ejb-jar_1_1
-->
<!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)>

<!--
The role-link element is used to link a security role reference to a
defined security role. The role-link element must contain the name of
one of the security roles defined in the security-role elements.
Used in: security-role-ref
-->
<!ELEMENT role-link (#PCDATA)>


<!ELEMENT remote (#PCDATA)>
<!--
The res-auth element specifies whether the enterprise bean code signs
on programmatically to the resource manager, or whether the Container
will sign on to the resource manager on behalf of the bean. In the
latter case, the Container uses information that is supplied by the
Deployer.
The value of this element must be one of the two following:
<res-auth>Application</res-auth>
<res-auth>Container</res-auth>
Mapps to: res-auth ejb-jar_1_1
-->
<!ELEMENT res-auth (#PCDATA)>
<!--
The res-id maps to a connector-id in the corresponding connectors section. For example a 
JDBC DataSource resource-ref would be supported by a connector and its res-id would map 
to the connector-id in connector declaration.
Used in: resource-ref
-->
<!ELEMENT res-id (#PCDATA)>
<!--
The res-ref-name element specifies the name of a resource manager con-nection
factory reference.
Used in: resource-ref
Mapps to: res-ref-name ejb-jar_1_1
-->
<!ELEMENT res-ref-name (#PCDATA)>
<!--
The res-type element specifies the type of the data source. The type
is specified by the Java interface (or class) expected to be imple-mented
by the data source.
Used in: resource-ref
Mapps to: res-type ejb-jar_1_1
-->
<!ELEMENT res-type (#PCDATA)>
<!--
The resource-ref element contains a declaration of enterprise beans
reference to an external resource. It consists of an optional description,
the resource factory reference name, the indication of the
resource manager connection factory type expected by the enterprise
bean code, the type of authentication (bean or container), and either a
res-id which maps to the corresponding services res-id, or a set of properties
Used in: jndi-enc
Example:
<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>
Mapps to: resource-ref ejb-jar_1_1
-->
<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth, (res-id | res-ref-location | properties | connector-id))>
<!ELEMENT res-ref-location (remote-ref-name, jndi-context-id)> 

<!ELEMENT resource (description?, res-id, properties)>

<!ELEMENT security-role (description?, role-name)>
<!--
The security-role-ref element contains the declaration of a security
role reference in the enterprise bean's code. The declaration con-sists
of an optional description, the security role name used in the
code, and an optional link to a defined security role.
The value of the role-name element must be the String used as the
parameter to the EJBContext.isCallerInRole(String roleName) method.
The value of the role-link element must be the name of one of the
security roles defined in the security-role elements.
Used in: entity and session
-->
<!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)>

<!--
The trans-attribute element specifies how the container must manage the
transaction boundaries when delegating a method invocation to an
enterprise bean's business method.

The value of trans-attribute must be one of the following:
		<trans-attribute>NotSupported</trans-attribute>
		<trans-attribute>Supports</trans-attribute>
		<trans-attribute>Required</trans-attribute>
		<trans-attribute>RequiresNew</trans-attribute>
		<trans-attribute>Mandatory</trans-attribute>
		<trans-attribute>Never</trans-attribute>
		<trans-attribute>Bean</trans-attribute> (indicates bean managed transaction. Stession beans only)
Used in: method-transaction
Maps to: trans-attribute ejb-jar_1_1
-->
<!ELEMENT trans-attribute (#PCDATA)>


