1

My company has tomcat 7 as distributed environement. I'd like to get JSF2 and CDI working together on tomcat 7. This is possible with not a lot of surprises as described here: http://www.theserverside.com/tutorial/Working-with-CDI-and-JSF-20-on-Tomcat-7-Configuring-Weld

My problem is about transaction, without Java EE 3 solutions comes to me:

  1. Do it by hand : em.getTransaction().begin() ...
  2. Use CDI interceptor made by my self or ones like CODI http://matthiaswessendorf.wordpress.com/2010/11/20/enterprise-java-without-ejbs-but-with-cdi-and-myfaces-codi/
  3. Use spring transaction but as far as I know there is a problem between JSR 299 & 330 and it needs some glue to work : http://matthiaswessendorf.wordpress.com/2010/05/06/using-cdi-scopes-with-spring-3/

So where would you go if you were me? CODI seems nice to me.

thx

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
bodtx
  • 590
  • 9
  • 29

2 Answers2

3

DeltaSpike :) Though if you're looking for something outside of the Apache Incubator, CODI will work well.

LightGuard
  • 5,298
  • 19
  • 19
  • 1
    Deltaspike user here. We have it in production and it's great. Afaik the released Deltaspike modules are production ready but the interfaces etc may still change. However that is really only on the positive side imo (i.e works well now might get better :) – Karl Kildén Jan 09 '13 at 09:16
  • 1
    Yeah, until 1.0 we reserve the ability to change public APIs, but in the past year I think that's only happened once. – LightGuard Jan 09 '13 at 16:15
1

Change to Google Guice like me : )

For latest project I use JSF2 + Primefaces + Google Guice + EclipseLink

This solution make code clean easy and ready to make unit test. (with TestNG)

Peerapat A
  • 420
  • 4
  • 13