Enterprise Java Bean 3.1+(EJB 3) EJB specification details how an application server provides: EJB初學者常見的12個困惑問與答http://developer.51cto.com/art/200802/66059.htmhttp://www.infoq.com/cn/news/2010/02/jee6_ejb_31 http://www.mastertheboss.com/en/jboss-server/219-ejb-31-tutorial.html EJB 3.1 帶來的改變
2009, EJB 進展至 3.1 的版本, 在這個版本我們看到了幾個明顯的特色, - 更多來自開放社群修正參考, 提高更一致性的服務模式
- POJO 大量的使用, 引入 Java Annotation 減少開發者的工作量
- EJB 不再包含 Entity Beans, 由 JPA 2.0 取代
- 默認的“約定優於配置”獲得廣泛的應用
- Singleton
- EJB Timer
- 無介面的 View
- @Asynchronous, 非同步服務
- 簡化的部署
Java EE 6新特性嘗鮮:EJB 3.1重要變化總覽, http://developer.51cto.com/art/200907/138734.htm
Different EJB types
You can also try using the @Stateful
annotation. Alternatively, you
could try the new @Singleton annotation for
singleton instances. If
you do, you may notice that there is are two
annotations: javax.ejb.Singleton
and javax.inject.Singleton . Why two
singletons? The CDI singleton
(javax.inject.Singleton ) lets you define a
singleton instance outside
of EJB in case you are using CDI in a non-EJB
environment. The EJB singleton
(javax.ejb.Singleton ) provides all the
features of an EJB such as
transaction management. Therefore, you have the choice
depending on your needs
and whether you are working in an EJB environment.
我的 Blog 文章 JBoss 4 + EJB 3 在 Netbeans 6.5 中環境的設定Enterprise JavaBean 3 / 3.1
大型分佈式應用
|
|