IBM SOMobjects Java Client
Contents
Thanks for your interest in our SOMobjects Java Client.
We'd like to know what you think about this product, and you can send feedback
to me personally. My internet address is: rschnier@vnet.ibm.com.
This address is only for feedback:
- do you like it?
- do you hate it?
- should it be more?
- should it be less?
- what would you like to see it do in the future?
For problems and bug reports, please use the normal SOM 3.0 support channels
described at the bottom of this page. Please
do not send bug reports or configuration questions to my e-mail address - we
have a separate service group set up for these types of issues. Your cooperation and
understanding are much appreciated.
I will read all mail, but cannot promise a response to all inquiries or
suggestions.
And thanks again for giving our stuff a try! We think it's pretty cool,
and hope you will too.
Regards,
The IBM SOMobjects Java Client Development Team:
Randy Schnier, Russell Butek, Joe Bockhold, Tony Bachand, Kim Fall
The API documentation can either be found here or, once you've installed this package on your web server, at http://(server machine name)/(HTML directory)/docs/packages.html.
A version of an OMG draft proposal for mapping IDL to Java, used as the basis for this product, is available
here. That mapping specification was current at the time this product was developed.
We have also included, hot off the press, the official proposal from IBM-Sun-Netscape-Visigenic et. al. that has
been submitted in response to the OMG Request for Proposal (RFP) for mapping IDL to Java. This proposal is in
Adobe Acrobat (.pdf) format...you can download an Acrobat reader for free from the Adobe Website.
Note that even the official proposal is subject to change based on the OMG adoption process.
You can run the Checkers demo to test your runtime installation. The demo code can also be used as a guide for
writing your own Java applets and applications that interoperate with CORBA server objects.
The following section details the requirements and instructions for running this demo.
Server Machine Prerequisites
Client Machine Prerequisites
- Any Java-enabled web browser, or the applet viewer (part of JDK toolkit)
Server-side Checkers Setup
Client-side Checkers Setup (Java Client)
Once the Checkers server is installed you can now play checkers.
- Start Checkers Player 1 from a Java client browser:
- Open URL http://(server machine name)/(HTML directory)/Checkers.html
- When the initial screen of Checkers.html is displayed:
- choose "Red player",
- then enter a name for the checkerboard server object (your choice).
The server-side runtime will launch the Checkers server if it is not
already running.
- Start Checkers Player 2 from a Java client browser:
- Open URL http://(server machine name)/(HTML directory)/Checkers.html
- When the initial screen of Checkers.html is displayed:
- choose "Black player",
- then enter the same name for the checkerboard server object as
what the "Red player" entered.
- If everything is working correctly, you should be able to play checkers.
To start a new game, type the letter 'r' (for reset) on each of the clients.
When you are finished, you may exit the client applets.
Once you have verified that this works, you can have multiple games
going simultaneously on the same server - just choose a different
server object name for each game.
NOTE: Due to a current limitation in the Checkers demo applet, you should not move to a different web page while running the demo. If you do, and then come back to the demo page, the server object will no longer be in the proper state.
Code Samples
The following samples are in the directory COM/ibm/samples:
- CheckersApp.java
- applet for checkers demo
- CheckersRef.java
- java code for checkers "ref" proxy interface
- CheckersStub.java
- java code for checkers "stub" proxy class
- Run the IDL-to-Java compiler against your idl file. The compiler generates .java files in the manner specified by the Sun/IBM proposed OMG submission for IDL to Java mapping.
The IDL compiler generates files in package directories under the current directory.
Compiler Usage: java COM.ibm.idl.toJava.Compile <options> <idl file>
where <idl file> is the name of a file containing IDL definitions, and
<options> is any combination of the options listed below. The <idl file> must appear after all options.
Options:
- -i <include path>
- By default, the current directory is scanned for included files. This option adds another directory.
- -d <symbol>
- This is equivalent to the following line in an IDL file: #define <symbol>
- -v
- Verbose mode.
- -SOM
- Parse the IDL file as SOM IDL rather than standard CORBA IDL.
- Compile the .java files generated by the compiler. Make sure the directory which contains the generated files is defined in the CLASSPATH environment variable.
- Not all the CORBA methods are currently supported on proxy objects. For example, the get_Interface method is not yet supported.
- Some error handling in the ORB is not yet completely finished. If catastrophic error conditions occur (for example, the TCP/IP connection is broken to the server), you may experience strange behavior in your client application. Close the client application, reestablish the connection, and restart the client application.
- The compiler does not follow the IDL to Java Mapping Specification completely. The specification defines that there are 4 items generated for each interface. For example, interface X would have the following items:
- XOperations - an interface listing the operations;
- XRef - an interface extending XOperations and ObjectRef;
- XStub - a class implementing XRef;
- XHolder - a holder for an XRef.
This compiler has folded the XOperations and XRef interfaces into one interface called XRef.
- There is a bug in the server-side SOMobjects IDL compiler. If you re-generate the Checkers.xih (C++) or Checkers.ih (C) files
that are part of the Checkers demo, you will
need to add a "(COM_ibm_samples_Checkers_Square*)" typecast to the return statement in the getBoard method. (You will receive a
compiler error if you do not do this.)
We ship the modified versions of these files in the samples directory, and the makefiles by default do not
rebuild these files.
Your satisfaction is important to us. If you encounter a problem you
believe to be a defect in the SOMobjects Developer Toolkit code or
documentation, please submit a report to the technical support team. The
problem submission form is located at:
http://www.austin.ibm.com/somservice/supform.html.
© 1996 IBM Corp. All rights reserved. All trademarks are the property of their respective owners.