Chapter 7 Developing Applications with PowerJ and EAServer


Migrating from PowerJ 3.5 to 3.6

Building Enterprise JavaBeans 1.0 components

In PowerJ 3.6 you can continue to develop, maintain, and deploy EJB 1.0 components in nearly the same way as described in the PowerJ 3.5 documentation.

You use the EJB 1.0 Component wizard to specify the EJB component and the wizard creates an EJB 1.0 target and, optionally, an associated JAR file. However, before you can access the EJB 1.0 Component wizard, you must set the Sun VM used at design-time to JDK Version 1.1.

You specify the version of the JDK you want to use by selecting the version in the Tools>Options>Design Time VM tab page. Since the default is JDK Version 1.2 you must set the design-time VM to JDK Version 1.1 before you can create or edit EJB 1.0 components. Also you must reset the design-time VM to JDK Version 1.2 before you can create or edit any of the J2EE components types such as EJB 1.1 components, servlets, or JSP pages. You must restart PowerJ after you change the JDK setting.

Note   Tools>Options>Enabled JDK tab page replaced In PowerJ 3.6 the Tools>Options>Enabled JDK tab page has been replaced by the Design Time VM tab page.

Migrating an EJB 1.0 target to 1.1

While PowerJ 3.6 continues to support the creation or modification of EJB 1.0 targets, you can migrate your existing EJB 1.0 targets to EJB 1.1 if you prefer.

When you open a workspace created in PowerJ 3.5 containing an EJB 1.0 target, you'll see a Tools>Save EJB 1.0 As EJB 1.1 menu item.

Steps To migrate the EJB 1.0 component to 1.1:

  1. Select Tools>Save EJB 1.0 As EJB 1.1.

  2. In the EJB 1.0 to EJB 1.1 dialog box, click Yes if you want to migrate your EJB 1.0 components.

  3. In the subsequent dialog box, click Yes if you want PowerJ to automatically create a new 1.1 target with the same name and copy all class files and other files from the 1.0 target to the 1.1 target.

    Click No if you want to create a new 1.1 target location yourself.

  4. If you clicked No, the Choose Target Folder dialog box displays. Select the folder or name a new folder where you want PowerJ to copy all the files and click OK.


The migration process also ensures that any targets that depended on the EJB 1.0 target now depend on the EJB 1.1 target, and targets that the EBJ 1.0 depended on are now depended on by the EBJ 1.1 target.

After the migration, you should fix deprecated code so you can run the component on Jaguar. Any use of deprecated APIs won't be discovered until the EJB 1.1 component is running on Jaguar.

Java WWW server application target is deprecated

PowerJ 3.5 supported the creation of servlets that were called Web server extensions. In PowerJ 3.5, you created a servlet by selecting the Java WWW Web Server Application target in the Target tab page of the New dialog box.

The term servlets in PowerJ 3.5 referred to Web server extensions in general, not Web server extensions that use Sun's Java Servlet API. Power J 3.6 now supports the creation of Java Servlet components that support Version 2.2 of the Java Servlet API. Since the Java WWW Web Server Application target will not be supported in future releases of PowerJ, you should use the Servlet 2.2 Component target instead.

 


Copyright © 2000 Sybase, Inc. All rights reserved.