Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Application Server Platform Edition 2004Q4 Beta Compatibility Guide 

Chapter 2
J2EE 1.4 Compatibility Issues

The following topics are covered in this section:


Binary Compatibility

In this Application Server 8 release, the included Java SDK is The Java™ 2 Platform, Enterprise Edition (J2EE™ platform), version 1.4 SDK. This version of the J2EE SDK is upwards binary-compatible with J2EE SDK, v1.3, except for the incompatibilities listed below. This means that, except for the noted incompatibilities, applications built for version 1.3 run correctly in the Sun Java System Application Server 8 release. For ease of reference, the version of the J2EE SDK included in this release is referred to throughout this section as J2EE 1.4.


Source Compatibility

Downward source compatibility is not supported. If source files use new J2EE APIs, they are not usable with an earlier version of the J2EE platform.

In general, the policy is as follows:

Deprecated APIs are methods and classes that are supported only for backward compatibility, and the compiler generates a warning message whenever one of these is used, unless the -nowarn command-line option is used. It is recommended that programs be modified to eliminate the use of deprecated methods and classes, though there are no current plans to remove such methods and classes entirely from the system.


Incompatibilities in the J2EE 1.4 Platform (since the J2EE 1.3 release)

The Sun Java System Application Server 8 release is based on the Java 2 Platform, Enterprise Edition, version 1.4. The Sun Java System Application Server 7 release is based on the Java 2 Platform, Enterprise Edition, version 1.3.

The Sun Java System Application Server 8 release is strongly compatible with previous versions of the J2EE platform. Almost all existing programs should run on the Sun Java System Application Server 8 release without modification. However, there are some minor potential incompatibilities that involve rare circumstances and “corner cases” that we are documenting here for completeness.


Application Server 8 Options Incompatible with J2EE 1.4 Specification Requirements

Sun Java System Application Server 8 is compatible with the Java 2 Platform, Enterprise Edition specification by default. In this case, all portable J2EE programs run on the Application Server without modification. However, as allowed by the J2EE compatibility requirements, it is possible to configure applications to use features of the Sun Java System Application Server 8 that are not compatible with the J2EE specification.

The pass-by-reference element in the sun-ejb-jar.xml file only applies to remote calls. As defined in the EJB 2.0 specification, section 5.4, calls to local interfaces use pass-by-reference semantics.

If the pass-by-reference element is set to its default value of false, the parameter passing semantics for calls to remote interfaces comply with the EJB 2.0 specification, section 5.4. If set to true, remote calls involve pass-by-reference semantics instead of pass-by-value semantics, contrary to this specification.

Portable programs cannot assume that a copy of the object is made during such a call, and thus that it’s safe to modify the original. Nor can they assume that a copy is not made, and thus that changes to the object are visible to both caller and callee. When this flag is set to true, parameters and return values are considered read-only. The behavior of a program that modifies such parameters or return values is undefined. For more information about the pass-by-reference element, see the Developer’s Guide.


Application Server 8 Options Contrary to J2EE 1.4 Specification Recommendations

If the delegate attribute in the class-loader element of the sun-web.xml file is set to its default value of true, classes and resources residing in container-wide library JAR files are loaded in preference to classes and resources packaged within the WAR file, contrary to what is recommended in the Servlet 2.3 specification, section 9.7.2. If set to false, the classloader delegation behavior complies with what is recommended in the Servlet 2.3 specification, section 9.7.2.

Do not package portable programs that use the delegate attribute with the value of true with any classes or interfaces that are a part of the J2EE specification. The behavior of a program that includes such classes or interfaces in its WAR file is undefined. For more information about the class-loader element, see the Developer’s Guide.



Previous      Contents      Index      Next     


Part No: 819-0077.   Copyright 2004 Sun Microsystems, Inc. All rights reserved.