Question

What is the best approach or technologies for java web based applications in Spring , hibernate ,EJB 3.0 ,JPA ,Jboss . I want to make a project . What is the best combination of these ? Whether I use Spring+hibernate+JBOSS+JPA or Spring+hibernate+EJB3.0+JBOSS+JPA . Help me out here . I also want to use maven in my project .

Was it helpful?

Solution

This question is opinion based so I'm going to give you my opinion :).

Go for using Spring Boot. It boostraps your project with basic configurations based on what dependencies you have in your classpath (or imported with Maven) and what types of Spring beans you use.

For example

  • if you use Spring controllers in you app, it will detect it and deploy your app in an embedded Tomcat server
  • if you include the spring-boot-starter-data-jpa dependency it will automatically configure a DataSource to an in-memory database

Take a look at the reference documentation and take a look at the Starter POMS and read what default configurations it provides and how you can override them.

OTHER TIPS

Hibernate have to be used with JPA, JPA needs EntityManager like Hibernate, Toplink or iBiats, EJB3.0 other than JPA used for remote invocation so the question should be different, use Hibernate or other ORM framework "Hibernate the most used", and if you have remote invocation to use EJB, WS,REST, or SpringHTTPInvoke "and this is bigger question but as short answer { using EJB depends on the Application server to be used and its support to EJB 3.0 , and if you are going to use spring so using HTTPInvoke and REST are easy to be used} "

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top