*******************************************************************************
*                                                                             *
*                     JMX connections resource adapter                        *
*                                                                             *
*******************************************************************************

****************** 
* Description
******************

Find here a ResourceAdapter providing a pool of JMX connections. 
The lookup on the JNDI server will give you a factory, on wich you can get 
 JMX Connections.
On these connections, you'll be able to release it (free in the pool, but not
 physically closed) or close (physically closed and free in the pool).

The resource adapter is composed of : 
- a generic RA (jmxadapter_for_jonas.rar)
- a specific RA which will be specific to one JMX URL to monitor. 
    This one has to be generated

****************** 
* Configuration & Generation
******************

To use the JMX connections resource adapter, you have to generate a specific 
  RA, related to the JMX URL you want to access.
To generate this RA, you can use the script generate-ra.[bat|sh]

Usage : 

  generate-ra.sh [-j <JMX URL>] [-l] [-p <file.properties>] 
    [-o <outputFileName>] [-d]
  
  generate-ra.bat [-j <JMX URL>] [-l] 
    [-p <minconpool> <maxconpool> <conmaxage> <maxopentime> <maxwaiters> 
    <maxwaittime>] [-o <outputFileName>] [-d] 

Options

  -h Print the help message.
  
  -l This option has to be set if running on JOnAS 4.8.x, 4.9.x, 5.0.3 
       or older versions.
  
  -j <JMX URL> 
     Set the JMX URL of the server you want to connect to.
     default :
          service:jmx:rmi:///jndi/rmi://localhost:1099/jrmpconnector_jonas

  -p <file.properties> 
     Specify a property file to build the RA. 
     Default value is jmxconnectionra.properties. 
     This file is used to configure the RA pool.
     
     Note: file.properties cannot be used with generate-ra.bat
           You have to set directly properties value to the command
           -p <minconpool> <maxconpool> <conmaxage> <maxopentime>
              <maxwaiters> <maxwaittime>
           Default values are : -p 0 5 1440 1 50 10

  -o <outputFileName> 
     Specify the output file name of the ra.
     Default value is JMXGeneratedRA. 
     The .rar extension is automatically set.

  -d If this option is set, the generated RA will be moved into the JONAS_BASE
       deploy directory.
            

Example :

  generate-ra.sh 
    -j service:jmx:rmi:///jndi/rmi://localhost:1099/jrmpconnector_jonas
    -o JMXConnectionRA_1 -d 


****************** 
* Installation
******************

Both of jmxadapter_for_jonas.rar and JMXConnectionRA.rar have to be deployed.
