Monday Apr 27, 2009

Java ES Release 6 is out there ... Interoperability in there

Sun Java Enterprise System (Java ES) Release 6 is out. Read what it can bring it to you on Java ES Features and Benefits page.

What's there behind the scenes is it's Interoperability across all Java ES Base components and multiple Java System Suites. Read more about Java ES commitment to one of the most important feature for IT companies - Interoperability ...

[Read More]

Friday Jan 09, 2009

StartUp init script - Sun Java Enteprise System 2005Q4 + Portal 7

Some time ago we deployed together with Sun Partner Sun Java Enteprise System 2005Q4 and Sun Java Portal Server 7, where Customer asked for deployment to be started automatically after Operating System boot.

(Solution script was posted already in this blog created by my fellow Lukas Cirkva in Czech Language. I'm adding some more technical informations for configuration steps and translation in English)

 
  

As a solution we have developed script (startJES provided below) to stop, start and restart Sun Java Enteprise System 2005Q4 and Sun Java Portal Server 7 services for Linux Operating System and identified configuration steps recorded below for automatic start.

Startup script manages following Java ES Products and Services:

  • Sun Java Portal Server 7 with Sun Java Application Server 8.1
  • Portal Server SRA Rewriter Proxy
  • Portal Server SRA Gateway
  • Directory Server 5.2p4 instance
  • Administration Server (for DS5.2)
  • Common Agent Container (CACAO)

You will need to perform following steps to configure the script to start after system boot (steps have been done for Red Hat Enterprise Server 3.0):

  1. Copy script startJES to /etc/ini.d directory
    [root@localhost root]#cp startJES /etc/init.d
  2. Create symbolic link from rc.3 (Multi-user mode (Text login) dedicated for server side processes)
    [root@localhost root]#cd ../rc3.d
    [root@localhost root]#ln -s ../init.d/startJES S80javaES
  3. update runlevel information for system services with the script
    [root@localhost root]#chkconfig --add startJES
  4. mark it for start
$ntsysv

That's it! 


Script startJES recorded below:


#!/bin/sh

# chkconfig: - 80 80
# description: This script is used as a startup script.
# processname: startJES
# Java Enterprise Services installed on this server can be managed using this script

final_exit_code=0

case "$1" in
   start)
    
	# start Administration Server
	/var/opt/sun/directory-server/start-admin 2>&1

	# start Directory Server
	/var/opt/sun/directory-server/slapd-server/start-slapd 2>&1

	# start CACAO
	/opt/sun/cacao/bin/cacaoadm start 2>&1

	# start Application Server - instance
	#need to create /opt/sun/appserver/config/.passwd file with content "AS_ADMIN_PASSWORD="
	/opt/sun/appserver/bin/asadmin start-domain --user admin  --passwordfile /opt/sun/appserver/config/.passwd domain1 2>&1

	# start Portal Server SRA Rewriter Proxy
	/opt/sun/portal/bin/psadmin start-sra-instance --adminuser amadmin --passwordfile /opt/sun/portal/admin/.pwdfile --name default --type rwproxy 2>&1

	# start Portal Server SRA Gateway
	/opt/sun/portal/bin/psadmin start-sra-instance --adminuser amadmin --passwordfile /opt/sun/portal/admin/.pwdfile --name default --type gateway 2>&1

	exit ${final_exit_code}
	;;
   stop)

	# stop Portal Server SRA Gateway
	/opt/sun/portal/bin/psadmin stop-sra-instance --adminuser amadmin --passwordfile /opt/sun/portal/admin/.pwdfile --name default --type gateway 2>&1

	# stop Portal Server SRA Rewriter Proxy
	/opt/sun/portal/bin/psadmin stop-sra-instance --adminuser amadmin --passwordfile /opt/sun/portal/admin/.pwdfile --name default --type rwproxy 2>&1

	# stop Application Server - instance
	/opt/sun/appserver/bin/asadmin stop-domain  domain1 2>&1

	# stop CACAO
	/opt/sun/cacao/bin/cacaoadm stop 2>&1

	# stop Directory Server
	/var/opt/sun/directory-server/slapd-server/stop-slapd 2>&1

	# stop Administration Server
	/var/opt/sun/directory-server/stop-admin 2>&1
	
	exit ${final_exit_code}
	;;

   restart)
	# Stop All Java ES Services
	# stop Portal Server SRA Gateway
	/opt/sun/portal/bin/psadmin stop-sra-instance --adminuser amadmin --passwordfile /opt/sun/portal/admin/.pwdfile --name default --type gateway 2>&1
	
	# stop Portal Server SRA Rewriter Proxy
	/opt/sun/portal/bin/psadmin stop-sra-instance --adminuser amadmin --passwordfile /opt/sun/portal/admin/.pwdfile --name default --type rwproxy 2>&1

	# stop Application Server - instance
	/opt/sun/appserver/bin/asadmin stop-domain  domain1 2>&1

	# stop CACAO
	/opt/sun/cacao/bin/cacaoadm stop 2>&1

	# stop Directory Server
	/var/opt/sun/directory-server/slapd-server/stop-slapd 2>&1

	# stop Administration Server
	/var/opt/sun/directory-server/stop-admin 2>&1


	#Start All Java ES Services
	# start Administration Server
	/var/opt/sun/directory-server/start-admin 2>&1

	# start Directory Server
	/var/opt/sun/directory-server/slapd-server/start-slapd 2>&1

	# start CACAO
	/opt/sun/cacao/bin/cacaoadm start 2>&1

	# start Application Server - instance
	#need to create /opt/sun/appserver/config/.passwd file with content "AS_ADMIN_PASSWORD="
	/opt/sun/appserver/bin/asadmin start-domain --user admin  --passwordfile /opt/sun/appserver/config/.passwd domain1 2>&1

	# start Portal Server SRA Rewriter Proxy
	/opt/sun/portal/bin/psadmin start-sra-instance --adminuser amadmin --passwordfile /opt/sun/portal/admin/.pwdfile --name default --type rwproxy 2>&1

	# start Portal Server SRA Gateway
	/opt/sun/portal/bin/psadmin start-sra-instance --adminuser amadmin --passwordfile /opt/sun/portal/admin/.pwdfile --name default --type gateway 2>&1

	exit ${final_exit_code}
	;;

   \*)
	if [ -z $1 ]
	then
		echo "Usage: $0 {start|stop|restart}" >&2
	fi
	exit 1
	;;
esac
                                                                                
exit 0

Thursday Dec 18, 2008

3-2-1 ... Go!

Getting started has never been "easier" ...

Entries published in this blog will be mostly related to Sun Java Enterprise System (Java ES), the topic that I have been working with for last couple of years. Given that my main interest as well as day to day job is related to Interoperability, Products Compatibility and Upgrades of Java ES, I hope you'll find some tips, hints and interesting information which could have a good value for you. At least that is my plan for the time being :)

For the start let me share some useful sites that were created recently:

Java ES Interoperability

Place, where we share knowledge and experience with software interoperability in general and more specifically with interoperability of Java Enterprise System products.

Java ES Product Components discussed on these pages include Sun's GlassFish Enterprise Server, Sun Java System Web Server, Sun Java System Message Queue, Sun Java System Directory Server Enterprise Edition, Sun Java System Portal ServerWebSynergy, Sun Identity Manager or the Sun Java Composite Application Platform Suite.

Java ES Reference Architectures

Place, where we share end to end solutions that addresses specific business needs.

Mainly because Java Enterprise System offers infinite ways for deployment. It consists several products that can be deployed on 1 or multiple machines (or operating system instances), where each of those products may have one or multiple instances deployed and each of those products offer many ways how to configure them.

By providing White Papers, Deployment Guides for these tested and proven deployments (Reference Architectures) we'll try to show what Java ES products can do, how to set them up, what works, where potential problems are and how to resolve them.

Above sites are places where you want to go and look for solutions, learn some hints, technical tips that might address your problems. Pages were established and have been maintained by Sun's Java ES QA team, but external contributions are more than welcome too.

That's it for now then. Enjoy your time!

About

Rasta's little things related to Java ES. Interoperability and Compatibility are the main themes.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today