EJB 3.1 の Singleton はインスタンス単位で有効

2010年12月15日 at 12:57 午前

皆様、本件につきまして皆様に誤解を与え大変申し訳ございませんでした。
過去、私が Java EE 6 の EJB 3.1 で Singleton クラスについて説明した際、Singleton クラスは異なるJavaVM(クラスタ環境)で1インスタンスを保証すると説明しておりました。このページで説明する資料の P30 など。しかしながら、EJB 3.1 の仕様を改めて確認した所、下記の記載がございました。

JSR 318: Enterprise JavaBeansTM,Version 3.1
4.8 Singleton Session Beans
A Singleton session bean is a session bean component that is instantiated once per application. In cases where the container is distributed over many virtual machines, each application will have one bean instance of the Singleton for each JVM.

当初、GlassFish v3.1 でクラスタを跨ぐ Singleton をサポートする計画で開発が進められていた事を知っていた事もあって上記解釈を間違えてしまいました。
上記の事実は GlassFish v3.1 の EJB の拡張部分について確認していた際、クラスタ環境での Singleton をサポートしないという下記の記載があり気付き、再度上記仕様を確認致しました。

EJB 3.1 Singleton support
No new work is needed to support the EJB 3.1 spec behavior of per-JVM singleton instance creation. We evaluated using the EJB Singleton component as the basis of a new per-cluster Singleton, but the programming model is not a good fit.

GlassFish Issue Tracker
上記 Issue Tracker にも Singleton はクラスタ単位で作成されるのではなくそれぞれのインスタンス(JVM)単位で作成される事が明記されております。
また、この情報は高可用性管理ガイド、アプリケーション開発ガイド、アプリケーション配備ガイドに記載する旨記載されておりました。

本件につきまして私の誤解から間違えた内容を伝えてしまった事を心よりお詫び申し上げます。

広告

Entry filed under: Application Server/GlassFish, GlassFish, Java, 未分類.

Java SE 7, 8 関連の JSR が承認 GlassFish v3.1 の新機能概要


Java Champion & Evangelist

Translate

ご注意

このエントリは個人の見解であり、所属する会社の公式見解ではありません

カレンダー

2010年12月
 12345
6789101112
13141516171819
20212223242526
2728293031  

カテゴリー

Twitter

  • RT @satyanadella: GitHub Copilot is the first at-scale developer tool, and today we're going further—bringing the power of Copilot past the… 8 hours ago
  • RT @seanjmullan: JDK 20 was released yesterday! Highlights of this release include further improvements that strengthen the default securit… 14 hours ago
  • RT @mkheck: Can’t get enough Spring content? Neither can I! That’s why I'm presenting "Build Better, Deploy Faster: Spring Boot + Spring C… 14 hours ago
  • RT @yuhattor: やばいのきました これからはエディターの外でも開発者の効率を爆上げします。まずはウェイトリスト登録! GitHub Copilot X👇 ●GPT4を採用 ●チャット/音声サポートでエディタでもChatGPTに似た体験 ●プルリクエストの文章自動生… 1 day ago
  • RT @github: GitHub Copilot is already helping developers code faster in their IDEs. But what’s next? Our answer is GitHub Copilot X. It’s… 1 day ago

clustermap

ブログ統計情報

  • 1,263,278 hits

RSSフィード

アーカイブ


%d人のブロガーが「いいね」をつけました。