Basic Spring Interaction with WebLogic Portalby Mark Meyer and Don Davis09/06/2006 AbstractBEA WebLogic Portal 8.1 provides a flexible, powerful framework for creating portal interfaces. The Spring Framework is a full-stack Java/Java EE application framework featuring, among other things, an inversion of control (IoC) container, simplified POJO development, and AOP functionality. The goal of this tutorial is to demonstrate how basic Spring functionality can be leveraged in a WebLogic Portal application. One use case focuses on page flows and Spring while the other use case focuses on backing files and Spring. In each use case, we show how the same Portal/portlet code is used to interact with different implementation objects accessed using the Spring framework. IntroductionBEA WebLogic Portal provides enterprise portal infrastructure for streamlined portal development. This includes a graphical environment for developing portals as well as browser-based assembly tools. The version used in this exercise is BEA WebLogic Portal 8.1 with Service Pack 6. The Spring Framework encourages a layered architecture that provides centralized configuration and wiring of application objects through its inversion of control container. While Spring provides a variety of abstraction layers and integrations, this example demonstrates only the core features of Spring. The version used is Spring Framework 1.2.8. For a basic introduction to Spring, see Better J2EEing with Spring (Dev2Dev, July 2005). Two use cases are considered in this article, both focusing on the core functionality provided by Spring. One case demonstrates using Spring features in WebLogic Portal page flows, while the other demonstrates using Spring features in WebLogic Portal backing files. This article looks at each use case and includes a description of how to implement them. Demonstration Application ArchitectureA demonstration application accompanies this article and consists of a one-page portal created using BEA WebLogic Workshop. It is a file-based portal with four portlets in a two-column layout, forming a simple matrix as shown in Figure 1.
Two of the portlets are instances of a page flow portlet while the other two portlets are instances that use a Java backing file. Each portlet has its own portlet preference of The four portlet instances form a simple matrix. One page flow portlet uses the The cases shown here take advantage of the same Spring application context, which gets created using a Spring This is the additional listener in <listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
By default, Spring looks for an application context configuration file named
|
Tutorial Tools Related Products Check out the products mentioned in this article:Related Technologies Related Articles Bookmark Tutorial
|