Création d'un connecteur JDBC à partir de RAFW.

  • Infrastructure.

  • +------------------------------+                                        +-----------------------------+ 
    | Serveur RAFW                 |                                        | Serveur WebSphere 8.5       | 
    | Hostname : saturn            |--(installe l'environement DMGR+NODE)-->| Hostname : arecibo          | 
    | Os : Linux 2.6.32            |                                        | Os : Linux                  | 
    |                              |                                        | DMGR : areciboNetwork       | 
    |                              |                                        | NODE : areciboNode          | 
    +------------------------------+                                        +-----------------------------+ 
    
  • Prendre le fichier d'exemple dans l'arborescense de la bonne version de WebSphere.

  • root@saturn:/opt/IBM/RAFServer/rafw/samples/xml/was/80# ls
    appLogins.xml                    coreGroups.xml               jdbc.xml                pmi.xml                  sharedlibs.xml  variables.xml
    appName_split_was_80.properties  default_wp_users_groups.xml  jms.xml                 resourceEnvironment.xml  SIBus.xml       vhosts.xml
    cache.xml                        fileRegistry.xml             mail.xml                rmiSecurity.xml          sib.xml         web_servers.xml
    consoleMembers.xml               j2c.xml                      name_space_binding.xml  security.xml             sslCerts.xml    wimconfig.xml
    coreGroupBridges.xml             jaas.xml                     osgi.xml                server.xml               url.xml
    root@saturn:/opt/IBM/RAFServer/rafw/samples/xml/was/80# cp jdbc.xml /opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork
    root@saturn:/opt/IBM/RAFServer/rafw/samples/xml/was/80#
    
  • Copie du fichier jdbc.xml du sample vers votre scope.

  • Après avoir copier le fichier jdbc.xml dans le bon scope adapté votre configuration à ce que vous souhaitez.
    root@saturn:/opt/IBM/RAFServer/rafw/samples/xml/was/80# cp jdbc.xml /opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1
    root@saturn:/opt/IBM/RAFServer/rafw/samples/xml/was/80#
    
    
    
  • Modification du fichier jdbc.xml.

  • Toutes les balises de configuration possible existe dans le fichier sample, il vous faudra adapter ce fichier et le sauvegarder.
    root@saturn:/opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1# vi jdbc.xml
    <?xml version="1.0"?>
    <jdbc>
            <RAFW_JDBCProviders>
            <JDBCProvider
                    classpath="${ORACLE_JDBC_DRIVER_PATH}/toto/titi/ojdbc14.jar"
                    description="Oracle JDBC Driver (XA)"
                    implementationClassName="oracle.jdbc.xa.client.OracleXADataSource"
                    isolatedClassLoader="false"
                    name="JDBC Provider - Oracle JDBC Driver (XA)"
                    nativepath=""
                    providerType="Oracle JDBC Driver (XA)"
                    xa="true"
            >
            </JDBCProvider>
       </RAFW_JDBCProviders>
    
    </jdbc>
    
    :x!
    
  • Lancer la commande suivante :

  • ./rafw.sh -e arecibo -c areciboNetwork -n areciboNode -s server1 -execute was_common_configure_jdbc_providers
    root@saturn:/opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1# /opt/IBM/RAFServer/rafw/bin/rafw.sh -e arecibo -c areciboNetwork -n areciboNode -s server1 -execute was_common_configure_jdbc_providers
    CRWFW0026I A new run with the following ID 33au is starting at Sep 19, 2013 15:05:59 CEST
    Rational Automation Framework version 3.0.0.5 build 20121029-1616
    Including the following modules:
         WebSphere Liberty Profile version 8.5.0.0
         Midvision Extension Module version 1.0.0.1
    
    CRWFW0104I Using the values defined for the properties OS_USER and OS_PASSWORD for the user 'was80'
    defined in the file user/environments/arecibo/cells/areciboNetwork/configure.properties
    CRWFW0103I Using the following value for OS_GROUP 'web' defined in the file
     user/environments/arecibo/cells/areciboNetwork/configure.properties
    CRWFW0015I A network connection has been made to 'arecibo'
    CRWFW0013I A list of files that are already on the target system is being created.
    CRWFW0066I 1 files are being transferred.
    CRWFW0017I The following files are being transferred:
       user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml
    
    CRWFW0113I 0 files need to have their file permissions changed.
    Buildfile: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/build.xml
    
    default:
      [rafwlog] CRWFW0001I If an error occurs, check '/apps/Rational/RAFW//logs/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/was_common_configure_jdbc_providers.log'
      [rafwlog] CRWFW0014I Beginning action was_common_configure_jdbc_providers on host arecibo
         [echo] Apache Ant version 1.7.0 compiled on December 13 2006
    
    scope_init:
    
    was_common_configure_jdbc_providers:
         [echo] execute: jdbc providers defined at the server level for server1
    
    assert_file:
    
    execute_wsadmin_command:
         [echo] Decrypting passwords in file: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml
    [encryptfile] CRWFW0121I Passwords are being decrypted in the following file: '/apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml'
    
    scope_init:
    
    prepare_shell:
    
    decode_password:
    
    was_init:
    
    jython_jacl_init:
    
    java_init:
    
    build_wsadmin_exec_string:
    
    use_lr_wsadmin:
    
    call_wsadmin_function:
         [exec] WASX7209I: Connected to process "dmgr" on node areciboManager using SOAP connector;  The type of process is: DeploymentManager
         [exec] Creating types in scope: /Cell:areciboNetwork/Node:areciboNode/Server:server1/ types: ['JDBCProvider']
         [exec] CRWWA9902I ConfigWriter - _createWASObject: creating: JDBCProvider under parent: server1(cells/areciboNetwork/nodes/areciboNode/servers/server1|server.xml#Server_1379514614324)
         [exec] Created config object JDBCProvider: "JDBC Provider - Oracle JDBC Driver (XA)(cells/areciboNetwork/nodes/areciboNode/servers/server1|resources.xml#JDBCProvider_1379595988908)"
         [exec] Saving Config...
         [exec] Synchronizing Nodes...
         [exec] --## areciboNode contains a non-deploymentManger and will be synced ##--
         [exec] checking for the existence of a NodeSync MBean on node areciboNode
         [exec] Invoking synchronization for node WebSphere:name=nodeSync,process=nodeagent,platform=common,node=areciboNode,diagnosticProvider=true,version=8.0.0.5,type=NodeSync,mbeanIdentifier=nodeSync,cell=areciboNetwork,spec=1.0 because serverStartupSyncEnabled is set to false...
         [exec] Done with synchronization.
       [delete] Deleting: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml.decrypted
    
    scope_init:
    
    was_common_configure_jdbc_datasources:
         [echo] execute: jdbc datasources defined at the server level for server1
    
    assert_file:
    
    call_wsadmin:
         [echo] Decrypting passwords in file: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml
    [encryptfile] CRWFW0121I Passwords are being decrypted in the following file: '/apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml'
    
    scope_init:
    
    prepare_shell:
    
    decode_password:
    
    was_init:
    
    jython_jacl_init:
    
    java_init:
    
    build_wsadmin_exec_string:
    
    use_lr_wsadmin:
    
    call_wsadmin_script:
         [exec] WASX7209I: Connected to process "dmgr" on node areciboManager using SOAP connector;  The type of process is: DeploymentManager
         [exec] WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-washome, /apps/WebSphere/profiles80/node, -scope, server, -scopename, server1, -nodename, areciboNode, -properties, /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml.decrypted, -mode, execute]"
         [exec] Creating datasources in scope: /Cell:areciboNetwork/Node:areciboNode/Server:server1/
       [delete] Deleting: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml.decrypted
    
    scope_init:
    
    was_common_configure_jdbc_was40_datasources:
         [echo] execute: jdbc was40 datasources defined at the server level for server1
    
    assert_file:
    
    call_wsadmin:
         [echo] Decrypting passwords in file: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml
    [encryptfile] CRWFW0121I Passwords are being decrypted in the following file: '/apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml'
    
    scope_init:
    
    prepare_shell:
    
    decode_password:
    
    was_init:
    
    jython_jacl_init:
    
    java_init:
    
    build_wsadmin_exec_string:
    
    use_lr_wsadmin:
    
    call_wsadmin_script:
         [exec] WASX7209I: Connected to process "dmgr" on node areciboManager using SOAP connector;  The type of process is: DeploymentManager
         [exec] WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[-washome, /apps/WebSphere/profiles80/node, -scope, server, -scopename, server1, -nodename, areciboNode, -properties, /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml.decrypted, -mode, execute]"
         [exec] Creating WAS 40 jdbc datasources in scope: /Cell:areciboNetwork/Node:areciboNode/Server:server1/
       [delete] Deleting: /apps/Rational/RAFW/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/jdbc.xml.decrypted
    
    prepare_shell:
    
    change_directory_ownership:
    
    prepare_shell:
    
    change_directory_ownership:
    
    prepare_shell:
    
    change_directory_ownership:
    [querychangedfiles] CRWFW6009I Computing list of files modified during action execution for scope arecibo/cells/areciboNetwork
    
    BUILD SUCCESSFUL
    Total time: 56 seconds
    CRWFW0059I The following file is being transferred from the target system to the framework server: logs/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/was_common_configure_jdbc_providers.wsadmin
    CRWFW0059I The following file is being transferred from the target system to the framework server: logs/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/was_common_configure_jdbc_providers.log
    CRWFW0059I The following file is being transferred from the target system to the framework server: logs/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1/was_common_configure_jdbc_providers.trace
    CRWFW7070I Disconnected from 'arecibo'
    root@saturn:/opt/IBM/RAFServer/rafw/user/environments/arecibo/cells/areciboNetwork/nodes/areciboNode/servers/server1#
    
    
    

  • Voici le résultat.

  • Création d'un connecteur JDBC oracle avec RAF
  • Url IBM.

  • lien pour l'option de commande was_common_configure_jdbc_providers.