handlersサンプルを試す
Javaコマンドを使ってデモを起動
celtix-server.xmlファイルとceltix-client.xmlファイルのコンフィグレーション情報を使ってアプリケーションを 起動します。サーバ側はFileLoggingHandlerを、クライアント側はSmallNumberHandlerをそれぞれ使用します。
samples/handlersディレクトリから次のコマンドを起動します。以下の「java」からはじまる行は、すべて1行のコマンドである点に注意してください。
UNIXの場合は以下のコマンドを入力します。
java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
-Dceltix.config.file=file:///$CELTIX_HOME/samples/handlers/celtix-server.xml
demo.handlers.server.Server &
java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
-Dceltix.config.file=file:///$CELTIX_HOME/samples/handlers/celtix-client.xml
demo.handlers.client.Client ./wsdl/addNumbers.wsdl
コマンドを実行すると、サーバがバックグラウンドで起動します。
Windowsの場合は以下のコマンドを入力します。
start
java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
-Dceltix.config.file=file:///%CELTIX_HOME%\samples\handlers\celtix-server.xml
demo.handlers.server.Server
java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
-Dceltix.config.file=file:///%CELTIX_HOME%\samples\handlers\celtix-client.xml
demo.handlers.client.Client .\wsdl\addNumbers.wsdl
新しいコマンドウィンドウがサーバプロセスのために起動します。
celtix-server.xmlコンフィグレーションファイルで指定されたFileLoggingHandlerは、 samples/handlerディレクトリにあるdemo.logファイルとコンソールにログを出力します。また、celtix-client.xml コンフィグレーションファイルで指定されたSmallNumberHandlerは、クライアントアプリケーションが動作するコンソールに情報を出力しま す。
サーバプロセスを停止したら、続いてLoggingHandlerを使用して再起動します。クライアント側はハンドラを使用しません。
samples/handlersディレクトリから次のコマンドを起動します。以下の「java」からはじまる行は、すべて1行のコマンドである点に注意してください。
UNIXの場合は以下のコマンドを入力します。
java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
demo.handlers.server.Server &
java -Djava.util.logging.config.file=$CELTIX_HOME/etc/logging.properties
demo.handlers.client.Client ./wsdl/addNumbers.wsdl
サーバがバックグラウンドで起動します。
Windowsの場合は以下のコマンドを入力します。
start
java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
demo.handlers.server.Server
java -Djava.util.logging.config.file=%CELTIX_HOME%\etc\logging.properties
demo.handlers.client.Client .\wsdl\addNumbers.wsdl
新しいコマンドウィンドウがサーバプロセスのために起動します。続いてクライアントを起動して、サーバプロセスを終了してください。
WSDLファイルやclassファイルから生成したコードを削除して、buildディレクトリを削除するには次のコマンドを起動してください。
ant clean