div.collapsecontent{display:block;}

Express (Distributed operating systems), v8.0 > Develop and deploying applications > Rapid deployment of J2EE applications > Constructing a J2EE application from artifacts


Dropping J2EE artifacts into a free-form project

We can place application artifacts in a free-form project and let the rapid deployment tools automatically place them in the appropriate J2EE project structure, generate any additional required artifacts to construct a J2EE compliant application, and deploy that application on a target server.


Before you begin

Restriction: We can use the rapid deployment tools for packaging applications at J2EE 1.3 or 1.4 specification-levels. However, the rapid deployment tools do not support Java EE 5.0 (or later) nor J2EE 1.2 specification-level. For tools support of deploying Java EE 5 and later modules, you can use the monitored directory starting in WAS V8.0 release. For more details about the monitored directory, see Ways to install enterprise applications or modules and Installing enterprise application files by adding them to a monitored directory topics.

  1. Learn how to work with free-form projects
  2. Set up a rapid deployment environment.
  3. Create a free-form project in your workspace.


Procedure

  1. Verify that the server to deploy the application is running.

    Tip: If there is no server connection, you get the following console output:

    [06:52:28 PM] Publishing MyProjectApp to server_510658053
    [06:52:28 PM] Failed to make connection to WAS.
    
  2. Launch a rapid deployment session by using the wrd command.

  3. Use your file management system to place the application artifacts properly into a free-form project. The directory name of the free-form project has the same string value providedd for the -project parameter when you created the free-form project.

    When you create or drop in your J2EE artifacts into the free-form project, these resources is placed automatically in the appropriate location in the J2EE project structure. You might experience approximately 5 seconds delay for the changes in the files system to be picked up, as these changes are being polled from the workspace.


Results

Tip:

The rapid deployment tools preserve the folder structures created and dropped into a free-form project. When dropping Java source files, place these files in the correct package structure to avoid compilation errors. For example, suppose a Java package statement, package java.src;, is defined in a Java source file, HelloWorld.java. Simply dropping the Java source file, HelloWorld.java, in the file path, workspace/MyFreeForm/HelloWorld.java, where workspace is the directory where your rapid deployment project resides, results in the following compilation error, displayed in the console output:

[06:32:19 PM] [/MyFreeForm/HelloWorld.java] Added
[06:32:20 PM] [/MyFreeForm/bin/HelloWorld.class] copied to project [MyFreeFormUtility]
[06:32:20 PM] 'The declared package does not match the expected package ' in resource 'HelloWorld.java' on line number 10
To correct the compilation error, place the HelloWorld.java source file in the following file path workspace/MyFreeForm/java/src/HelloWorld.java The following topics show how to handle supported artifacts in free-form projects:

Previous topic: Start a WebSphere rapid deployment session
Free-form projects
Create a free-form project in your workspace


Feedback

+

Search Tips   |   Advanced Search