1-4 Developing Applications for Oracle WebLogic Server
1.4.3 More Information on Web Application Modules
See the following documentation:
■
Section 3.3, Organizing Java EE Components in a Split Development Directory .
■
Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server
■
Programming JSP Tag Extensions for Oracle WebLogic Server
1.5 Enterprise JavaBean Modules
Enterprise JavaBeans EJBs beans are server-side Java modules that implement a business task or entity and are written according to the EJB specification. There are
three types of EJBs: session beans, entity beans, and message-driven beans.
Enterprise JavaBeans EJB 3.0 is a Java EE 5 technology for the development and deployment of component-based business applications. Although EJB 2.X is a
powerful and useful technology, the programming model was complex and confusing, requiring the creation of multiple Java files and deployment descriptors for even the
simplest EJB. This complexity hindered the wide adoption of EJBs.
Therefore, one of the central goals of version 3.0 of the EJB specification is to make it easier to program an EJB, in particular by reducing the number of required
programming artifacts and introducing a set of EJB-specific metadata annotations that make programming the bean file easier and more intuitive. Another goal of the EJB 3.0
specification was to standardize the persistence framework and reduce the complexity of the entity bean programming model and object-relational OR mapping model.
For more information on Enterprise JavaBeans 3.0, see Programming WebLogic Enterprise JavaBeans, Version 3.0 for Oracle WebLogic Server.
For more information on Enterprise JavaBeans 2.X, see Understanding Enterprise JavaBeans.
1.5.1 EJB Overview
Session beans execute a particular business task on behalf of a single client during a single session. Session beans can be stateful or stateless, but are not persistent; when a
client finishes with a session bean, the bean goes away.
Entity beans represent business objects in a data store, usually a relational database system. Persistence—loading and saving data—can be bean-managed or
container-managed. More than just an in-memory representation of a data object, entity beans have methods that model the behaviors of the business objects they
represent. Entity beans can be accessed concurrently by multiple clients and they are persistent by definition.
The container creates an instance of the message-driven bean or it assigns one from a pool to process the message. When the message is received in the JMS destination, the
message-driven bean assigns an instance of itself from a pool to process the message. Message-driven beans are not associated with any client. They simply handle
messages as they arrive.
1.5.2 EJBs and WebLogic Server
Java EE cleanly separates the development and deployment roles to ensure that modules are portable between EJB servers that support the EJB specification.
Deploying an EJB in WebLogic Server requires running the WebLogic Server appc
Overview of WebLogic Server Application Development 1-5
compiler to generate classes that enforce the EJB security, transaction, and life cycle policies. See
Section 4.2, Building Modules and Applications Using wlappc .
The Java EE-specified deployment descriptor, ejb-jar.xml, describes the enterprise beans packaged in an EJB application. It defines the beans types, names, and the
names of their home and remote interfaces and implementation classes. The ejb-jar.xml deployment descriptor defines security roles for the beans, and
transactional behaviors for the beans methods.
Additional deployment descriptors provide WebLogic-specific deployment information. A weblogic-cmp-rdbms-jar.xml deployment descriptor unique to
container-managed entity beans maps a bean to tables in a database. The weblogic-ejb-jar.xml deployment descriptor supplies additional information
specific to the WebLogic Server environment, such as JNDI bind names, clustering, and cache configuration.
1.6 Connector Modules