Products Downloads


French version


 

With WebSphere or Tomcat Web servers, it is possible to specify resources external to a Web application that are accessed via a URL. Adelia first attempts to use the URL; if no URL has been specified, Adelia searches for the file in the execution context.

 

The following Adelia runtime configuration files are managed as external resources:

  • The CfgConfiguration.properties file
    URL: url/adelia/CfgConfiguration.

  • Middleware session pool configuration files
    URL: url/adelia/poolSession_<PoolName>
    (where PoolName = Pool in the case of the Pool.properties file (pool by default))

  • Middleware session preparer configuration files
    URL: url/adelia/SessionPrep_<SessionPreparerName>

  • The MWCLIENT.INI file
    The reference to the file or URL is made via the ID_FILE_CONFIG key:
    ID_FILE_CONFIG = [URL]<reference resource name>;<(complete) name of real file>
    Example: ID_FILE_CONFIG =[URL]url/myMwClient;MWCLIENT.INI

  • The MWSERVER.INI file
    The reference to the file or URL is made via the ID_FILE_CONFIG_SRV key:
    ID_FILE_CONFIG_SRV = [URL]<reference resource name>;<(complete) name of real file>

  • The apiva.properties file
    The reference to the file or URL is made via the ID_FILE_CONFIG_APIVA key:
    ID_FILE_CONFIG_APIVA  =[URL]url/apiva;apiva.properties

  • The CfgWebServices.xml file
    The reference to the file or URL is made via the ID_FILE_CONFIG_WEBSERVICES key:
    ID_FILE_CONFIG_WEBSERVICES=[URL]url/cfgwebservices;CfgWebServices.xml

  • The log4j.properties file
    The reference to the file or URL is made via the ID_FILE_CONFIG_LOG4J key:
    ID_FILE_CONFIG_LOG4J=[URL]url/log4j;log4j.properties

 

Implementation

  • Any external resources must be declared in the Web application's web.xml file, as follows:

<resource-ref id="ResourceUrl_on_myfile">

<description>url on myfile</description>

<res-ref-name>url/myfile</res-ref-name>

<res-type>java.net.URL</res-type>

<res-auth>Container</res-auth>

<res-sharing-scope>Shareable</res-sharing-scope>

</resource-ref>

  • For Tomcat, a resource is defined by specifying the following <Resource> tag in the server.xml file or associated context XML file (conf/localhost/MyApp.xml):

<Context crossContext="true" debug="5" docBase="MonAppli" path="/MonAppli" reloadable="true">

...

<Resource auth="Container"  name="url/monfichier" factory="com.hardis.adelia.common.URLFactory" type="java.net.URL" url="file:///c:/MonRepertoire/fichier.xxx" />

...

</Context>

 

Note:

In order to allow ".properties" files that contain application settings to be accessed as external resources, the VaToolBxJavaQueryValue function in the VaToolBx DLL takes into account any resources defined as URLs.

 

↑ Top of page

  • Aucune étiquette