6.7. RAConfig

6.7.1. Synopsis

RAConfig [ Options ] InputFilename [OutputFilename]

Generates a JOnAS-specific resource-adapter configuration file.

6.7.2. Description

The RAConfig utility generates a JOnAS-specific resource-adapter configuration file (jonas-ra.xml) from an ra.xml file (Resource adapter deployment descriptor).

The InputFileName is the file name of a resource adapter.

The OutputFileName is the file name of an output resource adapter used with the -p (required) or -u (optional).

6.7.3. Options

-? or -help options

Gives a summary of the options.

-dm,-ds,-pc,-xa DriverManager, DataSource, PooledConnection, XAConnection

Specifies the rarlink value to configure; used with the -p option.

-j jndiname

It is a mandatory option. It specifies the JNDI name of the connection factory. This name corresponds to the name of the <jndi-name> element of the <jonas-resource> element in the JOnAS-specific deployment descriptor. This name is used by the resource service for registering in JNDI the connection factory corresponding to this resource adapter.

-p database_properties_file

Specifies the name of the database.properties file to process. The result of this processing will be a jonas-ra.xml file that will update the /META-INF/jonas-ra.xml file in the output RAR.

-r rarlink

Specifies the JNDI name of the RAR file with which to link. This option can be used when this RAR file will inherit all attributes associated with the specified JNDI name. If this option is specified in the jonas-ra.xml file, it is the only file needed in the RAR, and the ra.xml file will be processed from the rarlink file.

-u inputname

Specifies the name of the XML file to process. This file will update the /META-INF/jonas-ra.xml file in the RAR. If this argument is used, it is the only argument executed.

-verbose

Verbose mode. Displays the deployment descriptor of the resource adapter on standard System.out.

6.7.4. Example

RAConfig -j adapt_1 MyRA.rar

Generates the jonas-ra.xml file from the ra.xml file.

After jonas-ra.xml has been configured for the MyRA.rar file,

RAConfig -u jonas-ra.xml MyRA.rar

Updates/inserts the jonas-ra.xml file into the RAR file.

RAConfig -dm -p MySQL1 $JONAS_ROOT/rars/autoload/JOnAS_jdbcDM MySQL_dm

Generates the jonas-ra.xml file from the ra.xml file of the JOnAS_jdbcDM.rar and inserts the corresponding values from the MySQL1.properties file. The jonas-ra.xml file is then added/updated to the MySQL_dm.rar file. This RAR file can then be deployed and will replace the configured MySQL1 datasource.