Expand +



Get Hands-On Experience with the Newest Java Standard Running on SAP NetWeaver — Why SAP Is an Early Adopter of Java EE 5

by Karl Kessler | SAPinsider

January 1, 2007

by Karl Kessler, SAP AG SAPinsider - 2007 (Volume 8), January (Issue 1)

When SAP added a Java stack to the SAP NetWeaver platform back in 2004, it reflected SAP's strong commitment to open standards. Today, the Java stack in SAP NetWeaver 2004s is fully J2EE 1.3-compliant, in line with a majority of Java applications out there today.

But as the Java aficionado will attest, J2EE is evolving. Sun has introduced its newest Java specification — Java EE 5 (Java Platform, Enterprise Edition 5) — and SAP has wasted no time adopting this latest standard. In fact, SAP was one of the early adopters of Sun's new Java specification, and put it to the test in a preview of its Java EE 5-compliant SAP NetWeaver application server, showcased at the 2006 JavaOne conference (see sidebar).

Together, Java EE 5 and this new application server — SAP NetWeaver Application Server, Java EE 5 Edition — offer developers a number of key advantages:

  • Easier development of Java and Web projects

  • Enhanced Java support for Web services

  • Smaller footprint for installation

  • Optimized startup time

SAP Unveils Preview of Java EE 5-Compliant Server at JavaOne

At the May 2006 JavaOne conference, SAP, together with other vendors, showcased a preview of the new Java EE 5-compliant SAP NetWeaver application server, which contained a subset of Java EE 5 specifications. The JavaOne preview exemplified the server's powerful capabilities and its adoption of plug-ins that are widely accepted by the Java community.

The server was accompanied by SAP NetWeaver Developer Studio based on the open-source development tools from Eclipse 3. It featured Eclipse Web Tools Platform (WTP) plug-ins for Web and Java development rather than SAP's own proprietary tool solutions, highlighting the open-standards approach of the new application server.

Now, a fully compliant demo version, which has evolved beyond the JavaOne preview version to contain all Java EE 5 specifications, is available for download from the SAP Developer Network at The new server is the predecessor for the next release of SAP NetWeaver and is designed to integrate seamlessly with previous SAP NetWeaver installations.

Now SAP customers can see this new Java standard at work by downloading a demo of SAP's newest application server from the SAP Developer Network at (see "Additional Resources" at the end of this article). This new application server demo gives you a taste of what's to come in the upcoming major release of SAP NetWeaver.

So how will Java EE 5 and the new SAP NetWeaver application server simplify implementation and Web application development? Let's first look at some of the characteristics of the Java EE 5 standard and find out why SAP is moving toward a highly robust implementation of Java EE 5 in its own application server.

To download a demo version of the fully compliant SAP NetWeaver Application Server, Java EE 5 Edition, visit the SAP Developer Network, at

Why All the Excitement Around Java EE 5?

For developers, the Java EE 5 release is built for easier, more efficient development — especially for enterprise-scale Web development projects. It relies on Sun's Java Development Kit (JDK 5.0) and simplifies the architecture, as well as common coding and development tasks.

The use of JDK 5.0 introduces new efficiencies for developers. One of the most prominent is the ability to insert metadata into Java source code, making it easy for tools and frameworks to identify any structures in that code. This dramatically simplifies higher-level frameworks such as Enterprise JavaBeans (EJB) — you'll see this metadata in action in the application server later in this article. JDK 5.0 also comes with a number of other language enhancements to support enhanced type safety, more compact syntax, and greater scalability and performance (see "New Language Features" sidebar above).

New Language Features in Java EE 5

Here are a few of the most dramatic changes to the Java standard that developers will appreciate:

  • Extended support for generic data types that can be instantiated at compile time, a JDK 5.0 feature designed to reduce casting errors at run time

  • Autoboxing, a language enhancement that avoids code sequences in which you usually have to convert between a primitive data type and its object representation

  • Simplified FOR loops

  • C-style conventions for formatted standard input and output n New features for concurrency handling

  • Enumerated data types

  • Enhanced monitoring support

See for a detailed list of delta features. For the SAP developer community, review the forums, blogs, and other resources on Java EE 5 at (and see the "Additional Resources" section at the end of this article).

For developers, the Java EE 5 release is built for easier, more efficient development — especially for enterprise-scale Web development projects.

When it comes to simplifying Java development and architecture, the J2EE standard has undergone significant evolution. Previous versions — especially J2EE 1.3 — were widely used, but often lacked simplicity. Many basic J2EE 1.3 artifacts, such as session beans and entity beans, required a substantial amount of rather tedious coding.

In contrast, the Java EE 5 standard simplifies development tasks through:

  • The use of annotations (@) — This shorthand, along with defaults and reduction of complex deployment descriptors, allows for more concise code. Later in this article, you'll see an example of annotations in the demo server.

  • The use of a new standard for Enterprise JavaBeans development — EJB 3 is heavily based on annotations and the use of plain Java objects (POJOs), and it comes with a persistence API to leverage various persistence levels in your enterprise applications.

  • An enhanced and simplified Web services stack to enable SOA scenarios.

Java EE 5 also supports application development based on some new technologies: JavaServer Faces (JSF), Java Standard Tag Libraries (JSTLs), a rich Web UI experience based on asynchronous communication (AJAX), and more (see definitions in the "Key Terms" box). These technologies dramatically ease the construction of Web applications. For example, AJAX allows you to selectively update a Web page without redrawing the whole page — a common but rather cumbersome task due to the simple request/response model of the standard HTTP protocol.

Key Terms

JavaServer Faces (JSF) allows developers to create Web controls (entry fields, buttons, tables, etc.) using a tagged syntax that can be manipulated via JSF class libraries.

AJAX supports the construction of rich clients by fetching data asynchronously via XML and manipulating the document object model (DOM) of the current Web or page being presented in a browser.

What You'll See as You Preview the New SAP Application Server

Adopting an open-standards approach to technology and tools brings some big advantages to developers. The new application server is designed to provide composition capabilities on top, to support easy reuse of application components, and to build services-based applications,1 as well as to deliver the Eclipse open source development platform equipped with standard plug-ins for Web and Java EE 5 development.

Installation is also significantly easier; one of the outstanding features of the new SAP NetWeaver application server is its reduced footprint — in terms of both installation and startup time — compared to previous releases.

Best of all, the new environment will interoperate seamlessly with previous SAP NetWeaver releases. There is no need to rip and replace any of your previous SAP NetWeaver installations as you move to the new Java standard.

The new application server proves extremely easy to install and demonstrates a rather low footprint for both system startup and memory consumption.

Figure 1 shows a simple application — the demo application included in the SDN download — running on SAP's new Java EE 5-based application server using Enterprise JavaBeans. The demo application is a ready-to-deploy project management scenario that manages employee names and IDs and specifies team members, skill sets, and other project information. Let's look at the advantages of this new server from both a development and an architectural perspective through this demo example.

Figure 1
The Project Details screen in the Java EE 5 demo

Simplified Application Development and Deployment with SAP NetWeaver Developer Studio and the Web Tools Platform

Java EE 5 greatly simplifies development and deployment of your application projects; you simply open the server view in SAP NetWeaver Developer Studio, select your demo application, and publish (i.e., deploy) the project to the server.

In SAP NetWeaver Application Server, Java EE 5 Edition, the software deployment manager (SDM) has been fully integrated into the application server.2 Here in SAP NetWeaver Developer Studio, you won't find the old J2EE tool set — it was completely removed in favor of the popular WTP plug-in from Eclipse.3 WTP helps you create Web applications, such as servlets and JSPs, and provides the utilities to package all components of a Web application into a deployable EAR file. Likewise, you can use EJB wizards to create session and entity beans.

The demo application's user interface is based on JSF, which uses standard tag libraries to render UI elements, such as data tables or columns (see Figure 2). Data binding is expressed using the # syntax.

Figure 2
JSP page, with JSF controls for the demo application's user interface

The persistence and data mapping of the demo application is based on the new EJB 3 standard. In examples such as the one in Figure 3, you'll find that annotations are used heavily and that an EJB module ("Project") includes the bean specification for all the projects that are managed by the demo application. The Java code in Figure 3 uses annotations as shortcuts to indicate the code should represent an entity bean (@Entity) that is mapped to the underlying database table TMP_EDM_PROJECT (@Table).

Figure 3
An example SAP NetWeaver Developer Studio EJB 3 project

The annotations mean that a lot of support code can be generated out of that specification automatically, thereby making the code much easier to read and maintain. Compare this to a J2EE 1.3 specification, with all the home and remote interfaces required to create the Enterprise JavaBean and invoke application services offered by the bean.

Future versions of the Studio will incorporate even more sophisticated plug-ins, such as Eclipse's Dali,4 for object relational mapping and other powerful data mapping features.

SAP took a novel approach to the architecture of its new SAP NetWeaver application server to enhance application processing and bring enterprise-scale functionality to your Java applications.

Architectural Benefits of This Robust Java Server

In addition to making the most of the latest Java technology, SAP also took a novel approach to the architecture of its new SAP NetWeaver application server to enhance application processing and bring enterprise-scale functionality to your Java applications.

As a point of comparison, remember that the classic ABAP application server is based on a multiprocess approach; requests for ABAP processing (both GUI and Web applications) are dispatched among a collection of work processes. These work processes (basically the ABAP equivalent of a Java Virtual Machine) process the user sessions, whose state is kept in shared memory. At any given step, only one work process is allowed to access the session context. This powerful, highly reliable architecture ensures that a corrupt user session (loop or dump) does not impact other sessions; even if a work process crashes, it can be restarted without restarting the whole server.

In contrast, most Java servers follow a multithread architecture. A Java dispatcher manages a set of worker threads responsible for executing the user requests. If a thread goes wrong, it may impact the other threads, since all of the threads share the same heap segment.

In the Java EE 5-compliant implementation of its application server, SAP combined both approaches. SAP reduced the number of threads per Java Virtual Machine (VM) instance and increased the number of Java VM instances per server for greater session isolation. This way, if a thread goes awry and the session crashes, it only affects a small number of the other threads (see Figure 4).

Figure 4
Session isolation in the robust Java architecture

In Figure 4, you can also see that in the new Java server, the session context is kept in shared memory. When a session crashes, this allows the VM instance to resume if a user continues a request. To achieve this, SAP has extended Sun's hotspot VM by means of shared memory-based session handling. When you install the new server, you need not install a JDK since the SAP Java VM (a superset of Sun's hotspot VM) is installed automatically.

The SAP Java VM has some additional advantages from an administrative standpoint:

  • It covers all SAP platforms (hardware, operating system, and database systems).

  • It provides monitoring tools due to its shared session handling. Figure 5 shows the SAP Management Console (SAP MMC), which displays the current status of the server.

  • Debugging is much easier than with previous versions of the application server. If the server is in debug mode, you only need to set its state to "debug" and start debugging right away — no restart is necessary as it was with previous versions.

Figure 5
SAP Management Console (MMC) in the new Java server from SAP

Summary and Outlook

With the early support of the Java EE 5 standard and its robust implementation through shared memory handling, SAP has laid the groundwork for its next SAP NetWeaver release. At the same time, there's no need to worry if you're already running mySAP ERP 2005 on top of SAP NetWeaver 2004s — this new environment will interoperate seamlessly with previous SAP NetWeaver releases.

With the early support of the Java EE 5 standard and its robust implementation through shared memory handling, SAP has laid the groundwork for its next SAP NetWeaver release.

Take a look at what's new with Java EE 5 and its benefits for both speed and ease of development, as well as for memory consumption, simplified installation, and scalability. For Java developers looking to create and run reliable, enterprise-scale Java applications, this new platform offers some great advantages. For more information on Java EE 5 and the new application server, please see the resources listed below, and download the demo version to test it out for yourself.

1 For more on composite applications, see my article "Get Ready to Build Your Own Composite Application" in the October-December 2006 issue of SAP Insider (

2 In SAP NetWeaver 2004s, SDM was a separate process, even though it was under the control of the application server. The SDM process is now a service inside the engine.

3 For more on the Eclipse open development platform, see

4 For more on Dali, see

Additional Resources

Java EE 5 application server download at Look for the link on the right side of the home page. Under "SAP NetWeaver Application Server, Java EE 5 Edition," select "Download now!"

SAP Developer Network Java EE 5 forum: Java EE 5 @ SAP

Karl Kessler joined SAP in 1992. He is the Product Manager of the SAP NetWeaver foundation, which includes SAP NetWeaver Application Server, Web Dynpro, ABAP Workbench, and SAP NetWeaver Developer Studio, and is responsible for all rollout activities. You can reach him at

An email has been sent to:

More from SAPinsider


Please log in to post a comment.

No comments have been submitted on this article. Be the first to comment!