DEVELOPER: Open Source
Spring TimeBy Rich Schwerin
Oracle delivers solutions for Spring Framework-based applications.
Application developers typically face the challenge of creating very high-quality applications in a very short amount of time. And although caffeine plays a hallowed role in stereotypical application development, open source frameworks such as Spring offer a far more practical path to high-quality applications—without the jittery side effects.
"Spring is an open source framework designed to help developers construct high-quality applications faster by enforcing commonly used patterns of application design," explains Dan Hynes, Oracle principal product manager in the application server group. "Spring has become popular across the industry, and many developers use it with application servers such as Oracle Application Server. Oracle's support of Spring is evidence of our commitment to open source and to promoting developers' productivity with choice."
Oracle and Spring
The Spring Framework is backed by Interface21—the developers who created it—and the CEO of Interface21 has witnessed Oracle's ongoing support for Spring. "Since the beginning, Oracle has supported Spring in a variety of ways," says Rod Johnson, CEO of Interface21 and the father of the Spring Framework. "Through Spring's integration with products such as Oracle JDeveloper, TopLink Essentials, and Oracle Application Server, Oracle provides an end-to-end development and deployment solution for Spring-based application projects."
To better understand how Oracle and Spring work together, let's start with Oracle Containers for J2EE (OC4J), the core J2EE runtime component of Oracle Application Server, which provides related containers, APIs, and services and is a key component of Oracle Fusion Middleware.
"The Spring Framework has been fully certified on OC4J, assuring customers that Spring-based applications will perform as intended on the OC4J server," says Oracle's Hynes. "Integrating Spring into the OC4J runtime is made simple through the flexible OC4J class loading infrastructure, and developers can easily configure shared libraries to make Spring available to all applications across an Oracle Application Server cluster. Plus, the OC4J shared library framework even allows concurrent use of multiple Spring versions by applications.
"The current release, Oracle Containers for J2EE 10g Release 3 [10.1.3.1], provides an ideal runtime for Spring applications, due to Oracle's focus on key Java Platform, Enterprise Edition [Java EE] APIs, including the Java Persistence API [JPA], Java Transaction API [JTA], and Java Message Service [JMS]," Hynes adds.
This trio of APIs—JPA, which is used to create, remove, and query across lightweight Java objects; JTA, which specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system; and JMS, a messaging standard for application components' creating, sending, receiving, and reading of messages—are all complementary to Spring's development model, says Hynes, because they define and enforce common patterns and concepts, further improving developer productivity.
For developers, the primary benefit of how Oracle and Spring work together, he adds, is that Spring-based applications can be quickly and easily deployed into the latest Oracle Application Server release as is, without requiring any custom configuration. This is thanks in part to Oracle's stringent adherence to the latest standards and commitment to the Spring Framework. This commitment stems from an extensive history of close collaboration with Interface21.
TopLink Essentials and MBeans
Beginning with the Spring 1.2 release, the framework supports Oracle TopLink as a data access and persistence solution. Oracle continues to work closely with the Spring development team to assist with the JPA integration in Spring 2.0. The result is that the Spring 2.0 distribution includes and uses TopLink Essentials—the reference implementation of the JPA.
"Extending our partnership with Oracle and completing this technology integration is a significant addition to Spring, directly benefiting our open source community and corporate users," says Interface21's Johnson. "Oracle has been a huge supporter and leader of Java development for more than a decade, and we are delighted to be able to offer the JPA reference implementation as part of the Spring Framework 2.0 release."
So what does this integration mean for developers? It makes it easier, explains Oracle's Hynes, for developers to build next-generation applications by enabling them to access business data as Plain Old Java Objects (POJOs). "Previously, there was no standard persistence implementation, meaning that developers had to use proprietary persistence solutions," says Hynes. "Spring 2.0 comes with built-in support for the JPA, integrated with Spring's own, proven POJO programming model, and includes TopLink Essentials."
In addition, Spring supports dynamically exposing Spring beans as managed resources (MBeans) in a Java Management Extensions (JMX) environment. Oracle Application Server provides full support for JMX, including the capability to expose and access Spring MBeans directly within the Web-based Application Server Control Console. Once it is exposed, properties and methods ( operations , in JMX parlance) on a Spring bean (exposed as an MBean) can be set or invoked directly from the management console. OC4J's Enterprise JavaBeans (EJB) 3.0-compliant container ensures that EJB 3.0 session beans can interoperate with Spring beans.
"The business and development communities have clearly embraced Spring as a framework for building mission-critical applications, and as demand for flexibility and freedom of choice in application frameworks continues to grow, so undoubtedly will the popularity of Spring," says Hynes.
"Oracle remains committed to supporting this technology as a viable option for development of enterprise-quality solutions. Through strict adherence to the Java EE standards, the OC4J component of Oracle Fusion Middleware will continue to provide customers with an industry-leading runtime environment for deploying, hosting, and managing Spring-based applications," concludes Hynes.
"There's an active developer community using Oracle's technologies in conjunction with Spring, and Oracle provides resources via a dedicated center on Oracle Technology Network [OTN]," concludes Interface21's Johnson. "We welcome Oracle's engagement with open source and look forward to continued collaboration on Spring."
Rich Schwerin (email@example.com) is a product marketing manager with Oracle technology marketing.