OSGi Blog setup

Before you can run this sample on the server, you need to create the data sources and install the blog sample on the server.

Procedure

  1. If the server is stopped, start the server by running the following steps:
    1. Switch to the Servers view (Window > Show View > Servers).
    2. Right-click WebSphere Application Server and then click Start.
  2. Open the administrative console. Right-click the server and select Administration > Run Administrative Console.
  3. Access the JDBC providers view. In the administrative console, in the Resources section, expand JDBC and click JDBC providers.
  4. Click the Derby JDBC Provider link.
  5. Click Data sources.
  6. Create the data source. Click New. In the JNDI name field, enter jdbc/blogdb. Click Next.
  7. In the Database name field, enter the location of the BLOGDB database. This location must be on the same machine as the WebSphere® Application Server server. If you are deploying on a local server, enter the location of the database in your workspace. To find the location, expand the derby project, right-click the BLOGDB folder, and select Properties. In the Resource section of the properties view, copy the value that is displayed for Location. If you are using a remote server, copy the BLOGDB folder from the derby project to a location on the remote server machine. In the Database name field, enter the full path of the location of the BLOGDB folder.
  8. Go through the rest of the wizard, accept the defaults, and click Finish on the last page of the wizard.
  9. Click the Save link.
  10. Test the connection to the data source. In the Data sources view, check the box next to the data source that you created and click Test connection.

Results

When you have set up the database and data sources, you can run the sample on server.

Removing the blog sample data sources from the server

Procedure

  1. Open the WebSphere Application Server Administrative Console by right-clicking your server instance and select Administration > Run Administrative Console. The Admin Console opens in the workbench.
  2. In the task list, expand Resources > JDBC and then select Data sources.
  3. In the Data sources section, check the box next to the data source with the JNDI name jdbc/blogdb and then click Delete.
  4. Save your changes.
Icon that indicates the type of topic Sample setup topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: blogsetup.html