Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:關于Static [Re:JiafanZhou]
ivanna





发贴: 5
积分: 0
于 2009-06-22 12:18 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
JiafanZhou wrote:
Recently I have been preparing for the SCBCD exam, and I found the EJB3.0 specification is very very strict about using the static fields/members for the session and message-driven beans.

It also proves the concept that using static is not thread-safe, I believe this is the reason for the EJB3.0 specification.

Quoted from the EJB 3.0 specification.

A field or method of a bean class may be annotated to request that an entry from the bean's environment be injected. Any of the types of resources or other environment entries described may be injected. Injection may also be requested using entries in the deployment descriptor corresponding to each of these resource types.

The field or method MAY have any access qualifier, but <u>MUST NOT</u> be static.

In other words, EJB experts have the same concerns like me that using static fields could seriously compromise the thread safety.

Regards,
Jiafan

你要把sun的证考全么。。都卖了!!




学java的朋友,请一起来投票让sun推出中文jdk文档!!!

话题树型展开
人气 标题 作者 字数 发贴时间
14117 關于Static skwujinhua 80 2009-05-07 11:17
11433 Re:關于Static junyuo 77 2009-05-08 10:16
11143 Re:關于Static JiafanZhou 3471 2009-05-15 00:20
11385 Re:關于Static skwujinhua 264 2009-05-15 08:50
11259 Re:關于Static JiafanZhou 4643 2009-05-18 16:56
11134 Re:關于Static JiafanZhou 87 2009-05-18 17:03
11264 Re:關于Static skwujinhua 62 2009-05-19 16:02
11113 Re:關于Static JiafanZhou 18 2009-05-21 17:16
10968 Re:關于Static JiafanZhou 922 2009-06-06 06:06
10738 Re:關于Static ivanna 985 2009-06-22 12:18
10715 Re:關于Static abefirst 28 2009-06-28 10:38
11506 Re:關于Static abefirst 27 2009-06-28 10:52

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923