由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - EJB2 Question
相关主题
EJB的书Re: EJB and its Future (Discussion welcomed)
怎么学习EJB比较好关于EJB开发的几个问题
EJB ConnectionFactory issuehibernate和ejb3
About Hibernate唉进了一家烂公司
大家都是搞技术的Java Regular Expression Question
请问一个问题return null or empty list/set/...
Java,EJB的performance1 quick interview question
Java EE 习题 1请教 class cast problem
相关话题的讨论汇总
话题: ejb2话题: question话题: errors话题: throw
进入Java版参与讨论
1 (共1页)
z**r
发帖数: 13
1
for stateless EJB, do you handle rollback manually,
or just throw runtimeexception?
g*****g
发帖数: 34805
2
I don't do ejb2 any more, but I think if you do cmp, you should just throw
exception and let the framework deals with it.

【在 z**r 的大作中提到】
: for stateless EJB, do you handle rollback manually,
: or just throw runtimeexception?

t*******e
发帖数: 684
3
The rules are the same across the board, no matter what technology you use. Runtime errors (system errors) cause transaction rollback automatically, checked exceptions (app errors) by default do NOT roll back transactions. But you may explicitly call or configure a txn roll back on application errors.
z**r
发帖数: 13
4
the tricky part i know is, if you throw a runtimeexception,
the container rolls back for you, and invalidates the bean instance.
when system is under heavy load, those beans would cause GC disater.

【在 g*****g 的大作中提到】
: I don't do ejb2 any more, but I think if you do cmp, you should just throw
: exception and let the framework deals with it.

1 (共1页)
进入Java版参与讨论
相关主题
请教 class cast problem大家都是搞技术的
what is your opinion in this case?请问一个问题
对 spring 的 exception 处理方式真是不适应Java,EJB的performance
How do I send cookies from a servlet?Java EE 习题 1
EJB的书Re: EJB and its Future (Discussion welcomed)
怎么学习EJB比较好关于EJB开发的几个问题
EJB ConnectionFactory issuehibernate和ejb3
About Hibernate唉进了一家烂公司
相关话题的讨论汇总
话题: ejb2话题: question话题: errors话题: throw