For EJB3 or not?

I have an architecture script and would like to discuss to get your opinion.

I can choose between these two (this is a restriction imposed on me)

  • Use EJB3 + JPA - no Spring / Hibernate
  • POJO + JDBC - again no Spring / Hibernation

I have a number of web applications (intranet only) that need to be integrated. At the database level, there will be 3 to 4 oracle databases (and 40 to 50 tables per database). Some applications may interact with multiple databases for some queries. The number of simultaneous users will be less than 100. The user / audience for each application will vary from 10 to 6000 (max.).

All applications will be deployed on the same server, and it is very likely that the database and the server can be on the same machine.

Most use cases will be based on CRUD (some may offer a good domain model for ORM, while others may not), with some business processes, automatic tasks, etc. You may need to integrate with SAP for some applications in the future.

Do you think that EJB3 will make the application more scalable in this case or just add complexity? If I will develop using POJO, this application I do not want to add complexity without a good reason. I tried to lobby Spring and Hibernate, but did not succeed.

let me know if you need more information.

EDIT: I forgot to mention the application server. it was 7.

+3
source share
8 answers

, JPA , Hibernate . , , Hibernate - JPA. JPA , OpenJPA?

, , . ? , . , JavaEE- EJB3 JPA.

EJB3, EJB3 .

, Spring Hibernate, , iBatis, POJO JDBC.

+1

EJB JPA - ; , - . , Spring + Hibernate , JPA, (... err... Toplink, , -, Hibernate?)

POJO JDBC, Grails. .

+2

{POJO + JDBC, } {framework for peristence}. ( , , , EJB3/SLSB Spring , ).

, persistence (JPA Hibernate) , . JDBC - , .

JPA v Hibernate Spring v EJB3, , , .

+1

(Hibernate - JPA ), . - , EJB3/JPA, POJO/JDBC , , EJB3.

POJO/JDBC, , , Spring, . .

+1

EJB + JPA!

, - "" env, .. , , IBM Oracle - .

0

WAS 7 OpenJPA. Spring +

0

EJB3 + JPA . . - , java wise ( ).. spring 4 , , , . WAS 7.0, EJB + JPA.

Working with JPQL is much simpler and smarter for Java programmers. But; you cannot call stored procedures unless you are using JPA 2.1, which is only supported in WAS 8.5.

0
source

The answer is simple - If jboss / glassfish, use EJB3 if tomcat, use pure JPA or Hibernate or Spring data

EJB3 vs Hibernate? of course EJB3. You should know that EJB3 used hibernate under jboss, EJB3 used the eclipse link JPA for a glass chip.

0
source

Source: https://habr.com/ru/post/1712217/


All Articles