由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Stateful session bean到底有啥好处?
相关主题
简单的EJB问题Flex,Silverlight or Cappuccino/Sproutcore/JavascriptMVC?
请问一个问题本菜对EJB一问
关于EJB开发的几个问题Front End Developer / UI designer - Charlotte, NC - contract to hire
java servlet httpsession问题求教EJB ConnectionFactory issue
做Java web development 一定要 struts + spring + hibernate 吗EJB框架示意图
vaadinAnother nice EJB server(recommend ;-)
有经验的同志谈谈JDO吧?这三种方法获得EJB有何不同?
Questions on EJB3 Persistence/Hibernate关于RIA
相关话题的讨论汇总
话题: session话题: sfsb话题: bean话题: state话题: web
进入Java版参与讨论
1 (共1页)
g*****g
发帖数: 34805
1
跟把session state放在前端比如web session的比。
A**o
发帖数: 1550
2
我没用过

【在 g*****g 的大作中提到】
: 跟把session state放在前端比如web session的比。
s******e
发帖数: 493
3
for web application, it is useless.
But in the situation where you may not have web consumer, for example,
desktop application. it can be a choice for session state.
theoratically, if you have both web and desktop consumer, and use SFSB as
your back end, you only need one set of logic to manage session. But in
practice, even in such case, scalability might be a bigger fish to fry. I
will be really suprised if any new app are trying to use SFSB.
F****n
发帖数: 3271
4
主要区别是statefull bean可以passivate把STATE存在DISK上。当然你可以在WEB SESSION里自己MANAGE STATE,但FRAMEWORK的作用不就是ABSTRACT这些零碎活么。
其实这个跟Hibernate和EJB的关系一样,实际应用中真正有比较有用的是Persistent
Session State Management, 但SUN非要捆绑它的distributed application model, 就变成了现在
的stateful bean.

【在 g*****g 的大作中提到】
: 跟把session state放在前端比如web session的比。
A**o
发帖数: 1550
5
能在展开来讲讲么?这个PSSM有啥好处?

SESSION里自己MANAGE STATE,但FRAMEWORK的作用不就是ABSTRACT这些零碎活么。
就变成了现在

【在 F****n 的大作中提到】
: 主要区别是statefull bean可以passivate把STATE存在DISK上。当然你可以在WEB SESSION里自己MANAGE STATE,但FRAMEWORK的作用不就是ABSTRACT这些零碎活么。
: 其实这个跟Hibernate和EJB的关系一样,实际应用中真正有比较有用的是Persistent
: Session State Management, 但SUN非要捆绑它的distributed application model, 就变成了现在
: 的stateful bean.

t*******e
发帖数: 684
6
SFSB的methods都是synchronized,能防止concurrent ajax requests导致的data
corruptions.
t*******e
发帖数: 684
7
passivate把STATE存在DISK上, 就是intelligent memory management, 防止memory
outage.
A**o
发帖数: 1550
8
So session bean is much like the sticky session on web tier?
t*******e
发帖数: 684
9
sticky session is a concept in load balancing. It has nothing to do with
SFSB. The naming of SFSB is kind confusing, because the scope and lifetime
of a SFSB instance is determined by the caller, while in most case the
caller is scoped to session.
z****e
发帖数: 54598
10
基本上处于被淘汰的边缘
曾经有人论证过,完全没有必要使用stateful session bean,用web session就可以了
没有必要把state储存在服务器端的服务器端,这么说不知道你能理解否
EJB里面的破烂还不只这一个,entity bean也接近被淘汰的边缘
EJB里面真正有价值的是其它两个stateless session bean和messagedriven bean

【在 g*****g 的大作中提到】
: 跟把session state放在前端比如web session的比。
相关主题
vaadinFlex,Silverlight or Cappuccino/Sproutcore/JavascriptMVC?
有经验的同志谈谈JDO吧?本菜对EJB一问
Questions on EJB3 Persistence/HibernateFront End Developer / UI designer - Charlotte, NC - contract to hire
进入Java版参与讨论
z****e
发帖数: 54598
11
在这个前提下我也会专门写一个server给desktop application
也不会尝试着直接访问EJB,太危险了
一般我会尝试着利用web server,就像applet做的那样

【在 s******e 的大作中提到】
: for web application, it is useless.
: But in the situation where you may not have web consumer, for example,
: desktop application. it can be a choice for session state.
: theoratically, if you have both web and desktop consumer, and use SFSB as
: your back end, you only need one set of logic to manage session. But in
: practice, even in such case, scalability might be a bigger fish to fry. I
: will be really suprised if any new app are trying to use SFSB.

F****n
发帖数: 3271
12
为什么没有必要把STATE存在SERVER上, 特别是现在做RIA, PERSISTENT SESSION非常有
用吧。

【在 z****e 的大作中提到】
: 基本上处于被淘汰的边缘
: 曾经有人论证过,完全没有必要使用stateful session bean,用web session就可以了
: 没有必要把state储存在服务器端的服务器端,这么说不知道你能理解否
: EJB里面的破烂还不只这一个,entity bean也接近被淘汰的边缘
: EJB里面真正有价值的是其它两个stateless session bean和messagedriven bean

z****e
发帖数: 54598
13
有必要,但是没有必要用到stateful session bean而已
用web session就可以了,这个也是server端的东西

【在 F****n 的大作中提到】
: 为什么没有必要把STATE存在SERVER上, 特别是现在做RIA, PERSISTENT SESSION非常有
: 用吧。

g*****g
发帖数: 34805
14
I think you can also let your fat client to call servlet and
you are pretty much returning a different view. One html and
one raw data.

【在 s******e 的大作中提到】
: for web application, it is useless.
: But in the situation where you may not have web consumer, for example,
: desktop application. it can be a choice for session state.
: theoratically, if you have both web and desktop consumer, and use SFSB as
: your back end, you only need one set of logic to manage session. But in
: practice, even in such case, scalability might be a bigger fish to fry. I
: will be really suprised if any new app are trying to use SFSB.

s******n
发帖数: 876
15
你们对于session这个*词*的理解有误吧.
不一定是web session或者user session之类的.
session bean是泛指非persistent的scope.
可以对应到java servlet的application scope.
比方说各版当前在线人数. 没EJB可以用memcached
等distributed datastructure
s******e
发帖数: 493
16
directly calling ejb is not necessarily more dangerous than indirectly
calling it via servlet. Security by nature is not married with either of
them.
For desktop application, it is more common that you want object graph rather
than html, xml, or plain string (including fancy string object JSON). since
EJB is based on rmi, it is a nature fit for such scenario. Adding another
servlet layer will only cause you problem.
Actually since day one people were arguing how to handle the session states,
bas
F****n
发帖数: 3271
17

rather
since
states,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
That's the itching part that annoyed me most. People in Sun (and sometimes
IBM) are obsessed with pattern / framework, but why not just offer some
straightforward tools (like Hibernate) first and let application developers
decide how to use it.

【在 s******e 的大作中提到】
: directly calling ejb is not necessarily more dangerous than indirectly
: calling it via servlet. Security by nature is not married with either of
: them.
: For desktop application, it is more common that you want object graph rather
: than html, xml, or plain string (including fancy string object JSON). since
: EJB is based on rmi, it is a nature fit for such scenario. Adding another
: servlet layer will only cause you problem.
: Actually since day one people were arguing how to handle the session states,
: bas

d*****d
发帖数: 180
18
transaction scope
b*****t
发帖数: 1276
19
distributed transaction with state,
but hardly can find a use case, may be ATM
1 (共1页)
进入Java版参与讨论
相关主题
关于RIA做Java web development 一定要 struts + spring + hibernate 吗
Java笔试题分享-EJBvaadin
一个关于GWT的问题有经验的同志谈谈JDO吧?
关于Message Driven Bean的问题。Questions on EJB3 Persistence/Hibernate
简单的EJB问题Flex,Silverlight or Cappuccino/Sproutcore/JavascriptMVC?
请问一个问题本菜对EJB一问
关于EJB开发的几个问题Front End Developer / UI designer - Charlotte, NC - contract to hire
java servlet httpsession问题求教EJB ConnectionFactory issue
相关话题的讨论汇总
话题: session话题: sfsb话题: bean话题: state话题: web