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

<!--
/*
 * JOnAS: Java(TM) Open Application Server
 * Copyright (C) 1999 Bull S.A.
 * Contact: jonas-team@objectweb.org
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * Initial developer(s): France Telecom.
 *
 *
 * $Id$
 *
*/
-->

<!--
This is XML DTD for jonas specific EJB 2.0 deployment descriptor information.
-->

<!--
The automatic-pk element specifies if you would like to used an primary key auto-generated.
The default value is false.

Used in: jdbc-mapping
-->
<!ELEMENT automatic-pk (#PCDATA)>

<!--
The cleanup element specifies the policy about cleanup at bean loading.
Possible values are : none, create, removeall, removedata.
'none' is not implemented, the default value is 'create'.

Used in: jonas-entity
-->
<!ELEMENT cleanup (#PCDATA)>


<!--
The cmp-field-jdbc-mapping element declares the mapping of a container-managed field
of an entity to a column of a relational table.
It consists of
  - the field's name,
  - the column name of the relational table,
  - and optionaly the associated sql-type (CMP2 only).

Used in: jdbc-mapping
-->
<!ELEMENT cmp-field-jdbc-mapping (field-name, jdbc-field-name, sql-type?)>


<!--
The ejb-name element specifies an enterprise bean's name.

Used in: jonas-entity, jonas-session, jonas-message-driven-bean
-->
<!ELEMENT ejb-name (#PCDATA)>


<!--
The ejb-ref-name element specifies the name of an ejb reference.

Used in: jonas-ejb-ref
-->
<!ELEMENT ejb-ref-name (#PCDATA)>


<!--
The ejb-relation-name element specifies the name of an relation (CMP2 only).

Used in: jonas-ejb-relation
-->
<!ELEMENT ejb-relation-name (#PCDATA)>


<!--
The ejb-relationship-role-name element specifies the name of an relationship-role (CMP2 only).

Used in: jonas-ejb-relationship-role
-->
<!ELEMENT ejb-relationship-role-name (#PCDATA)>


<!--
The field-name element specifies the name of a container managed field.

Used in: cmp-field-jdbc-mapping
-->
<!ELEMENT field-name (#PCDATA)>


<!--
The finder-method-jdbc-mapping element declares the SQL WHERE clause associated to a
finder method of a container-managed persistence entity.
It consists of
  - the description of the finder method,
  - the SQL WHERE clause.
This is used only for entity bean CMP1.

Used in: jdbc-mapping
-->
<!ELEMENT finder-method-jdbc-mapping (jonas-method, jdbc-where-clause)>


<!--
The foreign-key-jdbc-mapping element specifies a foreign key column name and
its associated primary key column name.

Used in: jonas-ejb-relationship-role
-->
<!ELEMENT foreign-key-jdbc-mapping (foreign-key-jdbc-name, key-jdbc-name?)>


<!--
The foreign-key-jdbc-name element specifies a foreign key column name of a relational table.

Used in: foreign-key-jdbc-mapping
-->
<!ELEMENT foreign-key-jdbc-name (#PCDATA)>


<!--
The is-modified-method-name element specifies the name of the is-modified method of a
entity.

Used in: jonas-entity
-->
<!ELEMENT is-modified-method-name (#PCDATA)>


<!--
The jdbc-field-name element specifies a column name of a relational table.

Used in: cmp-field-jdbc-mapping
-->
<!ELEMENT jdbc-field-name (#PCDATA)>


<!--
The jdbc-mapping element declares the mapping of an entity with container-managed
persistence to the underlying database.
It consists of
  - the JNDI name of the datasource (CMP only),
  - the name of the relational table (CMP only),
  - an optional flag (true or false) to use automatic generation of primary key, (CMP only)
  - for each container-managed field, the associated column name in the table, (CMP only)
  - for each finder method, the associated SQL WHERE clause. (CMP1 only)

Used in: jonas-entity
-->
<!ELEMENT jdbc-mapping (jndi-name, jdbc-table-name?, automatic-pk?, cmp-field-jdbc-mapping*, finder-method-jdbc-mapping*)>



<!--
The jdbc-table-name element specifies a name of a relational table.

Used in: jdbc-mapping (for CMP only)
-->
<!ELEMENT jdbc-table-name (#PCDATA)>


<!--
The jdbc-where-clause element specifies a SQL WHERE clause.

Used in: finder-method-jdbc-mapping (for CMP1.x only)
-->
<!ELEMENT jdbc-where-clause (#PCDATA)>

<!--
The jndi-name element specifies a JNDI name.

Used in: jdbc-mapping, jonas-entity, jonas-session, jonas-resource
-->
<!ELEMENT jndi-name (#PCDATA)>


<!--
The jonas-ejb-jar element is the root element of the JOnAS specific EJB deployment descriptor.
It contains the JOnAS specific information about all included enterprise beans.
-->
<!ELEMENT jonas-ejb-jar (jonas-session | jonas-entity | jonas-message-driven | jonas-ejb-relation)+>


<!--
The jonas-ejb-ref element declares the JOnAS specific information for a reference
to another enterprise bean's home.
It consists of
  - the name of the ejb reference specified in the standard EJB deployment
    descriptor,
  - the JNDI name of the ejb.

Used in: jonas-entity, jonas-session, jonas-message-driven
-->
<!ELEMENT jonas-ejb-ref (ejb-ref-name, jndi-name)>


<!--
The jonas-ejb-relation element declares the mapping of a relation to the underlying database.
It consist of
  - the name of the relation specified in the standard EJB deployment descriptor,
  - the optional name of the relational joint table,
  - and for the two relationship roles of the relation, the mapping of those relationship roles.

Used in: jonas-ejb-jar
-->
<!ELEMENT jonas-ejb-relation (ejb-relation-name, jdbc-table-name? , jonas-ejb-relationship-role*)>


<!--
The jonas-ejb-relationship-role element declares the mapping of a relationship-role of a relation.
It consist of
  - the name of the relationship-role specified in the standard EJB deployment descriptor,,
  - and the names of the foreign key columns.

Used in: jonas-ejb-relation
-->
<!ELEMENT jonas-ejb-relationship-role (ejb-relationship-role-name, foreign-key-jdbc-mapping+)>


<!--
The jonas-entity element declares the JOnAS specific information for an entity.
It consists of
  - the enterprise bean's name specified in the standard EJB deployment descriptor,
  - the JNDI name of the enterprise bean's home,
  - JOnAS specific information about the external resources referenced by the bean,
  - JOnAS specific information about the reference to other enterprise's bean homes,
  - optional is-modified method name,
  - optional passivation-timeout,
  - optional shared flag, must be defined True if bean persistent state can be accessed
    outside JOnAS server,
  - optional max-cache-size value, defining the max nb of instances in memory,
  - optional min-pool-size value, defining the minimum instances precreated in pool,
  - information of the mapping of the bean to the underlying database in case of
    an entity with container-managed persistence.

Used in: jonas-ejb-jar
-->
<!ELEMENT jonas-entity (ejb-name, jndi-name?, 
                        jonas-resource*, jonas-resource-env*, jonas-ejb-ref*,
                        jonas-service-ref*, is-modified-method-name?,
                        passivation-timeout?, shared?, max-cache-size?,
                        min-pool-size?, cleanup?, jdbc-mapping?)>


<!--
The jonas-message-driven-bean element declares the JOnAS specific information for
a message driven bean.
It consists of
  - the enterprise bean's name specify in the standard EJB deployment descriptor,
  - JOnAS specific information about the message-driven destination,
  - JOnAS specific information about the external resources referenced by the bean,
  - JOnAS specific information about the reference to other enterprise's bean homes.
  - optional max-cache-size value, defining the max nb of instances in memory,
  - optional min-pool-size value, defining the minimum instances precreated in pool,

Used in: jonas-ejb-jar
-->
<!ELEMENT jonas-message-driven (ejb-name, jonas-message-driven-destination, 
                                jonas-resource*, jonas-resource-env*, jonas-ejb-ref*, 
                                jonas-service-ref*, max-cache-size?, min-pool-size?)>


<!--
The jonas-message-driven-destination element declares the JOnAS specific information for
a the message driven bean destination.
It consists of
  - the JNDI name of the message driven destination.

Used in: jonas-message-driven
-->
<!ELEMENT jonas-message-driven-destination (jndi-name)>


<!--
The jonas-method element is used to denote a method of the enterprise bean's home.
It consists of
  - the method's name,
  - optional method-params elements identify a single method among multiple methods
    with an overloaded method name.

Used in: finder-method-jdbc-mapping
-->
<!ELEMENT jonas-method (method-name, method-params?)>


<!--
The jonas-resource element declares the JOnAS specific information for an external
resource referenced by a bean.
It consists of
  - the name of the resource reference specified in the standard EJB deployment
    descriptor,
  - the JNDI name of the resource.

Used in: jonas-entity, jonas-session, jonas-message-driven
-->
<!ELEMENT jonas-resource (res-ref-name, jndi-name)>


<!--
The jonas-resource-env element declares the JOnAS specific information for an external
resource environment referenced by a bean.
It consists of
  - the name of the resource environment reference specified in the standard EJB deployment
    descriptor,
  - the JNDI name of the resource environment.

Used in: jonas-entity, jonas-session, jonas-message-driven
-->
<!ELEMENT jonas-resource-env (resource-env-ref-name, jndi-name)>


<!--
The jonas-session element declares the JOnAS specific information for a session.
It consists of
  - the enterprise bean's name specify in the standard EJB deployment descriptor,
  - the JNDI name of the enterprise bean's home,
  - JOnAS specific information about the external resources referenced by the bean,
  - JOnAS specific information about the reference to other enterprise's bean homes,
  - optionnal session-timeout.

(Nota Bene: The time-out of the session will be specified there when it will be implemented).

Used in: jonas-ejb-jar
-->
<!ELEMENT jonas-session (ejb-name, jndi-name?, 
                         jonas-resource*, jonas-resource-env*, jonas-ejb-ref*, 
                         jonas-service-ref*, 
			 session-timeout?, max-cache-size?, min-pool-size? )>


<!--
The key-jdbc-name element specifies a primary key column name of a relational table.

Used in: foreign-key-jdbc-name
-->
<!ELEMENT key-jdbc-name (#PCDATA)>


<!--
The max-cache-size value defines the max number of instances that can be hold in memory.
The default value is infinite.

Used in: jonas-entity, jonas-session, jonas-message-driven
-->
<!ELEMENT max-cache-size (#PCDATA)>


<!--
The method-name element contains a name of an enterprise bean method.

Used in: jonas-method
-->
<!ELEMENT method-name (#PCDATA)>


<!--
The method-param element contains the fully-qualified Java type name of a method
parameter.

Used in: method-params
-->
<!ELEMENT method-param (#PCDATA)>


<!--
The method-params element contains a list of the fully-qualified Java type names
of the method parameters.

Used in: jonas-method
-->
<!ELEMENT method-params (method-param*)>


<!--
The min-pool-size value specify the number of instances that will be created to populate
the pool when the bean is loaded for the first time.
The default value is 0.

Used in: jonas-entity, jonas-session, jonas-message-driven
-->
<!ELEMENT min-pool-size (#PCDATA)>


<!--
The passivation-timeout element specifies the value of timeout in seconds for passivation of
entity instances when no transaction are used.

Used in: jonas-entity
-->
<!ELEMENT passivation-timeout (#PCDATA)>


<!--
The res-ref-name element specifies the name of a resource factory reference.

Used in: jonas-resource
-->
<!ELEMENT res-ref-name (#PCDATA)>


<!--
The resource-env-ref-name element specifies the name of a resource environment reference.

Used in: jonas-resource-env
-->
<!ELEMENT resource-env-ref-name (#PCDATA)>

<!--
The session-timeout element specifies the value of timeout in seconds for expiration of
session instances.

Used in: jonas-session
-->
<!ELEMENT session-timeout (#PCDATA)>


<!--
The shared element specifies if the bean state can be accessed outside JOnAS.
Possible values are True or False (default is False).

Used in: jonas-entity
-->
<!ELEMENT shared (#PCDATA)>


<!--
The sql-type element specifies the SQL type (CMP2 only).

Used in: cmp-field-jdbc-mapping
-->
<!ELEMENT sql-type (#PCDATA)>

<!--
The jonas-service-ref definies a reference on a Web Service

Used in: jonas-entity | jonas-session | jonas-message-driven
-->
<!ELEMENT jonas-service-ref (service-ref-name, jndi-name,
                             jonas-init-param*)>

<!--
The service-ref-name element specifies lookup name for the Web Service.

Used in: jonas-service-ref
-->
<!ELEMENT service-ref-name (#PCDATA)>

<!--
The init-param element specifies a name/value pair used to
initialize the WebService

Used in: jonas-service-ref
-->
<!ELEMENT jonas-init-param (param-name, param-value)>

<!--
The param-name element specifies the name
of the parameter

Used in: init-param
-->
<!ELEMENT param-name (#PCDATA)>

<!--
The param-value element specifies the name
of the parameter

Used in: init-param
-->
<!ELEMENT param-value (#PCDATA)>


