The target audience for this guide is the Client component provider, i.e. the person in charge of developing the Client components on the client side. It describes how the Client component provider should build the deployment descriptors of its Client components.
The content of this guide is the following:
The Client component programmer is responsible for providing the deployment descriptor associated to the developed client components. As one goes along the different steps of the application development and deployment life cycle of the client components, (development, assembly, deployment), the deployment descriptor has to be completed.
The client component provider's responsibilities and the Application Assembler's responsibilities
is to provide a XML deployment descriptor respecting the deployment descriptor's XML DTD
defined in the Java TM Application Client Specification Version 1.3.
(See $JONAS_ROOT/xml/application-client_1_3.dtd
).
To be able to customize the Client components, informations not defined
in the standard XML deployment descriptor may be needed. Such information includes
for example the mapping of the name of referenced resources to its JNDI name.
This information can be specified, during the deployment phase, within another XML
deployment descriptor, which is specific to JOnAS.
The JOnAS specific deployment descriptor's XML DTD can be found in
$JONAS_ROOT/xml/jonas-client_X_Y.dtd
.
The file name of the JOnAS specific XML deployment descriptor must be 'jonas-client.xml'.
The JOnAS interpretation of the <!DOCTYPE> tag is particular,
at the parsing of the deployment descriptor XML files.
The parser try, first, to get the specified DTD via the classpath,
and then via the specified URL (or path).
Examples: in these two following examples, the parser get the
jonas-client_3_2.dtd
DTD file via the URL or in the /usr/local/jonas/xml/
directory.
<!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN" "http://java.sun.com/dtd/application-client_1_3.dtd"> <!DOCTYPE application-client SYSTEM "/usr/local/jonas/xml/application-client_1_3.dtd">
The standard deployment descriptor (application-client.xml) should contain structural information including:
The JOnAS specific deployment descriptor (jonas-client.xml) may contain information including:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN" "http://java.sun.com/dtd/application-client_1_3.dtd"> <application-client> <display-name>Client of the earsample</display-name> <description>client of the earsample</description> <env-entry> <env-entry-name>envEntryString</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>Test of envEntry of application-client.xml file</env-entry-value> </env-entry> <ejb-ref> <ejb-ref-name>ejb/Op</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>org.objectweb.earsample.beans.secusb.OpHome</home> <remote>org.objectweb.earsample.beans.secusb.Op</remote> <ejb-link>secusb.jar#EarOp</ejb-link> </ejb-ref> <resource-ref> <res-ref-name>url/jonas</res-ref-name> <res-type>java.net.URL</res-type> <res-auth>Container</res-auth> </resource-ref> <callback-handler>org.objectweb.jonas.security.auth.callback.LoginCallbackHandler</callback-handler> </application-client>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jonas-client PUBLIC "-//ObjectWeb//DTD JOnAS Client 3.2//EN" "http://www.objectweb.org/jonas/dtds/jonas-client_3_2.dtd"> <jonas-client> <jonas-resource> <res-ref-name>url/jonas</res-ref-name> <jndi-name>http://jonas.objectweb.org</jndi-name> </jonas-resource> <jonas-security> <jaasfile>jaas.config</jaasfile> <jaasentry>earsample</jaasentry> <username>jonas</username> <password>jonas</password> </jonas-security> </jonas-client>
Some characters, such "<" and "&" are strictly illegal in the XML data.
Others, such ">", are legal, but it is a good habit to replace them by XML entity references.
Here is the list of the predefined entity references in XML:
< | < | less than |
> | > | greater than |
& | & | ampersand |
' | ' | apostrophe |
" | " | quotation mark |