|
> Overview |
|
Last
revision of this document: |
This
structure contains the parameters for connecting an application to a
database or a Java-Application-Server (JAS).
Depending where the
persitant data is stored/retrieved, the respective elements for the
database or the JAS might be missing.
None;
this document accompanies the development of a fat-client with
Java (Develop a Fat-Client in Java) and
explains the structure of the xml-file with the parameters for
connecting to a database or a Java-Application-Server (JAS).
Example:This
example is an excerpt from a not yet published project.
That
means, the listed example has nothing to do with the Tutorial
to Develop a Fat-Client in Java.
The
sample - an excerpt from the file 'DisplayStrings.xml':<!--
Root-Element (Connections); has to be there otherwise the parser
reports an error -->
<Connections><!--
*********************************************
--></<!--
********** Parameters for connecting to a database ***********
-->
<DataBaseParameters> <DataBaseDriverName>com.mysql.jdbc.Driver</DataBaseDriverName> <DataBaseName>jdbc:mysql://192.168.0.125:3306/js_tutorial</DataBaseName> <DataBaseUserID> mysql</</DataBaseUserID> <DataBasePassword>drowssapDataBasePassword></DataBaseParameters> <JASParameters> <DataBaseDriverName>com.mysql.jdbc.Driver</DataBaseDriverName> <DataBaseName>jdbc:mysql://192.168.0.125:3306/js_tutorial</DataBaseName> <DataBaseUserID>drowssapmysql<DataBasePassword></DataBaseUserID>
</ DataBasePassword></JAS>ParametersConnections>
<
is
enclosing the whole xml-structure.Connections>
An attribute name for the
whole xml-structure is requiered, as the parser (to read the file
and build a structure within a Java-application) is not capable to
read more than one xml-structure within one file.
<DataBaseParameters>
is
the section for the connection to the database-system.
If the
application is configured to be a Fat-Client to a
Java-Application-Server (JAS), this section can be omitted.
<DataBaseDriverName>
is
the name of the class (and the package) that contains the driver for
the installed database-system.
This package is usually provided
by the vendor of the database-system and the JAR-file that contains
it has to be defined within the JAVA-classpath.
<
is
the name of the database that was given to it with the 'create
database' command.DataBaseName>
Within several database-systems (like the
mySQL used in the example) some other specifications have to be
given here.
Please consult the documentation of the installed
database-system.
<
is
the code used within the application to open the selected
(Sub-)Task.DataBaseUserId>
If this element is missing, then entering the
<
expands the displayed tree-structure to show further
selection.DisplayedCode>
(This is dependant on your individual implementation
of the Application-Start-Frame !).
<
is
the explanatory text displayed on the tree-structure of the
Task-List.Description>
<Parameter1Label>
is
the explanatory text of the additional parameter that can be entered
at the Application-Start-Frame.
If this element is missing, the
Label is filled with spaces and the Text-Entry-Field for the
parameter is blanked and entering text into it is disabled.
<
is
the minimum number of characters that have to be entered before the
button to call a (Sub-)Task is enabled.Parameter1MinimumLength>
If this element is
missing, the entered text can be omitted.
<Parameter2Label>
similar
to <Parameter1Label>.
<
similar
to Parameter2MinimumLength><.Parameter1MinimumLength>
<Parameter3Label>
similar
to <Parameter1Label>.
<
similar
to Parameter3MinimumLength><.Parameter1MinimumLength>
Related
Documents:Directory
Architecture shows the structure of sub-directories with
parameter-files.