⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch12.htm

📁 corba比较入门级的介绍详细间接了corba访问发布各种细节。
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD><SCRIPT LANGUAGE="JavaScript"><!--function popUp(pPage) { var fullURL = document.location; var textURL = fullURL.toString(); var URLlen = textURL.length; var lenMinusPage = textURL.lastIndexOf("/"); lenMinusPage += 1; var fullPath = textURL.substring(0,lenMinusPage); popUpWin = window.open('','popWin','resizable=yes,scrollbars=no,width=525,height=394'); figDoc= popUpWin.document; zhtm= '<HTML><HEAD><TITLE>' + pPage + '</TITLE>'; zhtm += '</HEAD>'; zhtm += '<BODY bgcolor="#FFFFFF">'; zhtm += '<IMG SRC="' + fullPath + pPage + '">'; zhtm += '<P><B>' + pPage + '</B>'; zhtm += '</BODY></HTML>'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 }//-->                                                                </SCRIPT>	<META NAME="Author" Content="Bryan Flores">	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">	<TITLE>Teach Yourself CORBA In 14 Days -- Ch 12 -- Exploring CORBAservices and CORBAfacilities</TITLE></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF"><CENTER><H1><IMG SRC="../button/sams.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM" BORDER="0"><BR><FONT COLOR="#000077">Teach Yourself CORBA In 14 Days</FONT></H1></CENTER><CENTER><P><A HREF="../ch11/ch11.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch13/ch13.htm"><IMGSRC="../button/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../button/contents.gif" WIDTH="128"HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> <HR></CENTER><CENTER><H1><FONT COLOR="#000077">Day 12<BR>Exploring CORBAservices and CORBAfacilities</FONT><A HREF="#Heading1"></A></H1></CENTER><UL>	<LI><A HREF="#Heading1">CORBAservices</A>	<UL>		<LI><A HREF="#Heading2">Concurrency Control Service</A>		<LI><A HREF="#Heading3">Event Service</A>		<LI><A HREF="#Heading4">Externalization Service</A>		<LI><A HREF="#Heading5">Licensing Service</A>		<LI><A HREF="#Heading6">Life Cycle Service</A>		<LI><A HREF="#Heading7">Naming Service</A>		<LI><A HREF="#Heading8">Object Trader Service</A>		<LI><A HREF="#Heading9">Persistent Object Service</A>		<LI><A HREF="#Heading10">Property Service</A>		<LI><A HREF="#Heading11">Query Service</A>		<LI><A HREF="#Heading12">Relationship Service</A>		<LI><A HREF="#Heading13">Security Service</A>		<LI><A HREF="#Heading14">Time Service</A>		<LI><A HREF="#Heading15">Transaction Service</A>	</UL>	<LI><A HREF="#Heading16">CORBAfacilities</A>	<UL>		<LI><A HREF="#Heading17">Horizontal Facilities</A>		<LI><A HREF="#Heading18">Vertical Market Facilities</A>	</UL>	<LI><A HREF="#Heading19">Enhancing the Bank Example with CORBAservices</A>	<UL>		<LI><A HREF="#Heading20">Choosing CORBAservices</A>		<LI><A HREF="#Heading21">Implementing the New Functionality</A>		<LI><A HREF="#Heading22">Running the Application</A>	</UL>	<LI><A HREF="#Heading23">Summary</A>	<LI><A HREF="#Heading24">Q&amp;A</A>	<LI><A HREF="#Heading25">Workshop</A>	<UL>		<LI><A HREF="#Heading26">Quiz</A>		<LI><A HREF="#Heading27">Exercises</A>	</UL></UL><P><HR SIZE="4"><CENTER><H1><FONT COLOR="#000077"></FONT></H1></CENTER><P>By now you are very familiar with the basic mechanisms provided by CORBA to enablethe development of distributed object-oriented applications. The ORB mechanism facilitatesthe communication between CORBA objects and enables objects to locate each other,and the BOA provides the core functionality for all CORBA objects.</P><P>The functionality provided by the ORB and the BOA alone is not nearly enough onwhich to build robust, enterprise-class-distributed applications. Additional capabilitieswould definitely be advantageous--such as directory services, persistent object capability,a transaction mechanism, user interface and presentation facilities, and so on--regardlessof the industry in which they are used. Many industries--such as health care, finance,and telecommunications--require applications that are especially well-suited to CORBA,so functionality that caters to these vertical markets is a good idea. As it turnsout, the OMG offers such horizontal and vertical functionality in the form of CORBAservicesand CORBAfacilities.</P><P>You've already been introduced, albeit briefly, to CORBAservices and CORBAfacilities.Today you'll learn about these in greater detail, as well as get the chance to applysome of the CORBAservices to the <TT>Bank</TT> application you've been developing.<H2><A NAME="Heading1"></A><FONT COLOR="#000077">CORBAservices</FONT></H2><P>The Object Management Architecture (OMA), of which CORBA is a part, defines anumber of services that are useful to applications in general. These services rangefrom the nearly indispensable Naming Service to higher level services such as theTransaction Service. As with all its specifications (including CORBA), the ObjectManagement Group (OMG) does not define the implementations for these services butprovides the interfaces by which the services are offered. It is up to the variousCORBA product vendors to supply implementations. Note that products implementingCORBAservices are often provided separately from CORBA ORB products and that implementationof CORBAservices is not necessary for CORBA 2 compliance.</P><P>This section briefly describes each of the CORBAservices. In Appendix B, &quot;CORBATools and Utilities,&quot; you'll see which vendors are currently providing implementationsfor these services.<H3><A NAME="Heading2"></A><FONT COLOR="#000077">Concurrency Control Service</FONT></H3><P>The Concurrency Control Service provides an interface for managing concurrencyin shared CORBA objects. This is done through the use of locks, several types ofwhich are supported by the service. For example, readers-writer locks are supported,as are intention locks. Developers who have worked with multithreaded applicationsare probably familiar with the features provided by the Concurrency Control Service.<H3><A NAME="Heading3"></A><FONT COLOR="#000077">Event Service</FONT></H3><P>The Event Service provides a mechanism through which CORBA objects can send andreceive events. The service includes such features as these:<UL>	<LI>Reliable delivery, which (simply put) ensures that an event will reach its destination(s)<BR>	<BR>		<LI>Support for push and pull models of event delivery<BR>	<BR>		<LI>Anonymous messaging, when suppliers need not know the identities of event consumers,	or vice versa<BR>	<BR>		<LI>Event channels, a mechanism similar to publish/subscribe, through which consumers	can subscribe to certain types of events</UL><H3><A NAME="Heading4"></A><FONT COLOR="#000077">Externalization Service</FONT></H3><P>The Externalization Service provides interfaces for externalizing (that is, serializing)and internalizing objects. When an object is externalized, it can be internalizedwithin the same process or a different process. In addition, objects can be externalizedinto a portable file format (one that is defined with the Externalization ServiceSpecification). One possible application for the Externalization Service is in apass-by-value mechanism for CORBA objects.<H3><A NAME="Heading5"></A><FONT COLOR="#000077">Licensing Service</FONT></H3><P>The Licensing Service enables the provider to define policies that control theuse of services. The service supports three types of licensing policies:<UL>	<LI><I>Time</I> enables a license to set a start date, expiration date, and duration.<BR>	<BR>		<LI><I>Value mapping</I> enables licensing based on units (resource usage metering,	number of concurrent users, and so on).<BR>	<BR>		<LI><I>Consumer</I> assigns services for use by a particular user or machine.</UL><P>Facilities like those provided by the Licensing Service will become more widelyused as concepts such as pay-as-you-go or rentable software are realized. For example,an occasional user of image editing software might pay per use of a certain imagefilter. As a framework for electronic commerce becomes available, it is possiblethat you'll see more software made available in this way.<H3><A NAME="Heading6"></A><FONT COLOR="#000077">Life Cycle Service</FONT></H3><P>The Life Cycle Service offers facilities for creating, deleting, copying, andmoving CORBA objects. The service also supports the notion of an object factory,which is a CORBA object that creates other CORBA objects.<H3><A NAME="Heading7"></A><FONT COLOR="#000077">Naming Service</FONT></H3><P>The Naming Service enables CORBA objects to register and be located by name. Thisservice uses the notion of a <I>naming context,</I> which contains a set of uniquenames. The Naming Service also supports a <I>federated</I> architecture, meaningthat name servers can be distributed across the network and work in conjunction witheach other.</P><P>You recall that, as a part of the standard bind mechanism, CORBA objects are givennames by which other objects can look them up. Although you can think of this featureas a miniature Naming Service, the actual Naming Service is much more scalable.<H3><A NAME="Heading8"></A><FONT COLOR="#000077">Object Trader Service</FONT></H3><P>The Trader Service, like the Naming Service, enables other objects to locate CORBAobjects. Rather than use a name to locate an object, a client object looks for servicesbased on operation names, parameters, and result types.</P><P>The major difference between the Trader Service and the Naming Service is analogousto the difference between the yellow pages and the white pages of a telephone directory.The Naming Service can be thought of as the white pages, in which you look up a particularservice if you know its exact name. The Trader Service, on the other hand, resemblesthe yellow pages, in which you locate a service, based on its location, function,or even name. For example, in the white pages you can look up &quot;Bob's Dry Cleaning;&quot;in the yellow pages you can look for all dry cleaning services in, say, Littleton,Colorado. In the <TT>Bank</TT> example from previous chapters, an application mightuse the Naming Service to locate a <TT>Bank</TT> by its name (such as FirstBank)or use the Trader Service to locate objects by function (such as a bank or an ATM).<H3><A NAME="Heading9"></A><FONT COLOR="#000077">Persistent Object Service</FONT></H3><P>The Persistent Object Service provides a set of interfaces for managing the persistenceof objects. Typically, implementations for this service are provided by databasevendors.</P><P>Persistent objects are objects that <I>persist</I> over a period of time; thatis, the lifetime of the object can transcend the lifetime of any one application.While not in use, the object resides in a persistent store, such as a database ora flat file; the object can then be retrieved, or <I>resurrected</I>, when needed.For example, a document created by a word processor can be thought of as a persistentobject because the word processor application can be closed and run again later,allowing the document to be retrieved. In a CORBA application, it will sometimesbe useful to provide persistent capability to CORBA objects. For example, in thesample <TT>Bank</TT> application, the <TT>Bank</TT> objects could conceivably bepersistent objects. A <TT>Bank</TT> could be resurrected as needed, and then whenit is no longer processing transactions, it could be <I>put to sleep</I>, meaningthat its state could be stored in a database until the <TT>Bank</TT> was needed again.<H3><A NAME="Heading10"></A><FONT COLOR="#000077">Property Service</FONT></H3><P>The Property Service enables objects to define sets of properties, which are name/valuepairs. The name in a pair is simply a CORBA string; the value is a CORBA <TT>any</TT>.Access to properties can be restricted. For example, a property can be read-onlyor fixed.</P><P>The use of properties to describe objects is becoming more widespread, particularlyas object models such as JavaBeans gain momentum. A large application, or set ofapplications, could define a number of standard properties for its objects, therebypotentially easing management. For example, if the <TT>Bank</TT> application defineda location property for each object, the location of <TT>Bank</TT>s, <TT>ATM</TT>s,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -