(I have modified the original JTrader README to reflect its
distribution as part of JacORB. GB)



Selecting a persistence mechanism
---------------------------------

JTrader  supports  two   different  persistence  mechanisms:  "simple"
(i.e. serialized  objects) and  ObjectStore PSE.  The  ObjectStore PSE
product  is freely  available from  http://www.odi.com.   The "simple"
mechanism is used by default.

To select a particular mechanism: 

  1) Edit the top-level Make.config and enable the appropriate 
     value for DBSUBDIR

  2) If you wish to use ObjectStore PSE, ensure the value for
     OSJCFP is correct in Make.rules

  3) Edit src/jacorb/trading/TradingService.java to enable the appropriate
     value for dbMgr (near the end of the main() method)


Building JTrader
----------------

This distribution contains Makefiles that should work on any Unix
platform. For use with Win platforms, you need to convert slashes
to backslashes

1) Edit Make.rules to reflect your system's configuration.  In
   particular, the settings for the following variables should be
   verified:

   CLASSOUTPUTDIR  - Select the setting with the proper path separator
   IDL             - The IDL compiler
   IDLFLAGS        - Flags for the IDL compiler
   IDLPKGARG       - The IDL compiler flag to specify a Java package
   DBSUBDIR        - The selected persistence mechanism
   JAVAC           - The Java compiler

2) Make sure your CLASSPATH contains the classes for your ORB
   (and optionally for ObjectStore PSE).

3) Run 'ant'


Running JTrader
---------------

Syntax:
	trader ior_file [-d dbath]

The first  argument is an obligatory  file name where  the trader puts
its IOR. This file must be readable using the URL that is specified in
.jacorb_properties. The ORB lookup mechanism uses this URL to retrieve
and   return  a   reference  to   the   trader  to   clients  of   the
orb.resolve_initial_references("TradingService") call.

JTrader supports the following command-line option:

  -d dbpath 

      The persistence mechanism included with JTrader requires a
      subdirectory in which the service types and offers are stored.
      The -d option should specify the pathname of this subdirectory.
      If the option is not supplied, JTrader will use the default path
      of "db".

Make  sure zour  PATH contains  the  bin/ subdirectory  of the  JacORB
installation.  You  can  run  the  trading service  using  the  bin/ts
command:

  > trader ~/public_html/TS_Ref


To use a different subdirectory for the databases, use

  > trader ~/public_html/TS_Ref -d /var/adm/JTrader 

