Você está na página 1de 8

EJB3

[Pic
k
Collected by Martin Nad
the
dat martin_m_nad@yahoo.com
e]
EjB3

Page 2
EjB3

EjB3

EJB3
Collected by martin nad

Page 3
EjB3

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

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
• 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

Page 4
EjB3

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.
• 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. • 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

EJB 3.0 NEW FEATURES


• Following are the new features of EJB 3.0: • 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. •
Encapsulation of environmental dependencies EJB 3.0 now
uses the annotations and dependency injection mechanism to

Page 5
EjB3

encapsulation the environmental dependencies and JNDI


access.

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.

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.

Page 6
EjB3

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.

CALLBACK INTERFACES
• Elimination of the requirement for the implementation of
callback interfaces.

DONATION

If you like this documentation and it was


helpful you can just donate 7$ by using this
https://www.paypal.com/cgi-bin/webscr?cmd=_s-
or use this to put
xclick&hosted_button_id=5814019
any amont you like to donate
https://www.paypal.com/cgi-bin/webscr?cmd=_s-
xclick&hosted_button_id=5813954 and if it doesn’t work copy
the link and put it on your browser.

if it doesn’t work copy the link and put it on your browser.

Page 7
EjB3

MY OTHER DOCUMENTATION

Properties in Java and Spring by Martin Nad


Spring and Cxf by Example
Jboss and Perm Gen Error
Using Ftp Service With Spring
JunIt
How to use Maven
ReFactoring
Maven and Custome Archetype
How to Write Effective Code

Page 8

Você também pode gostar