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, 开发者_StackOverflowhow 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.
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.
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?
精彩评论