Saturday 9 November 2013

HOWTO: create WebSphere AS 8.5.5 development workspace in Eclipse

This post is a follow-up to HOWTO: script WebSphere AS 8.5.5 internet install and describes the post-install steps to create a development workspace.

The clean install described in the previous post requires further configuration before you can start the server and deploy applications.

  1. Create a profile
  2. Set the profile SDK
  3. Create an Eclipse workspace

Create a profile

WebSphere Application Server supports a variety of server topologies. It is possible to run multiple individually configured instances on the same host and these are managed via the use of profiles. The manageprofiles command (located in IBM/WebSphere/AppServer/bin) can be used to manipulate profiles from the command-line.

Here is a sample response file for creating a profile called AppSrv01:

create
isDeveloperServer
profileName=AppSrv01
serverName=server1
profilePath=/home/user/IBM/WebSphere/AppServer/profiles/AppSrv01
templatePath=/home/user/IBM/WebSphere/AppServer/profileTemplates/default
enableAdminSecurity=true
adminPassword=wasadmin
adminUserName=wasadmin

Modify the paths and passwords as appropriate. Here is the command invoked on the CentOS instance:

./manageprofiles.sh -response ~/create_appsrv01.txt

The Profile Management Tool offers a GUI alternative for creating profiles.

Set the profile SDK

WAS 8.5.5 profiles use Java 6 by default. The managesdk command can be used to set our profile to use Java 7.

Use this command to list the available SDKs:

./managesdk.sh -listAvailable -verbose

Then set the profile to use the given name:

managesdk.sh -enableProfile -profileName AppSrv02 -sdkname 1.7_32 -enableServers

Create an Eclipse workspace

The remaining IDE tasks are all GUI driven.

  1. Start Eclipse
  2. Open the Preferences dialog via the Window > Preferences menu
  3. Navigate to the Server > Runtime Environments panel
  4. Click Search...
  5. Select the ~/IBM folder and click OK
  6. In the Servers view (Window > Show View > Servers) right-click and select New > Server
  7. Select WebSphere Application Server v8.5 and click Next
  8. Select Security is enabled on this server and enter the credentials from the response file
  9. Click Finish

You can now create and deploy Java EE projects onto the local WAS server.

No comments:

Post a Comment

All comments are moderated