Use spring and Hibernate with WebSphere Application server

Source: Internet
Author: User
Tags websphere application server

If you consider using Spring or Hibernate with Ibm®websphere®application server, this article will explain how to configure these frameworks for various WebSphere application server scenarios. This article is not an exhaustive review of any framework, but rather an important reference to help you successfully implement such scenarios. (Updates are made for the Spring Framework 2.5 and WebSphere application Server V7.) )

Introduction

The spring Framework (often called spring) is an open source project designed to make the j2ee™ environment more accessible. Spring provides a framework for simple Java™ objects that allow them to use the Java-EE container through wrapper classes and XML configurations. The goal of Spring is to provide significant benefits to these projects, improve their development efficiency and run-time performance while improving test coverage and application quality.

Hibernate is an open source persistence and query framework that provides the object-relational mapping of traditional Java objects (Plain old Java Object,pojo) to relational database tables, as well as data query and retrieval capabilities.

While many organizations are interested in understanding the benefits of using these frameworks, IBM wants to let customers who use these frameworks know that they can do this in a robust and reliable way through WebSphere application Server. This article describes how these frameworks work with WebSphere application Server, and describes best practices for a variety of use cases to help you start using Spring or Hibernate as soon as possible.

Using Spring

Spring is often described as a lightweight container environment, but it may be more appropriate to describe it as a framework for simplifying development. The Spring Framework was developed by INTERFACE21 based on the publication of the dependency injection design pattern published by Rod Johnson. Spring can be used in stand-alone applications or in conjunction with application servers. The main concept is the use of dependency injection and aspect-oriented programming to simplify and smooth the transition from development to testing to production.

One of the most common scenarios involving Spring is the use of simple Java Bean classes to configure and drive business logic. The spring document should provide sufficient information to build the application using the spring Bean, without providing any content that is specific to WebSphere. The following sections describe some of the usage scenarios for using Spring on the WebSphere application Server. The Spring application developed according to the recommendations of this article should be able to execute in a WebSphere application server or WebSphere Application Server network deployment environment without any problems.

In addition to being clear, the information provided in this article applies to WebSphere application Server versions 6.0.2.x, 6.1.x, and 7.0.x on all platforms.

Presentation Layer Considerations

This section describes considerations related to using Spring in the web-based presentation layer.

Web MVC Framework

The Spring Web MVC Framework has been an alternative framework for other frameworks for a long time. The Web MVC framework that is delivered, used, and supported directly by WebSphere application Server includes JavaServer Faces (JSF) and Struts. The spring document describes how to integrate Spring with these Web frameworks. Although WebSphere Application Server supports the use of any of the above MVC, IBM provides product support only for the framework that is included with the WebSphere application server.

Portlet MVC Framework

Spring also provides a Portlet MVC framework that mirrors the Spring Web MVC Framework, and in the WebSphere Portal V6.0 and WebSphere application Server V6.1 Portl The ET container runs. (For a sample set of Spring portlets, see Spring portlet MVC.) Running Portlets in the WebSphere application Server V6.1 portlet container requires the creation of additional WEB applications to define the layout and aggregation of portlets. Information about how to use the Portlet Aggregator Tag library is available from the WebSphere Application Server Information Center and the article Portlet container introduction. It is common practice to use JSF and portlets in conjunction with rendering. For information on how to combine Spring, Hibernate, JSF, and WebSphere portal, see Configuring Hibernate, Spring, Portlets, and openinses using the IBM WebSphere Portal Sionviewfilter.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.