星期六 2004年07月03日
Seti@home and thinging
About two year ago, I have used several pc and my laptop computing seti for about one year, and finish computing 1982 units and need near 13 hours one unit.
Two months ago, I use another mail account to start new computing set units. and now the average time for one unit is less than 2 hours.
The hardware is evolving quickly than you can think. So as to the technique java related. The most attention two years ago maybe design pattern, mvc framework, EJB2.0 or so. Now it's very different, everyone is talking about POJO, IOC, Spring, AOP.
Will we chase new tech for ever? Will the J2EE fields too crowd? Will the client need so much tech?
七月 03, 2004 11:53 下午 GMT+08:00
Permalink
my cute girl(contain image)
难得的周六休息, 最近一直出差,终于有空陪可爱的女儿。一早就带她去家乐福,又带她去小区公园,它现在已经能区分电梯按钮的1楼和3楼(我们家在3楼)
七月 03, 2004 12:36 下午 GMT+08:00
Permalink
Never use hibernate JTATransaction implemention because it's wrong
Commonly, JTATransaction shall be used as
the following:
Lookup
UserTransaction and begin transaction
get Connection
from DS and do something and close the connection
get Connection
from DS and do something and close the connection
...
commit or
roolback
So, you can see only the connection as
opened after jtaTransaction started will be managed by the Transaction.
But In Hibernate, The Transaction is new by
a parameter Session.
JTATransaction(SessionImplementor session)
You can see the JTATransaction is based on
the session.
So if the session has already connected,
the connection can't been managed by the transaction.
So it is realy realy wrong.
The right flow to use JTATransaction
through hibernate shall like the following:
Lookup UserTransaction
and begin transaction
get hibernate session
and do something and flush
...
commit or rollback
So the better way is use cmt SessionBean.
七月 03, 2004 01:06 上午 GMT+08:00
Permalink