Showing posts with label R12. Show all posts
Showing posts with label R12. Show all posts

Friday, July 27, 2012

Configurator Model Size - Node count of the model

Usually its a common question in Configurator Development like how large the model is. Model size is usually determined by number of nodes created under it and its referenced models. When model performance is raised as a question, first question asked by analyzer would be how big the model is. Here is the query you can use for the same. This query returns the node count of all the models which are under given folder. You can modify the query to get node count for given project.

Q1) Count of nodes in model which are directly created under model

SELECT rpf.name folder_name,
  p.name model_name,
  p.devl_project_id,
  COUNT(*) node_count
FROM cz_devl_projects p,
  cz_ps_nodes pn,
  cz_rp_entries rpp,
  cz_rp_entries rpf
WHERE 1                  =1
AND rpp.object_id        =p.devl_project_id
AND rpp.enclosing_folder = rpf.object_id
AND pn.devl_project_id   = p.devl_project_id
AND p.deleted_flag       =0
AND pn.deleted_flag      =0
AND rpp.object_type      ='PRJ'
AND rpf.object_type      = 'FLD'
  --AND P.DEVL_PROJECT_ID=1037298
AND RPF.NAME LIKE 'Division A Models'
GROUP BY rpf.name ,
  p.name,
  p.devl_project_id;

Q2) Count of nodes in model which are directly created under this model + nodes created in all the referenced models of this model

SELECT rpf.name folder_name,
  p.name model_name,
  p.devl_project_id,
  COUNT(*) node_count
FROM cz_devl_projects p,
  cz_ps_nodes pn,
  cz_rp_entries rpp,
  cz_rp_entries rpf
WHERE 1                  =1
AND rpp.object_id        =p.devl_project_id
AND rpp.enclosing_folder = rpf.object_id
AND pn.devl_project_id  IN
  (SELECT component_id
  FROM cz_model_ref_expls mr
  WHERE mr.model_id  =p.devl_project_id
  AND mr.deleted_flag=0
  )
AND p.deleted_flag  =0
AND pn.deleted_flag =0
AND rpp.object_type ='PRJ'
AND rpf.object_type = 'FLD'
  --AND P.DEVL_PROJECT_ID=1037298
AND RPF.NAME LIKE ' Division A Models'
GROUP BY rpf.name ,
  p.name,
  p.devl_project_id
  --order by node_count desc
  ;

Sunday, November 20, 2011

Oracle apps R12 - Compiling JSP with custom classpath

We all know that to compile JSP manually on the Oracle Application R12 instance, we need to run the file $FND_TOP/patch/115/bin/ojspCompile.pl.

Its help is as follows:

syntax: ./ojspCompile.pl COMMAND {ARGS}
COMMAND --compile               update dependency, compile delta
        --create                rebuild entire dependency file
        -delta.out       update dependency, list delta to file
        -dep.out      update dependency, output heirarchy to file

ARGS    -s      matching condition for JSPs filenames
        -p      number of parallel compilations
        -log     to override logfile from ojspCompile.conf
You are
recommended to set the log file location
 outside of any network file system shared (NFS) area/drive.
        -conf    to override ojspCompile.conf
        --retry         retry previously failed compilation attempts
        --flush         forces recompilation of all parent JSPs
        --quiet         do not provide an actively running progress meter
        --fast          instantly fail jsps that are *possibly* invalid

example1: ojspCompile.pl --compile -s 'jtf%' -p 20 --retry
example2: ojspCompile.pl --compile -s 'jtflogin.jsp,jtfavald.jsp' --flush
example3: ojspCompile.pl --compile --fast --quiet

If your JSP uses custom classes, then compiling jsp manually can fail if proper classpath is not set. Yes, even though if you have setup the classpath correctly in orion-application.xml, it will fail because this jsp compile utility does not read orion-application.xml classpath.

So, the problem is to identify where to set the classpath so that above utility can pick it up. After several search and looking into code, I found following:

By default, the jsp compiler script uses following configuration file
$INST_TOP/appl/admin/ojspCompile.conf
This conf file has a classpath field in it which is usually pointed to file
$INST_TOP/appl/admin/ojspCompile.properties
This property file lists the classpath used for JSP compilation.

So if your classes are not listed in this file, your jsps will not compile by ojspCompile.

Ofcourse, you can always set the "main_mode" to "recompile" in orion-web.xml, but that for production you do not want to change it and compile the JSP on file deployment.

References:

  1. 458338.1  How to Enable Automatic Compilation of JSP pages in R12 Environment
  2. 433386.1  JSP Pages Hanging in R12 After Removing Cached Class Files in _pages
  3. 783094.1  Compile jsp files at Application R12 at Windows

Wednesday, November 2, 2011

OC4j Configuration


Oracle application R12 release uses OC4J and during implementation, many would need to modify oc4j configuration for easier/faster development.

I found following links to be useful while changing OC4J configuration for development mode.

OC4J Web Application Redeployment and Class Reloading Features

Element Descriptions for global-web-application.xml and orion-web.xml

Key OC4J Flags for Development

Monday, September 19, 2011

Oracle Application R12 release setup

Few important environment variables and filepaths:

$CONTEXT_FILE
gives the context file which should be used to any global permanent update to the instance.

$INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/orion-application.xml
stores information about OC4J server classpath.

$INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml
stores information about servet and jsp settings. New servlet needs to be defined here. If new jsps are added to the instance and they not getting recompiled automatically, following setting needs to be set for main_mode parameter in this file. Usually this setting is set to justrun which does not compile new jsp files.

      <init-param>
         <param-name>main_mode</param-name>
         <param-value>recompile</param-value>
      </init-param>

Classpath for the Java Concurrent programs should be set in adovars.env file.

Look for following element in $CONTEXT_FILE
 <oa_environment type="adovars">
This element will contain parameters for actual adovars file referred by instance. Sometimes there can be multiple adovars environment files on the instance and this should point to currently used adovars file.

Set the value for AF_CLASSPATH element tag to append or prepend classpath for concurrent programs.

$INST_TOP/ora/10.1.3/j2ee/oacore/config/oc4j.properties
Use this file to setup new system properties for OC4J. For Configurator users, you will find cz init properties file reference in this file.

$INST_TOP/logs/ora/10.1.3/
All log files are available here under respective directories like Apache, j2ee, oacore etc.

Apache/OC4J start/stop server scripts are available under $INST_TOP/admin/scripts/