Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to launch a script when starting an Oracle Application Server container?

Posted on 2006-10-27
6
Medium Priority
?
386 Views
Last Modified: 2013-12-01
We have added a JMS componant to our growing application and now whenever one of our OAS containers goes down there are a couple of .lock files that are left behind in our ....../j2ee/<containername>/persistence/ subfolders.

Then once we attempt to bring the container up it pukes on these lock files. It was suggested that we use a script of some sort to delete *.lock files in this folder upon container startup.

I am not seeing any obvious methods of doing that.

Yes we use simple .sh files for startup and shutdown, but we also use DCM off the command line and from ANT deployment scripts as well as going through the web front end for application server control. As such I am not sure where to deal with the problem being as there are multiple entry points where you can perform startups....
0
Comment
Question by:hooch604
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:bpeterse
ID: 17835151
Perhaps the best place to put it is in the shutdown script(s):

(This is Korn shell)
******************
sleep 15
if [[ -n `ls <your_path_to>/*lock` ]]
then
        for i in `ls -l <your_path_to>*lock|cut -c55-`
          do
                rm -f $i
          done
fi
********************
0
 

Author Comment

by:hooch604
ID: 17835625
Yes but as I mentioned there is more than one way to skin a cat in this case. We are building and testing our j2ee application and as such there are frequent shutdowns of the containers that do not come from the shutdown scripts. So ideally this could be done on startup...
0
 
LVL 6

Expert Comment

by:bpeterse
ID: 17836355
In unix - there's typically at least 3 ways to skin that cat, but it's your box.  You can put the script where you like.  
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:hooch604
ID: 17837683
Thanks you!
0
 
LVL 3

Accepted Solution

by:
rkogelhe earned 800 total points
ID: 17987658
You can configure start and stop event scripts in opmn. See the metalink note "274088.1 -How to use the pre-start and pre-stop event scripts with AS10g on UNIX"

https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=274088.1

The idea is that you can execute any script using the event-scripts tag in opmn.xml.

<event-scripts>
        <pre-start path="/home/ias9041/pre-start.sh"/>
       <pre-stop path="/home/ias9041/pre-stop.sh"/>
</event-scripts>
0
 

Author Comment

by:hooch604
ID: 18003494
ah most excellent, I will look into that, thank you. I expect this is stuff a fully qualified admin would know but we currently have a gap in our expertise over here.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question