Monday, April 25, 2016

Spring VS ejb

Plain transaction is complicate:

run function
if(error) rollback;

We have ejb to simplify the transaction code:

  • ejb has session bean, to simplify the transaction codes, can do declare service
  • But cannot run in Tomcat
  • ejb can run in jboss and weblogic
  • ejb is not POJO

Why Spring

  • Lite weight
  • Can run in Tomcat
  • Spring can take over the function of ejb's session bean, declare service
  • Spring can replace part functions of ejb
But ejb has much better performance on distributed system than Spring

No comments:

Post a Comment