Lets build a distribution (on UNIX with the shell script 'build', on Windows with 'build.bat'):
The result is:
xmlBlasterDist.jar
and
xmlBlasterDist-0.79e.zip
|
The above jar file you can use directly to start xmlBlaster:
/opt/jdk/bin/java -jar xmlBlasterDist.jar
|
The zip file contains the above jar file with some additional
files:
xmlBlaster/bin/ns
xmlBlaster/bin/xmlBlaster.sh
xmlBlaster/lib/xmlBlaster.jar
xmlBlaster/config/xmlBlaster.properties.template
xmlBlaster/config/xmlBlaster.policy
xmlBlaster/config/jacorb.properties.template
xmlBlaster/.bashrc
xmlBlaster/LICENSE
xmlBlaster/README
xmlBlaster/INSTALL
|
You can choose to use the jar file or to use the zip file,
whatever suits your needs better.
Now one problem remains, how can you customize the included jar file
and probably using an own property file.
Imagine you only want to use the CORBA driver and customize the MoM
behavior to your needs:
build -DADD_EMAIL=false -DADD_XMLRPC=false -DADD_PROP=my.properties dist
|
This won't add EMAIL and XMLRPC support to the distribution and will
package your my.properties
configuration file into
xmlBlasterDist.jar instead of the default xmlBlaster.properties
Here is a sample my.properties
:
# We use the CORBA protocol driver only:
ProtocolPlugin[IOR][1.0]=org.xmlBlaster.protocol.corba.CorbaDriver
CbProtocolPlugin[IOR][1.0]=org.xmlBlaster.protocol.corba.CallbackCorbaDriver
# We allow a user to login up to one hundred times
session.maxSessions=100
|
The nice thing is you can cascade your property files:
java org.xmlBlaster.Main -propertyFile mySecond.properties
|
Now my.properties
is read first as you packaged it
into the distribution jar file (see above), than your command line
property file mySecond.properties
is read next. The
command line property file entries have precedence over the property
file in the distribution jar file.
And now a typical UNIX shell script starting xmlBlaster (all in one line):
java -Xms12M -Xmx128M -jar lib/xmlBlasterDist.jar
-admin.remoteconsole.port 0
-logFile /tmp/xmlBlaster.log
-plugin/xmlrpc/port 8081
-useKeyboard false > /tmp/xmlBlaster.log 2>&1 &
echo "xmlBlaster started, see tail -n 100 -f /tmp/xmlBlaster.log"
sleep 5
|