Username:
Password:
Log me on automatically each visit
 

 
It is currently Wed Apr 23, 2014 9:11 am


Post a new topic Post a reply  [ 1 post ]   
Author Message
PostPosted: Sat Aug 28, 2010 7:03 pm 
Site Admin
User avatar

Joined: Sat Aug 02, 2008 8:00 am
Posts: 154
EJB stands for Enterprise Java Beans which is a Java enterprise technology that enables developers to create business logic and object on the application servers. EJB is part of the J2EE technologies and is implemented and adopted by most of the Java vendors such as IBM, Oracle, and Apache.
There are three types of EJBs

Entity Beans
An entity bean is a java server object that represents a record in the database. It enables the developer to deal with persistence as java objects rather than dealing with the JDBC connections and result sets. In EJB3 Entity beans are represented by the persistence API which uses ORM (Object Relation Mapping) to create Java objects that map to tables and database entities. This means that Java beans are going to be created to represent the data tables in the database and the mapping is going to be performed using an XML file called persistence.xml to map every field in the object to the appropriate field in the table.

Session Beans

Session beans enable the developer to create business logic that will reside on the server for access and reuse from applications residing either on the same server or other servers.
There are two kinds of session beans

Stateless Session Beans

This kind of sesson beans does not hold information regarding the state of conversation with the client application. A example of stateless session bean can be the send mail bean or the weather telling bean where no information regarding the conversation is being stored or relevant o the bean.

Statefull Session Bean

Unlike stateless session beans stateful session beans hold information regarding the conversation with the client. An example of stateful session bean is the shopping cart bean where the client will add a new item to the bean each time it calls the bean method.

Message Driven Beans

Message driven bans enable your application to receive messages and work in an asynchronous pattern. An example of message driven bean is the shop that sends a message to the warehouse to complete and order. When the warehouse receives the message the warehouse will perform the appropriate action.

In my next post I’ll show you how to create an entity bean using Eclipse EE and JBoss Application Server

_________________
Muhammad Safwat
The Java Code Admin

Top
OfflineProfileSend private message
 
Display posts from previous:  Sort by  
Post a new topic Post a reply  [ 1 post ] 

Who is online

Registered users: No registered users

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
cron