|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.Tobj.TP
Supplies a set of service methods that can be invoked by application code. This is the only interface in the TP Framework that can safely be invoked by application code. All other interfaces have callback methods that are intended to be invoked only by system code.
Constructor Summary | |
TP()
|
Method Summary | |
static Tobj_Bootstrap |
bootstrap()
Returns a com.beasys.Tobj_Bootstrap object. |
static void |
close_xa_rm()
Closes the XA resource manager to which the invoking process is linked. |
static org.omg.CORBA.Object |
create_object_reference(java.lang.String interfaceName,
java.lang.String stroid,
org.omg.CORBA.NVList criteria)
Creates an object reference. |
static void |
deactivateEnable()
Enables application-controlled deactivation of CORBA objects. |
static org.omg.CORBA.Object |
get_object_reference()
Returns a pointer to the current object. |
static int |
open_xa_rm()
Opens the XA resource manager to which the invoking process is linked. |
static org.omg.CORBA.ORB |
orb()
Returns an ORB object. |
static void |
register_factory(org.omg.CORBA.Object objp,
java.lang.String id)
Locates the M3 FactoryFinder object and registers an M3 factory. |
static void |
unregister_factory(org.omg.CORBA.Object objp,
java.lang.String id)
Locates the M3 FactoryFinder object and removes an M3 factory. |
static int |
userlog(java.lang.String str)
Writes a message to the user log (ULOG) file. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public TP()
Method Detail |
public static org.omg.CORBA.Object create_object_reference(java.lang.String interfaceName, java.lang.String stroid, org.omg.CORBA.NVList criteria) throws InvalidInterface, InvalidObjectId
Ordinarily, the server application calls this method in two places:
For examples of how and when to call the create_object_reference method, see Creating Java Server Applications.
interfaceName
- Specifies a character string that contains the
fully qualified interface name for the object.
stroid
- Specifies the object ID in string format. The object
ID uniquely identifies this instance of the class. It is up to the
programmer to decide what information to place in the object ID.
One possibility would be to use the object ID to hold a database key.
Choosing the value of an object identifier, and the degree of
uniqueness, is part of the application design. The M3 software cannot
guarantee any uniqueness in object references, since object references
may be legitimately copied and shared outside the M3 domain
(for example, by passing the object reference as a string).
criteria
- Specifies a list of named values that can be used to
provide factory-based routing for the object reference. The use of
factory-based routing is optional and is dependent on the use of this
argument. If you do not want to use factory-based routing, you can
pass a value of 0 (zero) for this argument.public static org.omg.CORBA.Object get_object_reference() throws NilObject
Note: If the get_object_reference method is invoked from within either the com.beasys.com.Tobj.Server.initialize or com.beasys.com.Tobj.Server.release methods, it is considered to be invoked outside the scope of an application's CORBA object execution.
public static void register_factory(org.omg.CORBA.Object objp, java.lang.String id) throws InvalidObject, InvalidName, RegistrarNotAvailable, CannotProceed, OverFlow
objp
- Specifies the object reference that was created for
an application factory using the
com.beasys.Tobj.TP.create_object_reference method.
id
- Specifies a string identifier that is used to identify
the application factory. For some suggestions as to the composition
of this string, see Creating Java Server Applications.public static void unregister_factory(org.omg.CORBA.Object objp, java.lang.String id) throws InvalidObject, InvalidName, RegistrarNotAvailable, CannotProceed, OverFlow
objp
- Specifies the object reference that was created for
an application factory using the
com.beasys.Tobj.TP.create_object_reference method.
id
- Specifies a string identifier that is used to identify
the application factory. For some suggestions as to the composition
of this string, see Creating Java Server Applications.public static int open_xa_rm() throws RMfailed
Note: The functionality of this method is also provided by the com.beasys.Tobj.TransactionCurrent.open_xa_rm method. However, the open_xa_rm method provides a more convenient way for a server application to open a resource manager because there is no need to obtain an object reference to the TransactionCurrent object. A reference to the TransactionCurrent object can be obtained from the Bootstrap object.
This method should be invoked once from the com.beasys.Tobj.Server.initialize method for each server that participates in a global transaction. This includes servers that are linked with an XA resource manager, as well as servers that participate in a global transaction, but are not actually linked with an XA-compliant resource manager.
The open_xa_rm method should be invoked in place of an open invocation that is specific to a resource manager. Because resource managers differ in their initialization semantics, the specific information needed to open a particular resource manager is placed in the OPENINFO parameter in the GROUPS section of the UBBCONFIG file.
The format of the OPENINFO string is dependent on the requirements of the database vendor providing the underlying resource manager. For more information about the OPENINFO parameter, see the ubbconfig(5) reference page in the BEA TUXEDO Reference and the Administration Guide. Also, refer to database vendor documentation for information about how to develop and install applications that use the XA libraries.
Note: Only one resource manager can be linked to the invoking process.
public static void close_xa_rm() throws RMfailed, org.omg.CORBA.BAD_INV_ORDER
Note: The functionality of this call is also provided by the com.beasys.Tobj.TransactionCurrent.close_xa_rm method. The com.beasys.Tobj.TP.close_xa_rm method provides a more convenient way for a server application to close a resource manager because there is no need to obtain an object reference to the TransactionCurrent object. A reference to the TransactionCurrent object can be obtained from the Bootstrap object.
This method should be invoked once from the com.beasys.Tobj.Server.release method for each server that is involved in global transactions. This includes servers that are linked with an XA resource manager, as well as servers that are involved in global transactions, but are not actually linked with an XA-compliant resource manager.
The com.beasys.Tobj.close_xa_rm method should be invoked in place of a close invocation that is specific to the resource manager. Because resource managers differ in their termination semantics, the specific information needed to close a particular resource manager is placed in the CLOSEINFO parameter in the GROUPS section of the M3 system UBBCONFIG file.
The format of the CLOSEINFO string is dependent on the requirements of the database vendor providing the underlying resource manager. For more information about the CLOSEINFO parameter, see the ubbconfig(5) reference page in the BEA TUXEDO Reference online document and the Administration Guide. Also, refer to database vendor documentation for information about how to develop and install applications that use the XA libraries.
public static void deactivateEnable() throws IllegalOperation
The following usage guidelines apply:
Note: When it is invoked from within the method of an object that has its activation policy set to method, the effect is the same as the normal behavior of such objects (effectively, a NO-OP). When it is invoked within the method of an object that has its activation policy set to transaction, an IllegalOperation exception is raised. This is because deactivation of such objects may interfere with their correct notification of transaction completion by the M3 transaction manager.
public static org.omg.CORBA.ORB orb()
public static Tobj_Bootstrap bootstrap()
Caution: Because the TP Framework owns the com.beasys.Tobj_Bootstrap object, server application code must not dispose of the Bootstrap object.
public static int userlog(java.lang.String str)
It is recommended that the server applications limit their use of userlog() messages to messages that can be used to help debug application errors; flooding the ULOG file with incidental information can make it difficult to spot actual errors.
str
- The message to be written to the ULOG.Example:
The following example shows how to use the userlog method:
userlog ("System exception caught: %s", e.get_id());
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |