Netscape Internet Service Broker for C++ Programmer's Guide. Contents
|
|
- Ann Gilbert
- 7 years ago
- Views:
Transcription
1 Netscape Internet Service Broker for C++ Programmer's Guide Page 1 of 5 [Next] Netscape Internet Service Broker for C++ Programmer's Guide Nescape ISB for C++ - Provides information on how to develop and program distributed, objectbased applications in C++ for Windows and Unix using the Netscape Internet Service Broker. Last Updated 2/98. Preface Organization of this Guide Typographic Conventions Platform Conventions Syntax Conventions Where to Find Additional Information Chapter 1 ISB for C++ Basics Contents What is CORBA? Accessing Distributed Objects What is ISB for C++? Developing Applications with ISB for C++ ISB for C++ Features Optimized Binding Dynamic Invocation Interface Support for Threads Event Handling Facilities Event Loop Integration (For Single-Threaded Applications Only) Chapter 2 Getting Started Setting Up Setting Your PATH Variable Setting Up Your Development Environment Configuring Your Enterprise Server Developing Applications A Sample Application Defining Interfaces in IDL Running the IDL Compiler Generated Files Implementing an Interface Writing a Server Application Writing a Client Application Building the Client and Server Starting the Object Server Running the Client Application file://e:\cpp_prog\contents.htm 08/08/99
2 Netscape Internet Service Broker for C++ Programmer's Guide Page 2 of 5 Chapter 3 Naming and Binding to Objects Interface and Object Names Interface Names Object Names Using Qualified Object Names with Servers Using Fully Qualified Names Binding to Objects Client and Server on Different Hosts Client and Server on the Same Host Client and Server in a Single Process Operations on Object References Checking for Nil References Obtaining a Nil Reference Duplicating a Reference Releasing an Object Reference Obtaining the Reference Count Cloning Object References Converting a Reference to a String Obtaining Object and Interface Names Object Reference Equivalence and Casting Determining the Location and State of Bound Objects Widening and Narrowing Object References Chapter 4 Object and Implementation Activation Object Implementation Transient Objects Persistent Objects Checking for Persistent Objects Object Registration The Basic Object Adaptor Object Server Activation Policies Object Activation Daemon The Implementation Repository OAD Registration with regobj OAD Registration using BOA::create Reference Data Parameter Implementation Definition Parameter Creation Definition BOA::create Example Changing an ORB Implementation Unregistering Implementations Unregistering with unregobj Unregistering with the BOA::dispose Method The listimpl Command ORB Interface to the OAD Activating Objects Directly Activating Objects with the BOA The Activator Class Putting it All Together Object and Implementation Deactivation file://e:\cpp_prog\contents.htm 08/08/99
3 Netscape Internet Service Broker for C++ Programmer's Guide Page 3 of 5 Chapter 5 Error Handling Exceptions in the CORBA Model The Exception Class System Exceptions Completion Status Getting and Setting the Minor Code Casting to a SystemException Handling System Exceptions Narrowing to a System Exception Catching System Exceptions User Exceptions Defining User Exceptions Modifying the Object implementation Catching User Exceptions Adding Fields to User Exceptions Portability considerations About the Environment Class Environment Methods Chapter 6 Handling Events Event Handler Concepts Client Event Handlers The ConnectionInfo Structure ClientEventHandler Methods Creating a Client Event Handler The Handler Registry HandlerRegistry Methods for Clients Applications Registering Client Event Handlers Implementation Event Handlers The ImplEventHandler Class ImplEventHandler Methods Creating Implementation Event Handlers Using the Handler Registry HandlerRegistry Methods for Object Implementations Registering Implementation Event Handlers Chapter 7 Advanced Programming Topics Using Threads with ISB for C++ Threads in an Object Implementation Threads in a Client Application One Bind with Multiple Client Threads Multiple Binds with Multiple Client Threads Multiple Threads with Cloning Linking Multi-threaded Applications Event Loop Integration The Dispatcher Class The IOHandler Class Using an IOHandler Integration with XWindows file://e:\cpp_prog\contents.htm 08/08/99
4 Netscape Internet Service Broker for C++ Programmer's Guide Page 4 of 5 Integration with the Windows/NT Event Loop Integration with Microsoft Foundation Classes Multithreaded Servers: Windows 95 and Windows NT Thread-safe Code Multithreaded Servers and Windows User Interfaces Integration with Other Environments Chapter 8 Dynamic Interfaces Dynamic Invocation Interface Steps for Dynamic Invocation The Interface Repository Obtaining an Object's Interface The Request Class Creating a DII request Initializing a DII Request Setting the Context Setting the Arguments The Any Class The TypeCode Class Sending a DII Request Sending and Receiving Multiple Requests Chapter 9 The IDL Compiler The IDL Compiler The Interface Definition Code Generated for Clients Methods Generated The _ptr Definition The _var Class Code Generated for Servers Generated Methods The Class Template Interface Attributes Oneway methods Mapping Object References Interface Inheritance Chapter 10 IDL to C++ Language Mapping Primitive Data Types Strings String_var Class Constants Enumerations Type Definitions Modules Complex Data Types Fixed-length Structures Variable Length Structures Unions Sequences file://e:\cpp_prog\contents.htm 08/08/99
5 Netscape Internet Service Broker for C++ Programmer's Guide Page 5 of 5 Arrays Principal Chapter 11 Parameter Passing Rules Implicit Arguments Explicit Arguments Primitive Data Types Memory Management Complex Data Types Memory Management Object Reference Pointers Fixed Structures and Unions Variable Structures and Unions Strings Sequences and Type-safe Arrays Fixed Arrays Variable-Length Arrays T_var Data Types Memory Management for T_var Types Appendix A Platforms without C++ Exception Support [Next] For Platforms without C++ Exception Support The Exception Macros Using the Exception Macros Object Implementation Considerations Last Updated: 02/03/98 15:27:03 Copyright 1997 Netscape Communications Corporation file://e:\cpp_prog\contents.htm 08/08/99
6 ISB for C++ Basics Page 1 of 3 [Contents] [Previous] [Next] Chapter 1 ISB for C++ Basics This chapter introduces Netscape Internet Service Broker for C++ (ISB for C++), a complete implementation of the CORBA 2.0 specification for developing distributed object-based applications. It includes the following major sections: What is CORBA? What is ISB for C++? Developing Applications with ISB for C++ ISB for C++ Features What is CORBA? The Common Object Request Broker Architecture (CORBA) specification was developed by the Object Management Group to address the complexity and high cost of developing software applications. CORBA specifies an object-oriented approach to creating software components that can be reused and shared between applications. Each object encapsulates the details of its inner workings and presents a well defined interface, which reduces application complexity. The cost of developing applications is also reduced because once an object is implemented and tested, it may be used over and over again. The Object Request Broker (ORB) in Figure 1.1 connects a client application with the objects it wishes to use. The client application does not need to know whether the object resides on the same computer or is located on a remote computer somewhere on the network. The client application only needs to know the object's name and understand how to use the object's interface. The ORB takes care of the details of locating the object, routing the request, and returning the result. Figure 1.1 Client application acting on an object through an ORB. file://e:\cpp_prog\basics.htm 08/08/99
7 ISB for C++ Basics Page 2 of 3 Accessing Distributed Objects To use an object, your application must first bind itself to the object, specifying the object's interface name. The ORB locates the host that offers an object with the requested interface name. If the server that implements the requested object is not currently executing, the ORB can ensure that the appropriate server is started. After the bind is completed, the client application can invoke operations on the object. The client's method invocations are translated into requests that are sent to the object server. What is ISB for C++? ISB for C++ is an ORB that offers a complete implementation of the CORBA specification. ISB for C++ makes it easy for you to develop distributed, object-based client applications and servers. ISB for C++ offers these important features: Support for the C++ programming language Object naming The ability to distribute objects across a network Support for persistent objects Support for dynamic object creation Interoperability with other ORB implementations Developing Applications with ISB for C++ The first step to creating an application with ISB for C++ is to specify your objects' interfaces using CORBA's Interface Definition language (IDL). The IDL mappings for the C++ language are covered in IDL to C++ Language Mapping. The interface specification you create is used by the ISB for C++ IDL compiler to generate stub routines for the client application and skeleton code for the object implementation. The stub routines are used by the client application for all method invocations. You use the skeleton code, along with code you write, to create the server that implements the objects. The code for the client and object, once completed, is used as input to your C++ compiler and linker to produce the executable client application and object server. These steps are covered in detail in Getting Started. ISB for C++ Features In addition to providing the features defined in the CORBA specification, ISB for C++ offers enhancements that increase application performance and reliability. Optimized Binding file://e:\cpp_prog\basics.htm 08/08/99
8 ISB for C++ Basics Page 3 of 3 When your application binds to an object, ISB for C++ selects and establishes the most efficient communication mechanism. Depending on the platform and the location of the requested object, the bind may be established through a pointer reference, shared memory, or a TCP/IP socket. Naming and Binding to Objects describes optimized binding in detail. Dynamic Invocation Interface ISB for C++ maintains an interface repository that contains the IDL specifications for all of the objects that have been activated. This repository can be used by client applications to discover a recently added object, obtain the object's interface, and dynamically construct requests to act on the object. The Dynamic Invocation Interface (DII) is covered in Dynamic Interfaces. Support for Threads On those platforms that support threads, ISB for C++ is thread-safe and reentrant for both the client application and the server. For each thread within your client application, each bind is allocated its own thread within the server. When your client disconnects, the server thread allocated for your client will exit. Thread support is discussed in Advanced Programming Topics. Event Handling Facilities ISB for C++ allows you to monitor the following events: Connection establishment and destruction The entry to and exit from an object method You can use these events to provide debugging, logging, accounting, performance monitoring, or security information for your applications. The Handling Events chapter describes event handling. Event Loop Integration (For Single-Threaded Applications Only) You may find that the objects you implement require interaction with an event-driven environment. Object implementations are also event driven because they must wait for client requests. ISB for C++ gives you the ability to incorporate your object's event polling into the network or windowing component's event loop. This frees you from the complexity of managing nested event loops in your code. Advanced Programming Topics explains the details of event loop integration. [Contents] [Previous] [Next] Last Updated: 02/03/98 15:28:34 Copyright 1997 Netscape Communications Corporation file://e:\cpp_prog\basics.htm 08/08/99
9 Getting Started Page 1 of 9 [Contents] [Previous] [Next] Chapter 2 Getting Started This chapter steps you through setting up your development environment and describes how to develop a distributed, object-based application with ISB for C++. A sample application illustrates each step of the process. This chapter includes the following major sections: Setting Up Developing Applications A Sample Application Setting Up To develop applications using ISB for C++, you must have: a C++ compiler Enterprise Server 3.0f, 3.01, or higher with WAI-Patch #P85416 Before you start, set up your development environment and the Enterprise Server. Setting Your PATH Variable Setting Up Your Development Environment Configuring Your Enterprise Server Setting Your PATH Variable Set your PATH environment variable to include the directory where the ISB for C++ executables reside: <server_root>\wai\bin. For example, if the ISB distribution was installed on drive C:\ using default settings, the directory is: c:\netscape\suitespot\wai\bin Setting Up Your Development Environment Add the following ISB header file and library directories to your compiler search path: <server_root>\include <server_root>\wai\include <server_root>\wai\lib <server_root>\wai\bin file://e:\cpp_prog\getstrt.htm 08/08/99
10 Getting Started Page 2 of 9 For example, if the ISB distribution was installed in C:\ using default settings, add the following ISB header file and library directories to your compiler search path: c:\netscape\suitespot\include c:\netscape\suitespot\wai\include c:\netscape\suitespot\wai\lib c:\netscape\suitespot\wai\bin Also, make sure the compiler and linker can find these libraries: <server_root>\wai\lib\oneiiop10.lib <server_root>\wai\lib\orb.lib <server_root>\wai\lib\orb_r.lib The sample application presented in this chapter was developed for Enterprise Server 3.0 using MSVC under Windows NT 4.0 using c:\msdev\projects\msg as its root directory. A batch file named VCVARS32.BAT (provided with MSVC++ 4.2) was run to set additional environment variables. Your development environment may provide a similar file, or it may not be necessary. Configuring Your Enterprise Server ISB for C++ uses services provided by the Enterprise Server. To develop and run ISB for C++ applications, you must set up the server to use WAI. For complete instructions, see the Using WAI chapter of "Writing Web Applications with WAI." The key steps are: Setting the option to enable WAI. Configuring the web server's ORB. You may also need to create a directory: <server_root>\wai\nameservice. Developing Applications This section outlines the development process (illustrated in Figure 2.1). Details are provided later in the chapter. Following are the steps for developing applications using ISB for C++. File names and commands listed here refer to files in the sample application; replace them as appropriate for your application. Create an IDL file to define interfaces (SendMsg.idl). 1. Compile the IDL file to generate client and server support files: c:\msdev\projects\msg> orbeline -c cpp -h hpp -S tie SendMsg.idl 2. Implement the service interface (HelloImpl.cpp). file://e:\cpp_prog\getstrt.htm 08/08/99
11 Getting Started Page 3 of 9 3. Implement the object server application (MsgService.cpp). 4. Implement the client application (MsgClient.cpp) 5. Build everything: prompt> cd c:\msdev\projects\msg c:\msdev\projects\msg> nmake 6. Start the object server: c:\msdev\projects\msg> start MsgService 7. Run the client application: c:\msdev\projects\msg> MsgClient Figure 2.1 Developing the sample application. file://e:\cpp_prog\getstrt.htm 08/08/99
12 Getting Started Page 4 of 9 A Sample Application The rest of this chapter presents a small sample application. A C++ object server named MsgService exposes one service, accessed via the Hello interface, that prints a message on the server and sends a message to the client. This sample application was developed under Windows NT 4.0. It assumes that c:\msdev\projects\msg is its root directory. If you recreate this sample application using a different configuration, change code and commands accordingly. The most important files in this application are listed in the following table. You, the programmer, will write each of these files. The application also uses files generated by the orbeline compiler. File Name SendMsg.idl Description Defines the interface to the Hello service. HelloImpl.cpp Implements the interface to the Hello service. MsgService.cpp Activates and registers the service, making it available to clients. MsgClient.cpp Accesses the service and calls a method from its interface. Defining Interfaces in IDL The standard way to define CORBA interfaces is to use the Interface Definition Language (IDL). An IDL file begins by defining a module. A module contains one or more interfaces that provide one or more methods. The following file (named SendMsg.idl) defines the SendMsg module that defines the Hello interface. The interface provides one method, sayhello, that returns a string. SendMsg.idl defines the Hello interface. // SendMsg.idl module SendMsg interface Hello string sayhello(); Running the IDL Compiler The ISB for C++ IDL compiler is named orbeline. The following command invokes orbeline to compile the IDL file SendMsg.idl for the sample application. c:\msdev\projects\msg> orbeline -c cpp -h hpp -S tie SendMsg.idl This example uses several command line arguments. The argument -c cpp tells the compiler to give C++ source files an extension of.cpp, the argument -h hpp tells the compiler to give C++ header files an extension of.hpp, and the argument -S tie tells the compiler not to generate code file://e:\cpp_prog\getstrt.htm 08/08/99
13 Getting Started Page 5 of 9 to support the tie mechanism (the sample application does not use the tie mechanism). By default, orbeline generates header files with an extension of.hh and source files with an extension of.cc. The choice of extensions is provided as a convenience. The default extensions make it easy to distinguish generated files, but they may not be recognized by some C++ development environments. For more information on the command line options for the IDL compiler, see the Netscape Internet Service Broker for C++ Reference Guide. Generated Files Compiling SendMsg.idl generates the files listed in the following table. File Name Description SendMsg_c.hpp, SendMsg_c.cpp SendMsg_s.hpp, SendMsg_s.cpp Stub code for the client application. These header and source files contain generated code for the Hello service object on the client side. Do not modify these files. Skeleton code for the object server. These header and source files contain generated code for the Hello service object on the server side. Do not modify these files. Implementing an Interface In CORBA, interface definitions and implementations are separate and distinct. You define interfaces once, then implement them one or more times in one or more languages, depending on your application requirements. In this sample application, the Hello service interface is implemented in C++ using a file generated by orbeline. Following is the implementation file HelloImpl.cpp. Normally, you, the programmer, would create this file. // HelloImpl.cpp #include "SendMsg_s.hpp" class HelloImpl : public _sk_sendmsg::_sk_hello public: HelloImpl(const char* object_name = NULL) : _sk_sendmsg::_sk_hello(object_name) char* sayhello() cerr << "Client called sayhello." << endl; return "Hello!"; Writing a Server Application The server application (also called an object server) creates, activates, and registers services, making them available to clients. In this sample application, the object server is named MsgService. Many of the files used to implement MsgService are generated by the IDL compiler, orbeline. The MsgService.cpp file presented here is not generated. Normally you, the programmer, would create this file. This file provides a main method that does the following: Initializes the Object Request Broker (ORB). The _var classes are described in The IDL Compiler. file://e:\cpp_prog\getstrt.htm 08/08/99
14 Getting Started Page 6 of 9 Initializes the Basic Object Adaptor (BOA). For more information, see Object and Implementation Activation. Creates and activates a pointer to a HelloImpl object. Registers the newly-created object with the ISB Naming Service. This example uses the object name "Howdy." The name is arbitrary, but clients must use the same name to access the service. Prints out a status message. Enters a loop by calling boa->impl_is_ready and waits for client requests. Figure 2.2 The object server for the sample application. // MsgService.cpp #include "HelloImpl.cpp" #include <iostream.h> #include <NameUtil.hpp> int main(int argc, char* const* argv) try // Initialize the ORB and the BOA. CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); CORBA::BOA_var boa = orb->boa_init(argc, argv); HelloImpl* hi = new HelloImpl(); WAIReturnType_t rc; char *objectname = "Howdy"; char *hostandport = "mikelee:80"; rc = registerobject(hostandport, objectname, hi); boa->obj_is_ready(hi); cerr << "Ready for client requests." << endl; file://e:\cpp_prog\getstrt.htm 08/08/99
15 Getting Started Page 7 of 9 boa->impl_is_ready(); catch (CORBA::SystemException& e) cerr << e << endl; return(1); return(0); Writing a Client Application The client application locates a service, then invokes methods that service provides. In this sample application, the client application is named MsgClient. Many of the files used to implement MsgClient are generated by orbeline. The MsgClient.cpp file is presented here is not generated. Normally you, the programmer, would create this file. It performs the following functions: Initializes the Object Request Broker (ORB). 1. Locates the Hello service. Client-side code must prepend the object name with the string "/NameService/." In this example, the desired object name is "Howdy,", so the complete string is "/NameService/Howdy." 2. Calls the sayhello method provided by the Hello service. 3. Displays the resulting message. //MsgClient.cpp #include "SendMsg_c.hpp" #include <iostream.h> #include <NameUtil.hpp> int main(int argc, char* const* argv) try // Initialize the ORB. CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv); SendMsg::Hello_var hi; // Find a reference to the Hello service. CORBA::Object_ptr p; WAIReturnType_t rc; char* host = "mikelee"; int port = 80; char* uri = "/NameService/Howdy"; rc = resolveuri(host, port, uri, p); // Narrow the reference. hi = SendMsg::Hello::_narrow(p); // Call a method provided by the service. cout << hi->sayhello() << endl; catch (CORBA::SystemException& e) cerr << e << endl; return(1); return(0); Building the Client and Server The sample application presented in this chapter was developed for Enterprise Server 3.0 using MSVC under Windows NT 4.0 using c:\msdev\projects\msg as its root directory. A batch file named VCVARS32.BAT (provided with MSVC++ 4.2) was run to set additional environment variables. Your development environment may provide a similar file, or it may not be file://e:\cpp_prog\getstrt.htm 08/08/99
16 Getting Started Page 8 of 9 necessary. Below is a VC makefile for building the sample application. To invoke it, issue commands like the following (actual file contents and commands may vary depending on your development platform): prompt> cd c:\msdev\projects\msg c:\msdev\projects\msg> nmake Makefile for building the sample application. CC = CL -DWIN32 -DXP_WIN32 /GX /MT /O2 DEBUG = ISBDIR = \netscape\suitespot\wai ESROOT = \netscape\suitespot ORBCC = orbeline -v _c -m _s -c cpp -h hpp CCINCLUDES = -I. -I$(ISBDIR)\include -I$(ESROOT)\include CCFLAGS = $(CCINCLUDES) $(DEBUG) LIBDIR = $(ISBDIR)\lib STDCC_LIBS = wsock32.lib kernel32.lib NSCP_LIBS = $(LIBDIR)\ONEiiop10.lib LIBORB = $(LIBDIR)\orb_r.lib.SUFFIXES:.CPP.obj.h.hh.hpp.CPP.obj: $(CC) $(CCFLAGS) -c $< EXE = MsgClient.exe MsgService.exe #EXE = MsgService.exe all: $(EXE) clean: del *.obj *.hh *_c.cpp *_s.cpp $(EXE) *.log SendMsg_c.cpp: SendMsg.idl $(ORBCC) SendMsg.idl SendMsg_s.cpp: SendMsg.idl $(ORBCC) SendMsg.idl MsgClient.exe: SendMsg_c.obj MsgClient.obj $(CC) -o MsgClient.exe MsgClient.obj SendMsg_c.obj \ $(LIBORB) $(STDCC_LIBS) $(NSCP_LIBS) MsgService.exe: SendMsg_s.obj SendMsg_c.obj HelloImpl.obj MsgService.obj $(CC) -o MsgService.exe MsgService.obj SendMsg_s.obj \ HelloImpl.obj SendMsg_c.obj $(LIBORB) \ $(STDCC_LIBS) $(NSCP_LIBS) Starting the Object Server If you are running Enterprise Server 3.0, start osagent before starting your object server. If you are running version 3.01, you do not need osagent. c:\msdev\projects\msg> osagent To start a server application (under Windows NT), open a console window and use the start command. For example, the following command starts the MsgService application. c:\msdev\projects\msg> start MsgService If the application starts successfully, it will display the following message in the console window. Ready for client requests. file://e:\cpp_prog\getstrt.htm 08/08/99
17 Getting Started Page 9 of 9 Running the Client Application After starting the object server, you can start the MsgClient application. c:\msdev\projects\msg> MsgClient If the application starts successfully, it will display the following message in the client's console window. Hello! Also, the following message will appear in the object server's console window: Client called sayhello. If your development environment is not connected to a network (that is, if you are developing the application on a stand-alone system), it may take several seconds for the message to appear. Response times are generally faster on networked systems. [Contents] [Previous] [Next] Last Updated: 02/03/98 15:28:52 Copyright 1997 Netscape Communications Corporation file://e:\cpp_prog\getstrt.htm 08/08/99
18 Naming and Binding to Objects Page 1 of 9 [Contents] [Previous] [Next] Chapter 3 Naming and Binding to Objects This chapter describes how interface names and object names are used to identify objects, the options associated with binding a client to an object implementation, and the way these object references can be manipulated. This chapter includes the following major sections: Interface and Object Names Binding to Objects Operations on Object References Widening and Narrowing Object References Interface and Object Names When you define an object's interface in an IDL specification, you must give it an interface name. For example, the following IDL code defines an interface named library. interface library void add_book(); The interface name is the least specific name by which a client application can identify an object. An object name may also be used to further qualify an object. For information on obtaining interface and object names from an object reference, see below. Interface Names You define an object's interface name when you define the object in IDL. Server applications register interface names with a naming service. The interface name is also the name that client applications will use to bind to an object. Object Names In addition to the required interface name, you may specify an optional object name when instantiating an object. The ISB for C++ IDL compiler generates a NULL object name as a default parameter. An object name is required if your client application plans to bind to more than one instance of an object at a time. Object names must be assigned at the time an object is registered with the Object Activation Daemon. Using Qualified Object Names with Servers Imagine a library application that needs to have two library objects available; one for a library at Stanford and one for the Harvard library. You may even want to implement two separate object file://e:\cpp_prog\naming.htm 08/08/99
19 Naming and Binding to Objects Page 2 of 9 servers, possibly on different hosts. Each server would instantiate a library object, but each would use the Library object's constructor that accepts an object name. The following code example shows the library server code required to create separate library objects for Stanford and Harvard. Specifying an object name when instantiating an object's implementation. #include <lib_srv.h> int main(int argc, char **argv) // Initialize ORB and Basic Object Adaptor (BOA) CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); CORBA::BOA_var boa = orb->boa_init(argc, argv); // Instantiate the Stanford Library class Library library_server("stanford"); // Instantiate Harvard Library class Library library_server("harvard"); Using Fully Qualified Names A client application does not have to specify an object name when binding to an object if the same service is available from multiple servers or if only one server implements the object. The ISB for C++ IDL compiler generates a NULL parameter for the object name, by default. A client application that uses two different services must specify a particular service object. The following code example specifies the Harvard library. Using an object name. // Declare the library object library *library_object; try CORBA::Object_ptr p; WAIReturnType_t rc; char* host = "myhost"; int port = 80; char* uri = "/NameService/Harvard"; rc = resolveuri(host, port, uri, p); // Narrow the reference. library_object = library::_narrow(p); // Check for errors catch(const CORBA::Exception& excep) cout << "Error binding to library object" << endl; return(0); Binding to Objects Before a client application can invoke methods on an object, it must obtain a reference to the object. A client application will never call the class' constructor, it will always obtain an object reference by calling a method. Then the ORB performs several functions on behalf of the application. The ORB contacts the directory service to locate an object server that is offering the specified interface name. If an object name is specified, it will be used to further qualify file://e:\cpp_prog\naming.htm 08/08/99
20 Naming and Binding to Objects Page 3 of 9 the directory service search. When an object implementation is located, the ORB attempts to establish a connection between the implementation and your client application. If the connection is successfully established, the ORB creates a proxy object, if necessary, and returns a reference to that object. Client and Server on Different Hosts If the ORB determines that the requested object implementation resides on a remote host, a TCP/IP connection will be established between the client and object server. The ORB will instantiate a proxy object for your client to use. All methods invoked on the proxy object will be packaged as requests and sent to the server on the remote host. The server on the remote host will unpack the request, invoke the desired method, and send the results back to the client. Figure 3.1 Client and Server processes on different hosts. Client and Server on the Same Host If the ORB determines that the requested object implementation resides on the local host, a connection will be established between the client and object server using shared memory only if both the client and server are multithreaded. The ORB will instantiate a proxy object for your client to use. All methods invoked on the proxy object will be packaged as requests and sent to the server using shared memory. Figure 3.2 Client and Server processes on the same host. file://e:\cpp_prog\naming.htm 08/08/99
21 Naming and Binding to Objects Page 4 of 9 Client and Server in a Single Process The previous discussions have assumed that object implementations have taken the form of a server process. While this is often the case, a client application and the object implementation can both be packaged inside a single process. When a client application binds to a service in this scenario, the ORB returns a pointer to the object implementation. That pointer will be widened to the object type used by the client application. All methods invoked on the client's object are called directly as C++ virtual functions on the object implementation. The ORB is involved only during the bind process. Figure 3.3 Client and object implementation in the same process. Operations on Object References A client application can use an object reference to invoke methods on the object that have been defined in the object's IDL interface specification. In addition, ORB objects inherit methods from the class CORBA::Object that you can use to manipulate the object. Checking for Nil References file://e:\cpp_prog\naming.htm 08/08/99
22 Naming and Binding to Objects Page 5 of 9 You can use the CORBA class static method _nil to determine if an object reference is nil. This method returns 1 if the object reference passed is nil. It returns 0 if the object reference is not nil. Method for checking for a nil object reference. class CORBA static Boolean _nil(object_ptr obj); Obtaining a Nil Reference You can obtain a nil object reference using the CORBA::Object method _nil. It returns a NULL value that is cast to an Object_ptr. Method for obtaining a nil reference. class Object static Object_ptr _nil(); Duplicating a Reference A client application can use the _duplicate method to copy an object reference so that the copy can be stored in a data structure or passed as a parameter. When this method is invoked, the reference count for the object reference is incremented by one and the same object reference is returned to the caller. The IDL compiler generates a _duplicate method for each object interface you specify. The _duplicate method shown accepts and returns a generic Object_ptr. The method for duplicating an object reference. class Object static Object_ptr _duplicate(object_ptr obj); Releasing an Object Reference Release an object reference when it is no longer needed. One way of releasing an object reference is by invoking the CORBA::Object class method _release. The method for releasing an object reference. class CORBA class Object void _release(); file://e:\cpp_prog\naming.htm 08/08/99
23 Naming and Binding to Objects Page 6 of 9 You can also use the CORBA class method release, provided for compatibility with the CORBA specification. The CORBA method for releasing an object reference. class CORBA static void release(); Obtaining the Reference Count Each object reference has a reference count that you can use to determine how many times the reference has been duplicated.when you first obtain an object reference, the reference count is set to one. Releasing an object reference will decrement the reference count by one. When the reference count reaches 0, ISB for C++ automatically deletes the object reference. Method for obtaining the reference count. class Object ULong _ref_count() const; Cloning Object References The IDL compiler generates a _clone method for each object interface that you specify. Unlike the _duplicate method, _clone creates an exact copy of the object's entire state and establishes a new, separate connection to the object implementation. The object reference returned and the original object reference represent two distinct connections to the object implementation. The following code listing shows the _clone method generated for a library interface. The _clone method for the library class. class library: public virtual CORBA::Object public: library_ptr _clone(); Platforms that support multi-threaded client applications may increase their performance by cloning an object reference for each by each thread that is created to access a particular object. See Advanced Programming Topics for information on multi-threaded applications. Converting a Reference to a String Object references are opaque and can vary from one ORB to another, so ISB for C++ provides an ORB class with methods that allow you to convert an object reference to a string as well as convert a string back into an object reference. The CORBA specification refers to this process as "stringification." file://e:\cpp_prog\naming.htm 08/08/99
24 Naming and Binding to Objects Page 7 of 9 Methods for converting an object reference to a string and vice versa. class ORB public: // Convert an object reference to a string char *object_to_string(object_ptr obj); // Convert a char* to an object reference Object_ptr string_to_object(const char *); Obtaining Object and Interface Names The following code listing shows the methods provided by the Object class that you can use to obtain the interface and object names as well as the repository id associated with an object reference. The interface repository is discussed in the Dynamic Interfaces chapter of this guide. Methods for obtaining the interface name, object name and repository id. class Object const char *_interface_name() const; const char *_object_name() const; const char *_repository_id() const; Object Reference Equivalence and Casting You can check whether an object reference is of a particular type by using the _is_a method. You must first obtain the repository ID of the type you wish to check using the _repository_id method. This method returns 1 if the object is either an instance of the type represented by repository_id or if it is a sub-type. 0 is returned if the object is not of the type specified. Method for determining the type of an object reference. class Object Boolean _is_a(const char *repository_id); The following code listing shows the _is_equivalent method which you can use to check if two object references are equivalent. This method returns 1 if the references are equivalent. This method returns 0 if the references are not identical. Method for comparing object references. class Object Boolean _is_equivalent(object_ptr other_object); You can use the _hash method shown below to obtain a hash value for an object reference. While this value is not guaranteed to be unique, it will remain consistent through the lifetime of the object file://e:\cpp_prog\naming.htm 08/08/99
25 Naming and Binding to Objects Page 8 of 9 reference. The _hash method. class Object ULong _hash(ulong maximum); Determining the Location and State of Bound Objects Given a valid object reference, your client application can use the method shown below to retrieve the current state of the bind for that object. The method returns 1 if the object is bound and 0 if the object is not bound. The method for querying the state of the bind for an object reference. class Object public: Boolean _is_bound() const; The following code listing shows two methods your client application can use to determine the location of a bound object implementation. Methods for determining the location of an object implementation. class Object virtual Boolean _is_local() const; Boolean _is_remote() const; NOTE: If the referred object is in the same process, _is_local returns TRUE. Widening and Narrowing Object References Converting an object reference's type to a super-type is called widening. The process of converting an object reference's type from a general super-type to a more specific sub-type is called narrowing. ISB for C++ maintains a typegraph for each object interface so that narrowing can be accomplished by the object's _narrow method. If the _narrow method determines it is not possible to narrow an object to the type you request, it will return NULL. Narrowing. // MsgClient.cpp #include "SendMsg_c.hpp" #include <iostream.h> #include <NameUtil.hpp> int main(int argc, char* const* argv) try // Initialize the ORB. CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv); SendMsg::Hello_var hi; file://e:\cpp_prog\naming.htm 08/08/99
26 Naming and Binding to Objects Page 9 of 9 // Find a reference to the Hello service. CORBA::Object_ptr p; WAIReturnType_t rc; char* host = "myhost"; int port = 80; char* uri = "/NameService/Howdy"; rc = resolveuri(host, port, uri, p); // Narrow the reference. hi = SendMsg::Hello::_narrow(p); // Call a method provided by the service. cout << hi->sayhello() << endl; catch (CORBA::SystemException& e) cerr << e << endl; return(1); return(0); The _narrow method constructs a new C++ object and returns a pointer to that object. When you no longer need the object, you must release the object reference returned by _narrow as well as the object reference you passed as an argument. [Contents] [Previous] [Next] Last Updated: 02/03/98 15:29:25 Copyright 1997 Netscape Communications Corporation file://e:\cpp_prog\naming.htm 08/08/99
27 Object and Implementation Activation Page 1 of 14 [Contents] [Previous] [Next] Chapter 4 Object and Implementation Activation This chapter discusses how objects are implemented and made available to client applications. It includes the following major sections: Object Implementation The Basic Object Adaptor Object Activation Daemon Unregistering Implementations ORB Interface to the OAD Activating Objects Directly Activating Objects with the BOA Object and Implementation Deactivation Object Implementation An object implementation provides the state and processing activities for the ORB objects used by client applications. An ORB object is created when its implementation class is instantiated in C++ by an implementation process or server. An object implementation uses the Basic Object Adaptor ( BOA) to activate its ORB objects so that they can be used by client applications. ORB objects fall into two categories: transient and persistent. Transient Objects Objects that are only available during the lifetime of the process that created them are called transient objects. Transient objects are not registered with ISB for C++'s directory service. Only those entities that possess an explicit object reference to a transient object may invoke its methods. The following code example shows you how to modify a library application so that library_server is created as a transient object. The scope must be set prior to instantiating the object. NOTE: Clients can only access objects of transient objects when passed as an argument, as defined by the IDL; for instance, object_to_string will fail. Creating a transient object. #include <lib_srv.h> file://e:\cpp_prog\objact.htm 08/08/99
28 Object and Implementation Activation Page 2 of 14 int main(int argc, char **argv) // Initialize ORB and Basic Object Adaptor (BOA) CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); CORBA::BOA_var boa = orb->boa_init(argc, argv); // Set local registration scope boa->scope(corba::boa::scope_local); // Instantiate the Library class as a transient object Library library_server(); // Since Library object is transient, it won't get // registered with the directory service boa->obj_is_ready(&library_server); Persistent Objects An object that remains valid beyond the lifetime of the process that created it is called a persistent object. These objects have a global scope and are registered with ISB for C++'s directory service, which allow them to be located and used by client applications. Persistent objects may also be registered with the Object Activation Daemon, enabling the servers that implement them to be activated on demand. You can use persistent objects to implement long-running servers that provide long-term tasks. The following code example shows the creation and registration of a persistent object. Creating and activating a persistent object. // MsgService.cpp #include "HelloImpl.cpp" #include <iostream.h> #include <NameUtil.hpp> int main(int argc, char* const* argv) try // Initialize the ORB and the BOA. CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); CORBA::BOA_var boa = orb->boa_init(argc, argv); HelloImpl* hi = new HelloImpl(); WAIReturnType_t rc; char *objectname = "Howdy"; char *hostandport = "mikelee:80"; rc = registerobject(hostandport, objectname, hi); boa->obj_is_ready(hi); cerr << "Ready for client requests." << endl; boa->impl_is_ready(); catch (CORBA::SystemException& e) cerr << e << endl; return(1); return(0); NOTE: You do not have to set the scope of a persistent object because the default scope is global, or persistent. Checking for Persistent Objects The following code listing shows a method a client application can use to determine whether a persistent or transient object implementation is associated with a given object reference. It is important to know whether or not an object is persistent because some methods for manipulating object references will fail if the object is transient. The _is_persistent method returns 1 if the file://e:\cpp_prog\objact.htm 08/08/99
29 Object and Implementation Activation Page 3 of 14 object is persistent and 0 if the object is transient. The method for checking for persistent object implementations. class Object Boolean _is_persistent() const; Object Registration Once a server has instantiated the service objects that it offers, the BOA must be notified when the objects have been initialized. Lastly, the BOA is notified when the server is ready to receive requests from client applications. The obj_is_ready method notifies the BOA that a particular service object is ready to receive requests from client applications. If a server offers more than one service object, it must call obj_is_ready for each object, passing the object reference as an argument. If the object reference passed to obj_is_ready represents a persistent object, the BOA will register the object with ISB for C++'s directory service. If the object is transient, no such registration will occur. NOTE: If a client tries to bind to a service and obj_is_ready has not been called, the exception NO_IMPLEMENT is raised. When all of the objects have been instantiated and all the calls to obj_is_ready have been made, the server must call impl_is_ready to enter an event loop and await client requests. The Handling Events chapter in this guide discusses event handling in detail. The Basic Object Adaptor ISB for C++'s BOA provides several important functions to client applications and the object implementations they use. An object may reside in the same process as its client application or it may reside in a separate process called a server. Servers may contain and offer a single object or multiple objects. Furthermore, servers may be activated by the BOA on demand or they may be started by some entity external to the BOA. Object Server Activation Policies The CORBA specification defines four activation policies that describe the way in which an object implementation is started and the manner in which it may be accessed by a client application. These activation policies only apply to persistent objects, not transient objects. Shared Server Policy When the shared server policy is specified, only one server is launched regardless of the number of clients; the clients share the server. Along with persistent servers, shared servers are the most common types of servers. Persistent Server Policy file://e:\cpp_prog\objact.htm 08/08/99
30 Object and Implementation Activation Page 4 of 14 This policy describes servers that, like shared servers, implement multiple objects. Persistent servers are started by some entity outside of the Basic Object Adaptor, but they still register their objects and receive requests using the BOA. Unshared Server Policy Unshared servers are processes that implement a single object. A client application causes this type of server to be activated. Once that client exits, the unshared server will exit. Server-Per-Method Policy This activation policy requires a server process to be started for each method that is invoked. After the method has been completed, the server will exit. Subsequent method invocations on the same object will require a new server process to be started. Object Activation Daemon You can register an object implementation with ISB for C++'s Object Activation Daemon (OAD) to automatically activate the implementation when a client binds to the object. Object implementations can be registered using a command-line interface or programmatically with the BOA::create method. There is also an ORB Interface to the OAD. In each case, the interface name, object name, the activation policy, and the executable program representing the implementation must be specified. The Implementation Repository All object implementations registered with the OAD are stored in an implementation repository maintained by the OAD. By default, the implementation repository data are stored in a file named impl_rep. This file's path name depends on where ISB for C++ was installed on your system. The default value can be overridden using OAD environment variables, described in the Netscape Internet Service Broker for C++ Reference Guide. OAD Registration with regobj The regobj command can be used to register an object implementation from the command line or from program code. The required parameters are the interface name, object name and path name. If the activation policy is not specified, the default policy of shared server will be used. For complete information on using this command, see the Netscape Internet Service Broker for C++ Reference Guide. NOTE: The implementation of your object does not need to be modified in order for you to use regobj. You can write an implementation and start it manually during the development and testing phases. When your implementation is ready to be deployed, use regobj to register your implementation with the OAD. NOTE: When registering an object implementation, use the same object name as is used when the implementation object is contructed. Figure 4.1 The regobj command file://e:\cpp_prog\objact.htm 08/08/99
31 Object and Implementation Activation Page 5 of 14 For information about the Windows implementation of regobj, see the "Commands" chapter of the Netscape Internet Service Broker for C++ Reference Guide. OAD Registration using BOA::create Instead of using the regobj command manually or in code, ISB for C++ provides the BOA::create method to register one or more objects with the OAD and the ISB for C++ directory service. The OAD will store the information in the implementation repository, allowing the object implementation to be located and activated when a client attempts to bind to the object. The BOA::create method and its parameters. class CORBA typedef OctetSequence ReferenceData; class BOA virtual Object_ptr create( const ReferenceData& ref_data, InterfaceDef_ptr inf_ptr, ImplementationDef_ptr impl_ptr) = 0; Reference Data Parameter You can use the ref_data parameter to distinguish between multiple instances of the same object. The value of the reference data is chosen by the implementation at object creation time and remains constant during the lifetime of the object. The ReferenceData typedef is portable across platforms and ORBs. NOTE: ISB for C++ does not use the inf_ptr, defined by the CORBA specification to identify the interface of the object being created. Applications created with ISB for file://e:\cpp_prog\objact.htm 08/08/99
Introduction Object-Oriented Network Programming CORBA addresses two challenges of developing distributed systems: 1. Making distributed application development no more dicult than developing centralized
More informationCORBA Programming with TAOX11. The C++11 CORBA Implementation
CORBA Programming with TAOX11 The C++11 CORBA Implementation TAOX11: the CORBA Implementation by Remedy IT TAOX11 simplifies development of CORBA based applications IDL to C++11 language mapping is easy
More informationStorage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas
CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage
More informationIntroduction to Distributed Computing using CORBA
Introduction to Distributed Computing using CORBA Rushikesh K. Joshi Dept of Computer Science & Engineering Indian Institute of Technology, Bombay Powai, Mumbai - 400 076, India. Email: rkj@cse.iitb.ac.in
More informationGlossary of Object Oriented Terms
Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction
More informationInfrastructure that supports (distributed) componentbased application development
Middleware Technologies 1 What is Middleware? Infrastructure that supports (distributed) componentbased application development a.k.a. distributed component platforms mechanisms to enable component communication
More informationObject Oriented Software Design II
Object Oriented Software Design II Introduction to C++ Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa February 20, 2012 G. Lipari (Scuola Superiore Sant Anna) C++ Intro February
More informationCourse Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)
Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Duration of Course: 6 Months Fees: Rs. 25,000/- (including Service Tax) Eligibility: B.E./B.Tech., M.Sc.(IT/ computer
More informationIntroduction CORBA Distributed COM. Sections 9.1 & 9.2. Corba & DCOM. John P. Daigle. Department of Computer Science Georgia State University
Sections 9.1 & 9.2 Corba & DCOM John P. Daigle Department of Computer Science Georgia State University 05.16.06 Outline 1 Introduction 2 CORBA Overview Communication Processes Naming Other Design Concerns
More informationcore. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt
core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY
More informationAn Incomplete C++ Primer. University of Wyoming MA 5310
An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages
More informationOverview of CORBA 11.1 I NTRODUCTION TO CORBA. 11.4 Object services 11.5 New features in CORBA 3.0 11.6 Summary
C H A P T E R 1 1 Overview of CORBA 11.1 Introduction to CORBA 11.2 CORBA architecture 11.3 Client and object implementations 11.4 Object services 11.5 New features in CORBA 3.0 11.6 Summary In previous
More informationThe Advantages of CorBA For Network Based Training Systems
Support of multimedia services for distributed network training applications in CORBA-3 Fausto Rabitti CNUCE-CNR, Via S. Maria, 36, Pisa, Italy Abstract In this paper, fundamental technological issues
More informationGetting Started with the Internet Communications Engine
Getting Started with the Internet Communications Engine David Vriezen April 7, 2014 Contents 1 Introduction 2 2 About Ice 2 2.1 Proxies................................. 2 3 Setting Up ICE 2 4 Slices 2
More informationDatabase Toolkit: Portable and Cost Effective Software
Database Toolkit: Portable and Cost Effective Software By Katherine Ye Recursion Software, Inc. TABLE OF CONTENTS Abstract...2 Why using ODBC...2 Disadvantage of ODBC...3 Programming with Database Toolkit...4
More informationIntegrating TAU With Eclipse: A Performance Analysis System in an Integrated Development Environment
Integrating TAU With Eclipse: A Performance Analysis System in an Integrated Development Environment Wyatt Spear, Allen Malony, Alan Morris, Sameer Shende {wspear, malony, amorris, sameer}@cs.uoregon.edu
More informationSMTP-32 Library. Simple Mail Transfer Protocol Dynamic Link Library for Microsoft Windows. Version 5.2
SMTP-32 Library Simple Mail Transfer Protocol Dynamic Link Library for Microsoft Windows Version 5.2 Copyright 1994-2003 by Distinct Corporation All rights reserved Table of Contents 1 Overview... 5 1.1
More informationC++ INTERVIEW QUESTIONS
C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get
More informationVirtuozzo Virtualization SDK
Virtuozzo Virtualization SDK Programmer's Guide February 18, 2016 Copyright 1999-2016 Parallels IP Holdings GmbH and its affiliates. All rights reserved. Parallels IP Holdings GmbH Vordergasse 59 8200
More informationApplication of Java and CORBA to Distributed Control and Monitoring Applications in the PHENIX Online Control System
Application of Java and CORBA to Distributed Control and Monitoring Applications in the PHENIX Online Control System E. Desmond 1, S. Adler 1, Lars Ewell 1, J. Haggerty 1, Hyon Joo Kehayias 1, S. Pate
More informationFundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
More informationTextbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. 1
Event Driven Simulation in NS2 Textbook: T. Issariyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. 1 Outline Recap: Discrete Event v.s. Time Driven Events and Handlers The Scheduler
More informationComp151. Definitions & Declarations
Comp151 Definitions & Declarations Example: Definition /* reverse_printcpp */ #include #include using namespace std; int global_var = 23; // global variable definition void reverse_print(const
More informationBuilding Applications Using Micro Focus COBOL
Building Applications Using Micro Focus COBOL Abstract If you look through the Micro Focus COBOL documentation, you will see many different executable file types referenced: int, gnt, exe, dll and others.
More informationAP Computer Science Java Subset
APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall
More informationVariable Base Interface
Chapter 6 Variable Base Interface 6.1 Introduction Finite element codes has been changed a lot during the evolution of the Finite Element Method, In its early times, finite element applications were developed
More informationElements of Advanced Java Programming
Appendix A Elements of Advanced Java Programming Objectives At the end of this appendix, you should be able to: Understand two-tier and three-tier architectures for distributed computing Understand the
More informationMicrosoft Windows PowerShell v2 For Administrators
Course 50414B: Microsoft Windows PowerShell v2 For Administrators Course Details Course Outline Module 1: Introduction to PowerShell the Basics This module explains how to install and configure PowerShell.
More informationJava (12 Weeks) Introduction to Java Programming Language
Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short
More information09336863931 : provid.ir
provid.ir 09336863931 : NET Architecture Core CSharp o Variable o Variable Scope o Type Inference o Namespaces o Preprocessor Directives Statements and Flow of Execution o If Statement o Switch Statement
More informationThe C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
More informationwww.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk
CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling
More informationModule 17. Client-Server Software Development. Version 2 CSE IIT, Kharagpur
Module 17 Client-Server Software Development Lesson 42 CORBA and COM/DCOM Specific Instructional Objectives At the end of this lesson the student would be able to: Explain what Common Object Request Broker
More informationObject Oriented Software Design II
Object Oriented Software Design II C++ intro Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa February 26, 2012 G. Lipari (Scuola Superiore Sant Anna) C++ Intro February 26,
More informationSAS 9.4 Intelligence Platform
SAS 9.4 Intelligence Platform Application Server Administration Guide SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2013. SAS 9.4 Intelligence Platform:
More informationE-mail Listeners. E-mail Formats. Free Form. Formatted
E-mail Listeners 6 E-mail Formats You use the E-mail Listeners application to receive and process Service Requests and other types of tickets through e-mail in the form of e-mail messages. Using E- mail
More informationBrent A. Perdue. July 15, 2009
Title Page Object-Oriented Programming, Writing Classes, and Creating Libraries and Applications Brent A. Perdue ROOT @ TUNL July 15, 2009 B. A. Perdue (TUNL) OOP, Classes, Libraries, Applications July
More informationMPLAB Harmony System Service Libraries Help
MPLAB Harmony System Service Libraries Help MPLAB Harmony Integrated Software Framework v1.08 All rights reserved. This section provides descriptions of the System Service libraries that are available
More informationInterBase 6. API Guide. Borland/INPRISE. 100 Enterprise Way, Scotts Valley, CA 95066 http://www.interbase.com
InterBase 6 API Guide Borland/INPRISE 100 Enterprise Way, Scotts Valley, CA 95066 http://www.interbase.com Inprise/Borland may have patents and/or pending patent applications covering subject matter in
More informationHighly Available AMPS Client Programming
Highly Available AMPS Client Programming 60East Technologies Copyright 2013 All rights reserved. 60East, AMPS, and Advanced Message Processing System are trademarks of 60East Technologies, Inc. All other
More informationHow To Create A C++ Web Service
A Guide to Creating C++ Web Services WHITE PAPER Abstract This whitepaper provides an introduction to creating C++ Web services and focuses on:» Challenges involved in integrating C++ applications with
More informationChannel Access Client Programming. Andrew Johnson Computer Scientist, AES-SSG
Channel Access Client Programming Andrew Johnson Computer Scientist, AES-SSG Channel Access The main programming interface for writing Channel Access clients is the library that comes with EPICS base Written
More informationMiddleware Lou Somers
Middleware Lou Somers April 18, 2002 1 Contents Overview Definition, goals, requirements Four categories of middleware Transactional, message oriented, procedural, object Middleware examples XML-RPC, SOAP,
More informationVisual Basic. murach's TRAINING & REFERENCE
TRAINING & REFERENCE murach's Visual Basic 2008 Anne Boehm lbm Mike Murach & Associates, Inc. H 1-800-221-5528 (559) 440-9071 Fax: (559) 440-0963 murachbooks@murach.com www.murach.com Contents Introduction
More informationSQLITE C/C++ TUTORIAL
http://www.tutorialspoint.com/sqlite/sqlite_c_cpp.htm SQLITE C/C++ TUTORIAL Copyright tutorialspoint.com Installation Before we start using SQLite in our C/C++ programs, we need to make sure that we have
More informationReport of the case study in Sistemi Distribuiti A simple Java RMI application
Report of the case study in Sistemi Distribuiti A simple Java RMI application Academic year 2012/13 Vessio Gennaro Marzulli Giovanni Abstract In the ambit of distributed systems a key-role is played by
More informationGetting Started with STATISTICA Enterprise Programming
Getting Started with STATISTICA Enterprise Programming 2300 East 14th Street Tulsa, OK 74104 Phone: (918) 749 1119 Fax: (918) 749 2217 E mail: mailto:developerdocumentation@statsoft.com Web: www.statsoft.com
More informationTable of Contents. Java CGI HOWTO
Table of Contents Java CGI HOWTO...1 by David H. Silber javacgi document@orbits.com...1 1.Introduction...1 2.Setting Up Your Server to Run Java CGI Programs (With Explanations)...1 3.Setting Up Your Server
More informationJava SE 7 Programming
Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 4108 4709 Java SE 7 Programming Duration: 5 Days What you will learn This Java Programming training covers the core Application Programming
More informationVisiBroker Configuration Reference
VisiBroker Configuration Reference VERSION 1.6 InpriseAppCenter Inprise Corporation, 100 Enterprise Way Scotts Valley, CA 95066-3249 Copyright 1998, 1999 Inprise Corporation. All rights reserved. All Inprise
More informationAn API for Reading the MySQL Binary Log
An API for Reading the MySQL Binary Log Mats Kindahl Lead Software Engineer, MySQL Replication & Utilities Lars Thalmann Development Director, MySQL Replication, Backup & Connectors
More informationCS 111 Classes I 1. Software Organization View to this point:
CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects
More informationPROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON
PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London
More informationObject-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007
Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007 The Java Type System By now, you have seen a fair amount of Java. Time to study in more depth the foundations of the language,
More informationOracle Service Bus Examples and Tutorials
March 2011 Contents 1 Oracle Service Bus Examples... 2 2 Introduction to the Oracle Service Bus Tutorials... 5 3 Getting Started with the Oracle Service Bus Tutorials... 12 4 Tutorial 1. Routing a Loan
More informationInstrumentation for Linux Event Log Analysis
Instrumentation for Linux Event Log Analysis Rajarshi Das Linux Technology Center IBM India Software Lab rajarshi@in.ibm.com Hien Q Nguyen Linux Technology Center IBM Beaverton hien@us.ibm.com Abstract
More informationBusiness Application
137 Germain CRT Validation Rules for Siebel CRM 7.7,7.8,8.0,8.1,8.2 Validation Rule Name Validation Rule Description Business Application Siebel Repository Level Improve CPU Improve Memory GS-SBL-REP-JDBC-1001
More informationIntroduction to Object-Oriented Programming
Introduction to Object-Oriented Programming Programs and Methods Christopher Simpkins chris.simpkins@gatech.edu CS 1331 (Georgia Tech) Programs and Methods 1 / 8 The Anatomy of a Java Program It is customary
More informationChapter 2: Remote Procedure Call (RPC)
Chapter 2: Remote Procedure Call (RPC) Gustavo Alonso Computer Science Department Swiss Federal Institute of Technology (ETHZ) alonso@inf.ethz.ch http://www.iks.inf.ethz.ch/ Contents - Chapter 2 - RPC
More informationUsing the VMRC Plug-In: Startup, Invoking Methods, and Shutdown on page 4
Technical Note Using the VMRC API vcloud Director 1.5 With VMware vcloud Director, you can give users the ability to access virtual machine console functions from your web-based user interface. vcloud
More informationC Programming Review & Productivity Tools
Review & Productivity Tools Giovanni Agosta Piattaforme Software per la Rete Modulo 2 Outline Preliminaries 1 Preliminaries 2 Function Pointers Variadic Functions 3 Build Automation Code Versioning 4 Preliminaries
More informationLecture 7: Java RMI. CS178: Programming Parallel and Distributed Systems. February 14, 2001 Steven P. Reiss
Lecture 7: Java RMI CS178: Programming Parallel and Distributed Systems February 14, 2001 Steven P. Reiss I. Overview A. Last time we started looking at multiple process programming 1. How to do interprocess
More informationDatabase Applications with VDBT Components
Database Applications with VDBT Components Ted Faison 96/4/23 Developing database applications has always been a very slow process, hindered by a myriad of low-level details imposed by the underlying database
More informationSIEBEL SERVER ADMINISTRATION GUIDE
SIEBEL SERVER ADMINISTRATION GUIDE VERSION 7.5.3 JULY 2003 12-FRLK3Z Siebel Systems, Inc., 2207 Bridgepointe Parkway, San Mateo, CA 94404 Copyright 2003 Siebel Systems, Inc. All rights reserved. Printed
More informationHow to Write a Simple Makefile
Chapter 1 CHAPTER 1 How to Write a Simple Makefile The mechanics of programming usually follow a fairly simple routine of editing source files, compiling the source into an executable form, and debugging
More informationApplication Development Guide: Programming Server Applications
IBM DB2 Universal Database Application Development Guide: Programming Server Applications Version 8 SC09-4827-00 IBM DB2 Universal Database Application Development Guide: Programming Server Applications
More informationProgramming in C# with Microsoft Visual Studio 2010
Introducción a la Programación Web con C# en Visual Studio 2010 Curso: Introduction to Web development Programming in C# with Microsoft Visual Studio 2010 Introduction to Web Development with Microsoft
More informationCA Clarity PPM. Connector for Microsoft SharePoint Product Guide. Service Pack 02.0.01
CA Clarity PPM Connector for Microsoft SharePoint Product Guide Service Pack 02.0.01 This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred
More informationWeb Services for Management Perl Library VMware ESX Server 3.5, VMware ESX Server 3i version 3.5, and VMware VirtualCenter 2.5
Technical Note Web Services for Management Perl Library VMware ESX Server 3.5, VMware ESX Server 3i version 3.5, and VMware VirtualCenter 2.5 In the VMware Infrastructure (VI) Perl Toolkit 1.5, VMware
More informationMS Active Sync: Sync with External Memory Files
Mindfire Solutions - 1 - MS Active Sync: Sync with External Memory Files Author: Rahul Gaur Mindfire Solutions, Mindfire Solutions - 2 - Table of Contents Overview 3 Target Audience 3 Conventions...3 1.
More information3.5. cmsg Developer s Guide. Data Acquisition Group JEFFERSON LAB. Version
Version 3.5 JEFFERSON LAB Data Acquisition Group cmsg Developer s Guide J E F F E R S O N L A B D A T A A C Q U I S I T I O N G R O U P cmsg Developer s Guide Elliott Wolin wolin@jlab.org Carl Timmer timmer@jlab.org
More informationName: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
More informationCrash Course in Java
Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is
More informationArchitecture and Data Flow Overview. BlackBerry Enterprise Service 10 721-08877-123 Version: 10.2. Quick Reference
Architecture and Data Flow Overview BlackBerry Enterprise Service 10 721-08877-123 Version: Quick Reference Published: 2013-11-28 SWD-20131128130321045 Contents Key components of BlackBerry Enterprise
More informationKeil C51 Cross Compiler
Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation
More informationDeploying Microsoft Operations Manager with the BIG-IP system and icontrol
Deployment Guide Deploying Microsoft Operations Manager with the BIG-IP system and icontrol Deploying Microsoft Operations Manager with the BIG-IP system and icontrol Welcome to the BIG-IP LTM system -
More informationHandout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
More informationPART-A Questions. 2. How does an enumerated statement differ from a typedef statement?
1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members
More informationBuilding ObjectStore C++ Applications. Release 6.3
Building ObjectStore C++ Applications Release 6.3 Building ObjectStore C++ Applications ObjectStore Release 6.3 for all platforms, October 2005 2005 Progress Software Corporation. All rights reserved.
More informationUG102 EMBER APPLICATION FRAMEWORK DEVELOPER GUIDE
EMBER APPLICATION FRAMEWORK DEVELOPER GUIDE The Ember application framework is a body of embedded C code that can be configured by Ember AppBuilder to implement any ZigBee Cluster Library (ZCL) application.
More informationCourse Number: IAC-SOFT-WDAD Web Design and Application Development
Course Number: IAC-SOFT-WDAD Web Design and Application Development Session 1 (10 Hours) Client Side Scripting Session 2 (10 Hours) Server Side Scripting - I Session 3 (10 hours) Database Session 4 (10
More informationImage Acquisition Toolbox Adaptor Kit User's Guide
Image Acquisition Toolbox Adaptor Kit User's Guide R2015b How to Contact MathWorks Latest news: www.mathworks.com Sales and services: www.mathworks.com/sales_and_services User community: www.mathworks.com/matlabcentral
More informationMoving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you
More informationMigrating Legacy Software Systems to CORBA based Distributed Environments through an Automatic Wrapper Generation Technique
Migrating Legacy Software Systems to CORBA based Distributed Environments through an Automatic Wrapper Generation Technique Hyeon Soo Kim School of Comp. Eng. and Software Eng., Kum Oh National University
More informationiphone Objective-C Exercises
iphone Objective-C Exercises About These Exercises The only prerequisite for these exercises is an eagerness to learn. While it helps to have a background in object-oriented programming, that is not a
More informationTivoli Access Manager Agent for Windows Installation Guide
IBM Tivoli Identity Manager Tivoli Access Manager Agent for Windows Installation Guide Version 4.5.0 SC32-1165-03 IBM Tivoli Identity Manager Tivoli Access Manager Agent for Windows Installation Guide
More information2/9/2010. Standard Approach to Distribution. Remote Procedure Calls (RPC) Example: Music Jukebox in the Cloud
Remote Batch Invocation for Compositional Object Services CPS 296.1 9 th Feb 2010 Vamsidhar Thummala Content borrowed from William R Cook Standard Approach to Distribution Step I: Design a language Clean
More informationEnd Users Guide VERSION 9.2 JULY 2003
End Users Guide VERSION 9.2 JULY 2003 COPYRIGHT NOTICE 2003 Macrovision Corporation. All rights reserved. Macrovision products contain certain confidential information of Macrovision Corporation. Use of
More informationSiebel Application Deployment Manager Guide. Siebel Innovation Pack 2013 Version 8.1/8.2 September 2013
Siebel Application Deployment Manager Guide Siebel Innovation Pack 2013 Version 8.1/8.2 September 2013 Copyright 2005, 2013 Oracle and/or its affiliates. All rights reserved. This software and related
More informationIBM Informix. IBM Informix Object Interface for C++ Programmer s Guide. Version 3.50 SC23-9422-00
IBM Informix Version 3.50 IBM Informix Object Interface for C++ Programmer s Guide SC23-9422-00 IBM Informix Version 3.50 IBM Informix Object Interface for C++ Programmer s Guide SC23-9422-00 Note: Before
More information1 External Model Access
1 External Model Access Function List The EMA package contains the following functions. Ema_Init() on page MFA-1-110 Ema_Model_Attr_Add() on page MFA-1-114 Ema_Model_Attr_Get() on page MFA-1-115 Ema_Model_Attr_Nth()
More informationBasics of I/O Streams and File I/O
Basics of This is like a cheat sheet for file I/O in C++. It summarizes the steps you must take to do basic I/O to and from files, with only a tiny bit of explanation. It is not a replacement for reading
More informationIS0020 Program Design and Software Tools Midterm, Feb 24, 2004. Instruction
IS0020 Program Design and Software Tools Midterm, Feb 24, 2004 Name: Instruction There are two parts in this test. The first part contains 50 questions worth 80 points. The second part constitutes 20 points
More informationIllustration 1: Diagram of program function and data flow
The contract called for creation of a random access database of plumbing shops within the near perimeter of FIU Engineering school. The database features a rating number from 1-10 to offer a guideline
More informationPHP Language Binding Guide For The Connection Cloud Web Services
PHP Language Binding Guide For The Connection Cloud Web Services Table Of Contents Overview... 3 Intended Audience... 3 Prerequisites... 3 Term Definitions... 3 Introduction... 4 What s Required... 5 Language
More informationEmbedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C
Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C 1 An essential part of any embedded system design Programming 2 Programming in Assembly or HLL Processor and memory-sensitive
More informationReview from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture
Review from last time CS 537 Lecture 3 OS Structure What HW structures are used by the OS? What is a system call? Michael Swift Remzi Arpaci-Dussea, Michael Swift 1 Remzi Arpaci-Dussea, Michael Swift 2
More informationMarkLogic Server. Java Application Developer s Guide. MarkLogic 8 February, 2015. Copyright 2015 MarkLogic Corporation. All rights reserved.
Java Application Developer s Guide 1 MarkLogic 8 February, 2015 Last Revised: 8.0-3, June, 2015 Copyright 2015 MarkLogic Corporation. All rights reserved. Table of Contents Table of Contents Java Application
More informationThe full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.
Content Introduction... 2 Data Access Server Control Panel... 2 Running the Sample Client Applications... 4 Sample Applications Code... 7 Server Side Objects... 8 Sample Usage of Server Side Objects...
More informationEMC RepliStor for Microsoft Windows ERROR MESSAGE AND CODE GUIDE P/N 300-002-826 REV A02
EMC RepliStor for Microsoft Windows ERROR MESSAGE AND CODE GUIDE P/N 300-002-826 REV A02 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748-9103 1-508-435-1000 www.emc.com Copyright 2003-2005
More information