Using the Integration Kit for Visual Age
IntroductionVisual Age for Java is an integrated, visual environment that supports the complete cycle of Java program development. With the Integration Kit for Visual Age, you can develop and debug your WebLogic Server applications from within Visual Age. This document describes how to use the Integration Kit for Visual Age with WebLogic Server. To download and install the Integration Kit for Visual Age, go to BEA WebLogic Developer Tools Resources.
Using the Integration KitIncluded below are some important concepts and instructions on performing common tasks.
The Visual Age workspaceAll activity in Visual Age for Java is organized around a workspace, which contains the Java programs that you are developing. The workspace also contains all the packages, classes, and interfaces that are found in the standard Java class libraries, and other libraries that your classes may need.
The Integration Kit for Visual Age adds the classes required to run WebLogic Server to your workspace. As you develop and debug your applications you will add classes and projects to your workspace. Note that while the server classes are loaded from the Visual Age workspace, the weblogic.system.home property is set to the installation directory of your WebLogic distribution. Therefore, the server will read its properties from the weblogic.properties file in the WebLogic home directory, just as it does when you run it outside of Visual Age.
Running WebLogic ServerTo run WebLogic Server, double-click on the WebLogic Server project in the All Projects pane of on the Projects tab and click on the Run button, or right-click on the WebLogic Server and select Run Main in the Run submenu.
DebuggingYou can debug server-side and client-side code by following these steps:
You can set breakpoints in server-side code and then trace the code when it is invoked from a client. You may choose to run the client from within or outside of Visual Age, whichever is more convenient. Note that external client calls may time out if the server is stopped at a breakpoint for too long.
In addition, the Visual Age class loader allows you to modify and continue debugging server-side code without restarting WebLogic Server, as long as you only change the content the object methods. Changes to an object's interface will require restarting the server.
Using the EJB toolsWhen developing EJBeans, there are a number of steps that must be performed to convert your source code into a Bean that can be deployed by WebLogic Server. The Integration Kit includes tools that help build and manage your EJB projects from within the Visual Age IDE. The EJB tools, which are available from the Selected\Tools\WebLogic Tools menu, are:
To use these tools, double-click on an EJB package or project. Then select the menus Selected, Tools, WebLogic Tools, then the appropriate tool. To deploy an EJB in the server, you must add the generated jar file to the deploy statement in the weblogic.properties file. See BEA WebLogic Server Enterprise Java Beans for more information on deploying EJBeans.
Note: To use the Generate EJB jar tool, users of the Enterprise Edition of Visual Age for Java will first need to create an open edition of the EJB package. To do this, select the package and choose the menus Selected, Manage, Create Open Edition.
While debugging an EJBean, you may change the content of the Bean methods without rebuilding the jar. Changes to the EJBean's interfaces (remote interface or home interface) or the addition of a new EJB jar file require the use of the Generate EJB jar tool and restarting the server.
Note: While it is possible to debug and modify an EJBean without rebuilding the jar file, you must rebuild the jar before attempting to deploy the EJBean in a server running outside of Visual Age.
Any of the WebLogic EJB examples can be built with these tools by selecting the individual EJB example package in the WebLogic Examples project.
Setting classpath within Visual AgeIn Visual Age for Java, you can set classpath at the workspace level and at the class level.
If you specify a workspace level classpath, every class in the workspace will reference these classes when compiling or running. This classpath is also needed to find resource files your classes use. During the installation process for the Integration Kit for Visual Age, you added the WebLogic Server Classes, WebLogic Support Libraries, and WebLogic Java Enterprise Libraries to the workspace level classpath. This was done because most of these classes are required by the examples included with the Integration Kit. To modify this classpath:
I addition, you may also set classpath at the class level. These classes are appended to the workspace level classpath for the given class. To set the classpath for a class:
Using Type 2 JDBC drivers
When I use a Type 2 JDBC driver, such as the Oracle driver shipped with WebLogic, I get strange errors such as "LDA not set", or the Visual Age IDE crashes.
Using Cloudscape database
When I use the Cloudscape database in Visual Age, I get a java.lang.VirtualMachineError in FileDescriptor.sync.
This is a known problem. According to IBM, this problem will be fixed in Visual Age 3.0, but there will not be a fix for Visual Age 2.0. The work around is to use a different database when running WebLogic in Visual Age.
Using EJB dynamic deployment
Can I use the new dynamic EJB deployment while debugging server-side code in Visual Age?
Not currently. Dynamic deployment uses classloaders in ways
which are incompatible with the debugger classloader in
Visual Age. However, the debugger will reload modified classes at
runtime, so you can do much of the work of developing and debugging
server applications without restarting the server.
Copyright © 2000 BEA Systems, Inc. All rights reserved.