JAVA/CORBA CLASSES


Examples: Running a Java program
The following examples demonstrate the minimal code needed for a Java program that uses the Domino classes. The examples instantiate a Session object and print the String output of its getPlatform method (Platform property).

1. This is an application that makes local calls and extends the NotesThread class:


2. This is an application that makes local calls and implements the Runnable interface:
3. This is an application that makes local calls and uses the static NotesThread methods:
4. This is an agent program where the code is entered through the Domino Designer UI. The UI generates everything in the example except the two lines following // (Your code goes here).
5. This is an agent program where the code is imported into Domino Designer:
6. This is an agent program with print output that can be seen by a browser:
7. This example demonstrates an application that makes remote (IIOP) calls. The example requires the user to enter the name of the host Domino server and optionally a user name and password. If a user name and password are not supplied, the server must allow anonymous access.
8. To enable SSL in the previous application example, replace:
9. This example demonstrates an applet that makes Domino calls. AppletBase makes the calls locally if possible, remotely otherwise.
10. This example demonstrates an applet that makes Domino calls in code that responds to an AWT event. Because the AWT event handler is a separate thread, you must explicitly initialize and terminate a Domino session if the code is running locally, and must not if the code is running remotely (IIOP).
11. This Domino agent gets a token for Single Sign-on and creates a remote (IIOP) session to another server based on the token. The agent runs on the server containing the token.
12. This Domino agent gets a token for Single Sign-on and creates a remote (IIOP) session to a server based on the token. The agent runs a Notes client.
13. This servlet gets a token for Single Sign-on from the LtpaToken cookie through HttpServletRequest and creates a session based on the token.
14. This application snippet creates a session based on a Credentials object obtained from the WebSphere loginHelper.
15. This WebSphere Enterprise JavaBeans (ERB) application creates a session based on the current Credentials object in the WebSphere environment.