Ayusman
Ayusman

Reputation: 8729

EJB equivalent in Spring+JPA+Hibernate architecture

We have a J2EE application that comprises of Spring+Struts+Hibernate+JPA, which also uses JBPM for workflow management.

If in future the JBPM (which is now part of the web application) engine starts to cause performance problem it is logical to move it out of the web app and put it as a standalone web app.

However, the JBPM engine also uses business entities. Now when we move the jbpm out, how would I expose the business entities?

I am aware of one solution with EJB, where I can expose the business rules/functions. Is there anything equivalent to EJB in the 'Spring+Hibernate+JPA' technology stack?

Or am I comparing apple and oranges.

Upvotes: 1

Views: 917

Answers (2)

sourcedelica
sourcedelica

Reputation: 24047

Yes, Spring offers a bunch of options to expose services.

Another alternative is to package your services and DAOs as a JAR and include that JAR in your JBPM instances' classpath.

Upvotes: 2

Lukas Eder
Lukas Eder

Reputation: 221220

I don't see a problem in adding an additional technology on your stack. JPA and EJB work well together. Since EJB 2.0 - style entity beans were replaced by JPA 2.0 (EJB 3.0) annotated entities, you might not run into major problems when adding session beans to access your business logic.

On the other hand, I'm sure spring also offers service interfaces instead of EJB session beans?

Upvotes: 1

Related Questions