Monday, April 16, 2012

What is an Enterprise Java Bean EJB and benefits of EJB

What is Enterprise Java Beans ( EJB ):

EJB is written in Java programming language and it is server side component that encapsulates the business logic of an java application from customers. Business logic code is managed in EJB that fulfills the purpose of the java applications. For example, in an eCommerce web application, the enterprise java beans might implement the business logic in methods called checkAvailableItem and orderProduct.

Benefits of Enterprise Java Beans EJB

EJB technology enables rapid and simplified the process of distributed, transactional, secure and portable java desktop applications development and Java ee web applications development because
  • EJB container provides System level services to enterprise java beans.
  • EJB developer just focus on business logic and on solving business problems.
  • Because business logic lies in EJB, so Front end developer can focus on the presentation of client interface.
  • The client developer does not have to code the routines that implement business rules or access databases. As a result, clients side has less codes which is  particularly important for clients that run on small devices.
  • Java Beans are portable components which enable the java application assembler to build new applications from existing java beans.
  • EJB is a standard API due to which applications build on EJB can run on any complaint Java EE web application server.

Types of Enterprise Java Beans:

There are two main types of  EJBs
1- Session Beans
2- Message Driven Beans

1- Session Beans

A session bean encapsulates business logic that can be invoked programmatically by a client over local, remote, or web service client views. A session bean is not persistent, means its data is not saved to a database. EJB Session Beans has three types which are

Stateful  Session Bean

In stateful session bean, the state of an object consists of the values of its instance variables. In a stateful session bean, the instance variables represent the state of a unique client / bean session.

Stateless Session Bean

In EJB stateless session bean conversational state is not maintained with client. When a client invokes the methods of a stateless bean, the bean’s instance variables may contain a state specific to that client but only for the duration of the invocation.

Single tone Session Bean

A singleton session bean is instantiated once per application and exists for the whole lifecycle of the java application. A single enterprise bean instance is shared across all the applications clients and it is concurrently accessed by clients

2- Message Driven Bean (MDB)

Message Driven Beans ( MDBs ) also known as Message Beans. Message Driven Beans are business objects whose execution is triggered by messages instead of by method calls.

When to Use Enterprise Java Beans EJB

EJB can be used in any java application which are simple or complicated. Java applications can be developed with out EJB. Now answer to question " when to use EJB" is that  EJB should be used if your application has any of the following requirements.
  • For Scalable Java Applications: The application must be scalable. To accommodate a growing number of users, you may need to distribute an application’s components across multiple machines. Not only can the enterprise beans of an application run on different machines, but also their location will remain transparent to the clients.
  • For Transactional java applications:  In application transactions must ensure data integrity. Enterprise java beans support transactions, the mechanisms that manage the concurrent access of shared objects.
  • Java Application with different Client like Desktop, Web, Mobile etc: The java application will have a variety of clients. With only a few lines of code, remote EJB clients can easily locate enterprise java beans. These clients can be thin, various, and numerous.
Find below slides to learn more about Enterprise Java Beans.


63 comments:

  1. very informative

    ReplyDelete
    Replies
    1. Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

      Delete
    2. Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training

      Hibernate Online Training Hibernate Online Training Spring Online Training Spring Online Training Spring Batch Training Online Spring Batch Training Online

      Delete
  2. there is also another type of bean entity bean

    ReplyDelete
  3. Thanks for your informative article on Java. It is most popular and reliable software development platform for creating mobile application.

    ReplyDelete
  4. I have learned much from your post. I would definitely bookmark your site to be updated with your upcoming articles. Great job! So much information.

    ReplyDelete

  5. Nice blog, here I had an opportunity to learn something new in my interested domain about java bean benefits. I have an expectation about your future post so please keep updates.
    JAVA Training in Chennai

    ReplyDelete
  6. Your posts is really helpful for me.Thanks for your wonderful post. I am very happy to read your post.
    Android Training in chennai | Android Training chennai | Android course in chennai | Android course chennai

    ReplyDelete
  7. Thanks for sharing this great article..Its really nice and useful for us..Website Design Companies Bangalore | Web Designing Bangalore

    ReplyDelete
  8. Hi, This is Jaman from Chennai. I have read your blog and I got some knowledgeable information through this blog. Really useful blog. Keep update your blog.
    regards,
    iOS Training in Chennai | Informatica Training in Chennai

    ReplyDelete
  9. The information you have given here are most worthy for me. I have implemented in my training program as well, thanks for sharing.

    Hadoop Training Chennai
    Hadoop Training in Chennai

    ReplyDelete
  10. The information you have deliver here is really useful to make my knowledge good. Thanks for your heavenly post. It is truly supportive for us and I have accumulated some essential data from this blog.
    Regards,
    Informatica training institute in Chennai|Best Informatica Training Institute In Chennai|Informatica training in chennai

    ReplyDelete
  11. There are lots of information about latest technology and how to get trained in them, like Best Hadoop Training In Chennai in Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies Hadoop Training in Chennai By the way you are running a great blog. Thanks for sharing this blogs..

    ReplyDelete
  12. I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    SalesForce Training in Chennai

    ReplyDelete
  13. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    Unix Training In Chennai

    ReplyDelete
  14. This information is impressive..I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic
    Android Training In Chennai In Chennai

    ReplyDelete
  15. SAP Training in Chennai
    This post is really nice and informative. The explanation given is really comprehensive and informative..

    ReplyDelete
  16. Oracle Training in chennai
    Thanks for sharing such a great information..Its really nice and informative..

    ReplyDelete
  17. Selenium Training in Chennai
    Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..

    ReplyDelete
  18. Data warehousing Training in Chennai
    I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly..

    ReplyDelete
  19. Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
    Websphere Training in Chennai

    ReplyDelete
  20. Oracle DBA Training in Chennai
    Thanks for sharing this informative blog. I did Oracle DBA Certification in Greens Technology at Adyar. This is really useful for me to make a bright career..

    ReplyDelete
  21. This is really an awesome article. Thank you for sharing this.It is worth reading for everyone. Visit us:
    Oracle Training in Chennai

    ReplyDelete
  22. very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
    Oracle DBA Training in Chennai

    ReplyDelete
  23. great article!!!!!This is very importent information for us.I like all content and information.I have read it.You know more about this please visit again.
    Oracle RAC Training in Chennai

    ReplyDelete
  24. Wonderful tips, very helpful well explained. Your post is definitely incredible. I will refer this to my friend.
    SalesForce Training in Chennai

    ReplyDelete
  25. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
    Java Training in Chennai

    ReplyDelete
  26. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
    PHP Training in Chennai

    ReplyDelete
  27. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.Nice article i was really impressed by seeing this article, it was very interesting and it is very useful for me..
    Android Training in Chennai

    ReplyDelete
  28. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
    SAP Training in Chennai

    ReplyDelete
  29. Excellent information with unique content and it is very useful to know about the information based on blogs.
    Hadoop Training in Chennai

    ReplyDelete

  30. Excellent Post, I welcome your interest about to post blogs. It will help many of them to update their skills in their interesting field.
    Regards,
    ccna course in Chennai|ccna training in Chennai

    ReplyDelete
  31. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
    Oracle Training In Chennai

    ReplyDelete
  32. I am reading ur post from the beginning, it was so interesting to read & i feel thanks to you for posting such a good blog, keep updates regularly.Best Hadoop Training Institute In Chennai

    ReplyDelete
  33. Your blog is really useful for me.
    Thanks for sharing this informative blog. Keep update your blog.
    Regards,

    Regards,
    CCNA Training in Chennai | CCNA Training Institute in Chennai | Best CCNA Training in Chennai

    ReplyDelete
  34. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    cloud computing training in chennai | cloud computing courses in chennai

    ReplyDelete
  35. • Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision.
    android Training in Chennai



    ReplyDelete
  36. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    sas training in chennai

    ReplyDelete
  37. Great article. Glad to find your blog. Thanks for sharing.
    java training in chennai

    ReplyDelete
  38. Well somehow I got to read lots of articles on your blog. It’s amazing how interesting it is for me to visit you very often
    Web development Company in India Company | Web development Company Bangalore
    Web Development Company in Bangalore | Responsive Web development

    ReplyDelete
  39. perfect explanation about java programming .its very useful.thanks for your valuable information.java training in chennai | java training in velachery

    ReplyDelete
  40. Congratulations guys, quality information you have given!!!..Its really useful blog. Thanks for sharing this useful information
    java training institutes in chennai | java j2ee training institutes in velachery

    ReplyDelete
  41. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  42. This blog contain Java Bean EJB and benefits of EJB. I gather lot of information to this blog. I got some of crispy information in this blog.


    Android Training in Chennai

    ReplyDelete
  43. Thanks for sharing the wonderful information.. I read your blob completely its very nice and useful. I gather lot of information to this blog.Thanks for sharing..


    Core Java Online Training

    ReplyDelete
  44. We share the java bean benignant of EJB. EJB is depend on the architecture of any specific platform, proprietary protocol, or middle ware infrastructure. It benefits of EJB Java encode developers can create complex applications by focusing on business logic rather than environmental and transaction issues. Thanks him, I like our article.
    Hadoop Training in Chennai
    Hadoop Training Institute in Chennai

    ReplyDelete
  45. I have read your blog and i got a very useful and knowledgeable information from your blog.You have done a great job . If anyone want Java Training in Chennai, Please visit our page

    Core Java Online Training

    ReplyDelete
  46. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  47. i have learnt so much from your post .And i liked it very much .its is very beneficial for me. Thank you so much .

    ReplyDelete
  48. Thanks a lot! You made a new blog entry to answer my question; I really appreciate your time and effort.
    java training in chennai |
    java training institutes in chennai

    ReplyDelete
  49. Hi learn so much detail about webbuilding.But your post is really amazing.you share more detail about websbuilding.Thanks for sharing.keep sharing more blogs.

    White Label Website Builder

    ReplyDelete
  50. Helpful post.. After reading this post i got more useful information about java and thank you for sharing..

    hadoop training institute in chennai velachery | big data training institute in chennai velachery

    ReplyDelete
  51. I have read your blog and i got a very useful and knowledgeable information from your blog.You have done a great job . Want to build your website
    White Label Website Builder

    ReplyDelete
  52. Your information about Java is useful for me to know more technical information. Really very informative post you shared here. Keep sharing this type of informative blog. If anyone wants to become a Java professional... Java Training in Chennai | Selenium Training in Chennai

    ReplyDelete
  53. This comment has been removed by the author.

    ReplyDelete
  54. nice post
    Omkarsoft Application Development solutions focus on building enterprise applications which reflect the changing work environment.
    Enterprise Software Applications

    ReplyDelete

Please enter relevant question and information.