Apache Software Foundation | Jakarta Project | Apache Tomcat
jk2.properties


jk2.properties ファイル

The examples below are working when the Web Server is configured according the examples described in the configweb file.


以下の例は、configwebファイルに記述された例に従ってWeb サーバが設定されている場合に動作します。

using normal socket


普通のソケットの使用

There is no need to use the jkjni logic to use normal socket, so that just for Fun.


普通のソケットを使うために jkjni ロジックを使う必要は全くありませんが、ちょっとした楽しみに。

# list of needed handlers.
handler.list=apr,channelSocket,request

# Override the default port for the channelSocket
channelSocket.port=8019

# Dynamic library
apr.NativeSo=/home1/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/jkjni.so


# 必要なハンドラの一覧
handler.list=apr,channelSocket,request

# channelSocket のデフォルトのポート番号を上書き
channelSocket.port=8019

# ダイナミック・リンク・ライブラリ
apr.NativeSo=/home1/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/jkjni.so


using AF_UNIX socket


AF_UNIX ソケットの使用

Create and listen on a AF_UNIX socket. The location of the socket must be the same in the Web Server configuration file.


AF_UNIX ソケットを作成して、接続を待ちます。ソケットの場所は、 Web サーバの設定ファイルでの指定と一致していなければいけません。

# list of needed handlers.
handler.list=apr,channelUnix,request

# Location of the socket.
channelUnix.file=${jkHome}/work/jk2.socket

# Dynamic library
jtc=/home1/jakarta/jakarta-tomcat-connectors
apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so


# 必要なハンドラの一覧
handler.list=apr,channelUnix,request

# AF_UNIX ソケットの場所
channelUnix.file=${jkHome}/work/jk2.socket

# ダイナミック・リンク・ライブラリ
jtc=/home1/jakarta/jakarta-tomcat-connectors
apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so


using user defined class for communication


ユーザ定義の通信クラスの使用

It is possible to have a user defined class for the communication. Here we have used the ChannelUn as example.


ユーザ定義の通信クラスを使うことが可能です。 以下に ChannelUn を使う例を示します。

# Define our own handler.
class.mychannel=org.apache.jk.common.ChannelUn
# list of needed handlers.
handler.list=apr,mychannel,request

# Location of the socket.
channelUnix.file=${jkHome}/work/jk2.socket

# Dynamic library
jtc=/home1/jakarta/jakarta-tomcat-connectors
apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so


# ユーザ定義ハンドラの定義
class.mychannel=org.apache.jk.common.ChannelUn
# 必要なハンドラの一覧
handler.list=apr,mychannel,request

# AF_UNIX ソケットの場所
channelUnix.file=${jkHome}/work/jk2.socket

# ダイナミック・リンク・ライブラリ
jtc=/home1/jakarta/jakarta-tomcat-connectors
apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so


using jni channel class for communication


jniチャンネル通信クラスの使用

Here we have the minimum configuration needed for the jni communication.


以下に、jni 通信に必要な最低限の設定を示します。

# list of needed handlers.
handler.list=apr,request,channelJni

# Dynamic library needs to be defined only if Tomcat is used
# out of process
jtc=/home1/jakarta/jakarta-tomcat-connectors
apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so
# Or you can use the mod_jk2 directly
apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If you wish to start the Tomcat from inside web server then
# you don't need any above directive. Here is shown the default
# value for the apr that you can ommit
apr.jniModeSo=inprocess


# 必要なハンドラの一覧
handler.list=apr,request,channelJni

# Tomcat をプロセス外で使用する場合に限って、
# ダイナミック・リンク・ライブラリを定義する必要があります。
jtc=/home1/jakarta/jakarta-tomcat-connectors
apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so
# もしくは、mod_jk2 を直接使う事もできます
apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# もし、Web サーバのプロセス内から Tomcat を起動したいなら、
# 上記のディレクティブは全く必要ありません。
# 以下に省略可能な apr のデフォルト値を示します。
apr.jniModeSo=inprocess



[訳注: これは鰈崎 義之が翻訳しました。日本語訳に対するコメントがあれば、こちらに送って下さい。]