![]() |
![]() |
BEA WebLogic Enterprise 4.2 Developer Center |
![]() HOME | SITE MAP | SEARCH | CONTACT | GLOSSARY | PDF FILES | WHAT'S NEW |
||
![]() GETTING STARTED | TABLE OF CONTENTS | NEXT TOPIC | INDEX |
This chapter discusses the following topics:
The WLE product extends the Object Request Broker (ORB) model with online transaction processsing (OLTP) functions. It uses the CORBA standard as a programming model for developing enterprise applications with high performance, scalability, and reliability. The WLE deployment infrastructure delivers secure, transactional, distributed applications in a managed environment.
Objects built with the WLE product can be accessed from Web-based applications that communicate using the Object Management Group (OMG) Internet Inter-ORB Protocol (IIOP). IIOP is the standard protocol for communications running on the Internet or on an enterprise's Intranet. The WLE product has a native implementation of IIOP, ensuring high-performance, interoperable, distributed-object applications for the Internet, Intranets, and enterprise computing environments. Figure 1-1 illustrates the WLE product.
The WLE product provides:
Overview of the WLE Product
Figure 1-1 WLE Product
The topics in Getting Started describe the features of the WLE product and the development process for building a transactional application using the WLE software. This topic does not discuss every feature of the WLE product; instead it gives an general description of building transactional applications. For more information, see the following on the Online Documentation CD:
Creating Client Applications
Creating C++ Server Applications
Creating Java Server Applications
Using Server-to-Server Communication
The WLE product offers a robust programming environment that makes the development and management of distributed objects easier. The following topics describe the features of the programming environment:
WLE Programming Environment
The WLE product comes with two IDL compilers that make object development easier:
IDL Compilers
idl
-compiles the OMG IDL file and generates client stub and server skeleton files required for interface definitions being implemented in C++
For a description of how to use the IDL compilers, see the following on the Online Documentation CD:
Creating Client Applications
Creating C++ Server Applications
Creating Java Server Applications
For a description of the C++ Programming Reference
Java Programming Reference
Table 1-1 lists the commands that the WLE product provides for developing application components and managing the Interface Repository.
For a description of how to use the development commands to develop client and server applications, see the following on the Online Documentation CD:
Creating Client Applications
Creating C++ Server Applications
Creating Java Server Applications
For a description of the development commands, see the following on the Online Documentation CD:
C++ Programming Reference
Java Programming Reference
The WLE product provides a complete set of tools for administering your WLE environment. You can manage the WLE application through commands, through a graphical user interface, or by including administration utilities in a script.
You can use the commands listed in Table 1-2 to perform administration tasks for your WLE application.
The Administration Console is a Java-based applet that you can download into your Internet browser and use to remotely manage your WebLogic Enterprise applications. The Administration Console allows you to perform administration tasks, such as monitoring system events, managing system resources, creating and configuring administration objects, and viewing system statistics. Figure 1-2 shows the main window of the Administration Console.
In addition, a set of utilities called the AdminAPI is provided for directly accessing and manipulating system settings in the Management Information Bases (MIBs) for the WLE product. The advantage of the AdminAPI is that it can be used to automate administrative tasks, such as monitoring log files and dynamically reconfiguring an application, thus eliminating the need for human intervention.
For information about the Administration commands, see the Adminstration Guide on the Online Documentation CD
For a description of the Administration Console and how it works, see the Administration Guide on the Online Documentation CD and the online help that is integrated into the Administration Console graphical user interface (GUI).
For information about the AdminAPI, see the BEA TUXEDO Reference on the Online Documentation CD.
The ActiveX Application Builder is a development tool that you use with a client development tool (such as Visual Basic) to select which CORBA interfaces in a WLE domain you want your ActiveX client application to interact with. In addition, you use the ActiveX Application Builder to create Automation bindings for CORBA interfaces, and to create packages for deploying ActiveX views of CORBA objects to client machines.
Figure 1-3 shows the ActiveX Application Builder main window.
For a description of the ActiveX Application Builder and how it works, see the online help that is integrated into the ActiveX Application Builder graphical user interface (GUI). For a description of how ActiveX client applications use CORBA objects, see Creating Client Applications on the Online Documentation CD.
The WLE product includes a set of environmental objects that provide object services to client applications in a WLE domain. You access the environmental objects through a bootstrapping process that accesses the services in a particular WLE domain.
The following services are provided:
idl
and m3idltojava
commands, see the following on the Online Documentation CD:
Development Commands
Table 1-1 Development Commands
Administration Tools
Table 1-2 Administration Commands
Figure 1-2 Administration Console Main Window
ActiveX Application Builder
Figure 1-3 ActiveX Application Builder Main Window
WLE Object Services
The Object Life Cycle service is provided through the FactoryFinder environmental object. The FactoryFinder object is a CORBA object that can be used to locate a factory, which in turn can create object references for CORBA objects. Factories and FactoryFinder objects are implementations of the CORBAservices Life Cycle Service. WLE applications use the Object Life Cycle service to find object references.
For information about using the Object Life Cycle Service, see the topic "How WLE Client and Server Applications Interact."
The Security service is accessed through the SecurityCurrent environmental object. The SecurityCurrent object is used to authenticate a client application into a WLE domain with the proper security. The WLE software provides an implementation of the CORBAservices Security Service.
For information about using security, see the topic "Using Security."
The Transaction service is accessed through either the TransactionCurrent environmental object or the UserTransaction object. The TransactionCurrent object allows a client application to participate in a transaction. The WLE software provides an implementation of the CORBAservices Object Transaction Service (OTS). In addition, the UserTransaction object provides access to Sun Microsystems, Inc.'s Java Transaction API (JTA) defined in the For information about using transactions, see the topic "Using Transactions."
javax.transaction
package.
The Interface Respository service is accessed through the IntefaceRepository object. The InterfaceRepository object is a CORBA object that contains interface definitions for all the available CORBA interfaces and the factories used to create object references to the CORBA interfaces. The Interface Repository object is used with client applications that use DII.
For information about using DII, see Creating Client Applications on the Online Documentation CD.
The WLE software provides environmental objects for the following programming environments:
This section provides an introduction to the following WLE components:
WLE Components
Figure 1-4 illustrates the components in a WLE application.
The Bootstrap object establishes communication between a client application and a WLE domain. A domain is simply a way of grouping objects and services together as a management entity. A WLE domain has at least one IIOP Listener/Handler and is identified by a name. One client application can connect to multiple WLE domains using different Bootstrap objects.
One of the first things that client applications do after startup is create a Bootstrap object by supplying the host and port of the IIOP Listener/Handler as a parameter to its constructor, as follows:
For example, // The client application then uses the Bootstrap object to obtain references to the objects in a WLE domain. Once the Bootstrap object is instantiated, the Figure 1-5 illustrates how the Bootstrap object works in a WLE domain.
The IIOP Listener/Handler is a process that receives the client request, which is sent using IIOP, and delivers that request to the appropriate server application. The IIOP Listener/Handler serves as a communication concentrator, providing a critical scalability feature. The IIOP Listener/Handler removes from the server application the burden of maintaining client connections. For information about configuring the IIOP Listener/Handler, see the Adminstration Guide on the Online Documentation CD.
The ORB serves as an intermediary for requests that client applications send to server applications, so that client applications and server applications do not need to contain information about each other. The ORB is responsible for all the mechanisms required to find the implementation that can satisfy the request, to prepare an object's implementation to receive the request, and to communicate the data that makes up the request. The WLE product provides a C++ ORB and a BEA version of the Java IDL ORB provided with the Java Development Kit from Sun Microsystems, Inc.
Figure 1-6 shows the relationship between an ORB, a client application, and a server application.
When the client application uses IIOP to send a request to the domain, the ORB performs the following functions:
Figure 1-4 Components in a WLE Application
Bootstrap Object
//
host:
portmyserver:4000
resolve_initial_references
method is invoked by the client application, passing in a string id
, to obtain a reference to the objects in the domain that provide CORBA services. The valid values for string Id
are FactoryFinder, TransactionCurrent, SecurityCurrent, and InterfaceRepository.
Figure 1-5 How the Bootstrap Object Works
IIOP Listener/Handler
ORB
Figure 1-6 The ORB in a Client/Server Environment
The TP Framework provides a programming model that achieves high levels of performance while shielding the application programmer from the complexities of the CORBA interfaces. The TP Framwork supports the rapid construction of WLE applications, which makes it easier for application programmers to adhere to design patterms associated with successful TP applications.
The TP Framework interacts with the Portable Object Adapter (POA) and the WLE application, thus eliminating the need for direct POA calls in an application. In addition, the TP Framework integrates transactions and state management into the WLE application.
The application programmer uses an Application Programming Interface (API) that automates many of the functions required in a standard CORBA application. The application programmer is responsible only for writing the business logic of the WLE application and overriding default actions provided by the TP Framework.
The TP Framework API provides routines that perform the following functions required by a CORBA application:
TP Framework
The TP Framework ensures that the execution of a client request takes place in a coodinated, predictable manner. The TP Framework calls the objects and services available in the WLE application at the appropriate time, in the correct sequence. In addition, the TP Framework maximizes the reuse of system resources by objects. Figure 1-7 illustrates the TP Framework.
The TP Framework is not a single object, but is rather a collection of objects that work together to manage the CORBA objects that contain and implement your WLE application's data and business logic.
One of the TP Framework objects is the Server object. The Server object is a user-written programming entity that implements operations that perform tasks such as initializing and releasing the server application; for server applications implemented in C++, the TP Framework instantiates the CORBA objects needed to satisfy a client request.
If a client request that requires an object that is not currently active and in-memory in the server application arrives, the TP Framework coordinates all the operations that are required to instantiate the object. This includes coordinating with the ORB and the POA to get the client request to the appropriate object implementation code.
For examples of programming with the TP Framework, see Creating C++ Server Applications and Creating Java Server Applications on the Online Documenation CD.
The interaction between WLE client and server applications includes the following steps:
Figure 1-7 The TP Framework
How WLE Client and Server Applications Interact
The following topics describe what happens during each step.
The system administrator enters the tmboot
command on a machine in the WLE domain to start the WLE server application. The TP Framework invokes the initialize
operation in the Server object to initialize the server application.
During the initialization process, the Server object does the following:
During initialization, the client application uses the Bootstrap object in the domain to obtain initial references to the environmental objects available in the domain.
The Bootstrap object returns references to the FactoryFinder, SecurityCurrent, TransactionCurrent, and InterfaceRepository objects in the WLE domain.
If the WLE domain has a security model in effect, the client application needs to authenticate itself to the WLE domain before it can invoke any operations in the server application. To authenticate itself to the WLE domain, the client application:
The client application needs to perform the following steps:
For example, the client application needs a reference to the
SimpleFactory
object. The client application obtains this factory reference from the FactoryFinder
object, shown in the following figure.
SimpleFactory
object to get a reference to the Simple
object.
SimpleFactory
object by invoking the Server::create_servant
method on the Server object, shown in the following figure.
SimpleFactory
object dynamically.
activate_object
and find_simple
operations
on the SimpleFactory
object to get a reference to the Simple
object, shown in
the following figure.
The SimpleFactory
object then returns the object reference to the Simple
object to the client application.
Note:
Because the TP Framework activates objects by default, the Simpapp sample application does not implicitly use the activate_object
operation for the SimpleFactory object.
Using the reference to the CORBA object that the factory has returned to the client application, the client application invokes an operation on the object. For example, now that the client application has an object reference to the Simple
object, the client application can invoke the to_upper
operation on it. The instance of the Simple object required for the client request is created as shown in the following figure.
activate_object
operation on the Simple
object and the factory object to allow the object to initialize any object state
necessary.
If the server application were implemented in Java, the Simple
object required for the client request is instantiated dynamically by the WLE system.