< Previous | Next >

Lesson 5: Deploy the OSGi Counter application

Follow these steps to deploy the application to a WebSphere® Application Server installation that has the OSGi feature pack installed. Refer to the WebSphere Application Server documentation for installation and configuration details.

About this task

To deploy your OSGi Counter application to a server:

Procedure

  1. In Enterprise Explorer, expand CounterWebBundle > CounterWebBundle > Servlets.
  2. Right click CounterServlet and select Run As > Run on Server. The Run On Server dialog opens.
  3. Click Finish.

Results

The web browser opens and the string counter=0 is displayed. Each time the page is reloaded the value increments.

Switch to the Console view (Window > Show View > Console) to view the output from the server. A successful outcome displays the message CounterImpl.init() called based on the initialization method entry for the CounterImpl bean in the blueprint file:
[3/30/10 15:30:58:546 EDT] 0000004c StepStartBLA  A   CWWMH0300I: Starting business-level application "WebSphere:blaname=CounterApp".
[3/30/10 15:30:59:187 EDT] 0000004c webapp        I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: CounterWebBundle.
[3/30/10 15:30:59:265 EDT] 0000004c WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_hostCounterWebBundle
[3/30/10 15:30:59:281 EDT] 0000004c webcontainer  I com.ibm.ws.wswebcontainer.VirtualHost addWebApplication SRVE0250I: Web Module CounterWebBundle has been bound to default_host[*:9083,*:80,*:9446,*:5067,*:5066,*:443].
[3/30/10 15:30:59:296 EDT] 0000004c FileLocatorIm E   CWPST0164E: The CounterWebBundle composition unit is not found.
[3/30/10 15:30:59:312 EDT] 0000004c StepStartBLA  A   CWWMH0196I: Business-level application "WebSphere:blaname=CounterApp" was started successfully.
[3/30/10 15:30:59:312 EDT] 00000016 SystemOut     O CounterImpl.init() called
Note: If the output from the CounterImpl.init() is not displayed in the console output, check the output for error messages during deployment or startup of the application and then check the blueprint files for possible errors in the bean and service definitions.

Lesson checkpoint

You deployed the application to WebSphere Application Server.

In this lesson, you learned how to run your application on a server.
< Previous | Next >
Icon that indicates the type of topic Tutorial lesson topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: counter_lesson6.html