由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - About Hibernate
相关主题
Hibernate的优势具体体现在哪里?hibernate性能问题
Does EJB specification require the use of other eRe: Need help with EJB
大家都是搞技术的Re: 推荐推荐
请问一个问题有经验的同志谈谈JDO吧?
Java,EJB的performanceJDBC vs Application Server
EJB2 Question考SCEA归来
Java EE 习题 1Questions on EJB3 Persistence/Hibernate
问一个design的傻问题.Net developer doing Java
相关话题的讨论汇总
话题: hibernate话题: jdbc话题: mapping话题: about
进入Java版参与讨论
1 (共1页)
d****s
发帖数: 30
1
I don't know why somebody are so confident with Hibernate.
I'd to admit it is famous in open source community. But
it is not a good architect in either academic or industry.
First of all, Hibernate is a light weight JDBC encapsulate
package, not ready for heavy loaded purpose
Second, Hibernate doesn't have its own transaction layer.
It relys on other transaction implementations, such as JTA
(you need set it in config file). By default it uses JDBC
Transaction. This makes Hibernate not a mission
m******t
发帖数: 2416
2

"Something is not ready for..." is a statement, not a fact.
What's the point for hibernate to reinvent the wheel with
JTA being the standard?
Who says you have to stick to the default? Is it obvious that
something is "default" because there is something else that
is "not default" but you can always change it to, depending
on your own needs?
Saying "by default something uses A, so it does not work when B"
is like saying "I usually drive to work, so I will never be able
to get to the hospital in

【在 d****s 的大作中提到】
: I don't know why somebody are so confident with Hibernate.
: I'd to admit it is famous in open source community. But
: it is not a good architect in either academic or industry.
: First of all, Hibernate is a light weight JDBC encapsulate
: package, not ready for heavy loaded purpose
: Second, Hibernate doesn't have its own transaction layer.
: It relys on other transaction implementations, such as JTA
: (you need set it in config file). By default it uses JDBC
: Transaction. This makes Hibernate not a mission

d****s
发帖数: 30
3

You call that "Support"? at that case you must
instantiate an instance of the persistent class itself and populate its
identifier properties before you can load(), you call it "Support"
What a joke.

【在 m******t 的大作中提到】
:
: "Something is not ready for..." is a statement, not a fact.
: What's the point for hibernate to reinvent the wheel with
: JTA being the standard?
: Who says you have to stick to the default? Is it obvious that
: something is "default" because there is something else that
: is "not default" but you can always change it to, depending
: on your own needs?
: Saying "by default something uses A, so it does not work when B"
: is like saying "I usually drive to work, so I will never be able

m******t
发帖数: 2416
4

Looks like we finally learned to check out the documentation first before
talking, eh?
A table without a surrogate key itself isn't the best practice in
data modeling to begin with. Now if you have a legacy schema like this
that you have to map to a hierarchy of objects, and here's how hibernate
proposes to support it (a couple of alternative approaches). Maybe you
can come up with a better way to support this? For example, how would
you handle this in entity bean? BMP then handwriting JDBC

【在 d****s 的大作中提到】
:
: You call that "Support"? at that case you must
: instantiate an instance of the persistent class itself and populate its
: identifier properties before you can load(), you call it "Support"
: What a joke.

c*****s
发帖数: 214
5
你的发言总是这样,说一些没有根据的结论。你如果想说服别人什么就要拿出事实,方案
,数据,对比或者连接。
好的软件不是powerful,而是simple, clean。"Hibernate doesn't have its own
transaction layer"只能显示你对软件设计的理解肤浅。
hibernate是OR Mapping工具,理想的OR Mapping工具应该只做Mapping, 提供简单的接口
使用别的caching,datasource, transaction, failover... 要集成别的JTA,当然要在
配置文件里设置。如果你个工具自己偷偷摸摸提供自己transaction实现不让我知道,我
是无论如何不会去用它的。
缓冲,failover这种都是一个道理。hibernate的CacheProvider可以配置,默认用ehcach
e。觉得ehcache不好就换呗,谁都不好用就自己写呗。failover, cluster和OR Mapping
没有直接关系。一个OR Mapping工具泛得着去提供最好的缓存和failover机制吗?
想做cluster

【在 d****s 的大作中提到】
: I don't know why somebody are so confident with Hibernate.
: I'd to admit it is famous in open source community. But
: it is not a good architect in either academic or industry.
: First of all, Hibernate is a light weight JDBC encapsulate
: package, not ready for heavy loaded purpose
: Second, Hibernate doesn't have its own transaction layer.
: It relys on other transaction implementations, such as JTA
: (you need set it in config file). By default it uses JDBC
: Transaction. This makes Hibernate not a mission

d****s
发帖数: 30
6





I don't think you have real large scale engineering experience skills either.
People need a solution, not a set of hacking tools. This is the reason
why Hibernate is not popular in industry.
缓冲,failover这种都是一个道理。hibernate的CacheProvider可以配置,默认用ehcach
Mapping
想做cluster,可以基于任何一种缓存,集成jgroup,写自己的CacheAdapter配到hiberna
I see. I guess you must be not only a OR mapping expert, also
multicasting/network guru, and a disaster reovering professional.
Once a tool offers us a set of clustering, failove

【在 c*****s 的大作中提到】
: 你的发言总是这样,说一些没有根据的结论。你如果想说服别人什么就要拿出事实,方案
: ,数据,对比或者连接。
: 好的软件不是powerful,而是simple, clean。"Hibernate doesn't have its own
: transaction layer"只能显示你对软件设计的理解肤浅。
: hibernate是OR Mapping工具,理想的OR Mapping工具应该只做Mapping, 提供简单的接口
: 使用别的caching,datasource, transaction, failover... 要集成别的JTA,当然要在
: 配置文件里设置。如果你个工具自己偷偷摸摸提供自己transaction实现不让我知道,我
: 是无论如何不会去用它的。
: 缓冲,failover这种都是一个道理。hibernate的CacheProvider可以配置,默认用ehcach
: e。觉得ehcache不好就换呗,谁都不好用就自己写呗。failover, cluster和OR Mapping

c*****s
发帖数: 214
7
听你意思好像所有的开放源码项目的创建者都是loser,所有用开放源码工具做项目的人
都是loser,hacker,他们都不如你能更清楚的看清这个世界。只有你才明白,这些工具
其实都是统统没有价值的。做项目有一个很聪明的方法,就是一个weblogic其实能搞定所
有问题。
关于我的工作经验,你错了。这个我不想多说,你也没有发言权。
关于"People need a solution, not a set of hacking
tools.",如果你把People改成Customer你多数情况下你是对的。但如果是指开发者,软
件提
供者,他们确实需要很多tools(但不是hacking tools)。这里既然是JAVA版,我假设大
家都是搞开发的人。你如果不是, 那你来错了地方。
我想这里只有你会认为写代码就意味着"start it from the skratch"。
你的逻辑也很怪,反对使用其他工具的理由是工具太多。
关于J2EE Application Server 在项目中的价值,我认为我比你清楚。
不同意见可以讨论,交流是提高的最有效方法,一般是很有价值的经历。
但我无法看到你在

【在 d****s 的大作中提到】
:
: 案
: 口
: 在
: 我
: I don't think you have real large scale engineering experience skills either.
: People need a solution, not a set of hacking tools. This is the reason
: why Hibernate is not popular in industry.
: 缓冲,failover这种都是一个道理。hibernate的CacheProvider可以配置,默认用ehcach
: Mapping

c**g
发帖数: 274
8
I am not a fan of Hibernater, but your first point and second
point are really not sound.
Are you saying JDBC is not ready for heavy loading? or a light
weight wrapper package is in general not ready for heavy loading?
Doesn't EJB itself also rely on JDBC as the underlying RDMS
access?
Talking about transaction, I doubt any framework/buzz tech
can do better than RDMS. As a matter of fact, mission critical
application existed long before 3/n-tier architecure born. Back
then, a lot of mission crit
L******y
发帖数: 275
9
来晚一步!原来这里有那么多Hibernate高手。
一直在做Hibernate MAPPING,不过过去都是去国内的Hibernate论坛看文章。
hibernate可以用来MAP没有PRIMARY KEY的表, 数据库视图也可以用。一般MAPPING有两
种方法,一种是根据OBJECT MODEL生成数据库的TABLE另外一种是根据ERD产生
POJO和XML。我们项目是用stateless session bean加Hibernate。

【在 d****s 的大作中提到】
: I don't know why somebody are so confident with Hibernate.
: I'd to admit it is famous in open source community. But
: it is not a good architect in either academic or industry.
: First of all, Hibernate is a light weight JDBC encapsulate
: package, not ready for heavy loaded purpose
: Second, Hibernate doesn't have its own transaction layer.
: It relys on other transaction implementations, such as JTA
: (you need set it in config file). By default it uses JDBC
: Transaction. This makes Hibernate not a mission

a*****a
发帖数: 1429
10


其实他说得不错。Hibernate支持Composite Key,但很像是workround。
这方面确实不大灵活。
另外用Session Bean加Hibernate倒是一个较好的方案。Hibernate的
Connection和Transaction都比较薄弱。用EJB Container,一来可以用
到比较好的Connection Pool,更重要的是CMT好得多。

【在 L******y 的大作中提到】
: 来晚一步!原来这里有那么多Hibernate高手。
: 一直在做Hibernate MAPPING,不过过去都是去国内的Hibernate论坛看文章。
: hibernate可以用来MAP没有PRIMARY KEY的表, 数据库视图也可以用。一般MAPPING有两
: 种方法,一种是根据OBJECT MODEL生成数据库的TABLE另外一种是根据ERD产生
: POJO和XML。我们项目是用stateless session bean加Hibernate。

a*****a
发帖数: 1429
11
看你这么说觉得你应该没有做过大设计。如果系统设计按照你这样的思路,
结果虽然未必不好,但风险大得很。关键是设计方案肯定过不了评审。因为
都是一些Workaround,这个在实际工程中很忌讳的.这点我同意donuts的说法。





缓冲,failover这种都是一个道理。hibernate的CacheProvider可以配置,默认用ehcach
Mapping
想做cluster,可以基于任何一种缓存,集成jgroup,写自己的CacheAdapter配到hiberna



【在 c*****s 的大作中提到】
: 你的发言总是这样,说一些没有根据的结论。你如果想说服别人什么就要拿出事实,方案
: ,数据,对比或者连接。
: 好的软件不是powerful,而是simple, clean。"Hibernate doesn't have its own
: transaction layer"只能显示你对软件设计的理解肤浅。
: hibernate是OR Mapping工具,理想的OR Mapping工具应该只做Mapping, 提供简单的接口
: 使用别的caching,datasource, transaction, failover... 要集成别的JTA,当然要在
: 配置文件里设置。如果你个工具自己偷偷摸摸提供自己transaction实现不让我知道,我
: 是无论如何不会去用它的。
: 缓冲,failover这种都是一个道理。hibernate的CacheProvider可以配置,默认用ehcach
: e。觉得ehcache不好就换呗,谁都不好用就自己写呗。failover, cluster和OR Mapping

a*****a
发帖数: 1429
12

"重型应用"直接使用JDBC确实是不够的,需要许多辅助环境.不过大多数
自称为heavy loading, mission critical的应用都并不那么heavy, critical。
Hibernate是没有问题的。
是的,无论是Entity Bean,或者Hibernate,都依赖于JDBC。但
他们还是提供了raw JDBC不能提供,或者你实现起来非常费时费力
的功能。
各有各的优势。更重要的是数据库本身提供的transaction并不足够。最简单
的例子:CMT支持function transaction,这多少属于Business Logic layer,
数据库就不可能做到。
如上所述。不能一概而论,也不能如此绝对。

【在 c**g 的大作中提到】
: I am not a fan of Hibernater, but your first point and second
: point are really not sound.
: Are you saying JDBC is not ready for heavy loading? or a light
: weight wrapper package is in general not ready for heavy loading?
: Doesn't EJB itself also rely on JDBC as the underlying RDMS
: access?
: Talking about transaction, I doubt any framework/buzz tech
: can do better than RDMS. As a matter of fact, mission critical
: application existed long before 3/n-tier architecure born. Back
: then, a lot of mission crit

a*****a
发帖数: 1429
13
有些事情不能太绝对。使用Hibernaet就要采用Hibernate的思维方式,
或者符合它的设计思路.我不觉得那些数据库的所谓限制是很不得了的
事情.比如说,Hibernate不能改PK的值。数据库却是允许你改。但从
Business Logic上来说,该了PK的值,那么原来的那个Object就不应该
还算是那个Object了。这是很自然的一件事情。
我同意你最大的一点就是关于Transaction。Hibernate确实弱点。但
如果和EJB Container一起用,采用Stateless Session Bean和CMT,
还是很不错的设计。比用Entity Bean也简单得多.

【在 d****s 的大作中提到】
: I don't know why somebody are so confident with Hibernate.
: I'd to admit it is famous in open source community. But
: it is not a good architect in either academic or industry.
: First of all, Hibernate is a light weight JDBC encapsulate
: package, not ready for heavy loaded purpose
: Second, Hibernate doesn't have its own transaction layer.
: It relys on other transaction implementations, such as JTA
: (you need set it in config file). By default it uses JDBC
: Transaction. This makes Hibernate not a mission

a*****a
发帖数: 1429
14
有些事情不能太绝对。使用Hibernaet就要采用Hibernate的思维方式,
或者符合它的设计思路.我不觉得那些数据库的所谓限制是很不得了的
事情.比如说,Hibernate不能改PK的值。数据库却是允许你改。但从
Business Logic上来说,该了PK的值,那么原来的那个Object就不应该
还算是那个Object了。这是很自然的一件事情。
我同意你最大的一点就是关于Transaction。Hibernate确实弱点。但
如果和EJB Container一起用,采用Stateless Session Bean和CMT,
还是很不错的设计。比用Entity Bean也简单得多.

【在 d****s 的大作中提到】
: I don't know why somebody are so confident with Hibernate.
: I'd to admit it is famous in open source community. But
: it is not a good architect in either academic or industry.
: First of all, Hibernate is a light weight JDBC encapsulate
: package, not ready for heavy loaded purpose
: Second, Hibernate doesn't have its own transaction layer.
: It relys on other transaction implementations, such as JTA
: (you need set it in config file). By default it uses JDBC
: Transaction. This makes Hibernate not a mission

1 (共1页)
进入Java版参与讨论
相关主题
.Net developer doing JavaJava,EJB的performance
Java EE vs. Core Java, 该选哪个呢?EJB2 Question
interview求助Java EE 习题 1
做Java web development 一定要 struts + spring + hibernate 吗问一个design的傻问题
Hibernate的优势具体体现在哪里?hibernate性能问题
Does EJB specification require the use of other eRe: Need help with EJB
大家都是搞技术的Re: 推荐推荐
请问一个问题有经验的同志谈谈JDO吧?
相关话题的讨论汇总
话题: hibernate话题: jdbc话题: mapping话题: about