Server User Manual
Table Of Contents
- Developing Applications for J2EE™ Servers
- Contents
- Ch 1: Introduction
- Ch 2: Programming for the Java 2 Platform, Enterprise Edition
- Ch 3: Creating applications with J2EE technologies
- Ch 4: Configuring the target server settings
- Ch 5: Using JBuilder with Borland servers
- Configuring Borland servers in JBuilder
- Making the ORB available to JBuilder
- Configurations, partitions, partition services, and J2EE APIs
- Starting the configuration or server
- Remote deploying
- Remote debugging
- Web module workarounds
- Displaying the Borland Management Console in JBuilder
- International issues
- Borland servers and JDataStore 7.0
- Ch 6: Using JBuilder’s CORBA tools
- Ch 7: Using JBuilder with BEA WebLogic servers
- Ch 8: Using JBuilder with IBM WebSphere servers
- Ch 9: Using JBuilder with JBoss servers
- Ch 10: Using JBuilder with Tomcat
- Ch 11: Editing J2EE deployment descriptors
- Ch 12: Integrating with Enterprise Information Systems
- Ch 13: Building J2EE modules
- J2EE modules
- Setting module build properties
- Adding custom file types
- Sample build scenarios
- EJB JAR without any bean classes
- EJB JAR with custom files
- EJB JAR without EJB designer XML descriptors
- WAR with custom descriptor(s) in the WEB-INF directory
- WAR without any classes
- WAR with custom class filters
- WAR with custom file types
- EAR with custom files
- RAR with classes and dependencies
- Application client module with classes and dependencies
- Improving module build performance
- Index
8 Developing Applications for J2EE Servers
Why are J2EE applications desirable?
Benefits of the multi-tier model
The multi-tier approach adopted by the J2EE platform has several benefits:
■
It reduces the complexity of distributed development with a simplified architecture
and the sharing of the work load among roles.
The business logic of the application runs in the middle tier inside an Enterprise
JavaBean (EJB) container and/or on a web server. These containers and servers
can handle many of the difficult tasks for developers. For example, an EJB container
can handle transactions, instance pooling, and data persistence without requiring
the EJB programmer to write the logic to perform these tasks. A web server can
create and pool instances of servlet classes and handle multiple threads and socket
connections. Instead of writing the code to do these things, a member of the
development team specifies the desired behavior at deployment time.
Members of the development team play different roles. Each is a specialist in one or
more areas. For example, the content of an HTML page or stylesheet would likely
be created by a graphic designer or webmaster. A senior developer might be
responsible for the business logic of the application encapsulated within Enterprise
JavaBean components. A web developer might develop the user interface and
presentation logic using JavaServer Pages (JSPs) and servlets. An application
assembler takes the various components of the application and puts it all together,
often creating an Enterprise Archive (EAR) file and creating the deployment
descriptor that explains how the application is to be deployed. The application
deployer and administrator deploy the application. By partitioning the work this way,
each step of the development/deployment process is handled by someone skilled in
their area while no one has to be an expert in every area.
■
It is highly scalable, allowing the development of systems to meet many different
needs that can change quickly.
When demands on the system increase, the logic can be updated easily in one
place on the middle tier without having to load new logic on every client machine.
■
New applications can integrate well with existing information systems.
JDBC, a J2EE technology, is a Java API to SQL databases, permitting the access to
any type of tabular data that might exist in the enterprise. The Java Naming and
Directory Interface (JNDI) allows applications that use Java technology to access
enterprise naming and directory services. The J2EE Connector architecture gives
Java applications connections to heterogeneous legacy systems. The Java
Message Service (JMS) is the Java API for sending and receiving messages though
enterprise messaging systems. CORBA services are called using JavaIDL.
■
Security is enhanced.
J2EE technologies are designed with security in mind. For example, only users in
assigned roles can access certain methods in enterprise beans. Who can access
these methods isn’t coded in the enterprise beans themselves. Instead this
information is set in the enterprise beans’ deployment descriptors, which are used
by the deployer to establish their behavior after they are deployed. This type of
security is called declarative security.
For complex security requirements, however, J2EE also allows programmable
security. In these cases, the security logic is placed within the code itself.
■
Developers can choose from a variety of development tools, servers, and
components to develop the applications they need.
The development team can select the solutions that are best for their needs, without
becoming locked into the offerings of a single vendor.