Page 1 of 1

--Using server-side application configuration

PostPosted: Tue Oct 01, 2013 9:14 am
by Development@SIB


This article is outdated - please use our new system at

https://doc.sibvisions.com




Sometimes you'll need additional settings for your application. Such a setting might be an additional database login or path to xsd files or mail server configuration (if not available in your database).

There's no need to implement your own settings mechanism because JVx offers that out-of-the-box.
Simply add your settings to the existing config.xml of your application, e.g.:

Syntax: [ Download ] [ Hide ]
<?xml version="1.0" encoding="UTF-8"?>

<application>
  <securitymanager>
    ...
  </securitymanager>
  ...
  <schema>/com/sibvisions/object/ImportDefinition_Schema_2013_10_01.xsd</schema>
</application>

Above config.xml contains an addition tag: schema. This tag is not a pre-configured tag, it's user-defined and not used from JVx.

If you want to use the configured value in a life-cycle object or any other server-side object, simple add one line in your source code:

Syntax: [ Download ] [ Hide ]
String sSchema = SessionContext.getCurrentSessionConfig().
                                                       getProperty("/application/schema");