November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

JBoss AS Clustering

Java Download wget http://download.oracle.com/otn-pub/java/jdk/6u33-b04/jdk-6u33-linux-i586.bin

Create a bash script to set JAVA_HOME and add Java executables to the path.

vim /etc/profile.d/java.sh

export JAVA_HOME=/opt/jdk1.6.0_26/ export PATH=$JAVA_HOME/bin:$PATH

5. Source you new script so exports take effect

source /etc/profile.d/java.sh

6. Setup Java to be used by the alternatives system (if you want, or if you have an existing install […]

Enabling GZIP compression : Jboss

Enabling GZIP compression for your web application is a good way to accelerate your web site. This can reduce the size of data being transferred and, consequently, speed your application.

Enabling compression on the web server will make data be transferred in compressed form. The browser will decompress the data on the fly, making the […]

Setting up Clustering on Apache/Jboss/Tomcat using Jakarta mod_jk

Clustering Jboss for two reasons load balancing and failover.

Fail-over

Fail-over is probably the most important issue for web applications. If the front end load balancer detects that one of the nodes has gone down it will redirect all the traffic to the second instance and your clients, apart from any on the failed […]

JBOSS AUTO RESTART SCRIPT

JBOSS AUTO RESTART SCRIPT

set –xv

Shell script with Debug command inside:

Add set –xv inside the shell script now to debug the output as shown below.

$ cat filesize.sh #!/bin/bash set -xv for filesize in $(ls -l . | grep “^-” | awk ‘{print $5}’) do let totalsize=$totalsize+$filesize done echo “Total file […]

JBOSS operations script

JBOSS operations script

The scripts are tested on RHEL 5

start_jboss.sh (for clustered environment) ————————————————————————– JAVA_OPTS=”-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true” JAVA_OPTS=”$JAVA_OPTS {you can add your custom JVM / application properties here}”

MULTICAST_ADDR={specify multicast addr} BIND_ADDR=`getip.sh` PARTITION=appname-partition1 SERVER={specify profile name} SERVER_PEER_ID=`getserverpeerid.sh`

$JBOSS_HOME/bin/run.sh -b $BIND_ADDR -c $SERVER -g $PARTITION -u $MULTICAST_ADDR -Djboss.messaging.ServerPeerID=$SERVER_PEER_ID $JAVA_OPTS echo “JBOSS […]

Logging on Jboss

Logging on Jboss

Make your logging choices in the file /opt/jboss5.0/jboss-as/server/default/conf/jboss-log4j.xml

App logs location can be defined in

For example, rollover can be done for each hour by uncommenting

JBOSS Admin Console urls

JBOSS Admin Console urls

JBOSS http://{ip_address}:8080/admin-console http://{ip_address}:8080/jmx-console http://{ip_address}:8080/web-console http://{ip_address}:8080/web-console/status

SSL ON JBOSS

SSL ON JBOSS

SSL Setup is same as Tomcat Procedure

1) Create a keystore using keytool utility

#keytool can be found from Java runtime – /opt/jre1.6.0_18/bin/keytool # Enter values as required

mkdir $JBOSS_HOME/ssl cd $JBOSS_HOME/ssl

$ keytool -genkey -alias jboss -keyalg RSA -keystore jboss.keystore -validity 3650 Enter keystore password: Re-enter new password: What […]

JBOSS virtual hosts

JBOSS virtual hosts

Edit /opt/jboss5.0/jboss-as/server/default/deploy/jboss.sar/server.xml to include your virtual hosts.

www.rmohan.com webtest.rmohan.com somename.rmohan.com

Using Apache mod_jk with BigIP LTM and JBOSS

Using Apache mod_jk with BigIP LTM and JBOSS

Using Apache mod_jk with BigIP LTM and JBOSS

1) Make sure your JBOSS is running and listening on AJP port 8009

2) LTM Load Balancer Configuration a) Create a TCP monitor jboss-tcp-monitor using parent profile TCP b) Create a Virtual Server with port 8009 c) Create a […]