Solved

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

Posted on 2006-10-27
6
377 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

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

Accepted Solution

by:
rkogelhe earned 200 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now