Posts Tagged ‘jboss’
This post will show a backup script used to create copies for a server running Oracle 10.2, some application server like FourJS and JBoss and some custom application written in java.
The backup process is divided in some parts :
- Variable declaration and export
- Oracle export and compress
- Data folder export and compress
- Application Server export and compress
- Tape writing of all compress file
- Tape checking
- Mail logging
This post assume you have the following enviroments, if you have something different you should only change variable declaration and comment some lines to have this script works.
- Oracle SID : DB01
- Oracle main folder : /oracle/product/10.2/db_1
- Oracle user/password : system/system
- DATA main folder to backup : /data
- APPSERVER main Folder : /appsrv
- Main backup folder : /data/backup
- Tape device : /dev/st0
Read the rest of this entry »
Here is the code for an advanced startup/shutdown script for JBoss.
I’m using it with JBoss 3.2.6 on a RHEL 5.2 Advanced Platform, and all works well.
I’ve added the “status” function for use it in a cluster suite and a new function to check if Oracle DB Server is up and running, otherwise JBoss doesn’t deploy well all developers files.
When you use “start” function, the script use a simple “tnsping” based function that loop into themselves until Oracle is not fully working and then sleep other 10 seconds to start JBoss.
JBoss startup/shutdown script with Oracle Support
Hope this help
Bye
Riccardo
Print This Post
Here is the code for a startup/shutdown script for JBoss.
I’m using it on a RHEL 5.2 Advanced Platform, and all works well.
I’ve added the “status” function for use it in a cluster suite.
Hope this help
Bye
Riccardo
Print This Post
In conf/jboss-service you will find the binding manager.
<!--
| Binding service manager for port/host mapping. This is a sample
| config that demonstrates a JBoss instances with a server name 'ports-01'
| loading its bindings from an XML file using the ServicesStoreFactory
| implementation returned by the XMLServicesStoreFactory.
|
| ServerName: The unique name assigned to a JBoss server instance for
| lookup purposes. This allows a single ServicesStore to handle mulitiple
| JBoss servers.
|
| StoreURL: The URL string passed to org.jboss.services.binding.ServicesStore
| during initialization that specifies how to connect to the bindings store.
| StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface
| implementation to create to obtain the ServicesStore instance.
<mbean code="org.jboss.services.binding.ServiceBindingManager"
name="jboss.system:service=ServiceBindingManager">
<attribute name="ServerName">ports-01</attribute>
<attribute name="StoreURL">../docs/examples/binding-manager/sample-bindings.xml</attribute>
<attribute name="StoreFactoryClassName">
org.jboss.services.binding.XMLServicesStoreFactory
</attribute>
</mbean>
-->
Uncomment this to use the ports-01 settings from the example bindings.
In this case you’ll have a second instance listening on port 8180.
##############
To shutdown the different instances : Execute the shutdown.sh script from the <jboss_home>/bin directory with 2 extra arguments. The first argument is the hostname and the second is the port number.
Example: If you have configured 2 instances of JBoss, one on port 1099 (the NamingService port) and another on 1199, then in order to shutdown the first JBoss instance use this command:
<jboss_home>\bin\shutdown.bat -s jnp://localhost:1099
And for the second instance , use this command:
<jboss_home>\bin\shutdown.bat -s jnp://localhost:1199
You could also modify your init script and use the command above as the argument for “CMD_STOP”.
Hope this help
Bye
Riccardo
Print This Post























