Set transactional state

The transactional state of a component instance determines whether a transactional component’s database updates are committed or rolled back.

In components that use the CtsComponents::ObjectControl control interface, each instance receives a CtsComponents::ObjectContext object each time that EAServer calls the setObjectContext method. The object reference is valid until unsetObjectContext is called. For more information on these methods, see the generated HTML documentation in the html/ir directory of your EAServer installation.

In classes that do not implement a control interface, call Jaguar.getInstanceContext() in each method that sets transactional state (do not save the object across method invocations, because it will not be valid if the component instance has been deactivated and reactivated). See the EAServer API Reference Manual for information on this method.

To set transaction state, choose the method that reflects the state of the work that the component is contributing to the transaction, as follows:

NoteTransaction control with the ServerBean control interface If you use the deprecated control interface JaguarEJB::ServerBean and Auto demarcation/deactivation option is disabled in the Transactions tab in the Transactions properties for your component, the transaction state specified in the method determines whether the instance is deactivated or remains bound to the client.