Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Search Stardeveloper.com
Stardeveloper RSS Feed
Newsletter
Enter your email address below to be informed every time a new article is posted at Stardeveloper.com:

You can follow Faisal Khan on Twitter
Article Categories
.NET  .NET
  ASP (16)
  ASP.NET (41)
  ADO (16)
  ADO.NET (10)
  COM (6)
  Web Services (4)
  C# (1)
  VB.NET (3)
  IIS (2)

J2EE  J2EE
  JSP (15)
  Servlets (9)
  Web Services (1)
  EJB (4)
  JDBC (4)
  E-Commerce (1)
  J2ME (1)
  Products (1)
  Applets (1)
  Patterns (1)
Log In
UserName Or Email:

Password:

Auto-Login:

Miscellaneous Links
  Submit Article

Hosted by Securewebs.com
 
Home : J2EE : EJB : An Introduction to Enterprise JavaBeans
 

Developers developing these application servers spend lot of time in making sure that if for some reason a server crashes, other servers should take over and not only take over but they should also be able to maintain the system in a stable state and complete any transactions which the failed application server might have been in the middle of committing or rolling back. Now whether you agree or not, all of this takes lot of money and hard work on the part of application server vendors.

Now depending on the requirements of your organization or company you may or may not be requiring such great level of services. If your organization's business processes span hundreds or thousands of different computers and servers then you will do yourself lot of good if you get yourself good application servers, database applications and best of all good J2EE developers. But on the other hand if your organization is really small one but still wants to use EJBs due to future scalability requirements then there are quite a few EJB application servers from free and open source to the ones which are fast but still their license fees are quite low.

Examples of application servers which are popular in large organizations include BEA Web Logic, IBM Web Sphere and Oracle 9i Application Server. While those for small organizations include JBoss and Orion Application Server.

Now to answer the second point that the EJB based system are complex to develop and maintain. I think people who raise this issue are probably those who have little experience in building and maintaining EJB systems or are too scared to learn EJBs in the first place. To be honest, after the availability of new and advanced editors, architecting, building, deploying and maintaining EJB based J2EE systems is a fun.

After the rising standard of UML to model business processes, it has become quite easy to architect business systems. There are UML modeling tools available like Rational Rose and Together Control Center which not only allow you to architect J2EE systems using UML but also allow you to build and deploy complete J2EE applications using graphical user interface. Their code editors are so nice that you only type the name of the object and it's methods and properties appear on the screen. They also offer this kind of code editors for JSP pages as well.

To sum up, you should use complete EJB based J2EE system when you need scalability and portability in your system. Developing and using EJBs is fun and to me there is no reason why you should stay away from them. The best anyone can do is to offer them to you at a cost you can afford, now it is up to you to make use of them.

Summary :
In this article we learned that EJBs are distributed, network aware, secure and scalable components which adhere to given EJB specification. Adhering to this specification means that EJBs will be able to run on a long list of application servers on a wide variety of platforms without change. EJBs are thus portable not only acorss platforms but across application servers.

We learned that there are different system level services provided to us built-in by the EJB container. The EJBs make use of them. We also learned that EJB's offer their services to different types of clients including Java based JSP and GUI windowed applications to non-Java COM based applications.

We learned that there are 3 types of EJBs and each one of them is responsible for a specific task. Session beans are responsible for maintaining logic, entity beans represent data and message-driven beans provide asynchronous event based response to JMS messages.

In the end we had a pretty long discussion on what points people not in favor of using EJBs raise and why we should use EJBs. We also learned that there are wide variety of application servers from free and open source to the ones with high license fees are available. There are accompanying IDEs for developing J2EE applications using wizards and graphical tools to aid in their quick development. The industry standard of UML for modeling business processes alleviates the complexity of architecting J2EE based systems.

Developers developing these application servers spend lot of time in making sure that if for some reason a server crashes, other servers should take over and not only take over but they should also be able to maintain the system in a stable state and complete any transactions which the failed application server might have been in the middle of committing or rolling back. Now whether you agree or not, all of this takes lot of money and hard work on the part of application server vendors.

Now depending on the requirements of your organization or company you may or may not be requiring such great level of services. If your organization's business processes span hundreds or thousands of different computers and servers then you will do yourself lot of good if you get yourself good application servers, database applications and best of all good J2EE developers. But on the other hand if your organization is really small one but still wants to use EJBs due to future scalability requirements then there are quite a few EJB application servers from free and open source to the ones which are fast but still their license fees are quite low.

Examples of application servers which are popular in large organizations include BEA Web Logic, IBM Web Sphere and Oracle 9i Application Server. While those for small organizations include JBoss and Orion Application Server.

Now to answer the second point that the EJB based system are complex to develop and maintain. I think people who raise this issue are probably those who have little experience in building and maintaining EJB systems or are too scared to learn EJBs in the first place. To be honest, after the availability of new and advanced editors, architecting, building, deploying and maintaining EJB based J2EE systems is a fun.

After the rising standard of UML to model business processes, it has become quite easy to architect business systems. There are UML modeling tools available like Rational Rose and Together Control Center which not only allow you to architect J2EE systems using UML but also allow you to build and deploy complete J2EE applications using graphical user interface. Their code editors are so nice that you only type the name of the object and it's methods and properties appear on the screen. They also offer this kind of code editors for JSP pages as well.

To sum up, you should use complete EJB based J2EE system when you need scalability and portability in your system. Developing and using EJBs is fun and to me there is no reason why you should stay away from them. The best anyone can do is to offer them to you at a cost you can afford, now it is up to you to make use of them.

Summary :
In this article we learned that EJBs are distributed, network aware, secure and scalable components which adhere to given EJB specification. Adhering to this specification means that EJBs will be able to run on a long list of application servers on a wide variety of platforms without change. EJBs are thus portable not only acorss platforms but across application servers.

We learned that there are different system level services provided to us built-in by the EJB container. The EJBs make use of them. We also learned that EJB's offer their services to different types of clients including Java based JSP and GUI windowed applications to non-Java COM based applications.

We learned that there are 3 types of EJBs and each one of them is responsible for a specific task. Session beans are responsible for maintaining logic, entity beans represent data and message-driven beans provide asynchronous event based response to JMS messages.

In the end we had a pretty long discussion on what points people not in favor of using EJBs raise and why we should use EJBs. We also learned that there are wide variety of application servers from free and open source to the ones with high license fees are available. There are accompanying IDEs for developing J2EE applications using wizards and graphical tools to aid in their quick development. The industry standard of UML for modeling business processes alleviates the complexity of architecting J2EE based systems.


Previous ( 1 Gone )( No Further Pages )

See all comments and questions (post-ad) posted for this tutorial.


Related Articles
  1. Building your first Enterprise JavaBean
  2. Reading and Parsing XML Files with Enterprise JavaBeans
  3. EJB 2.1 Kick Start : Implementing a Solution Using EJB 2.1

Comments/Questions ( Threads: 9, Comments: 11 )
    Contains 1 or more replies by the Author of this Article.
    Contains 1 or more replies by Faisal Khan.

  1. nothing just about above notes
  2. CMP/EJB
  3. Not able to Migrate EJB and RMI into .Net
  4. j2ee/ rmi
  5. Unable to run firstEJB.jsp
  6. Unable to locate some files as given in ur document and run firstEJB.jsp ( 1 Reply )
  7. Hello Sir
  8. J2EE/ejb ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  9. ejb

Post Comments/Questions

In order to post questions/comments, you must be logged-in. If you are not a member yet, then signup, otherwise login. Once you login then come back to this page and you'll see a form right here which will allow you to post comments/questions.

Please note, one of the benefits of signing up is to be notified immediately by email everytime you receive a reply to the thread you have subscribed to.

 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.