WAS 6.1, Hibernate, Spring and transaction managmement configuration -


I am using websphere application server express v6.1 and I am writing an application that is a spring 2.0.7 Uses, Hibernate 3.5 My dataset is Oracle 10G.

I have 2 questions

  1. Which is the best transaction manager? Is Websphere or Hibernate?
  2. If IBM is answering then how do I configure it in spring configuration XML?

This is my current declaration for hibernate

  & lt; Bean id = "transaction manager" category = "org.springframework.orm.hibernate3.HibernateTransactionManager" & gt; & Lt; Property Name = "sessionFactory" ref = "rmsSessionFactory" /> & Lt; / Bean & gt;  

What does this look like for Websphere?

You should pip your transaction through JTA, even if you have a different implementation behind the scenario Using (Hibernate, webpage, weblogic, etc.) Ideally, it should look like this:

  & lt; Bean id = "transactionImpl" class = "org.springframework.transaction.jta.WebSphereTransactionManagerFactoryBean" /> & Lt; Bean id = "transaction manager" class = "org.springframework.transaction.jta.JtaTransactionManager" & gt;  

If you want to use Hibernate's Transaction Manager, just want to replace transactionImpl bean class for Hibernate. One of your basic questions.

For the manager who is better, I honestly can not think of any important reason to choose someone else. The only thing that I can think of can come into play if you have a clustered application server that shares the load, instead of being a failover, maybe the transactions can be shared between them? I do not know. If someone can think of me more then, feel free to correct me.

Edit: It seems that WebSphereTransactionManagerFactoryBean (which I used to use above) does not need to be used for Webserver 6.0 and beyond, and for JTA Should be used as a direct replacement. In the hibernation of your original example, instead of the transaction manager, use the WebSphereUowTransactionManager class. The Spring App Captures JNDI Tree Transaction Manager of the server, so you may have to set some assets to specify the yolk name.

WebSpace Transaction Manager can tell you that, among other things, transactions suspend, personally I will go with the App Manager's transaction manager, even if it is webpage or weblogic or glassfish or anything Ho.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -