Create and configure WebSphere test servers

Understanding WebSphere Application Server V6.0 profiles

New with IBM WebSphere Application Server V6.0 is the concept of profiles. The WebSphere Application Server installation process simply lays down a set of core product files required for the runtime processes. After installation you will need to create one or more profiles that define the runtime to have a functional system. The core product files are shared among the runtime components defined by these profiles.

With WebSphere Application Server and WebSphere Application Server Express Editions you can only have standalone application servers. Each application server is defined within a single cell and node. The administration console is hosted within the application server and can only connect to that application server. No central management of multiple application servers are possible. An application server profile defines this environment.

You can also create standalone application servers with the Network Deployment package, though you would most likely do so with the intent of federating that server into a cell for central management at some point.

Define a new server in Rational Application Developer

Once you have defined the WebSphere Profile or chosen to use the default profile, you can create a server in Rational Application Developer. The server points to the server defined within the WebSphere Profile you configured.

NOTE: With the new server configuration architecture, there are a few considerations to be aware of:

To create a server in Rational Application Developer, do the following:

  1. Open the J2EE perspective.

  2. Select the Servers view.

  3. Right-click in the Servers view, and select New > Server.

  4. When the Define a New Server dialog appears, do the following, and then click the Next:

    Host name: localhost (default)

    Select the server type: Select WebSphere v6.0 Server.

    New server

  5. When the WebSphere Server Settings dialog appears, do the following, and then click Next:

    WebSphere Profile name: Select RADProfile. In our example, RADProfile is the WebSphere Profile we created. The default WebSphere Profile is the default value.

    Server admin port number (SOAP connector port): 8880. Note: The port will need to match the SOAP port defined when creating the WebSphere Profile.

    Server name: server1

    Check Run server with resources within the workspace. NOTE: The setting Run server with resources within the workspace runs your application in the workbench without publishing your application to a server. This mode of running your application is known as running your application on a server test environment.

    Server type: Select BASE, Express server.

    New server

  6. Click Finish. The server will be created and should be displayed in the Servers view.

Log files created during the creation of the Application Server profile

In addition to the logs created within the core product files, the following logs are created in the profile_root/logs directory.

Both the Profile Creation wizard and the wasprofile command create the log when creating an application server profile:

  1. activity.log - Compiled activity log from various installation activities.


  2. SystemErr.log - Record system errors.


  3. SystemOut.log - Log of all activity within the system.

  4. trace.log - Log of all traced events within the system.


    public class LoggingServlet extends HttpServlet implements Servlet {
        static Logger log;
        static {
            log = Logger.getLogger("LoggingServlet");
            // by default use "trace.out" file, can be customized: 
            // FileHandler hnd = new FileHandler(FILENAME,1000,5,true);
            // log.addHandler(hnd);
    	protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
    	    log.entering("LoggingServlet", "doGet");
    	    PrintWriter pw = arg1.getWriter();
    	    pw.println("<TITLE>JDK14 LoggingServlet</TITLE>");
    	    pw.println("<H2>JDK14 LoggingServlet Servlet</H2>");
    	    pw.println("<P>Logger ==> " + log +"</P>");
    	    log.exiting("LoggingServlet", "doGet");


    [2.7.07 13.23.52:117 EEST] 00000038 ServletWrappe A   SRVE0242I: [LoggingServlet]: Initialization successful.
    [2.7.07 13.23.52:195 EEST] 00000038 LoggingServle > LoggingServlet doGet ENTRY
    [2.7.07 13.23.52:195 EEST] 00000038 LoggingServle < LoggingServlet doGet RETURN

Change Log Detail Levels

Using log levels you can control which events are processed by Java logging. When you change the level for a logger, the change is propagated to the children of the logger.

Enter a log detail level that specifies the components, packages, or groups to trace. The log detail level string must conform to the specific grammar. You can enter the log detail level string directly, or generate it using the graphical trace interface.

If you select the Configuration tab, a static list of well-known components, packages, and groups is displayed. This list might not be exhaustive.

If you select the Runtime tab, the list of components, packages, and group are displayed with all the components that are registered on the running application server and in the static list.

Change Log Detail Levels

The format of the log detail level specification is:

<component> = <level>

where <component> is the component for which to set a log detail level, and <level> is one of the valid logger levels (off, fatal, severe, warning, audit, info, config, detail, fine, finer, finest, all). Separate multiple log detail level specifications with colons (:).

Components correspond to Java packages and classes, or to collections of Java packages. Use an asterisk (*) as a wildcard to indicate components that include all the classes in all the packages that are contained by the specified component. For example:

Specifies all traceable code running in the application server, including the product system code and customer code:


Specifies all classes with the package name beginning with*					

Specifies the JarClassLoader class only:					

BOOT.BY - Tech Industry News         Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Free SCJP 5.0 (Tiger) Study Guide     Free Mock Exam Engine     Free SCWCD 1.4 Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free SCBCD 5.0 Study Guide