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

📄 examples.htm

📁 Delphi7官方文档-英文 对于英文好的delphi程序员来说 这个是你的至宝!
💻 HTM
字号:
<HTML>
<HEAD>
   <META NAME="GENERATOR" CONTENT="HomePage Publisher">
   <META NAME="HPP" CONTENT="V=2.1 L=B ECP=1004 DCP=850 LID=1-86">
   <TITLE>Inprise Delphi CORBA Support - Examples</TITLE>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000C0" VLINK="#AE00AE" ALINK="#FF007F">
<BASEFONT SIZE=3> 
<h1 ALIGN=left> <b>Examples </b></h1>
<p>The examples listed below are intended to illustrate specific aspects 
  of the interaction between Delphi and VisiBroker. Complications such 
  as error handling have been omitted or minimized in order to make the interaction 
  clearer. </p>
<HR WIDTH="100%" ALIGN=CENTER>
<P ALIGN=LEFT STYLE="text-decoration: none"> 
<h3 ALIGN=left> <b>Examples </b></h3>
<TABLE BORDER=0 WIDTH="100%" CELLSPACING=2 CELLPADDING=2>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Account DOS </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This is the traditional simple account 
      client example written as a console application. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Account GUI </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This is the traditional simple account 
      client example with a GUI. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Anys </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the use 
      of the CORBA Any type. If you look at the generated code you can see that 
      Anys are mapped to Delphi variants. It is good practice to minimize the 
      use of Anys since that gets away from type checking at compile time.</TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Arrays </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example shows how to declare 
      a CORBA array in IDL and pass it as an argument to an interface method. 
    </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Attributes </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the use 
      of CORBA attributes. If you examine the generated code you can see that 
      attributes are mapped to Delphi properties. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"><img border=0 width=14 height=14 align=TOP src="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%">Call Backs</TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%">This shows how to make the server 
      call an object created in the client.</TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%"><img border=0 width=14 height=14 align=TOP src="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%">COSNaming</TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> 
      <p>This shows how to use the COS Naming Service with the VisiBroker 3.3 
        ORB. Before you start the server, you must start the naming service. The 
        executable is in the vbroker\bin directory. Open a DOS command window 
        and type:</p>
      <p>NameExtF Test1 mylog.log</p>
      <p>Test1 is the Node you're binding to and mylog.log is a log file. After 
        the naming service has started, run the server and then the client.</p>
    </TD>
  </TR>
  <tr valign=TOP> 
    <td valign=TOP align=RIGHT width="3%"><img border=0 width=14 height=14 align=TOP src="../Images/bludiamd.gif"> 
    </td>
    <td valign=TOP align=LEFT width="20%">COSNaming40</td>
    <td valign=TOP align=JUSTIFY width="77%"> 
      <p>This shows how to use the COS Naming Service with the VisiBroker 4 ORB. 
        The Naming Service was changed in the VB 4.0 implementation. It is now 
        a Java application and must be started with a command line parameter that 
        tells the service the TCP/IP port number to use. This same command line 
        argument must be suppplied to servers and clients too. Sample batch files 
        have been provided in the example to show how to start the Naming Service, 
        Servers and Clients.</p>
      <p>Before you start the server, you must start the naming service. The executable 
        is in the Inprise\VisiBroker\bin directory. Open a DOS command window 
        and type:</p>
      <p>start nameserv -J-Dvbroker.se.iiop_tp.scm.iiop_tp.listener.port=23000 
      </p>
      <p>In this case, 23000 is the port number. After the naming service has 
        started, run the server and then the client with the same argument.</p>
    </td>
  </tr>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Delphi Server </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the use 
      of the idl2pas compiler to create a client for a server created in Delphi 
     DII solution. The ability to create both DII and IDL2Pas static binding 
      servers and clients is only available if you installed the VisiBroker 3.3 
      ORB. 
      <OL TYPE=1>
        <LI> Create the server in Delphi. 
        <LI> From the Type Library user interface, export the interface as Corba 
          IDL. 
        <LI> Run the IDL2pas compiler on the IDL file and it will generate the 
          client side files (_c and _i) for you. 
        <LI> Write the client in Delphi and include the generated _c and _i files 
          in the project. 
        <LI> The client should now be able to access the server. 
      </OL>
    </TD>
  </TR>
  <tr valign=TOP> 
    <td valign=TOP align=RIGHT width="3%" src="../Images/bludiamd.gif"> <img border=0 width=14 height=14 align=TOP src="../Images/bludiamd.gif"> 
    </td>
    <td valign=TOP align=LEFT width="20%"> EJB/EuroConverter</td>
    <td valign=TOP align=JUSTIFY width="77%"> 
      <p>This example shows how to write a CORBA client that can connect to a 
        Java EJB deployed with Borland AppServer 4.5.1. The directory has the Delphi 
        client and a subdirectory that contains the EJB source.</p>
      <p>To run this example, deploy the EJB with the AppServer console application, 
        then build and run the EuroConverter client application. The applicaton 
        converts Dutch Guilders to Euros by calling a conversion method in the 
        EJB. </p>
      <p>There is further documentation in the example's Java directory on how to build and connect 
        to EJBs.</p>
    </td>
  </tr>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif" height="24"><img border=0 width=14 height=14 align=TOP src="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%" height="24">Event Service</TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%" height="24"> 
      <p>This shows how to use the COS Event Service. Two examples are shown: 
        a) a Push example, and b) a Pull example</p>
      <p>Note that neither of these examples binds to a specific Event Channel. 
        To do that, you would use the COSNaming service.</p>
      <p>To start the Event service in Visibroker 3.3, open a DOS command window in the vbroker\bin 
        directory and type:</p>
      <p>Channel Test1</p>
      <p>Test1 is a dummy name for the event channel. (Note: The Event service in VisiBroker 4 is called Event.exe.) Once the Event Service has 
        started, you can run the server, followed by the client.</p>
    </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Exceptions </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the creation 
      of user-defined exceptions in IDL and their handling on the client side. 
      Note the use of complex types as exception data types.</TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Interface Arguments </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the passing 
      of an interface as an operation parameter. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"><img border=0 width=14 height=14 align=TOP src="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%">Midas</TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> 
      <p>This example shows two ways to use Midas and CORBA. Note, you have to 
        have the sample database tables installed to run this example. It uses 
        the Employee.db Paradox table.</p>
      <p>The first example takes the Midas data packet and converts it to XML. 
        The data is sent from the server to the client as a CORBA string. On the 
        client side, the string is hooked to the TClientdataset. The XML packet 
        is also displayed. The second example transmits the Midas data packet 
        as a CORBA Any variable.</p>
      <p>Bonus: One interesting aspect of this example is the dmPooler data module. 
        This shows how to do thread safe database connection pooling. At start 
        up, a pool of connections is created. As each database request is made, 
        a connection is taken from the pool and returned immediately following 
        the SQL command. This technique avoids a common error of making a new 
        connection each time a database request is processed. Establishing a connection 
        for each request will eventually starve resources from the BDE. The dmPooler 
        example avoids this error.</p>
    </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Multiple Inheritence </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the implementation 
      of multiple inheritance of CORBA interfaces in Delphi. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Nested Modules </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the implementation 
      of nested CORBA modules in Delphi. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"><img border=0 width=14 height=14 align=TOP src="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%">Sequences</TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%">This example shows how to package 
      data into sequences. This is useful for database applications. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Single Inheritence </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the implementation 
      of single inheritance of CORBA interfaces in Delphi. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Structures </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the use 
      of CORBA structures. </TD>
  </TR>
  <TR VALIGN=TOP> 
    <TD VALIGN=TOP ALIGN=RIGHT width="3%" src="../Images/bludiamd.gif"> <IMG BORDER=0 WIDTH=14 HEIGHT=14 ALIGN=TOP SRC="../Images/bludiamd.gif"> 
    </TD>
    <TD VALIGN=TOP ALIGN=LEFT width="20%"> Unions </TD>
    <TD VALIGN=TOP ALIGN=JUSTIFY width="77%"> This example illustrates the use 
      of CORBA unions. </TD>
  </TR>
</TABLE>
<P ALIGN=CENTER> 
<P ALIGN=LEFT> 
</BODY>
</HTML>

⌨️ 快捷键说明

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