|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This document explains how to set up Domino to cooperate with Tomcat. この文書は、DominoをTomcatと協調するように設定する方法を説明します。 It is recommended that you also read the Workers HowTo document to learn how to setup the working entities between your WebServer and Tomcat Engines. WebサーバとTomcatエンジンの間で動作する構成要素(ワーカ)の設定方法を知るために、 ワーカの手引き もあわせて読むことをおすすめします。 Recent versions of the Lotus Domino web server have had the ability to host Java servlets, but at the time of writing the Domino servlet container uses JDK 1.2.2 and it is not (apparently) possible to replace this with JDK 1.3. 最近のバージョンのLotus Domino WebサーバはJava サーブレットを使えるようになりましたが、 執筆時点では、DominoサーブレットコンテナはJDK 1.2.2を使用しており、これをJDK1.3に置き換えることは(明らかに)できません。 That means if you want to use JAAS or any other API that is JDK 1.3 only in your servlets you're stuck. つまり、サーブレットでJDK1.3でしか使えないJAASなどのAPIを使おうとすると、ハマってしまうということです。
${tomcat_home} is the root directory of tomcat. Your Tomcat installation should have the following subdirectories:
${tomcat_home}はTomcatのルートディレクトリです。 Tomcatのインストール時には以下のサブディレクトリがなければいけません。
In all the examples in this document ${tomcat_home} will be c:\jakarta-tomcat . A worker is defined to be a tomcat process that accepts work from the Domino server. この文書の全てのサンプルでは、${tomcat_home}は c:\jakarta-tomcat になっています。 ワーカ(worker)は、Dominoサーバからの作業を受け取るTomcatプロセスと定義します。
The Domino Tomcat redirector was developed and tested on:
Domino-Tomcatリダイレクタは以下の環境で開発・テストされました。
The redirector uses ajp12 and ajp13 to send requests to the Tomcat containers. It probably also works with Tomcat in process, but that hasn't been tested. リダイレクタは、要求をTomcatコンテナに送るのに ajp12 および ajp13 を使用します。 おそらくTomcatとともに内部プロセスとしても動作するでしょうが、テストされていません。
The ajp12 protocol is only available in Tomcat 3.2.x and 3.3.x. ajp12プロトコルはTomcat 3.2.xと3.3.xでのみ使用可能です。 The ajp12 has been deprecated with Tomcat 3.3.x and you should use instead ajp13 which is the only ajp protocol known by Tomcat 4.0.x, 4.1.x and 5. ajp12 は Tomcat 3.3.xでは 推奨されません 。代わりに ajp13 を使うべきです。 ajp13 はTomcat 4.0.x, 4.1.x と 5 で扱える唯一のajpプロトコルです。 Of course Tomcat 3.2.x and 3.3.x also support ajp13 protocol. もちろんTomcat 3.2.xと 3.3.xもajp13プロトコルをサポートしています。 Others servlet engines such as jetty have support for ajp13 protocol jetty のような他のサーブレットエンジンもajp13プロトコルをサポートしています。
The Tomcat redirector requires 3 entities:
Tomcatリダイレクタには以下の3つが必要です。
We'll assume that tomcat redirector is placed in c:\jk\lib\tomcat_redirector.dll , the properties file is in c:\jk\conf and you created a log directory c:\jk\logs 本項ではTomcatリダイレクタが c:\jk\lib\tomcat_redirector.dll に、 プロパティファイルが c:\jk\conf に置かれ、 ログディレクトリとして c:\jk\logs を作成していると仮定して話をすすめます。 Copy the file tomcat_redirector.dll to the Domino program directory (this is the directory, which may be called something like c:\Lotus\Domino , that contains a file called nlnotes.exe ). tomcat_redirector.dll ファイルをDominoのプログラムディレクトリにコピーします (これは nlnotes.exe というファイルが入っているディレクトリで、 c:\Lotus\Domino というような名前になっているはずです)。
Shortly we will tell Domino where to find this file, but before we do that we need to make some registry entries. The simplest way is to edit the supplied file tomcat_redirector.reg , which initially will look like this : 要するに、このファイルがどこにあるかをDominoに伝えるわけですが、その前にいくつかのレジストリ エントリを作成する必要があります。 一番簡単なのは、インストール時に作成される tomcat_redirector.reg ファイルを編集するという方法です。このファイルは初期状態としては以下のようになっています。
Edit this file to reflect the location where Tomcat has been installed, i.e. replace the instances of c:\\jakarta-tomcat and c:\\jk with the appropriate path remembering to retain the double backslashes . Tomcatがインストールされている場所にあわせて、このファイルを編集します。つまり、 c:\\jakarta-tomcat と c:\\jk を適切なパスに置き換えます。 円マークまたはバックスラッシュ("\")は2個ずつのままにしておく ことをお忘れなく。 Once you've made the necessary changes save this file and double click on it to enter it into the registry. 必要な変更を加えたら、このファイルを保存し、ダブルクリックしてレジストリに追加します。 Note that the files referred to by the worker_file and worker_mount_file keys need to exist and contain sane values. Default Tomcat installations will have these files. Note also that recent versions of Tomcat write a file called uriworkermap.properties-auto when they start up that can be renamed uriworkermap.properties to obtain default behaviour. worker_fileキーとworker_mount_fileキーが参照しているファイルについては、実際に存在し、正しいデータが入っている必要があることに注意して下さい。 Tomcatをデフォルトでインストールした場合には、これらのファイルも作成されています。Tomcatの最近のバージョンでは、スタートアップ時にuriworkermap.properties-autoというファイルを作成し、デフォルトの動作をさせるためにこのファイル名をuriworkermap.propertiesに変えることも可能であることにも注意して下さい。
For some reason Windows 2000 seems to have a problem resolving the references to localhost in the default workers.properties. デフォルトのworkers.propertiesを使う場合、何らかの理由で、Windows 2000ではlocalhostへの参照解決で問題が起こるようです。 The easiest solution is to replace 'localhost' with '127.0.0.1' everywhere it appears. 一番簡単な解決策は'localhost'を全て'127.0.0.1'に置換することです。
The last two registry entries above provide commands that the redirector DLL will use to start and stop Tomcat when the Domino http server starts and stops respectively. 先にあげたレジストリ エントリの最後の2つ(tomcat_startとtomcat_stop)にはコマンドが書いてあります。これは、DominoのHTTPサーバが起動・停止する時に、 リダイレクタDLLがTomcatを起動・停止させるのに使用するコマンドです。 If you don't require this behaviour these two lines can be omitted (or deleted if you've already placed them in the registry). もしこのような動作が不要なら、これらの2行を省くこともできます (もしすでにレジストリに設定しているのであれば削除することもできます)。
Finally we need to configure Domino to use the DSAPI extension DLL. For those who are unfamiliar with Domino server configuration most of a server's configurable behavior is dictated by a document called the "server document" in a database called the "Public Name and Address Book" or "NAB" for short 最後に、DSAPI拡張DLLを使えるようにDominoの設定を行う必要があります。 Dominoサーバ設定について詳しくない人のために説明しておくと、サーバで設定可能な動作のほとんどは、 「公開アドレス帳(Public Name and Address Book)」 、または略して 「NAB」 と呼ばれるデータベースの「サーバ文書」という文書でコントロールできます (N.B. Lotus have renamed the NAB to "Domino Directory" from Domino 5 onwards). Each Domino server will have a NAB (called names.nsf) and each NAB will have a number of server documents including one for the current server. (注意:LotusはDomino 5以降、NABを「ドミノディレクトリ」に名称変更しています)。 それぞれのDominoサーバにはNAB(ファイル名はnames.nsf)があり、それぞれのNABには、現在のサーバに関する文書を含む、たくさんのサーバ文書があります。 If you have not previously configured a Domino server you may need to refer to the supplied documentation, or you may need to pass this document to your tame Domino administrator. もし今までにDominoサーバの設定をしたことがないのであれば、マニュアルを見る必要があるかもしれません。あるいはこの文書を仲良しのDomino管理者に見せる必要があるかもしれません。 Assuming you know your way around a Domino server document what we're going to do is actually quite simple. Open the server document for this server, place it in Edit mode, then locate the DSAPIsection and the 'DSAPI filter file names' field on the Internet Protocols tab, HTTP sub-tab. Add "tomcat_redirector.dll" to the DSAPI field, then save and close the document. Dominoサーバー文書の使い方を心得ているのなら、これからすることは実はとても簡単です。 設定しようとしているサーバに関するサーバ文書を開き、編集モードにして、「インターネット」タブの「HTTP」サブタブにある「DSAPI」セクションの「DSAPIフィルタファイル名」フィールドを探します。このDSAPIのフィールドに"tomcat_redirector.dll"を追加し、文書を保存して閉じます。
In order to get these settings to take effect and make sure that you haven't disrupted anything else you should now restart the Domino server. これらの設定変更を反映し、他の箇所がおかしくなっていないことを確認するために、 Dominoサーバを再起動しなければなりません。 If the server is running as a service and you have changed any relevant system variables (JAVA_HOME, TOMCAT_HOME, CLASSPATH) since the last time you restarted the computer you should do a complete restart now because updates to system variables are not seen by services until after a reboot. もしサーバがサービスとして実行されていて、直前のコンピュータの再起動以降に関連するシステム変数 (JAVA_HOME, TOMCAT_HOME, CLASSPATH)を変えたのなら、今すぐコンピュータを再起動しなければなりません。 なぜなら、更新されたシステム変数はリブートした後でないとサービスが参照しないからです。 If all goes well you should see something like this on the server console when the web server starts up : もし全てうまくいけば、Webサーバが起動したときに、サーバコンソールに以下のような感じで表示されるはずです。
At about the same time Tomcat should open in a new window (assuming you enabled the autostart option in the registry settings). 同時にTomcatが新しいウィンドウで開いているはずです(レジストリ設定で自動起動オプションをオンにしていることを想定しています)。 You should now be able to visit a URL that is handled by Tomcat. Something like may be available, depending on how Tomcat is configured : これでTomcatが管理しているURLを見ることができるはずです。 Tomcatの設定にもよりますが、以下のようなURLが使えるでしょう。 If that all works you're done ;-) 全ての作業が完了していればの話ですが ;-)
The Tomcat redirector requires 3 entities:
Tomcatリダイレクタには以下の3つが必要です。
Copy the file libtomcat.so to the Domino program directory which may be called something like /opt/lotus/notes/5601/linux , it should contains a file called libnotes.so and copy libtomcat.ini to the Domino data directory. libtomcat.so ファイルをDominoのプログラムディレクトリにコピーします (このディレクトリは /opt/lotus/notes/5601/linux というような名前になっており、 libnotes.so というファイルが入っているはずです)。 そして、 libtomcat.ini をDominoのデータディレクトリにコピーします。
Note that if you're building the redirector from source these files should already have been copied to the appropriate locations. もしリダイレクタをソースコードからビルドしているのであれば、 これらのファイルはすでに適切な場所にコピーされているはずであることに注意して下さい。 Before using the redirector you may like to review the settings in libtomcat.ini which, by default, will look something like this: リダイレクタを使う前に、 libtomcat.ini の設定を見たいかもしれません。 デフォルトでは以下のような感じになっています。
If you're building the redirector from the source you may not need to make any changes, otherwise you may have to edit this file to reflect the location where Tomcat has been installed, i.e. replace the instances of /usr/local/apache/tomcat with the appropriate path. もしリダイレクタをソースコードからビルドしている場合は、何も変更する必要はないでしょう。 そうでなければ、Tomcatがインストールされている場所を反映するためにこのファイルを編集しなければならないでしょう。 つまり、/usr/local/apache/tomcatとなっているのを適切なパスに置換するということです。 Note that the files referred to by the worker_file and worker_mount_file keys need to exist and contain sane values. worker_file キーと worker_mount_file キーが参照しているファイルについては、 実際に存在し、そこに正しいデータが入っている必要があることに注意して下さい。 Default Tomcat installations will have these files. Note also that recent versions of Tomcat write a file called uriworkermap.properties-auto when they start up that can be renamed uriworkermap.properties to obtain default behaviour. Tomcatをデフォルトでインストールした場合は、これらのファイルも作成されています。Tomcatの最近のバージョンでは、スタートアップ時にuriworkermap.properties-autoというファイルを作成し、デフォルトの動作ができるようにこのファイル名をuriworkermap.propertiesに変えることも可能であることにも注意して下さい。
The last two registry entries above provide commands that the redirector will use to start and stop Tomcat when the Domino http server starts and stops respectively. 先にあげたレジストリエントリの最後の2つ(tomcat_startとtomcat_stop)にはコマンドが書いてあります。これは、DominoのHTTPサーバが起動・停止する時に、 リダイレクタがTomcatを起動・停止させるのに使用するコマンドです。 If you don't require this behaviour these two lines can be deleted. もしこの動作が不要ならば、この2行を削除することも可能です。
Finally we need to configure Domino to use the DSAPI extension. 最後に、DSAPI拡張DLLを使って、Dominoの設定を行う必要があります。 For those who are unfamiliar with Domino server configuration most of a server's configurable behavior is dictated by a document called the "server document" in a database called the "Public Name and Address Book" or "NAB" for short Dominoサーバ設定について詳しくない人のために説明しておくと、サーバで設定可能な動作のほとんどは、 「公開アドレス帳(Public Name and Address Book)」 、 または略して 「NAB」 と呼ばれるデータベースの「サーバ文書」という文書でコントロールできます N.B. Lotus have renamed the NAB to "Domino Directory" from Domino 5 onwards). (注意:LotusはDomino 5以降、NABを「ドミノディレクトリ」に名称変更しています)。 Each Domino server will have a NAB (called names.nsf) and each NAB will have a number of server documents including one for the current server. If you have not previously configured a Domino server you may need to refer to the supplied documentation, or you may need to pass this document to your tame Domino administrator. それぞれのDominoサーバにはNAB(ファイル名はnames.nsf)があり、それぞれのNABには、現在のサーバに関する文書を含む、たくさんのサーバ文書があります。 もし今までにDominoサーバの設定をしたことがないのであれば、マニュアルを見る必要があるかもしれません。あるいはこの文書を仲良しのDomino管理者に見せる必要があるかもしれません。 Assuming you know your way around a Domino server document what we're going to do is actually quite simple. Dominoサーバー文書の使い方を心得ているのなら、これからやることは、実はとても簡単です。 Open the server document for this server, place it in Edit mode, then locate the DSAPIsection and the 'DSAPI filter file names' field on the Internet Protocols tab, HTTP sub-tab. 設定しようとしているサーバに関するサーバ文書を開き、編集モードにして、「インターネット」タブの「HTTP」サブタブにある「DSAPI」セクションの「DSAPIフィルタファイル名」フィールドを探します。 Add "libtomcat.so" to the DSAPI field, then save and close the document. このDSAPIのフィールドに"libtomcat.so"を追加し、文書を保存して閉じます。
In order to get these settings to take effect and make sure that you haven't disrupted anything else you should now restart the Domino HTTP server. これらの設定変更を反映し、他の箇所がおかしくなっていないことを確認するために、 Dominoサーバを再起動しなければなりません。 At the Domino console type Dominoコンソールで以下のようにタイプします。
You should see the HTTP server reload along with messages that will confirm that the redirector has loaded and that Tomcat has (if you used Tomcat autostart) started. リダイレクタがロードされ、(Tomcat自動起動を使用している場合は)Tomcat が起動したことを確認するメッセージとともに、 HTTPサーバがリロードされるのを見られるはずです。 You should now be able to visit a URL that is handled by Tomcat. Something like これでTomcatが管理しているURLを見ることができるはずです。 Tomcatの設定によりますが、以下のようなURLが使えるでしょう。
To compile it you'll need the JK Domino sources and Microsoft Visual C++ 6.0. (Windows向けに)コンパイルするためにはJK DominoのソースとMicrosoft Visual C++ 6.0が必要です。 You will probably also want the Lotus Notes C API version 5.0.7 or later. You can build the DLL without the C API, in which case you'll need to define the macro NO_CAPI in config.h. If you do this Domino logging from the DLL will be disabled. それに、おそらくはLotus Notes C API version 5.0.7またはそれ以降のバージョンが欲しいと思うでしょう。 C APIがなくてもDLLをビルドすることはできますが、その場合にはconfig.hにNO_CAPIマクロを定義する必要があります。 ただし、その場合はDLLからのDominoのログ出力ができなくなります。
You will probably also want the Lotus Notes C API version 5.0.3 for Unix or later. おそらく、Lotus Notes C API version 5.0.3 for Unixまたはそれ以降のバージョンが欲しいと思うでしょう。 You can build the redirector without the C API, in which case you'll need to define the macro NO_CAPI in config.h. If you do this, Domino logging from the redirector will be disabled. C APIがなくてもリダイレクタをビルドすることはできますが、その場合にはconfig.hにNO_CAPIマクロを定義する必要があります。 ただし、その場合は、リダイレクタからのDominoのログ出力ができなくなります。
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[訳注: これは高橋達男が翻訳しました。日本語訳に対するコメントがあれば、こちらに送って下さい。]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||