[jboss-user] [JBoss Seam] - Re: JDBC Transaction integration

flozanolopez do-not-reply at jboss.com
Tue Jan 2 17:19:49 EST 2007


"norman.richards at jboss.com" wrote : Yes, you'll find that JPA let's you do pretty much what you want. If not, you can hit the datasource.  You can't inject a datasource directly. You'd need to create an @Unwrap component to perform the actual datasource JNDI lookup.  Then you can directly inject it.  Or, you can use an EJB3 component and use the @Resource annotation to get the data source.   But, I'd recommend trying to use the JPA functionality.
  | 
  | Datasources are transactional and are aware of your JTA transaction.   You don't have to do ANYTHING to get this to work.  I would recommend using the TransactionalSeamPhaseListener and letting Seam manage the transactions to let Seam control the transaction boundaries. 
  | 
  | If all of your stuff is going to the same DB, I don't think you truly need XA.  But, if you do, have a look at the new jboss transaction manager. http://labs.jboss.com/portal/jbosstm.    (the old arjuna stuff)

Thankyou very much for such a deep answer, it's very helpful. I'll check all these topics shortly :)

Our transactions are all against the same database (if using the same datasource in JPA and in pure JDBC, I don't think we'll have any problem, right?). The only problem is JMS, but I guess it's also covered by what you said and by marking a given method @Transactional, all the JMS operations performed within the boundaries of that method become part of the same transaction.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997377#3997377

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997377



More information about the jboss-user mailing list