

今週の金曜日(11月14日)発売の技術評論社からでるJava Expert #03、まるごと!NetBeansに、「GlassFishを活用したエンタープライズシステム開発」という記事で執筆しました。記事中では現在主流のバージョンGlassFish v2をメインに、最新のGlassFish v3 preludeまでをカバーしています。GlassFish v3 preludeについては先週正式リリースされましたが、執筆時期とのタイミングの問題で若干情報が古くなっています。紙面だと書ききれなかったところもたくさんあるので、引っ越しなどがある程度落ち着きましたらまたこのブログや、Glassfishユーザ・グループ・ジャパンなどでアップデートできればいいなと思っています。たぶん、Sun Tech Days 2008ではこのあたりがきちんとカバーされるでしょうから、こちらが要チェックですね。関連しそうなセッションで言うと、12月2日13:00〜13:50の寺田さんのGlassFish and the Future of Java EEというセッション。
2005年に始まったGlassFishのダウンロード数は既に年間500万に達し、コミュニティは活発に成長しております。コンパクトかつ標準仕様に忠実な Java EE アプリケーションサーバを維持しながら、現行のGlassFish v2では品質やパフォーマンスを改善し(Project Grizzly), クラスタ機能、スクリプト言語(Ajax, Ruby, Ruby on Rails)、高可用性機能、Comet、SIP相互運用等が拡張されております。オープンソースと企業ユーザから求められる豊富な機能とパフォーマンスを伴う高度な品質製品に境目はなくなりつつあります。次に予定されているGlassFish v3は次世代のアプリケーションサーバです。OSGiを用いたモジュラー設計で、Java EE 6仕様にアーキテクチャ準拠しております。Project GlassFish v3の実装ではサーバソフトウエアで重要な2つのキーワード(モジュール化と拡張性)にフォーカスしております。このセッションではGlassFish v2のクラスタ機能、Metro Webサービススタックと .NETとの相互運用性、Web層(Grizzly, Comet, jMaki…)のツールと管理機能の特徴について紹介します。さらに、より先進的な話題GlassFish v3の概要と拡張性高いサーバサイドプラットホームを実現する実装技法について紹介します。最後に Java EE 6 に予定される新機能についても触れる予定です。
50分のセッションでカバーする範囲がとても広いので、GlassFish v3 Preludeに関してあまりたくさん盛り込めなさそうですが、全体をざっと見渡すには丁度良さそうなセッションだと思います。
GlassFish ESBのマイルストーンビルドが出て少し経ちましたが、遅ればせながら入れてみました。ところで、GlassFish ESBはhttp://glassfishesb.orgというサイトがあるにもかかわらず、https://open-esb.dev.java.net/glassfishesb/にフォワードされます。http://glassfish.orgがhttps://glassfish.dev.java.netにフォワードされるのと同じテイストでしょうか。FishCATのデザインといい、GlassFishのデザインテイストは今ひとつわからないところがあります(笑)。さて、GlassFish ESBですが、ダウンロードすればNetBeans + GlassFish ESBのインストーラが実行可能になります。

このインストーラはどうやら、NetBeansインストーラと別の実装のようで、インストール先もNetBeansインストーラと別の場所がデフォルトとなっています。/Applications以下の整理整頓に気をつけている僕としては、このインストーラは気に入らないところがいくつかあります。まず、デフォルトインストール先がGlassFish ESBが /Applications/glassfish、NetBeansが /Applications/NetBeansです。これはインストール前に変更できるのでいいんですが、/Applications/servicetagというディレクトリが勝手に作られて servicetag-registry.xmlというファイルが一つおかれます。このファイルはSERVICE TAG IMPLEMENTATION FOR OPEN ESBを参照すると、どうやらSun Online Accountへの登録に関する情報を管理しているようです。作ってもいいけど、$HOME/Library以下におくか、せめて . (どっと)で始まるディレクトリ名にしてほしい。もう一つの不満は、インストールされたNetBeansのアイコンついていないこと。これは、インストールされたNetBeans.app/Contents/Resources/icon.icnsというシンボリックリンクが、
icon.icns -> NetBeans GlassFish ESB/{nb-cluster}/netbeans.icns
というように、{nb-cluster}というおそらくビルド時の変数が展開されていないことによるようです。とりあえずこの辺の話はOpen ESBのメーリングリストに投げてみたのでひょっとしたらそのうち直るかもしれません。

GlassFish ESBといっても、今のところ同時にインストールされるNetBeans側に特別変化があるような感じではなく、ちょっと違いが感じられるとすればGlassFishの管理コンソール側でしょうか。左ペインのJBIフォルダ内のコンポーネントはGlassFishに比べてかなり多めです(GlassFishはsun-http-bindingとsun-javaee-engineだけ。NetBeansのSOAサポートパッケージで入れた場合はそれに加えsun-bpel-engine、sun-xslt-engine、sun-file-bindingなどが入る)。もう一つの違いはESBというフォルダがあることです。CAPS Application Configurationとありますので、Java CAPSプロジェクトがデプロイできるようになっているんでしょう。なお、Java CAPS自体はダウンロードはできないのでSunの人に言ってもらわないと使えないようですから、実際にこのフォルダがどう生きてくるかはよくわかりません。
Sun Java Enterprise System - Get Itより。
Sun Java Composite Application Suite
Note: Currently, Sun does not offer a free download of this product. Contact your local sales for details on how to download this product.

ほかに違いで見つけたところは、Lifecycle Moduleとして、JavaEEVerifyESBというモジュールが組み込まれているところです。DescriptionではAdds Java EE verifier MBeanということなのですが用途はよくわかりません。ところで、Open ESB、GlassFish ESB、Sun ESB Suite、Java CAPSと、似たようなプロダクトがたくさんあってわかりづらいのですが、比較表がありました。

GlassFish ESBにはSAPとかSiebel、PeopleSoft向けのアダプタやSWIFTやX12、EDIFACTのようなメッセージライブラリが付いてこないという切り分けなんですね。オープンなプロトコルのみでシステム統合するならGlassFish ESBだけでよく、プロプライエタリなプロトコルも使うならSun ESB SuiteかSun Java CAPS。さて、GlassFish ESBが今後どういう風に進歩していくかですが、個人的に注目しているのはESB Consoleというインキュベーションプロジェクトです。現在のGlassFish ESBでの管理コンソールではESBの各コンポーネント・ライフサイクル程度は管理できますが、トランザクションごとの情報や、ビジネス的な視点での管理はほとんどできません。ESB Consoleはそれらの点を補うためのプロジェクトのようです。Minimal feature listを少し引用してそれぞれみていきましょう。
- The unified ESB management console will provide all the features that are useful in the current Enterprise Manager.
- The unified ESB management console will provide an extensible management console to allow for various management features (like BPEL management, IEP management, ETL management, HTTP BC management and more) to be plugged in with drill-down capabilities. The Web Console would consist of one core web application which will accommodate other plug-ins thus making it an extensible management console to allow various management features to be plugged-in. This will allow our customers and partners to participate in the development of it by contributing certain management features.
- The Web Application will allow users to deploy services to a number of arbitrary server instances and to a DAS with clusters.
- Since Java CAPS management/monitoring capability is beyond what a typical application server would provide, these web applications could either be deployed on Glassfish, or be running outside of Glassfish.
- The Web Console will also provide an Intelligent Audit Dashboard(IAD).
- The Web Console will allow users to view various Web service performance metrics such as average response time, Transactions per Second (TPS), error count, call count, etc.
- The Web Console will also have charting capabilities for web service performance metrics.
- The Web Console will provide the ability to print relevant reports as PDF files.
- The Web Console will notify administrators when an Service Level Agreement (SLA) metrics cross specified thresholds.
- The Web Console will provide scale-out capabilities with the ability to deploy/undeploy a service or a composite application simultaneously on several servers and manage and monitor these services running on various server instances and clusters.
- Scaling down services like limiting the Thread pools where available on a a component basis will also be exposed so resources allocated to an engine can be limited if required.
- The Web Console will be able to manage and monitor JMS destinations for both STCMS and Java MQ
- External Plugins: The Web Console will be able to manage and monitor BPEL 2.0 business process instances, terminate instances, and drill down to instance level details with a BPEL Management & Monitoring plugin. Same goes for other types of Service Engines.
- The Web Console will expose Application Configuration (to configure environment specific information), Application Variables(to configure environment specific information), and support Application Verification before deployment of Composite Applications.
- The Web Console will provide the ability to view log activity, with the ability to define filters.
- All features will have access control so users can be limited only to a subset of management/monitoring features if required.
- Based on the alert message sent, users should be able to view the associated service unit that an alert came from. It should be possible since we have the service unit name and component name available in the alert message header, and we should be able to take the user to the associated service unit’s plug-in in the UI.
- For Alert Agent configuration, the administrator has to be able to propagate configurations done for one Server to multiple servers automatically.
- There are certain management and monitoring capabilities that are exposed through aspects/interceptors. The Web Console should expose these configurations for users to configure.
おもしろそうなところでいえば、Intelligent Audit Dashboard (IAD)でしょうか。Audit Dashboardということなので、Intelligent Event Processor (IEP)と連携して監査的な情報を出せるのかもしれません。
9月25日に日本Javaユーザグループ(JJUG)のナイトセミナーでGlassFish Night Seminarが開催されます。今回はタイトルにあるとおり「作ってみた」ですから、作ってみた結果を切り口にJavaやJRubyなど開発のトピックをご紹介していく予定です。
GlassFish で、作ってみた。
最新 GlassFish は単なる Java EE 実行環境ではなく、多彩な機能が盛り込まれた遊べるアプリケーションサーバです。
今回は開発の実演を交えながら、Java はもちろん、JRuby での開発に便利な機能をご紹介します。
この秋は、思いっきり GlassFish で遊んでみましょう!

(写真は先月のJRubyとJythonのJJUGクロスコミュニティーセミナーの様子)