由买买提看人间百态

topics

全部话题 - 话题: ejb3
1 2 3 4 下页 末页 (共4页)
q*********a
发帖数: 340
1
来自主题: Java版 - hibernate和ejb3
如果用jboss完成一个简单的项目,这两个东西有什么本质的区别吗?
JBOSS只是一个web server,他内嵌了apache,like WebLogic, WebSphere.
EJB3和EJB2没有本质上的区别,EJB3的注释更先进了,
EJB3 include entity bean and session bean, and message bean
Hibernate只是一个数据映射而已,like entity bean.
Hibernate is one of several framework.
A**o
发帖数: 1550
2
来自主题: Java版 - hibernate和ejb3
用了一段时间的jboss ejb3,大致有这些感受:
1. jboss 4.x doesn't fully support ejb3 yet. you can't use annotations in
the servlet...
2. you can't use jpa to get a scaler value, such as select count(1) from
user; :( and what to do? jdbc? ehhh...
3. 1 to many and cascading operations are tricky. especially when you want
to update a list/set of children objects. no silver bullet here yet.
4. UUID seems to be better than auto-increament, but i'm not sure you really
want that for each table even if you have a unqiue
c**********y
发帖数: 15
3
来自主题: Java版 - when will ejb3 reach final release?
EJB3会消灭Hibernate不?
T*****e
发帖数: 361
4
I am using EJB3 Persistence through Hibernate. My entity classes are
annotated and packed in a jar file. It works.
I have two questions.
The first one is quite simple. Can I use simple classes (other than
entities) in EJB/QL? Example:
List addresses = entityManager.createNativeQuery(
"select u.address from user as u").listResults();
The above query seems fine. But how can I use the result? I've tried:
String address = (String) addresses.get(i);
but it doesnot' work.
The second questio
g*****g
发帖数: 34805
5
来自主题: Java版 - Spring 2.5 vs. EJB3.0
With new Spring 2.5 annotation. They now share about 90% of
functionalities and program paradigms. With Spring being more flexible,
powerful, but more verbose (still needs some XML and more configuration)
Spring is more friendly for test-driven approach as you don't need to run
the container for unit testing.
It's also said Spring may be a vendor for EJB3.1 and the gap would be
closed.
I am still disappointed at java web framework. We have more frameworks than
applications and we can't settle on
g*****g
发帖数: 34805
6
来自主题: Java版 - Spring 2.5 vs. EJB3.0
Yes, but it can be done in an embedded way. Although EJB3 can be embedded
for some implementation like jboss.
g*****g
发帖数: 34805
7
来自主题: Java版 - hibernate和ejb3
I think you mean JPA, hibernate is one implementation.
And EJB3 only supports JPA.
z****e
发帖数: 54598
8
来自主题: Java版 - hibernate和ejb3
其实没什么本质区别
你自己觉得哪个适合你的项目就用哪个
JAVA这么多框架规则,哪有可能那么清楚说得出谁好谁坏来的
个人感觉还是用hibernate吧,ejb3感觉还在进化中
还不太成熟,就是JSF一样,将来还会变,hibernate将来变的空间就小了
F****n
发帖数: 3271
9
来自主题: Java版 - hibernate和ejb3
Actually as goodbug pointed out early, Hibernate is not competing with EJB3,
as JPA is only a standard. EJB is basically useless and unnecessary unless
you really want to manage distributed transactions (which is such a big
assumption).
w******e
发帖数: 1038
10
来自主题: Java版 - hibernate和ejb3
Entity Bean is dead.
Hibernate gains more traction I think.
Even Terracotta http://www.terracotta.org/ has plugins for hibernate, don't think it has made one for EJB3.
I like hibernate very much, hibernate + lucene leads to quite powerful text
search, the best you can get in open source.
N***m
发帖数: 4460
11
freemarker那么简单的东西,看看就行了,
河ejb3不是一个层次的东西
z****e
发帖数: 54598
12
ejb3也很简单
现在大部分东西都很简单
学也没什么成本
躺在床上看看就会了
o*******m
发帖数: 154
13
申请CS Master当然是must,但是自己的学习也不能放松,老马讲的挺好的。
原创 - 尚学堂科技 - 马士兵老师]
JAVA自学之路 一:学会选择
[转载请注明出处:http://www.bjsxt.com/zixue/zixuezhilu_1.html]
为了就业,不少同学参加各种各样的培训。
决心做软件的,大多数人选的是java,或是.net,也有一些选择了手机、嵌入式、游戏
、3G、测试等。
那么究竟应该选择什么方向呢?
我的意见是,不要太过相信各种培训机构或是抢手文章的说法(包括我),当你要走向
社会的时候,就不要再把自己当成学生,不要把自己的将来交给别人,学会运用自己的
眼睛去观察,去了解这个世界吧。
每个培训机构都会宣传自己的好处,并不能说明大的趋势。
一些新闻文章很有可能是枪手写的,不必太过相信。
国外背景的教师和课程,未必适合你。
那么怎么才能确定自己将来的方向?如何才能从纷繁复杂、或真或假的数据世界中挖出
一条路?
我讲一个通过招聘网站的观察方法。
可以到各种招聘的网站上查询信息(可以到google上查询招聘的网站),例如:
http://www.51job.c... 阅读全帖
f******e
发帖数: 3
14
来自主题: Java版 - J2EE入门
I also feel j2ee becomes a pain in the ass when these many debatings
are involved. You got CMP, people felt it's too heavy weight and verbose
and then someone comes up with Hibernate, JDO.
And now EJB3.0 is debating with JDO2.0. It looks like EJB3.0 will be like
Hibernate. And then you get debate between EJB3 and Spring.
Sometimes I feel the nice thing about J2SE is its monoply. Suns told you
to get rid of AWT and go for swing, plain and simple. Although IBM will
come up with SWT, for most of ja
f******e
发帖数: 3
15
来自主题: Java版 - J2EE入门
I also feel j2ee becomes a pain in the ass when these many debatings
are involved. You got CMP, people felt it's too heavy weight and verbose
and then someone comes up with Hibernate, JDO.
And now EJB3.0 is debating with JDO2.0. It looks like EJB3.0 will be like
Hibernate. And then you get debate between EJB3 and Spring.
Sometimes I feel the nice thing about J2SE is its monoply. Suns told you
to get rid of AWT and go for swing, plain and simple. Although IBM will
come up with SWT, for most of ja
P*****f
发帖数: 2272
16
and is any application server release supporting EJB3.0?

what 's fundamental changes in EJB3?
Everybody is jumping on EJB3 bandwagon, and I don't think
many books are available, but there are many tutorials online,
you can start with Sun's JEE 1.5
I*******o
发帖数: 53
17
来自主题: Java版 - EJB的书
要做EJB2的东西了,同时还要考虑把现有EJB2 code转为EJB3的。。。
live system...
pain in a**啊。。。有没有什么书,
1/3讲EJB2,1/3讲EJB3,1/3讲EJB2-->EJB3的?LOL
g*****g
发帖数: 34805
18
来自主题: Java版 - j2ee web 方向的职业规划
Spring and hibernate grab the good parts out of ejb1.x and ejb2.x.
Namely IOC, AOP (declarative transaction, security) and ORM. Ejb, however,
had a poor implementation. Verbose, hard to test, can't run outside
of container. But you need to give some credit to ejb, the idea behind
it leads to the birth of spring.
Spring is meant to be the replacement with assembled services, thus
make it lighted-weighted and run everywhere.
You have pieces that resembles what an ejb container provides,
and you as... 阅读全帖
g*****g
发帖数: 34805
19
来自主题: Java版 - j2ee web 方向的职业规划
Spring and hibernate grab the good parts out of ejb1.x and ejb2.x.
Namely IOC, AOP (declarative transaction, security) and ORM. Ejb, however,
had a poor implementation. Verbose, hard to test, can't run outside
of container. But you need to give some credit to ejb, the idea behind
it leads to the birth of spring.
Spring is meant to be the replacement with assembled services, thus
make it lighted-weighted and run everywhere.
You have pieces that resembles what an ejb container provides,
and you as... 阅读全帖
k********e
发帖数: 368
20
搞技术的人就容易极端。其实很简单的问题搞得太复杂。
萝卜白菜,各有所爱。大家在纠结什么app server好,人家已经用dot net搞起新系统
了。so what?
小公司为了省钱,用开源的,因为系统小,用tomcat。 好选择
中型公司,有了些钱和数据,为了应付增加的流量和安全性能,开始用jboss。好
大型公司为了确保稳定和系统的连贯,维护,继续使用weblogic, websphere。他们不
在乎几十万的费用。你让他们改架构,就是找扁。好
google,amazon等巨型公司,市场上根本没有他们能用的系统,他们就自己开发。好
ejb还是spring? 新项目当然用spring,也有的公司用ejb3,因为ejb3和spring的差距
不大了,而且是标准。 老项目继续ejb,不重要的老项目有钱有人的时候可以改成
spring。
至于有人说为什么JEE不JBOSS,答案就是JBOSS就是JEE certified。
JTA也是JEE标准。 这些搞不清的话,需要搞清楚在讨论,省得浪费时间,误导观众。
EJB的好处是在10年以前。现在基本就是POJO了。 EJB3继续大行其道是因为他学... 阅读全帖
f*****g
发帖数: 31
21

Sorry I disagree with you again. I know what "modern
object container" you mean. But I think your declairation
of "almost all ... follow this pattern" is inaccurate.
Pre EJB3.0 containers, as not "modern containers", are
not using IoC. Yes they are not modern. But EJB3.0 containers,
shall have many other appoarches. First of all, session
beans will remain normal POJO instantiation mechnism,
no IoC will be used. Entity beans, with annotation definition,
may be or may not be set values with IoC.
P*****f
发帖数: 2272
22
what 's fundamental changes in EJB3?

Everybody is jumping on EJB3 bandwagon, and I don't think
many books are available, but there are many tutorials online,
you can start with Sun's JEE 1.5
g*****g
发帖数: 34805
23
来自主题: Java版 - EJB book
ejb is dead, kind of. Try spring instead.
ejb2.x is very wrong, dead. ejb3.0 is a good attempt but too
little too late, ejb3.1 is a new attempt trying to answer the
question nobody asks. I don't understand why they can't make ejb
an embeded component in servlet container.
b*****t
发帖数: 1276
24
来自主题: Java版 - EJB book
ejb3.0 is fine, will not die. if you like hibernate, then ejb3.0 is close to
it. there is no reason it will die.
I kind of feel spring lives in idea world, not sure how does it work in real
life large project. It's pretty hard to maintain that long xml.
t*******e
发帖数: 684
25
我指declarative programming,不是XML configuration。Object inheritance,
polymorphism使用在domain model上很好,business code可能还是越简单,越少
hierarchy才容易维护。EJB3和Spring都是这个宗旨,non-intrusive container,所以
EJB3和SpringBean都是POJO,理论上portability也好。不喜欢用XML的,可以用
annotations. Web framework是否是POJO可能不如business layer或DAO中那么重要。
本身web framework没有一个是perfect的,具体怎么用还是由requirement和developer
的knowledge base决定的。争论webframework在theserverside.com每次都是non-conclusive
discussions. 新的frameworks都不错,选择很大程度就是个个人喜好。
m******t
发帖数: 2416
26
来自主题: Java版 - Java,EJB的performance

I don't have first-hand experience with ejb3
so I can't really comment on it.
Although I think that the performance problem
of classic ejbs mostly comes from not the
wiring, but the invocation boundary - all
the marshalling/going over the wire/unmarshalling,
which probably hardly changed in ejb3.
It's not really that bad for stateless session
beans though, their API being very coarse
grained.
t*******e
发帖数: 684
27
来自主题: Java版 - Java,EJB的performance
EJB3还是可以的,从Spring那儿学了不少好的东西。EJB3.1 light weight EJB会更有点
意思.
S*********t
发帖数: 78
28
来自主题: Java版 - 谁来给简单的讲讲JAAS
I am using ejb3
it seems acegi does not support ejb3 .

配置
b******y
发帖数: 1684
29
来自主题: Java版 - j2ee without EJB
forgive my ignorance on spring...
i dont understand why spring is more popular than ejb3...
except that spring is far better than ejb2 and took the #1 place..
but isn't ejb3's annotation usage a lot better than spring's xml?
and not to mention vendor independence.
g*****g
发帖数: 34805
30
来自主题: Java版 - j2ee without EJB

This is largely due to that spring does it right first, (IoC, AOP,
POJO oriented, no do one thing with 3 classes), getting mature,
popular and adopted by many open source projects before ejb3 becomes
a spec. ejb3 is pretty much some good practices of spring and
hibernate, and some good features of RoR (convention over configuration),
and I am gonna give it credit for that.
Well, since spring 2.0 and especially after 2.5, you can configure most
spring components using only annotations too. So th
g*****g
发帖数: 34805
31
来自主题: Java版 - EJB 3 的前途怎么样?
ejb3.1 looks promising. And spring will likely be one
vendor for ejb3.1 lite.
t*******e
发帖数: 684
32
Do you see any ejb3.1 feature, which is missing from Spring 3?
I recalled that there will be 2 flavors of EJB3.1, complete and
lightweight.
z****e
发帖数: 54598
33
来自主题: Java版 - j2ee web 方向的职业规划

但那是ejb2.0时代的故事了
ejb3.0已经简化很多了
而且对于不同虚拟机的接口调用
spring还是用ejb那一套,rmi或者是ejb的remote接口
或者web service
但是ejb3.0以后版本开始逐渐把web service给接纳到ejb的规范中去了
其实我觉得ejb那一套并不复杂,我个人用得挺爽的
关键是看会不会,会了都不难,最难的是ejb1.0
ejb2.0比1.0容易,3.0比2.0容易
g*****g
发帖数: 34805
34
来自主题: Java版 - j2ee web 方向的职业规划
Although spring is proprietary, it's also open source with apache
license, so discontinued support is not really a concern. Someone
will just fork it.
Spring+Hibernate is more flexible and more powerful, with finer
control and a bigger set of API (e.g. Advanced AOP through aspectJ).
On the other hand, ejb3.1 is definitely more consise, has a lot of
convention over configuration learned from RoR.
I think ejb3.x is mature enough for most projects, so you can't go
wrong with either one. Personally... 阅读全帖
z****e
发帖数: 54598
35
来自主题: Java版 - j2ee web 方向的职业规划

但那是ejb2.0时代的故事了
ejb3.0已经简化很多了
而且对于不同虚拟机的接口调用
spring还是用ejb那一套,rmi或者是ejb的remote接口
或者web service
但是ejb3.0以后版本开始逐渐把web service给接纳到ejb的规范中去了
其实我觉得ejb那一套并不复杂,我个人用得挺爽的
关键是看会不会,会了都不难,最难的是ejb1.0
ejb2.0比1.0容易,3.0比2.0容易
g*****g
发帖数: 34805
36
来自主题: Java版 - j2ee web 方向的职业规划
Although spring is proprietary, it's also open source with apache
license, so discontinued support is not really a concern. Someone
will just fork it.
Spring+Hibernate is more flexible and more powerful, with finer
control and a bigger set of API (e.g. Advanced AOP through aspectJ).
On the other hand, ejb3.1 is definitely more consise, has a lot of
convention over configuration learned from RoR.
I think ejb3.x is mature enough for most projects, so you can't go
wrong with either one. Personally... 阅读全帖
e*****t
发帖数: 1005
37
同意好虫,ejb3不像过去了,已经相当好用了。可是对于很多企业,招人也主要是维护
当前系统,或者develop new features.所以ejb3相比之下还是没有那么popular了。

Spring/
both
the
e*****t
发帖数: 1005
38
同意好虫,ejb3不像过去了,已经相当好用了。可是对于很多企业,招人也主要是维护
当前系统,或者develop new features.所以ejb3相比之下还是没有那么popular了。

Spring/
both
the
a*******m
发帖数: 626
39
+1
ejb3向spring学了很多。

stereotype
heavy的就永远都heavy
ejb3.0以后也都是pojo了
要是websphere没有人用了
ibm的市值怎么爬上200b的?
z*******3
发帖数: 13709
40
来自主题: Java版 - 本菜对EJB一问
wikipedia上的例子很好,所以调用ejb的就是web层了
如果是persistence层的话,那应该有一层business层
Such an EJB can be used by a class in e.g. the web layer as follows:
@Named
@RequestScoped
public class CustomerBacking {
@EJB
private CustomerService customerService;
public String addCustomer() {
customerService.addCustomer(customer);
context.addMessage(...); // abbreviated for brevity
return "customer_overview";
}
}
越往后面变化越小
ejb干脆就干掉了hibernate之类的
直接变成api了
如果自己倒腾hibernate
还要搞定sessionfactory和session,... 阅读全帖
g*****g
发帖数: 34805
41
来自主题: Java版 - 本菜对EJB一问
ejb3 is a standard, hibernate implements ejb3 too. It has a big set of API
beyond the standard.
g*****g
发帖数: 34805
42
EJB3 was way later than Spring/hibernate. Websphere/Weblogic never recover
since that time. Today, Spring/Hibernate is actually more powerful than an
EJB3 solution, though the latter is arguably simpler.
The issue is that Websphere/Weblogic charges hefty fee, and it doesn't
perform as well as Tomcat. Other than rare case like two-phase commit, I don
't see the benefits of ejb servers at all.
Jetty is also being used a lot as an embedded server. This can be handy when
you are running a non-web s... 阅读全帖
g*****g
发帖数: 34805
43
来自主题: Programming版 - Goodbug你给个学java的roadmap吧
对。Spring的设计初衷就是个简化版的J2EE。到EJB3的时候EJB反过来抄Spring和
Hibernate。
而Spring也模块化越来越大,变成了一堆的类库。
从今天的角度来说,可以说Spring更强大更灵活更主流,反而EJB3更简单。
z****e
发帖数: 54598
44
来自主题: JobHunting版 - 挨踢热点过去二十年应该是这样的
ejb3之后基本上ejb就是spring了,倒是spring越来越难用
主要是文档越来越差,估计是vmware要赚钱,故意把文档弄差
jboss的文档也是,越来越以阅读
bea和ibm的全套用起来还是很舒服的
以前bea给客户写软件,很多consultant压根不懂ejb
就是画图,画完交差,搞定
ibm的clear case比git什么好用很多
不过都比不上juju,aws将来推广juju之后,ibm估计会遇到大麻烦
s*****r
发帖数: 43070
45
来自主题: JobHunting版 - 挨踢热点过去二十年应该是这样的
ejb3算是个进步,主要是J2EE的产品捆绑了太多垃圾,远没有tomcat+spring+jersey
/jetty+hibernate轻便好用。
J2EE不好的地方是比较傻瓜,俺面试过一些J2EE程序员,只会写写简单的API和SQL,一
问API是如何被支持的,参数如何赋值,立马歇菜。
g*****g
发帖数: 34805
46
spring, ejb3出现之后,大量的应用被部署到web container里,比如tomcat,
jetty。这些才是app server的大头。
m****o
发帖数: 837
47
我是IT民工。我来这个研究单位也才一年不到(但工作经验有很多年了),这个地方人事
关系很复杂,感觉同事,上下级之间都是互相不信任,互相堤防的。我的project
manager计算机知识很差,什么实际的忙也帮不上,就会在老板面前来虚的。平时经常
说谁谁干什么就是为了自己的job security。比如填个单位IT部门的申请移程序上服务
器表吧,他也会嘟囊麻烦,弄这个表就是因为那些人需要job security之类。我来了这
一年不到,在他这里听到的job security一词比我来之前加起来都多多了,给我的感觉
,他自己才是最在乎job security的人。也让我开始警惕自己的job security了。
前一阵子我刚独立完成一个web-based application,用的JAVA语言。现在一个新的项
目要开始了。由于一些原因吧,单位里两拨人马都想做这个项目。这个项目我的PM参与
开会都开了一两年了,所以定他是项目负责人。他很想让我参与进去做编程。但是老板
不同意,让我接手另外几个很急的小项目,给他分配了另一个程序员。那个程序员擅长
的是另一种语言,不是JAVA。
不知道怎么,我... 阅读全帖
z**********f
发帖数: 74
48
生物转CS,那楼主要多多努力了,尽早行动;俺当初生物PHD,读了两年差点把人读废
了,费尽千辛万苦转到Bioinfo,快毕业时找实习找工作,发现基本找不到,又费了点
时间学CS,写论文直接写了差不多大半年,很多东西都要自己从头开始学,此中辛苦不
经历的人是无法体会的;终于找到码工工作了,干活的能力还是大大不行,很多时候项
目做不出来的时候睡觉很多时候突然惊醒,向比自己小4~5岁的同事请教,遇到不nice
的被讥笑个面红耳赤。早上八点半起来就开始琢磨代码,晚上12点睡觉,几个月后终于
比较熟练了。知识面还是窄,很多时候人家探讨问题自己都不知道,还需要多努力。
一定要把Java学好,这个用的太多了,core Java的部分每天反复练,坚持写日志。如
果想做传统的web application,那么Java EE学几个框架,例如Spring整合Hibernate
,EJB3.0之类,不过这些东东配置文件调的人想吐;然后RIA前台技术学个AJAX,HTML5
,Flex之类,MVC搞搞熟;然后database稍微学点,简单的SQL会写,知道如何调SP之类
。如果想学移动平台app开发,感觉这个... 阅读全帖
z**********f
发帖数: 74
49
生物转CS,那楼主要多多努力了,尽早行动;俺当初生物PHD,读了两年差点把人读废
了,费尽千辛万苦转到Bioinfo,快毕业时找实习找工作,发现基本找不到,又费了点
时间学CS,写论文直接写了差不多大半年,很多东西都要自己从头开始学,此中辛苦不
经历的人是无法体会的;终于找到码工工作了,干活的能力还是大大不行,很多时候项
目做不出来的时候睡觉很多时候突然惊醒,向比自己小4~5岁的同事请教,遇到不nice
的被讥笑个面红耳赤。早上八点半起来就开始琢磨代码,晚上12点睡觉,几个月后终于
比较熟练了。知识面还是窄,很多时候人家探讨问题自己都不知道,还需要多努力。
一定要把Java学好,这个用的太多了,core Java的部分每天反复练,坚持写日志。如
果想做传统的web application,那么Java EE学几个框架,例如Spring整合Hibernate
,EJB3.0之类,不过这些东东配置文件调的人想吐;然后RIA前台技术学个AJAX,HTML5
,Flex之类,MVC搞搞熟;然后database稍微学点,简单的SQL会写,知道如何调SP之类
。如果想学移动平台app开发,感觉这个... 阅读全帖
d****s
发帖数: 30
50
来自主题: Java版 - 大家都是搞技术的

pattern.
experience,
developer
project.
new
Agree with you in most points, but not the last sentence. EJB3.0 container
will
not be mutual enough within 2 years. Go ahead with EJB 2.0.
1 2 3 4 下页 末页 (共4页)