?
Solved

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

Posted on 2006-10-27
6
Medium Priority
?
384 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
Technology Partners: 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!

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
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 …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 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