# DCesb.cfg: Collects Enterprise Service Bus Information # $Id: DCesb.cfg,v 1.8 2014/02/28 06:38:56 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCesb.cfg,v 1.8 2014/02/28 06:38:56 RDA Exp $ # # Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. # # Change history # 20140228 MSC Transform strings in regular expressions. ############################################################################### # Collect Enterprise Service Bus setup information ############################################################################### #------------------------------------------------------------------------------ # Module definition #------------------------------------------------------------------------------ col=${B_IN_USE} dsc='Collects Enterprise Service Bus Information' pre=OFM:DCj2ee rpt=B_IN_USE tgt=${I_OHC/C} var=not_used # Flow:in_use,B_IN_USE exe=sdcl { "if ${GRP.INIT.I_OH} "{var ${I_OHC/T} = $itm = last " var $ORACLE_HOME = $itm->get_first('D_ORACLE_HOME') " if ?testDir('d',catDir($ORACLE_HOME,'integration','esb')) " var @{AUX.var} = (cond(${PRF.B_TESTS},'in_use','B_IN_USE')) " keep $ORACLE_HOME "} } #------------------------------------------------------------------------------ # Setting definitions #------------------------------------------------------------------------------ [in_use] typ=B dft=true dsc='Is Enterprise Service Bus information requested?' nam=B_IN_USE var=B_DB_AUTO,I_OHC [not_used] typ=B dft=false dsc='Is Enterprise Service Bus information requested?' nam=B_IN_USE [B_IN_USE] typ=B dft=${AUX.B_SELECTED} dsc='Is Enterprise Service Bus information requested?' inp='Do you want RDA to analyze Enterprise Service Bus (ESB) (Y/N)?' var=true:B_DB_AUTO,I_OHC [B_DB_AUTO] typ=B dft=true dsc='Do you want RDA to collect the database connection details automatically?' inp='Do you want RDA to collect the database connection details \ automatically (Y/N)?' lvl=6 var=true:T_USER,need_sysdba,set_target:\ I_DB [T_USER] typ=T dft='oraesb' dsc='User to connect to SQL*Plus' inp='Enter an Oracle User ID (user name only) to view DBA_ and ESB_ related \ tables.' [need_sysdba] typ=B dft=check(${T_USER},'^\/',true,${B_SYSDBA}) dsc='Indicate that T_USER will connect as SYSDBA' inp="Is '${T_USER}' a SYSDBA user (will connect as SYSDBA) (Y/N)?" nam=B_SYSDBA [set_target] typ=B dsc='Determine the query target' nam=- exe=sdcl { "if !?${I_DB} "{var @tbl = () " var $J2EE_TOP = ${GRP.J2EE.D_TOP:catDir($ORACLE_HOME,'j2ee')} " " # Get the container list " if ?testFile('r',catFile($ORACLE_HOME,'opmn','conf','opmn.xml')) " {var $top = xmlLoadFile(lastFile()) " loop $xml (xmlFind($top,\ " 'opmn/process-manager/ias-instance/ias-component/process-type \ " module-id="OC4J"')) " call push(@tbl,xmlValue($xml,'id')) " } " elsif ?testDir('d',catDir($J2EE_TOP,'home')) " var @tbl = ('home') " " # Get the database connection details " var $sid = undef " loop $itm (@tbl) " {next !?testFile('r',catFile($J2EE_TOP,$itm,'config','data-sources.xml')) " var $top = xmlLoadFile(lastFile()) " if xmlFind($top,'data-sources/managed-data-source jndi-name="jdbc/esb$"') " {var $con = xmlValue(last,'connection-pool-name') " if xmlFind($top,concat('data-sources/connection-pool name="',\ " verbatim($con,'e'),'"/connection-factory')) " {var $sid = replace(xmlValue(last,'url'),'^.*@') " if match($sid,'^//([\w\-\.]+:{1}\d+/{1}.*)$') " {# Pattern for service name, eg: //hostname:port/service " var $sid = replace(last,'/','::') " } " break " } " } " } " " # Determine the corresponding query target " var $ttl = 'OFM.ESB queries' " if findItem('SQ',{B_DEDICATED=>true,\ " T_TITLE=>$ttl}) " var $db = defineTarget(last,{B_SYSDBA=>${B_SYSDBA},\ " T_ORACLE_SID=>$sid,\ " T_USER=>${T_USER}}) " else " var $db = defineTarget('SQ',{B_DEDICATED=>true,\ " B_SYSDBA=>${B_SYSDBA},\ " T_ORACLE_SID=>$sid,\ " T_TITLE=>$ttl,\ " T_USER=>${T_USER}}) " var ${I_DB:'Database to analyze'} = $db "} } [I_DB] typ=I cls='SQ' dft=nvl(findItem('SQ','T_USER','oraesb'),${SET.DB.DB.I_DB}) dsc='Database to analyze' exe=sdcl { "var ${RUN.CLASS.SQ.T_USER} = 'oraesb' } [I_OHC] typ=I cls='OH' dsc='Target associated with the Oracle home' vis=false