2007年7月5日木曜日

SOA ESB Muleメモ

Ubuntu 7.04 - the Feisty Fawn -に ESBのmule-1.4.1入れて試す。

■インストール
 Tar.gzファイルを解凍した場所を以下の様に環境変数へ登録
 ※お試しなので適当に/home/rsos01を解凍場所とした。

export MULE_HOME=/home/rsos01/mule-1.4.1
export PATH=$PATH:$MULE_HOME/bin

■初期実行
 ~/mule-1.4.1/bin$ mule
で実行すると以下の様に表示されてくる。

Usage: /home/rsos01/mule-1.4.1/bin/mule { console | start | stop | restart | status | dump }
No command specified, running in console (foreground) mode by default, use Ctrl-C to exit...
Running Mule...
--> Wrapper Started as Console
Launching a JVM...


沢山の文字が流れて来て最終的にライセンス確認のプロンプトが出る。
当然yを押下
Do you accept the terms and conditions of this license agreement [y/n]?

Downloading http://www.ibiblio.org/maven2/javax/activation/activation/1.1/activation-1.1.jar ...


□エラー
1)プロキシーの設定エラー
(状況)
Exception in thread "main"
JVM exited while loading the application.
java.io.IOException: Unable to reach a remote repository, this is most likely because you are behind a firewall and have not configured your HTTP proxy settings in $MULE_HOME/conf/wrapper.conf.

ちなみに上記ログは以下のディレクトリにも出力される。
~/mule-1.4.1/logs

(対策)
$MULE_HOME/conf/wrapper.confの以下の箇所を修正
# Set these parameters for your HTTP proxy if behind a firewall
#wrapper.java.additional.3=-Dhttp.proxyHost=proxy.acme.com
#wrapper.java.additional.4=-Dhttp.proxyPort=8080

自分の環境にあわせて修正(以下は例)
# Set these parameters for your HTTP proxy if behind a firewall
wrapper.java.additional.3=-Dhttp.proxyHost=146.50.67.117
wrapper.java.additional.4=-Dhttp.proxyPort=3128

2)設定ファイル
ファイルのダウンロードはされたが、以下のようなメッセージ(警告)が出る。
WARN 2007-07-05 14:47:27,508 [WrapperSimpleAppMain] org.mule.MuleServer: A configuration file was not set, using default: mule-config.xml


*******************************************************************************
No config file specified and no config by the name of mule-config.xml
found on the classpath.

Usage: mule -config [-builder ]

mule-configuration - a URL for the Mule Config XML to use,
if not specified the config will be loaded from
the classpath

config-builder - a fully qualified class name of the builder to use
to configure Mule. For Spring-based configurations
a 'spring' (without quotes) shortcut is available.
*******************************************************************************

たしかに、オプション無しで起動している。
http://mule.codehaus.org/display/MULE/Starting+the+Server
に書いてある。
設定ファイルとはなんでしょうか?

少し気になるが、次のステップに続く・・・・

■サンプルアプリの起動
Echo Example サンプル

以下のディレクトリに移動
~/mule-1.4.1/examples/echo

以下のコマンドを実行
mule -config ./conf/echo-config.xml

※先ほどわからなかった設定ファイルが出てきました。こういうモノですね。

なにやら沢山出力されるが結局以下の表示がされる。
**********************************************************************
* Mule ESB and Integration Platform version 1.4.1 *
* MuleSource, Inc. *
* For more information go to http://mule.mulesource.org *
* *
* Server started: 3:56:22 午後 *
* Server ID: Mule_Echo_Sample *
* JDK: 1.4.2 (GNU libgcj 4.1.2 (Ubuntu 4.1.2-0ubuntu5)) *
* OS: Linux (2.6.20-16-generic, i386) *
* Host: itp21033 (127.0.1.1) *
* *
* Agents Running: *
* Mule Admin: accepting connections on tcp://localhost:60504 *
**********************************************************************
INFO 2007-07-05 15:56:24,487 [WrapperSimpleAppMain] org.mule.MuleServer: Mule Server initialized.

サンプルの説明にあるようにブラウザで以下の様に入力すると
http://localhost:8081/services/EchoUMO?method=echo&param=ThisIsEcho

ブラウザの画面に以下のようなレスポンスが帰ってくる。



   ThisIsEcho
  

 



とりあえず動作はしているが、、、
何が良いのかわからない、、、それはこれから

0 件のコメント: