Saturday, April 23, 2011

Starting Weblogic Admin Server and Node Manager as background service

The following steps explains how to start Weblogic Node Manager and Admin Server automatically with Linux OS (Redhat in my case):

- Create boot.properties file under

/user_projects/domains/my_domain/servers/AdminServer/security


- Add to the file the following entries

username=weblogic
password=welcome1


- Create a file called wlsndm under

/etc/init.d


- Add to the file the following

#!/bin/bash
#
# wlsndm startup script for node manager
#
# chkconfig: - 74 15
# description: weblogic
# processname: WLSNDM

# Source function library
. /etc/rc.d/init.d/functions

start() {
echo -n $"Starting $prog: "
nohup su - oracle -c /wlserver_10.3/server/bin/startNodeManager.sh > /wlserver_10.3/server/bin/wlsnd.log &
echo "OK"
}

case "$1" in
start)
start
;;
*)
echo $"Usage: $prog {start}"
exit 1
esac

exit 1


- Create a file called wlsadmin under

/etc/init.d


- Add to the file the following

#!/bin/bash
#
# wlsadmin startup script for node manager
#
# chkconfig: - 75 15
# description: weblogic
# processname: WLSADMIN

# Source function library
. /etc/rc.d/init.d/functions

start() {
echo -n $"Starting $prog: "
nohup su - oracle -c /user_projects/domains/my_domain/bin/startWebLogic.sh > /user_projects/domains/my_domain/servers/AdminServer/logs/wlsa.log &
echo "OK"
}

case "$1" in
start)
start
;;
*)
echo $"Usage: $prog {start}"
exit 1
esac

exit 1


- Create the following symbolic links under /etc/rc5.d/

ln -s /etc/init.d/wlsndm S74NodeManager
ln -s /etc/init.d/wlsadmin S75Weblogic


- then Create background services

chkconfig --add wlsadmin
chkconfig --add wlsndm


- Activate the created background services

chkconfig wlsadmin on
chkconfig wlsndm on


Now we have finished creation of background service, and you can start UCM or any other Managed Server from Admin Server Console. Using the same approach you can start UCM automatically.

Using UCM11g Logout With Site Studio

As most of us remember in Oracle UCM 10g, logout was not there by default. In UCM 11g Oracle has added logout to be there by default.

Also it is noticed there is new Service (LOGOUT) added to UCM 11g for logout and that service make use of redirect template.

What if you want to secure parts of a website designed by Site Studio using Oracle UCM security (may be it is intranet and you want to add security to HR section). Definitely UCM security will be used on a section and/or a layout, however you will need to add logout, and you want logout to redirect you to some page like home page or login screen.

To do that create your logout link like below


<a style="text-decoration:none " href='/cs/idcplg?IdcService=LOGOUT&RedirectUrl=%2Fmywebsite%2Findex.htm'>Logout</a>