Enterprise JavaBeans  PDF Print E-mail
Tag it:
Delicious
Furl it!
Digg
NewsVine
Reddit
YahooMyWeb
Technorati
Articles Reviews Java
Written by Jeff Scanlon   
Sunday, 03 January 2010

Enterprise JavaBeans, or EJBs, are a server-side component-based architecture that is used to build applications that are scalable, transactional, distributable, portable, and secure. If you think in terms of reusable code, then you will see why EJBs are so vital. EJBs are only concerned with the business logic of the application; the system logic is the requirement of the EJB container. EJB containers are basically application servers that provide you with a server platform to deploy your EJBs on.


They handle all the scalability, transactional, security, connection pools, and other system logic components, thus making your job as a developer much easier. Because EJBs are a standard, and application servers must implement the EJB specification, EJBs can be deployed on different application servers with very little configuration changes and almost no code changes. Therefore EJBs are very portable.


RMI, on the other hand, is great if you never really plan to have a very robust enterprise application. In order to make a robust RMI enterprise application, it would require much more work to write all the transaction, security, and connection pools that EJB containers provide. So, depending on your needs, you can decide which technology is best for your architectural requirements.


RMI is also involved in EJB development. EJBs are accessed via RMI, so all that you learned about RMI will apply nicely to EJB development. Several of the components you used in RMI you will also use in EJBs, like remote interfaces and remote  exceptions, but you won’t have to deal with complex system logic components like transaction support.


Just like RMI, EJB clients interact with interfaces that expose methods that they can use to communicate with the server. Therefore, clients never need access to the implementation code on the server in order to communicate and use its methods. EJBs also do not need to manage resources; they simply interact with  their container in order to obtain connections to external resources like databases. Developers can leverage these resources quickly and easily and do not need to worry about setting up connection pools, transaction support, or security restrictions. Those tasks fall on the administrator of the container and keep the EJB code itself portable.


User reviews

There are no user reviews for this item.

Add new review




Powered by jReviews

Last Updated ( Sunday, 24 January 2010 )
 
< Prev   Next >