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


Create 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: 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. Prerequisite


Procedure

  1. From the command prompt, change to the x:/profiles/ <profileName>/bin directory, where x is the directory WAS 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:

      • wrd-config.bat -project "project_name" -style "freeform"
      • wrd-config.sh -project "project_name" -style "freeform"

    • To specify a particular runtime environment to compile the 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 WAS runtime libraries. We can complete this by typing the following at the prompt:

      • wrd-config.bat -project "project_name" -style "freeform" -runtime "was60" -runtimePath "x:\WebSphere\AppServer"
      • wrd-config.sh -project "project_name" -style "freeform" -runtime "was60" -runtimePath "x:\WebSphere\AppServer"

      where x:\WebSphere\AppServer is the directory WAS is installed.

    Tip: The runtimePath parameter is not used for targeting the server to publish against but rather specifying the WAS libraries you want the application to compile against. If the runtime and runtimePath parameters are not specified, the default runtime environment used is WAS v8.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 to publish the application. The default setting is server1. For WAS 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 WAS 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 WAS 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.

    • 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. We 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 WAS you are using:

    • For WAS 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 WAS v6.1 or later, 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

We 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 we 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.

Previous topic: Set up a WebSphere rapid deployment environment

Next topic: Start a WebSphere rapid deployment session
Free-form projects


Feedback

+

Search Tips   |   Advanced Search