To configure server
Go to
JBOSS_HOME\server\configuratin(all,default,minimal)
copy any one and rename it as our predifened name(server name)
To start server
run.bat -c ourconfig(say all)
run.bat (starts default server)
runt.bat -c all (starts the 'all' configuration)
run.bat (starts default server)
runt.bat -c all (starts the 'all' configuration)
To shut down
shutdown.bat -S (stops default server running on 1099 jndiport)
shutdown.bat -s hostname:jndiport
.bat files are located in
JBOSS_HOME\bin
default jmx,web console port====8080(to open console) jndiport===1099(for stopping server, for jms communicatioin) connectorport===8009(used for loadbalancing)
To change the default ports:
JBOSS_HOME\serevr\ourconfig\conf\jbossservice.xml uncomment binding service.xml and setports as ports-default(defaultports 8080).ports-01(defaultport+100,ex 8180),ports-02(defaultports+200,ex 8280)
To configure jboss as cluster
JBOSS_HOME\server\ourconfig\deploy\jboss.webdeployer\server.xml
add jvmRoute in engine name attribute.
for loadblancing(s\w LB)
JBOSS_HOME\server\ourconfig\deploy\jboss.webdeployer\meta-inf\jbossservice.xml
use jk as true
To define login page for console
JBOSS_HOME\server\ourconfig\deploy\jmx-console,war\web-inf\jbossservice.xml uncomment security
JBOSS_HOME\server\ourconfig\deploy\jmx-console.war\web-inf\web.xml uncomment security
and restart the server
default username& password admin admin
To change username &password
edit
C:\jboss\downloads\jboss-4.2.3.GA\jboss-4.2.3.GA\server\server-1\conf\props\jmx-console-users
C:\jboss\downloads\jboss-4.2.3.GA\jboss-4.2.3.GA\server\server-1\conf\props\jmx-console-roles
To configure appache
1.add approrite mod_jk module to appache directory
add the loadmodule in httpd.conf file as foolowing steps
2,Append the following contents to the end of the /etc/httpd/conf.httpd.conf file:
# Add this to the end of httpd.conf
LoadModule jk_module modules/mod_jk.so
<IfModule mod_jk.c>
Include conf/modjk.conf
</IfModule>
3.Create a file named /etc/httpd/conf/modjk.conf and add the following contents:
JkLogFile logs/modjk.log
JkLogLevel info
JkWorkersFile conf/jkworkers.properties
JkMountFile conf/jkmount.properties
# JK Balancer manager
<Location /status/>
JkMount jkstatus
Order deny,allow
Allow from all
</Location>
4.Create a file named /etc/httpd/conf/jkworkers.properties and add the following contents:
worker.list=jboss,jkstatus
# First Node
worker.node1.type=ajp13
worker.node1.host=node1.server
worker.node1.port=8009
worker.node1.lbfactor=1
worker.node1.disabled=false
worker.node1.socket_timeout=10
worker.node1.connect_timeout=20000
# Second Node
worker.node2.type=ajp13
worker.node2.host=node2.server
worker.node2.port=8009
worker.node2.lbfactor=1
worker.node2.disabled=false
worker.node2.socket_timeout=10
worker.node2.connect_timeout=20000
# Third Node
worker.node3.type=ajp13
worker.node3.host=node3.server
worker.node3.port=8009
worker.node3.lbfactor=1
worker.node3.disabled=false
worker.node3.socket_timeout=10
worker.node3.connect_timeout=20000
# Fourth Node
worker.node4.type=ajp13
worker.node4.host=node4.server
worker.node4.port=8009
worker.node4.lbfactor=1
worker.node4.disabled=false
worker.node4.socket_timeout=10
worker.node4.connect_timeout=20000
# Load balancer
worker.jboss.type=lb
worker.jboss.balance_workers=node1,node2,node3,node4
worker.jboss.sticky_session=true
worker.jboss.sticky_session_force=false
worker.jboss.method=R
worker.jboss.lock=P
worker.jkstatus.type=status
NOTE: The value for worker.nodeX.host is represented in this step as nodeX.servers. This should be replaced for each JBoss Enterprise Application Servers hostname or IP address. For this example, node1.server is used for the host system.
5.Create the file /etc/httpd/conf/jkmount.properties and add the following contents:
/jmx-console/*=jboss(LB for console)
/Counter/*=jboss(LB for application).
To configure datasoure
copy the appropriate ds.xml from JBOSS_HOME\docs\examples\jta
and modify accordingly and place that file in JBOSS_HOME\server\ourconfig\deploy
for deploying
place the appropirate file in JBOSS_HOME\server\ourconfig\deploy
To configuring JMS queues and topics
JBOSS_HOME\server\ourconfig\deploy-haslinton\jms\destinationservice.xml copy one of the default queue\topic to our predefined name
To configure persistence store
create the datasource as mentioned above
and copy the appropriate service.xml from JBOSS_HOME\docs\examples\jms\
For multicast testing
set classpath=JBOSS_HOME\server\ourconfig\lib\jgroups.jar;.
java org.jgroups.tests.McastSenderTest -mcast_addr 231.0.1.1 -port 5555
java org.jgroups.tests.McastReceiverTest -mcast_addr 231.0.1.1 -port 5555