Professional Documents
Culture Documents
Auto Config Customizing
Auto Config Customizing
The way to do customization was to insert custom code between the Begin
Customization and End Customization blocks in the XML file. It was difficult to
document and keep track of the customizations that were made. Now Oracle has
come up with a better way to manage and maintain customizations.
As you have noted from the earlier discussion, AutoConfig uses template files to
generate final files. So the logical place would be to create a custom template file in
the same location and tell AutoConfig process to look at this custom template file
rather than the normal template file that comes out of the box.
Customization Steps
First find out the corresponding AutoConfig template file for the configuration file to
be customized
The adtmplreport utility returns the name and location of the AutoConfig template
file. For the above example it would return:
$FND_TOP/admin/template/appsweb.cfg.
If you need to customize something on the Database side, you can use similar
command structure $ORACLE_HOME/appsutil/bin/adtmplreport.sh contextfile= \
$ORACLE_HOME/appsutil/(CONTEXT_NAME).xml target= (Configuration File with Full
Path)
Note: You cannot customize all AutoConfig template files. The AutoConfig template
file cannot be customized if the "LOCK" keyword appears in the template file's entry
in the product driver file.
AutoConfig ignores custom template files that are marked with "LOCK".
Copy the AutoConfig template fileCopy the AutoConfig template file to the custom
template file.
Edit the custom template file Edit the custom template file with a text editor with
required customizations.
Note: Do not edit the original template files. It will violate your support contract with
Oracle support
This utility :
Detects all configuration files that have "Begin/End customizations" blocks.
Copies the corresponding AutoConfig template files to custom template files.
Appends the contents between "Begin/End customizations" blocks at the end of the
custom template files.
Removes the "Begin/End customizations" blocks from the configuration file.
Review the logfile generated by the adcustomizer script. Ensure that all your
customizations were successfully migrated to the custom template file(s) by
examining the generated custom template file(s).
Adding New context variable to the context file
You can add a new context variable to be managed by AutoConfig. You can use
AutoConfig context editor that comes up Oracle Applications Manager to accomplish
this. Note that this is available from OAM.H patch level
AutoConfig Internals
AutoConfig Internals
So what happens when you run adconfig.sh script? Remember it uses the XML file
generated using adbldxml command. This XML file itself is build based upon the
environment settings. You should ensure that the environment is set correctly by
executing (CONTEXT_NAME).env script.
So one half of the equation comes from the XML file that we generated. The other
half is the templates for each of the configuration file the AutoConfig process
ultimately generates.
For each of the configuration file that gets generated as a result of running
AutoConfig, Oracle uses a template file that come with the initial install process.
# FILENAME
# adalnctl.sh
# # DESCRIPTION
# Start / Stop Applications RPC Listener process for %s_dbSid%
# Make sure the logfile directory exists
#
if [ ! -d "%s_com%/admin/log/%s_dbSid%" ];
then mkdir -p %s_com%/admin/log/%s_dbSid%
fi;
# # Set up the logfile for this instance #
if [ -n "$SRVLOG" ];
then LOGFILE=$SRVLOG
else
LOGFILE="%s_com%/admin/log/%s_dbSid%/adalnctl.txt"
fi;
touch $LOGFILE
Notice the s_dbSid variable being used in this script. The value for this variable will
be read from the XML file generated when we ran the perl script adbldxml.pl.
Following the excerpt from the actual (CONTEXT_NAME).xml file located under
$APPL_TOP/admin directory. Note that I have removed <> tags to enhance
readability.
oa_system
oa_system_name oa_var="s_systemname"SND1/oa_system_name global_db_name
oa_var="s_dbSid"snd1/global_db_name
global_db_name oa_var="s_dbGlnam">SND1/global_db_name
db_name_lower oa_var="s_dbSidLower"snd1/db_name_lower
PRINTER oa_var="s_printer"noprint/PRINTER
!oa_system_config
As you can see, the actual file is created as copy from the template with values
replaced from XML file.
# FILENAME
# adalnctl.sh
# # DESCRIPTION
# Start / Stop Applications RPC Listener process for snd1
if [ ! -d `dirname /u10/apps/snd1/comn/admin/log/snd1_ebdev03/adalnctl.txt` ];
then mkdir -p `dirname
/u10/apps/snd1/comn/admin/log/snd1_ebdev03/adalnctl.txt`
fi;
# # Set up the logfile for this instance #
Conclusion
We have seen how AutoConfig creates the configuration files from template files.
Posted by suresh chaganti at 11:12 AM 0 comments
Friday, May 25, 2007
Autoconfig Indepth
Background
CONTEXT_NAME
Logical name for your Context. Default: _In earlier versions the default was set to
Configuration file
The instantiated configuration file created when AutoConfig runs.For example:
$COMMON_TOP/html/bin/appsweb_$CONTEXT_NAME.cfg
Application Tier
(APPL_TOP)/admin/(CONTEXT_NAME)/log/(MMDDhhmm)
Database (
RDBMS ORACLE_HOME)/appsutil/log/(CONTEXT_NAME)/(MMDDhhmm)
There will be one log file per AutoConfig session, and it will contain exact information
for every action that AutoConfig performed.