Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internal Cache flush - how ? 1

Status
Not open for further replies.

davehogg

Technical User
Feb 28, 2003
7
0
0
GB
We have a situation where we restart the Weblogic server when we place new code into the Deploy area (server set to no-deploy mode) which is fine as long as we move forward.

Recently we had need to regress the code to back out the new release. We placed the old code in teh deploy area and restarted and ended up with very weird results.

Our log files indicated that we were in fact still running the new code.

Clearly the Weblogic server had cached some compiled versions of JSPs etc, but upon restart these were still seen as newer than the (now regressed) code.

We ended up having to do a 'touch' of all the files to force it to accept the regressed code as 'new'. Not very elegant.

Does anyone know of a 'nice' way to do this (e.g. a command line, or a cache dir that can be deleted)?

I note that under the server's dir their is a hidden dir called .wlnotdelete which seems to be updated with recent files????
 
Hi DaveHog,

You don't say which version of WLS, but anyway:

WLS-v7: remove (delete) anything from inside /opt/weblogic/user_projects/Main/ManagedServer1/stage
this is the cached copy of all the deployed apps. [you can change this if you wish by editing config.xml and set TwoStage="false" within your app directives, "then it creates no cache" but will not test your code as WLS starts {stage 1} and just loads your compiled code into memory {stage two}.

WLS-v5: remove anything in (delete) /opt/<your-app-name>/WEB-INF/_<your-app-name>

This is a dir beginning with an underscore and named the same as your app and is the cache of the code well any part that has been run and therfore compiled into memory also.

You may need to restart WLS and you probably know wls5 takes < 1 minute to do this but, wls7 probably > 5 minutes!! watch this come up with tail -f <logdir>/ManagedServer1.log

Good Luck
Laurie.
 
Thanks for the help.

The version is Weblogic7, but staging is already set to false so there is no 'stage' dir under the directory within /var/opt/apps/bea/user_projects/couk/server6

It is as if it is in memory, but it doesn't clear when we do a server stop & server start.

Do you know of any other caching area?
 
Sorry in not responding earlier, your sure that /var/opt/apps~ is the path to your weblogic server? You need to be sure that you are looking in the right directory structure.

If you are then the other aproach would be to use something like truss (man truss) to watch what files the java application is using as this will give you a hint of where to look.

I'd hope that you have found and resolved your problem before now though.

Good luck
Laurie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top