Web Services and J2EE - Roles: Development, Assembly, and Deployment
(Page 3 of 4 )
One of the most useful aspects of J2EE is the way the architecture was designed from the start with ordinary people in mind. Early Web systems were often created from many different technologies, so the developer had to be good at programming in multiple languages and systems as well as understand the network, the database connections, system administration, and so on. For example, many of the early dynamic Web technologies mixed HTML with the programming language in a single file. This meant that a graphic designer couldn't modify the look and feel without risking breaking the logic—with the result the programmer frequently did the layout and HTML/Web design, or spent valuable time cutting and pasting HTML into their code.
The J2EE model clearly separates roles such as Web programmer, business logic programmer, deployment engineer, and administrator. To achieve this separation, there are clear contracts between the components and the infrastructure. For example, JSPs allow the HTML and page design to be separate from the business logic.
There are two important roles: the assembler and the deployment engineer. Both are like systems integrators. Like a brick layer, the assembler pulls together a set of components to create an application. Then the deployment engineer comes and wires and connects everything, like an electrician and plumber rolled into one. The mortar, solder, and cabling that keep it all together are called deployment descriptors.
Deployment descriptors (DDs) are XML files that capture information about components and applications. They help resolve aspects left undefined by the programmer, such as resolving references, setting policies, and linking to other components.
The following snippet shows a sample DD for an EJB:
<?xml version="1.0"?>
<ejb-jar>
<description>Simple Application</description>
<display-name>Simple</display-name>
<enterprise-beans>
<session>
<ejb-name>StockQuote</ejb-name>
<home>com.skatestown.StockQHome</home>
<remote>com.skatestown.StockQ</remote>
<ejb-class>
com.skatestown.StockQHome
</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
As you'll see later, the same approach has been applied to the Web services support in J2EE 1.4, where a new DD—webservices.xml—has been added. This file is effectively the Java Standards version of the Axis WSDD file.
Next: Benefits of Using Web Services with J2EE >>
More Web Services Articles
More By Sams Publishing
|
This article is excerpted from the book Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 0672326418). Check it out today at your favorite bookstore. Buy this book now.
|
|