Announcement Announcement Module
Collapse
No announcement yet.
Using EJB with Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using EJB with Spring

    Hello ,

    A question from a newbie ,

    why do people prefer to use EJB with Spring Framework , As it seems that all the things can be done by the spring Framework itself.

    Thanks in advance.

  • #2
    EJB stateless session beans provide standards based remoting, transaction management and security. It fits well for communication between applications. Personally I like the container managed transactions that don't require any configuration and usually no annotations either.

    Spring on the other hand gives you great tools for application's internal wiring, database access etc. But my experiences about Spring remoting haven't been so great. Together these technologies work well if you use them for different purposes.

    Comment


    • #3
      Originally posted by olli View Post
      EJB stateless session beans provide standards based remoting, transaction management and security.
      As does Spring. Even standards-based remoting (e.g. RMI).

      Originally posted by olli View Post
      Personally I like the container managed transactions that don't require any configuration and usually no annotations either.
      I didn't experience significant overhead with Spring-based declarative transaction as well.

      Originally posted by olli View Post
      But my experiences about Spring remoting haven't been so great.
      Which problems did you encounter? I mostly used RMI-based communications and sometimes HTTP-Invoker without problems so far.

      Originally posted by olli View Post
      Together these technologies work well if you use them for different purposes.
      Agreed.

      From my own point of view it is rarely necessary to use EJBs and bind yourself to an JEE application server. Most of the time you can get away with Tomcat and Spring.

      Just my 2 cents,
      Andreas

      Comment

      Working...
      X