After you generate the method skeleton file, class header file, and class implementation template, write the code for each method in the class implementation template (you can also write your class implementation from scratch and replace the generated class implementation template).
You must use scoped names to specify the CORBA IDL module, the EAServer SessionManager IDL module, and any component IDL modules that you want to execute methods on. To make using scoped names easier, you can use the C++ using statement for the IDL module namespaces as in the following example:
using namespace CORBA; using namespace SessionManager;
If your C++ compiler does not support namespaces, define a compiler macro JAG_NO_NAMESPACE when compiling your source files.
CORBA::is_nil(Object) can be used to verify that a specific interface is implemented by a component.
As with any C++ class, you use the constructor and destructor to initialize and perform any cleanup of objects.
Constructors of class variables in file scope not called
If you declare a class variable in file scope and compile
it into a shared object, such as a component, the Solaris C++ compiler
doesn’t call the constructor of the class variable. If
the variables need to be in scope only for a particular function,
procedure or module, then declare these variables in the appropriate function,
procedure, module; otherwise declare these variables in the class definition.
Each C++ method signature must use the return types and parameter datatypes described in “Supported datatypes”. In the method implementation, you optionally implement the features below:
Caching Connections to Third-Tier Database Servers
You can use a data source to improve performance when connecting to database servers. See “Using data sources” for more information.
Managing explicit OTS transactions
You can explicitly to manage OTS transactions from your component.
Setting Transaction State
Methods in a transactional component should call one of the transaction primitive routines to set the transaction state before returning. See “Setting transaction state” for more information.
Handling Errors
Use user-defined or CORBA system exceptions to handle errors. See “Handling errors” for more information about system and user-defined exceptions.