Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Make the Right Decision with Our Side-by-Side Comparison of Spring and EJB 3.0 : Page 5

Are you trying to choose between Spring and EJB 3.0? If you are you know what a hard decision it can be. Explore the similarities and differences between two of the most popular Java technologies today and learn key distinctions in making a technological decision between the two.


advertisement
Wrapping It Up
In this article I've begun to compare the Spring application framework and the EJB 3.0 specification, focusing on support for persistence, transaction management, and statefulness. Interestingly both technologies address these issues well, and the commonalities underscore the validity of the comparison.

At this point I have illustrated some of the many similarities between Spring and EJB 3.0. The main differences observed have been state management, configurability, and extensibility.

If you are working with applications that are highly stateful then you may want to consider whether EJB 3.0 SFSBs might be a good solution. For highly conversational applications you may want to consider SEAM, which provides a very powerful solution for conversational interaction built on SFSBs and JSF.



Spring gives you more flexibility in many aspects of application development than EJB does—and as you've seen in this article, this is particularly true with regards to persistence and transaction providers. But the trade-off for this added flexibility is increased complexity in configuration. EJB 3.0 provides less flexibility but its tight technology stack, annotations-based configuration, and philosophy of configuration by exception make configuring EJB 3.0 applications quite simple. If flexibility is more important to you than a pre-defined approach then you certainly will want to consider Spring.

A final point on standardization: While Spring integrates many standards such as JTA, JDBC, and JMS it is not itself a Java standard. If standardization (and by extension vendor support, tooling, etc.) is important to your organization or application then you will want to consider EJB 3.0.

But luckily Spring and EJB 3.0 are not mutually exclusive choices. There are very powerful ways of integrating these two technologies to take advantage of their relative strengths and weaknesses. In part 2 in this series (coming soon) I will examine additional characteristics, including messaging, remoting, scheduling, dependency management, and intermediation. After the comparison is complete I will make some general observations that can assist in making a technical decision regarding Spring and EJB 3.0. And lastly, I will point out several strategies for integrating these technologies in order to take advantage of features of each technology.



Rod Coffin is an agile technologist at Semantra, helping to develop an innovative natural language ad hoc reporting platform. He has many years of experience mentoring teams on enterprise Java development and agile practices and has written several articles on a range of topics from Aspect-Oriented Programming to EJB 3.0. Rod is a frequent speaker at user groups and technology conferences and can be contacted via his home page.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap