Creating a free-form project in your workspace

The free-form project allows the creation of a J2EE application using a single project directory for development. Free-form development releases you from having to maintain multiple projects as well as having to understand the J2EE application structure.

About this task

Restriction: You 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 nor J2EE 1.2 specification-level.
Prerequisite

Steps for this task

Procedure

  1. From the command prompt, change to the x:/profiles/<profileName>/bin directory, where x is the directory WebSphere Application Server is installed.
  2. Use one of the following options to configure a new free-form project:
    • To configure a new free-form project, you can complete this by typing the following at the command prompt:
      • This graphic is a Windows icon. On Windows:wrd-config.bat -project "project_name" -style "freeform"
      • This graphic is a UNIX icon. On UNIX:wrd-config.sh -project "project_name" -style "freeform"
    • If you want to specify a particular runtime environment to compile your application against, use the optional runtime and runtimePath parameters. Targeting your runtime configures which JRE library to use, based on the runtime location, and configure the project's classpath to contain the WebSphere Application Server runtime libraries. You can complete this by typing the following at the prompt:
      • This graphic is a Windows icon. On Windows:wrd-config.bat -project "project_name" -style "freeform" -runtime "was60" -runtimePath "x:\WebSphere\AppServer"
      • This graphic is a UNIX icon. On UNIX:wrd-config.sh -project "project_name" -style "freeform" -runtime "was60" -runtimePath "x:\WebSphere\AppServer"
      where x:\WebSphere\AppServer is the directory WebSphere Application Server is installed.
    Tip: The runtimePath parameter is not used for targeting the server to publish against but rather specifying the WebSphere Application Server libraries you want your application to compile against. If the runtime and runtimePath parameters are not specified, the default runtime environment used is WebSphere Application Server v7.0.
  3. The Parameter Configuration Settings dialog box opens. Specify the value for one or more of the following settings:
    Option Description
    Enter the server name* ( server1 ) The name of the server process you want to publish your application. The default setting is server1. For WebSphere Application Server Network Deployment, the server name is in the form <cell name>/<node name>/<server name>. To publish to a cluster, the server name is in the form <cell name>/<cluster name>.
    Enter the server JMX host name* ( localhost ) The host name of the machine containing the server you want to make a connection to. The default setting is localhost. A localhost address is used for connecting to a local server. For WebSphere Application Server Network Deployment, type the host name of the Network Deployment Manager.
    Enter the server JMX port number* ( 8880 ) The server administrative port number, also known as the Simple Object Access Protocol (SOAP) connector port. This port is used for making Java Management Extensions (JMX) connections with the server. The default setting is 8880. For WebSphere Application Server Network Deployment, type the SOAP port number of the Network Deployment Manager, for example the default port value is 8879.
    Enter a path for containing the exported EAR This is an optional field to specify the directory location of the output EAR file that is created by rapid deployment tools and contains the generated classes required for deployment. For example: c:\temp\export.
    Note:
    • When you specify the directory for the output EAR file and then run the wrd-config command, any existing output EAR file of the same name is overwritten without warning. In addition, the EAR file gets overwritten as additional J2EE artifacts are added to the free-form project to reflect the new changes.
    Enter your server username (Optional) If security is enabled, specify the user name for current active authentication settings defined in the server configuration.
    Enter your server password (Optional) If security is enabled, specify the password for current active authentication settings defined in the server configuration.
    As a result, an XML configuration file is created. You can use this file later to configure a free-form project with the same configuration without having to specify these parameters again. Use the optional configData parameter from the wrd-config command to complete this task. The name and file location of the XML configuration file depends on which version of WebSphere Application Server you are using:
    • For WebSphere Application Server v6.0, the default filename convention of the XML configuration file is projectName_headless.xml and is generated at the root of your rapid deployment workspace. For example, c:\MyWorkspace\MyProject_headlessconfig.xml
    • For WebSphere Application Server v6.1 and v7.0, the default filename convention of the XML configuration file is .wrdconfig.xml and is generated in is in the x:/projectName directory, where x:/ is the directory of the rapid deployment workspace and projectName is the value specified in the -project parameter. For example c:\MyWorkspace\MyProject\.wrdconfig.xml

Results

Results
You can see that the initial configuration of the free-form project creates only the free-form project. As artifacts are introduced and modified in the free-form project, rapid deployment tools dynamically generates the necessary J2EE project structures inside the workspace directory. The following table lists the naming convention of the project folder with its associated project type:
Naming Convention of the Project Folder Project Type
project_name The free-form project
project_nameApp A single enterprise application project
project_nameEJB A single EJB module project
project_nameEJBClient A single EJB client jar project
project_nameUtility A single utility Java project
project_nameWeb A single Web module project
where project_name is the string value provided for the -project parameter.

What to do next

After you have configured the workspace to contain a free-form project and the supporting J2EE projects, you will then launch a rapid deployment session. Launching a rapid deployment session indicates that you want the free-form project to start listening for your J2EE artifacts.

Feedback