4.3.1 How Bootstrap Objects Work
Bootstrap objects are created by a client or a server application that must access object references to the following Oracle Tuxedo CORBA interfaces:
- FactoryFinder
- Security
- Interface Repository
- Naming Service
- Notification Service
- Tobj_SimpleEvents Service
- Transaction
Bootstrap objects may represent the first connection to a specific Oracle Tuxedo domain depending on the format of the IIOP Listener/Handler address. If the NULL scheme Universal Resource Locator (URL) format is used (the only address format supported in releases of Oracle WebLogic Enterprise prior to version 5.1 and Oracle Tuxedo release 8.0), the Bootstrap objects represent the first connection. However, if the URL format is used, the connection will not occur until after creation of the Bootstrap object. For more information on address formats and connection times, refer to Tobj_Bootstrap.
For an Oracle Tuxedo CORBA remote client, Bootstrap objects are created with the host and the port for the Oracle Tuxedo IIOP Listener/Handler. However, for Oracle Tuxedo native client and server applications, there is no need to specify a host and port because they execute in a specific Oracle Tuxedo domain. The IIOP Listener/Handler host and the port ID are included in the Oracle Tuxedo domain configuration information.
After they are created, Bootstrap objects satisfy requests for object references for objects in a particular Oracle Tuxedo domain. Different Bootstrap objects allow the application to use multiple domains.
Using the Bootstrap object, you can obtain references to the following objects:
- SecurityCurrent
The SecurityCurrent object is used to establish a security context within an Oracle Tuxedo domain. The client can then obtain the PrincipalAuthenticator from the
principal_authenticator
attribute of the SecurityCurrent object. - TransactionCurrent
The TransactionCurrent object is used to participate in an Oracle Tuxedo transaction. The basic operations are as follows:
- Begin
Begin a transaction. Future operations take place within the scope of this transaction.
- Commit
End the transaction. All operations on this client application have completed successfully.
- Roll back
Abort the transaction. Tell all other participants to roll back.
- Suspend
Suspend participation in the current transaction. This operation returns an object that identifies the transaction and allows the client application to resume the transaction later.
- Resume
Resume participation in the specified transaction.
- Begin
- FactoryFinder
The FactoryFinder object is used to obtain a factory. In the Oracle Tuxedo system, factories are used to create application objects. The FactoryFinder provides the following different methods to find factories:
- Get a list of all available factories that match a factory object reference (
find_factories
) - Get the factory that matches a name component consisting of
id
and kind (find_one_factory
). - Get the first available factory of a specific kind (
find_one_factory_by_id
). - Get a list of all available factories of a specific kind (
find_factories_by_id
). - Get a list of all registered factories (
list_factories
).
- Get a list of all available factories that match a factory object reference (
- InterfaceRepository
The Interface Repository contains the interface descriptions of the CORBA objects that are implemented within the Oracle Tuxedo domain. Clients using the Dynamic Invocation Interface (DII) need a reference to the Interface Repository to be able to build CORBA request structures.
- NamingService
A NamingService object is used to obtain a reference to the root namespace. When you use this object, the ORB locates the root of the namespace.
- NotificationService
The NotificationService object is used to obtain a reference to the event channel factory (CosNotifyChannelAdmin::EventChannelFactory) in the CosNotification Service. In the Oracle Tuxedo system, the EventChannelFactory is used to locate the Notification Service channel.
- Tobj_SimpleEventsService
The Tobj_SimpleEventsService object is used to obtain a reference to the event channel factory (Tobj_SimpleEvents::ChannelFactory) in the Oracle Simple Events Service. In the Oracle Tuxedo system, the ChannelFactory is used to locate the Oracle Simple Events Service channel.
Using the bootstrapping mechanism, you can obtain six different references, as follows:
- SecurityCurrent
The SecurityCurrent object is used to establish a security context within an Oracle Tuxedo domain. The client can then obtain the PrincipalAuthenticator from the principal_authenticator attribute of the SecurityCurrent object.
- TransactionCurrent
The TransactionCurrent object is used to participate in an Oracle Tuxedo transaction. The basic operations are as follows:
- Begin
Begin a transaction. Future operations take place within the scope of this transaction.
- Commit
End the transaction. All operations on this client application have completed successfully.
- Roll back
Abort the transaction. Tell all other participants to roll back.
- Suspend
Suspend participation in the current transaction. This operation returns an object that identifies the transaction and allows the client application to resume the transaction later.
- Resume
Resume participation in the specified transaction.
- Begin
- FactoryFinder
The FactoryFinder object is used to obtain a factory. In Oracle Tuxedo CORBA, factories are used to create application objects. The FactoryFinder provides the following different methods to find factories:
- Get a list of all available factories that match a factory object reference (find_factories).
- Get the factory that matches a name component consisting of id and kind (find_one_factory).
- Get the first available factory of a specific kind (find_one_factory_by_id).
- Get a list of all available factories of a specific kind (find_factories_by_id).
- Get a list of all registered factories (list_factories).
- InterfaceRepository
The Interface Repository contains the interface descriptions of the CORBA objects that are implemented within the Oracle Tuxedo domain. Clients using the Dynamic Invocation Interface (DII) need a reference to the Interface Repository to be able to build CORBA request structures. The ActiveX Client is a special case of this. Internally, the implementation of the COM/IIOP Bridge uses DII, so it must get the reference to the Interface Repository, although this is transparent to the desktop client.
- NotificationService
The NotificationService object is used to obtain a reference to the event channel factory (CosNotifyChannelAdmin::EventChannelFactory) in the CosNotification Service. In Oracle Tuxedo CORBA, the EventChannelFactory is used to locate the Notification Service channel.
- Tobj_SimpleEventsService
The Tobj_SimpleEventsService object is used to obtain a reference to the event channel factory (Tobj_SimpleEvents::ChannelFactory) in the Oracle Simple Events Service. In Oracle Tuxedo CORBA, the ChannelFactory is used to locate the Oracle Simple Events Service channel.
The FactoryFinder and Interface Repository objects are not implemented in the environmental objects library. However, they are specific to an Oracle Tuxedo domain and are thus conceptually similar to the SecurityCurrent and TransactionCurrent objects in use.
The Bootstrap object implies an association or “session” between the client application and the Oracle Tuxedo domain. Within the context of this association, the Bootstrap object imposes a containment relationship with the other Current objects (or contained objects); that is, the SecurityCurrent and TransactionCurrent. Current objects are valid only for this domain and only while the Bootstrap object exists.
Note:
Resolving the SecurityCurrent when using the new URL address format (corbaloc://hostname:port_number)
is a local operation; that is, no connection is made by the client to the IIOP Listener/Handler.
In addition, a client can have only one instance of each of the Current objects at any time. If a Current object already exists, an attempt to create another Current object does not fail. Instead, another reference to the already existing object is handed out; that is, a client application may have more than one reference to the single instance of the Current object.
To create a new instance of a Current object, the application
must first invoke the destroy_current()
method on the
Bootstrap object. This invalidates all of the Current objects, but
does not destroy the session with the Oracle Tuxedo domain. After
invoking destroy_current()
, new instances of the
Current objects can be created within the Oracle Tuxedo domain
using the existing Bootstrap object.
To obtain Current objects for another domain, a different
Bootstrap object must be constructed. Although it is possible to
have multiple Bootstrap objects at one time, only one Bootstrap
object may be “active;” that is, have Current objects
associated with it. Thus, an application must first invoke
destroy_current()
on the “active”
Bootstrap object before obtaining new Current objects on another
Bootstrap object, which then becomes the active Bootstrap
object.
Note:
If you want to access objects in multiple domains, either import the object to the local domain or administratively configure your application access multiple domains. For more information on multi-domain configurations, see “Configuring Multiple CORBA Domains” in Using the Oracle Tuxedo Domains Component.Servers and native clients are inside of the Oracle Tuxedo
domain; therefore, no “session” is established.
However, the same containment relationships are enforced. Servers
and native clients access the domain they are currently in by
specifying an empty string, rather than
//host:port
.
Note:
When using the Bootstrap object, client and server applications must use theTobj_Bootstrap::resolve_initial_references()
method, not the ORB::resolve_initial_references()
method.
Parent topic: Oracle Bootstrapping Mechanism