Advertisment

Implementing SOA using Enterprise Java

author-image
CIOL Bureau
Updated On
New Update

BANGALORE, INDIA: Architecting enterprise solutions for service orientation is now a serious technical issue. Comprehending the enormity of the problem, orienting, (or reorienting) the application for services, choosing the right kind of technology for implementation, opting for the right kind of tools and platform, designing the right kind of components for services delivery (or availing), configuring optimally and deploying application for acceptable quality of service are some of the important factors that leads to the success of enterprise solution. We have designed this book to aptly cover all these factors using a pragmatic approach. We have provided all the necessary ingredients in a lucid format that helps in understanding of the technology – concepts to implementation, in three parts in this article - evolution, services and implementation.

Advertisment

Evolution

Initially, the mainframes provided "Centralized Model" architecture to manage business data and processes. The concept of software architecture started to evolve when enterprises and other businesses started adopting small and medium computers and networking them to share resources. The need for decoupling of the systems and software applications in smaller networked environments resulted in the emergence of the popular "Client / Server" architecture. Many of the architectures that evolved later were influenced by Clients and Servers. The evolution of "distributed" architectures may be considered as a sophisticated extension of Client / Server architecture. Clearly, the Internet and World Wide Web caused a shift in the nature and ways of business transactions taking place today. These challenges and opportunities have caused the architecture to be governed by non-functional requirements rather than that of functional requirements of the enterprises. Some of the important non-functional requirements that influence the architecture of modern day enterprise applications include performance, reliability, availability, and security.

The requirement of service-orientation for the enterprises first emerged with the advent of the Internet and World Wide Web.The IT world has since witnessed numerous paradigm shifts, as newer technologies such as XML and Java continuously impacted enterprise solution requirements. The business of “service delivery” started gaining momentum among the enterprises and their collaborators. However, the IT definition of the term “service” kept on deviating with that of the business definition, and this cohesion was crucial for the enterprises to remain competitive in the dynamically changing market conditions. Evolution of business oriented technologies such as Enterprise JavaBeans (EJB, JPA etc), as a part of J2EE technologies, on the one hand and the emergence of core constituents of web services such as SOAP, WSDL and UDDI, on the other, provided the opportunity to draft service definitions in alignment with the business requirements. The possibility of loosely composing of these services and binding them with the business process of the enterprise resulted in the arrival of Service Oriented Architecture.

Advertisment

Services and Service Orientation

Services and Services composition and delivering / availing the same, making it work as a part of the business process are the most important aspects of the services orientation challenge. Each of them will be dealt with briefly in the next sections.

Advertisment
 

Services  and Services Composition - The SOAP way

SOAP is a web service extension of eXtensible Markup Language (XML). XML is a very simple but very powerful protocol that promises many advantages to the enterprise processes for delivering service (or exchange information). SOAP efficiently piggybacks on Hypertext Transfer Protocol (HTTP), and, as a result, this protocol can help enterprises in exchange information on the Internet. Enormous success of SOAP is attributed to its simplicity elegant structure to envelope and carry the information. The SOAP message is designed to carry textual (plain text) as well as binary information. While the textual information can be enclosed in the body part of the SOAP message, the non-textual information may be carried as it's MIME attachment. A SOAP message can be exchanged between two communicating applications in a synchronous or asynchronous manner. A "synchronous mode" of SOAP message communication uses RPC style SOAP message while "asynchronous mode" of message communication uses Document style SOAP message. An enterprise solution may adopt either or both verities of message interchange pattern for realizing the service-orientation.

Advertisment

Services Definition and Description - The WSDL way

Web Services Description Language (WSDL) is an important part of the services definition part of SOA. WSDL, an extension of the XML provides an excellent combination of tags include a complete description of a service (or a set of services). The description of WSDL includes all related information required for any application, including "service name", number and types of "parameters" required for invoking the service, "return type", "location" of the server application etc is most important details of the description of the service. Services described this way are discoverable and amenable for invocation by other services.

Services Brokering - The UDDI way

Advertisment

Registries and repositories represents the information database about the business and its services in an XML format. These registries are essentially store the information about the all the businesses and industries participating in an effort to publish and/or avail all relevant information about the nature of business and the types of services as per popular taxonomies or other industrial classification schema. Universal Description, Discover and Integration (UDDI) specification is the XML flavour that helps in allowing organizations to store the business and services information in a specified classification format.  UDDI Registries allow the businesses to store most up to date information on the business. They essentially act as electronic "white pages", "yellow pages" or "green pages" . The registries may be private or public in nature. The private registries may be used by a set of companies that are in agreement to be partners / collaborators and they exchange information in over extranet. However, the public registries, on the other hand, allows to global participation from all types of industries interested in publishing relevant information for business promotion.

Business Process and Wiring the Services - The BPEL Way

Business process represents the work flow of a set of services in any enterprise. As the volume and activities of the enterprise increases, the dependencies on the business process and work flow of any enterprise increases, and they increase exponentially. Automating the business process and work flow in such organizations provides tremendous advantages to the enterprises and the need of such automation reflect the maturity of the enterprise and its ability to scale up and grow to the needs of the dynamic nature of business. Enterprises offering / availing the services in such scenarios have started feeling the compulsion of orienting (or reorienting) their services to the needs of newly emerging discipline in the global enterprise business scenario. Emerging standards such as WS-Business Process Execution Language (or WS-BPEL) for the process orchestration in the intranet scenarios and WS-Choreography Definition Language (or WS-CDL) in the collaborative scenarios over the internet, holds a lot of promise for these enterprises in implementation of the SOA.

Advertisment

 

SOA Implementation Technologies and Strategies

Advertisment

Web services route of implementing SOA has many crucial advantages over any other implementation strategies. There are two predominant solutions that help in web services implementation of SOA in the present day context - Microsoft’s .NET technologies and and Sun Microsystems’s Java Enterprise Edition technologies.

Microsoft's .NET Technologies

The .NET product suite from Microsoft enables enterprises to build enterprise-class web SOAs. The .NET product suite is largely a rewrite of Windows DNA,11 which constitutes Microsoft's previous platform constituents for developing enterprise applications. The new .NET Framework replaces these technologies and includes the web services layer.

Java Enterprise Edition Technologies

The Java 2 Platform, Enterprise Edition (J2EE) is a progression of the Java environment to the server side of the application software paradigm. J2EE, unlike Microsoft’s .NET, could be termed a defacto industry standard and has resulted in a large industry initiative called the Java Community Process (JCP). The participants of this community include the “who's who” in the IT and related industries IBM, Oracle, Nokia, Erricson, and so on. The spirit of Java as well as the other related technologies, such as J2EE, was to free the customers from the dependency of products and tools from vendors. In this work, we will focus on the Java EE driven SOA implementation technologies and strategies

The enterprise Java platform has evolved from the industry's need for a a secure, reliable, highly available and scalable platform for development and deployment of enterprise applications. The main focus of the new Java EE platform is the ease of development and to increase developer productivity with the goal of attracting even more developers to the platform as well as broadening the use of technologies within the platform. As a part of this evolution many other related technologies evolved to meet the growing needs of the java enterprise applications. These technologies are:

Web Tier Technologies

Servlets, Filters, JavaServer Pages (JSP), Java Server Faces Components (JSF) and Enterprise JavaBeans (EJB) components are the core ingredients of enterprise edition of Java. Servlets, JSP and JSF are the web tier components/frameworks, while EJBs are the business tier components. A variety of clients can communicate with these web components via the Internet/intranet environment. These web components, in turn, can perform specific tasks as per the requirement of the enterprise process. They also can communicate with the EJBs on the business tier. Message Driven Beans (MDB) could be deployed to communicate appropriately with the messaging middle ware of the enterprise network. Together, these components help in making the enterprise application building a simple process.

Business Tier Technologies

A key requirement for enterprise components is to persist or access data stored in relational databases. The new Java Persistence API (JPA) provides a powerful, standard object-relational mapping facility usable by any component in the Java EE platform. Entity EJBs are plain Java objects and they can be used in detached mode too, obviating the need for patterns such as Data Transfer Objects (DAO). Many object-oriented language features, such as inheritance and polymorphism, are supported by the mapping, resulting in more readable and maintainable domain object models. The JPA includes support for several advanced features which are particularly appropriate in an enterprise setting, such as named queries and optimistic locking. In addition to Java Persistence, the latest Enterprise JavaBeans specification defines a much simpler model for writing session EJBs and MDBs.

 

Web Services Supporting Technologies

The new Java Enterprise Edition platform includes an interoperable Web services stack. It comprises several well-integrated technologies such as Java API for XML Web Services (JAX-WS), Java API for XML Binding (JAXB), and SOAP with Attachments API for Java (SAAJ) etc. Web service endpoints can be defined as either web tier components or EJB components. The programming model is very similar in either case; compared to the past, there's been a great emphasis on simplicity, mostly obtained by the careful use of Java language annotations. Additionally, any component can act as a client of web services, often without requiring a deployment descriptor. For maximal interoperability, the web services stack in the Java EE platform supports several standards, including SOAP, WSDL, WS-I Basic Profile , WS-I Attachment Profile and the entirety of XML Schema. Finally, the Java API for XML Registries (JAXR) client API provides access to standard-compliant registries and repositories.

Integration and Enterprise Services Bus

Now comes the task of integrating the whole thing. An Enterprise Service Bus (ESB) is the latest buzz word in the SOA world. ESB is a technology that helps in simplifying the integration aspects of the services delivery for the enterprise. An ESB is essentially a "distributed middle ware" system used for promoting enterprise integration. Conceptually any ESB consists of a set of service containers, which integrate various types of IT assets (applications, protocols, databases). The containers are, in-turn,interconnected with a reliable "messaging bus". Service containers adapt IT assets to a standard services model, based on XML message exchange using standardized message exchange patterns. The ESB provides services for transforming and routing messages, as well as the ability to centrally administer the distributed system.

Summary

Web services specifications and technologies can be considered as the best route to address the services creation, composition, definition and other related aspects of Service Oriented Architecture. While there are many implementation technology choice are available, Microsoft’s .NET and Sun Microsystems’s Java Platform, Enterprise Edition can be considered as the most popular choices available for implementing the SOA. The new enterprise Java platform, Java EE, provides a host of APIs and libraries, such as JAX-WS, JAXB, JAXR, it is easier and quicker to implement SOA solutions for the enterprises.

References

1.Thomas Erl (2005). Service-Oriented Architecture (SOA): Concepts, Technology, and Design. Prentice Hall PTR

2.Paul Clements, Rick Kazman, Mark Klein (2002). Evaluating Software Architecture: Methods and Case Studies,  Addison Wesley.

3.Derek Krafing, Karl Banke, Dirk Salma (2004). Enterprise SOA: Service Oriented Architecture Best Practices. The Codd Series.

4.Eric Newcomer, Greg Lomow (2005). Understanding SOA with Web Services

5.B V Kumar, Prakash Narayan, Tony Ng, (2009) Implementing SOA Using Java EE, Addison Wesley

tech-news