Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
What is EJB 3.0? 
 

This very useful JEE 5.0 and EJB 3.0 Tutorial. You will learn about EJB 3.0 and its benefits.

 

What is EJB 3.0

                         

This lesson introduces you with EJB 3.0, which is being used extensively for developement of robust, scalable and secure applications.

What is EJB?

The Enterprise JavaBeans architecture or EJB for short is an architecture for the development and deployment of component-based robust, highly scalable business applications. These Applications are scalable, transactional, and multi-user secure. You can develop the application once and then deploy on any one of the JEE 5 complaint application server. There are many application servers are available both free and commercial. You can choose the server for development and deployment to suit your requirement and budget.

Benefits of EJB

EJB simplifies the development of small and large enterprise applications. The EJB container provides system-level services to enterprise beans, the bean developer can just concentrate on developing logic to solve business problems.

Types of EJB

  1. Session Bean
    Session is one of  the EJBs and it  represents a single client inside the Application Server. Stateless session is easy to develop and its efficient. As compare to entity beans session beans require few server resources.
     
    A session bean is similar to an interactive session and is not shared; it can have only one client, in the same way that an interactive session can have only one user. A session bean is not persistent and it is destroyed once the session terminates. 
     
    Session Bean Types
    Session Beans are of two types, Stateful Session Bean and Stateless Session Bean. 
     
    Stateless Session Beans
    A stateless session bean does not maintain a conversational state for the client. When a client invokes the method of a stateless bean, the bean's instance variables may contain a state, but only for the duration of the invocation.
     
    Because stateless session beans can support multiple clients, they can offer better scalability for applications that require large numbers of clients. Typically, an application requires fewer stateless session beans than stateful session beans to support the same number of clients.

    Stateful Session Beans
    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. Because the client interacts ("talks") with its bean, this state is often called the conversational state.
      
  2. Entity Bean
    Enity beans are persistence java objects, whose state can be saved into the database and later can it can be restored from Data store. Entity bean represents a row of the database table.
      
  3. Message Driven Bean
    Message Driven Bean is an enterprise bean that can be used by JEE applications to process the messages asynchronously. Message Driven Bean acts as message consumer and it receives JMS messages.

EJB 3.0 New Features

Following are the new features of EJB 3.0:

  1. Metadata Annotations
    EJB 3.0 extensively uses the metadata annotations to simplify the development of EJB 3.0 components. Now there is no need to write the deployment descriptor, but the deployment descriptor is still supported. Annotations can be overridden by deployment descriptor.
      
  2. Encapsulation of environmental dependencies
    EJB 3.0 now uses the annotations and dependency injection mechanism to encapsulation the environmental dependencies and JNDI access.
      
  3. More simplified EJB Specification
    EJB 3.0 is simplified Specification but still very powerful. Now there is no need to write home and component interfaces and implementing the javax.ejb.EnterpriseBean interface by EJB class. The EJB bean class is now pure java class, also know as POJO and the interface is know as POJI is simple Java interface. So, you can now developed your enterprise application very fast.
      
  4. Dependency Injection
    Now the API for lookup and usage of EJB environment and resource references has been simplified and dependency injection is used through metadata annotations.
      
  5. Simplification of Entity Persistence
    Persistence of the entity objects are now very simple through the introduction of Java Persistence API. A new API EntityManager API has been introduced is used create, find, remove and update entities. Now the domain objects supports inheritance and polymorphism.
      
  6. Callback interfaces 
    Elimination of the requirement for the implementation of callback interfaces.
     

                         

» View all related tutorials
Related Tags: java c api server orm form application io install system ejb tutorial uri int deploy ria log sun app technologies

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

4 comments so far (
post your own) View All Comments Latest 10 Comments:

Dear sir/ Madam,
i want to play audio file at java application without using applet .
i don't know how to play
so please help me
please send me java coding how to play audio file at java application.

Best regards,

Posted by tinmg on Friday, 10.10.08 @ 20:49pm | #81000

Maybe some sample codes will help some greens for this technology..

if your looking for a good book on ejb 3.0, i would greatly recommend Wiley's Mastering EJB 3.0 and EJB 3.0 in Action..

Also, learn directly EJB 3.0 instead of the previous versions.. EJB 3.0 is far different from those previous complex versions..

Posted by Louie Nohay on Wednesday, 06.11.08 @ 19:13pm | #63033

Hi! Now I'm researching Enterprise JavaBean version 3. Because I want to develop my knowledge.
Thanks.

Posted by Thin Norakseiha on Tuesday, 09.11.07 @ 09:49am | #26719

it is the one of the best introductory tutorial available

Posted by pradeep on Tuesday, 12.12.06 @ 20:59pm | #905

Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.