I’m developing java enterprise web application using EJB 3.1 and I wonder which technology to use on which MVC layer. I have ear, ejb(jar) and war projects.
-
Is it possible to use something other as persistence layer then JPA implementations (e.g. myBatis) and how? I would like to manage some more difficult queries on my own.
-
What framework to use in web project (war) except JSF or plain servlets?
-
I’m familiar with Spring, would it be possible to use Spring in web (war) projects and benefit from its controllers?
Can you explain which technologies are used to develop enterprise web applications?
Thanks.
The best combination would be to use what’s already there. JSF 2.0 is already one of the best MVC frameworks, so it would often be a first choice anyway.
When using EJB 3.1, this is almost always in combination with a Java EE implementation, so in that case JSF is already there and simply using it is a no-brainer.
The different technologies in the Java EE stack are made to work with each other, so a typical stack consisting of JSF + CDI + EJB + JPA is the most ideal combination and you’ll find the most support for this.
I personally don’t think there’s any place for Spring in an EJB/CDI stack. Those two technologies are direct competitors that solve the same problem in (slightly) different ways. Combining them will most likely only complicate your code.