Hello Everyone!!
In this post I am covering Clearing Java classes caching in R12.
If you have worked in 11i, you might have done many times, clearing the caches by running
rm -rf $COMMON_TOP/_pages/*
But in R12 if you do that, your login page will not come up, You will see blank screen.
Why? In R12, on the fly compilation of JSP's are disabled.
In R12, by default,
s_jsp_main_mode is set justrun Instead of recompile (which is 11i setting) in $CONEXT_FILE
which will be propagated to oacore config file
$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml
What is the implication of this Change?
When main_mode = justrun the OC4J container running the OACoreGroup is told that no compilation on the fly is allowed and only (pre)compiled classes are picked up.
Since this requires less checks to be done the performance is improved. Therefore is this the recommended setting for a Production environment where JSP's will only be replaced occasionally.
In cases where development activities are done and JSP pages are changing often this default setting makes things more complicated. Each time a JSP is deployed a manual compilation using the ojspCompile.pl is needed and the OC4J running the oacore needs a restart to pick up the changes. This will also affect other people working on the same environment.
In development environment you may would like to change to 11i setting level.
If you have accidentally removed _pages directory, don't worry, you can get back jsp's. but its going to take around 20 minutes of time to generated compiled .class and .java files under _pages directory. If you are at R12.0.3 level, much improved version of ojspCompile.pl utililty reduces time required to compile the jsp's.
compilation of Jsp's can be done by,
$FND_TOP/patch/115/bin/ojspCompile.pl --compile --quiet
Ref metalink note: 458338.1
If you have not embarked in R12, this info will help you a lot!!
3 comments:
Hi Suresh,
Very good post..
My company uses 11.5.10. I have a practice of clearing _pages for better performance of Apache server. So is it not necessary to delete the directory in 12i. If not whatelse can be done instead of deleting _pages directory.
Thanks in advance
Bipin
Its Not necessary to delete _pages in R12. If you delete _pages directory content you won't be seeing Login screen at all!!(as s_jsp_main_mode is set to 'justrun' in context xml file by default in R12).
To avoid the dynamic compilation of jsp's, R12 has come up with this option which will boost the run time performance of the system.
I hope you got the point.
Suresh
Very Good Post!
About a month ago I was cloning Production to Test at a new client.
I couldn't get the startup page to come up, and didn't know about the _pages rule in R12, as I have a lot of 11i experience, but hadn't heard of this rule in R12 (even having a year's worth of R12 experience).
I ended up replacing the Applications top with a new backup clone, and know now why it worked, I didn't do the cleanup, because I was in a hurry to complete the clone on time...
Sometimes, thinking you know what you're doing, is not always true...
Well done!
Post a Comment