| <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; SunOS 5.8 sun4u) [Netscape]"> |
| <!-- |
| |
| Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0, which is available at |
| http://www.eclipse.org/legal/epl-2.0. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <title>Readme for the RMI over IIOP example</title> |
| </head> |
| <body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#990066" alink="#FF0000"> |
| |
| <h2> |
| RMI over IIOP example</h2> |
| |
| <hr WIDTH="100%"> |
| <ul> |
| <li> |
| <b><a href="Bank/AccountManager.java">Bank/AccountManager.java</a>:</b> |
| The java interface that describes the AccountManager CORBA interface</li> |
| |
| <li> |
| <b><a href="Bank/Account.java">Bank/Account.java</a>:</b> The java interface |
| that describes the Account RMI remote interface</li> |
| |
| <li> |
| <b><a href="Bank/AccountData.java">Bank/AccountData.java</a>: </b>The java |
| class that is used to carry data to create an account</li> |
| |
| <li> |
| <b><a href="AccountManagerImpl.java">AccountManagerImpl.java</a>:</b> The |
| servant that implements the AccountManager interface</li> |
| |
| <li> |
| <b><a href="AccountImpl.java">AccountImpl.java</a>:</b> The servant |
| that implements the Account interface</li> |
| |
| <li> |
| <b><a href="Server.java">Server.java</a>:</b> The server mainline</li> |
| |
| <li> |
| <b><a href="Client.java">Client.java</a>:</b> The client mainline</li> |
| </ul> |
| |
| <h3> |
| Building this example</h3> |
| Typing <b>make</b> java (or <b>vbmake</b> <i>on Windows</i>) in the rmi-iiop |
| subdirectory will this example to be built. This will include the following |
| steps |
| <p>1. Compile all the remote interfaces and the AccountData class. |
| <br>2. Run the AccountManager interface (which refers to all the other |
| classes and interfaces) through the java2iiop compiler |
| <br>3. Compile the generated stubs and servants, the servant implementations |
| for all the remote interfaces |
| <br>4. Compile the Client and Server mainlines. |
| <h3> |
| Running this example</h3> |
| To run the examples, first make sure that the VisiBroker Smart Agent (osagent |
| executable) is running on your network. Then start the bank server using |
| the command: |
| <ul> |
| <pre><tt><b>prompt></b> vbj Server & |
| (start vbj Server <i>on Windows</i>) |
| <i>// make the server run in the background</i></tt></pre> |
| </ul> |
| <i>Next, open some users' bank account with initial balances</i> |
| <ul> |
| <pre><i><tt><b>prompt></b> vbj Client peter 12.213 paul 23.213 mary 5893.223</tt></i></pre> |
| </ul> |
| <i>or</i> |
| <ul> |
| <pre><i><tt><b>prompt></b> vbj Client |
| // uses a default name</tt></i></pre> |
| </ul> |
| <i>The example client first creates all the accounts specified with the |
| appropriate balances by creating AccountData objects for each account and |
| passing them to the AccountManager to create the accounts. It then confirms |
| that the balance is correct on the created account. The client then queries |
| the AccountManager for a list of all the accounts, and proceeds to credit |
| $10 to each account. It then verifies if the new balance on the account |
| is accurate.</i> |
| <br> |
| <hr WIDTH="100%"> |
| <p><i>Return to the <a href="../README.html">top-level examples page</a>.</i> |
| </body> |
| </html> |