Skip navigation.

CORBA Programming Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


Tobj_ServantBase::_remove_ref()

Synopsis

Releases a reference to a servant. This method supports the development of a multithreaded server application.

Note: In applications written using BEA Tuxedo release 8.0 or later, use this method instead of the C++ "delete" statement that you used previously with the TP::application_responsibility() method.

C++ Binding

void _remove_ref()

Parameters

None.

Description

Invoke this method when a reference to a servant is no longer needed. Invoking this method causes the reference count for the servant to be decremented by one. If the _remove_ref() method brings the reference count to zero, it also calls the C++ "delete" statement on its own this pointer and deletes the servant.

Return Value

None.

Example

if(servant != NULL)
servant->_remove_ref();

TP Interface

The TP interface 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.

The purpose of this interface is to provide high-level calls that application code can call, instead of calls to underlying APIs provided by the Portable Object Adapter (POA), the CORBA Naming Service, and the BEA Tuxedo system. By using these calls, programmers can learn a simpler API and are spared the complexity of the underlying APIs. The TP interface implicitly uses two features of the BEA Tuxedo software that extend the CORBA APIs:

For information about the FactoryFinder object, see the section FactoryFinder Interface. For more information about factory-based routing, see Setting Up a BEA Tuxedo Application.

Usage Notes

C++ Declarations (in TP.h)

The C++ mapping is as follows:

class TP {
public:
static CORBA::Object_ptr create_object_reference(
const char* interfaceName,
const char* stroid,
CORBA::NVList_ptr criteria);
static CORBA::Object_ptr create_active_object_reference(
const char* interfaceName,
const char* stroid,
Tobj_Servant servant);
static CORBA::Object_ptr get_object_reference();
static void register_factory(
CORBA::Object_ptr factory_or,
const char* factory_id);
static void unregister_factory(
CORBA::Object_ptr factory_or,
const char* factory_id);
static void deactivateEnable()
static void deactivateEnable(
const char* interfaceName,
const char* stroid,
Tobj_Servant servant);
static CORBA::ORB_ptr orb();
static Tobj_Bootstrap* bootstrap();
static void open_xa_rm();
static void close_xa_rm();
static int userlog(char*, ... );
static char* get_object_id(CORBA::Object_ptr obj);
static void application_responsibility(
Tobj_Servant servant);
};

 

Skip navigation bar  Back to Top Previous Next