Lotus DominoNotes Toolkits Review (4) Java

zhaozj2021-02-08  296

4 Toolkit For Java / Corba

4.1 Introduction

This is a for Java toolkit that implements processing of data objects in the Notes database, and has certain processing capabilities for data elements:

data processing

Document: New, Copy, Modify, Delete, Send (as a mail) view: equivalent to a recordset, can be used to get a document or view display record domain: new, modify, delete, support RTF domain, accessory processing Database: New, Copy, copy, delete ACL control design elements

You can get, run, delete the agent to get and delete the view, form (including the list) to create the outline and add multiple entries to the outline

This kit is named Toolkit For Java / Corba because the technology used is different when handling two different situations of the local Notes database and remote database. However, on the interface implemented interface, both are basically the same, so that the same code implementation can accommodate different environments, which makes it easy to develop.

The latest version

V2.1 for R5.0.8, published in 2001.10.02

4.2 Supported Domino objects and structures are shown below:

4.3 Access local Notes app

Use environment

Since it is access to local Notes applications, it is undoubtedly a Domino / Notes software installed. At this point, you need to add notes.jar to the ClassPath (added automatically in the Domino / Notes running environment).

The program will use Notes.ini to get the current user. If the user starts and enters the Notes client, the current user ID is set to allow the Notes Address Sharing Identifier Dipout, and you do not need to enter your password again.

Working mechanism

When using the local Domino class from the Java program, it is actually directly accessed the Domino rear end with C implementation by the thin Java layer. Java uses the JNI mechanism to access the Domino class in the dynamic link library, and Domino's code is loaded into the JVM process.

From a performance perspective, this is the best choice: this provides the fastest connection between Java and C code, all things are in the same memory space.

However, Domino requires special processing for the initialization and end of each thread (similar to the C / C API).

Local Domino object library provides a class, Lotus.domino.notesthread is moving to this initialization processing and end processing. If you use NotSthread instead of java.lang.thread to create a thread, the init / term call required for Domino is automatically executed. At the same time, Notesthread is also derived from Thread, and there is no function. If you use NotesThread to create a thread, you need to call two static methods for the Notesthread class: sinitthread () and Stermthread () to complete the initialization and end processing.

4.4 Accessing Remote Domino Applications

Use environment

It is only necessary to add ncso.jar to the client's classpath, no longer need to install the Notes client or Domino.

The target Domino server is required to start HTTP and DIIOP services.

In this case, Domino verifies the user's identity according to the username / password provided by the user.

Working mechanism

Domino uses CORBA technology to implement access to remote objects.

In this case, the Java program no longer needs to access any Domino's C / C code in the JVM process space, so there is no need to do thread initialization and end processing. Therefore, you can instantiate the Session object, the Database object, using techniques similar to the connection pool to reuse these objects to improve access efficiency. When turning off the Session object, the system will automatically turn off the various Notes objects opened in the Session, such as databases, views, documents, etc., automatically release memory. In the absence of a session object, pay attention to close these objects (using the Recycle method) at any time, otherwise the content occupied by these objects cannot be reused automatically, which will cause the system to crash when severe.

In short, Lotus Toolkit For Java / Corba enables users to get rid of the dependence on the Notes client, free access to the remote Domino server. At the same time, it has limited object processing capacity other than Notes data, and the system security is relatively weak, and the performance is lower than the C / C API. It is recommended that the network environment is safe, and the data access speed is not particularly high.

Lotus Domino / Notes Toolkits Summary (1)

Lotus Domino / Notes Toolkits Review (2) C API

Lotus Domino / Notes Toolkits Summary (3) C API

Lotus Domino / Notes Toolkits Review (4) Java

Lotus Domino / Notes Toolkits Summary (5) LDDJ

Lotus Domino / Notes Toolkits Summary (6) Other

Lotus Domino / Notes Toolkits Review (7) Comparison

Lotus Domino / Notes Toolkits Review (8)

Lotus Domino / Notes Toolkits Summary (Nine) Summary

转载请注明原文地址:https://www.9cbs.com/read-1208.html

New Post(0)