2.8. Transaction Factory
By default, JBoss Transaction Service does not use a separate transaction manager when creating transactions through the
Current
interface. Each transactional client essentially has its own transaction manager, the TransactionFactory
, which is co-located with it. To override this behavior at run-time, set the com.arjuna.ats.jts.transactionManager property variable to YES
. To execute the Transaction Factory, execute the start-transaction-service
script, located in the ATS_ROOT/bin
directory.
Current
typically locates the factory using the CosServices.cfg
file located in the $JBOSS_HOME/etc
directory. This file is similar to the resolve_initial_references
file, and is automatically created or updated when the transaction factory is started on a particular machine. This file must be copied locally to each machine which needs to share the same transaction factory.
Note
The information about
CosServices.cfg
refers to the default name and location of the configuration file. To change the name of the file, use the com.arjuna.orbportability.initialReferencesFile variable. To change its location, set the com.arjuna.orbportability.initialReferencesRoot variable.
Example 2.4. Customizing the Initial References File
java –Dcom.arjuna.orbportability.initialReferencesFile=ref –Dcom.arjuna.orbportability.initialReferencesRoot=c:\\temp prog
You can override the default location mechanism by setting the com.arjuna.orbportability.resolveService property variable with any of the parameters listed in ResolveService Parameters.
ResolveService Parameters
- CONFIGURATION_FILE
- The system uses the
CosServices.cfg
file. This is the default behavior. - NAME_SERVICE
- JBoss Transaction Service attempts to use a name service to locate the transaction factory. If this is not supported, an exception is thrown.
- BIND_CONNECT
- JBoss Transaction Service uses the ORB-specific bind mechanism. If this is not supported, an exception is thrown.
If com.arjuna.orbportability.resolveService is specified when the transaction factory is run, the factory registers itself with the specified resolution mechanism.