Previous Next Contents


Chapter 2 Running NAS 2.1 Applications on NAS 4.0

This chapter describes how to run NAS 2.1 applications on NAS 4.0 without making any source-level changes.

NAS 4.0 is completely backward-compatible with NAS 2.1. In other words, you should be able to deploy your older NAS 2.1 application on NAS 4.0 without alteration, although C++ applications and extensions must be recompiled before deploying on the new server (see C++ Applications and Extensions).


NAS 2.1 Application Components
This section describes the NAS 4.0 support for each of the major types of components from the 2.1 programming model.

HTML Templates
For presentation layout, NAS 2.1-style HTML Templates, including GX tags, are fully supported without alteration by the NAS template engine. If a template is called by a servlet, however, it is compiled as a JSP. JSPs support GX tags with the exception of hierarchical queries.

AppLogics
The AppLogic framework is fully supported in NAS 4.0, though many of the proprietary APIs introduced in NAS 2.1 have been deprecated in favor of the Java standards on which the new programming model is based. For more information, see Netscape Application Server Foundation Class Reference.

Database Logic: DAE and JDBC
The NAS 2.1 database access classes and interfaces are now deprecated in favor of JDBC, the Java standard database connectivity API. Code that uses NAS 2.1 database connection and query methods is supported in NAS 4.0, but this support may disappear in a future release.

The new JDBC layer provides the same functionality as the old 2.1 JDBC layer and many new methods are supported. As a result, you may want to modify some of your Applogic code to remove workarounds or add new JDBC calls.

AppLogics should use either the new JDBC layer or the old JDBC layer, but not both. Servlets and EJBs should use only the new JDBC layer. Mixing and matching of JDBC calls from each version is not supported.

You can use JDBC AppLogics from NAS 2.1 against the same NAS 4.0 JDBC layer, but you must make sure that the JDBC 2.0 interfaces are loaded into the JVM instead of the 1.2 interfaces. For example, if you get a log message like the following, you probably have the JDBC 1.2 interfaces in your CLASSPATH before the JDBC 2.0 interfaces:

[01/05/99 11:25:51:0] error: APPLOGIC-caught_exception: Caught 
Exception: 
java.lang.NoSuchMethodError: java.sql.Statement: method
addBatch(Ljava/lang/String;)V not found

The NAS Registry
Part of the NAS registry now resides in an LDAP directory, though for the most part access to it has not changed. See the Administration Guide for more information.


Deploying NAS 2.1 Applications on NAS 4.0
Use the NAS Deployment Manager to deploy all applications to NAS. For more information, see the Administration Guide.


C++ Applications and Extensions
NAS 4.0 provides new versions of required C++ header files. For this reason, C++ applications and extensions must be recompiled using the new header files.

NAS provides pre-built extensions for several legacy systems, including MQSeries, TUXEDO, and CICS. These extensions will be re-released to provide support for NAS 4.0, though they will retain support for the NAS 2.1 programming model.


Beginning the Migration Process
When you decide to migrate your application to the new model, it is easiest to begin by redesigning your application and coming up with a transition plan. It is often best to gradually migrate parts of an application to a new programming model, rather than planning a large-scale migration for the entire application. However, it is also possible to migrate gradually by programming tier (presentation layout, business logic, etc.) rather than by application component.

For information on partial migration, including how to allow 2.1 components (like AppLogics) to interact with 4.0 components (like servlets and EJBs), see Partial Migration

 

© Copyright 1999 Netscape Communications Corp.