GlassFish Remote Administration

Once you have prepared for remote GlassFish administration you can do most of the things that you want to do by using your browser to log in to the GlassFish web administrative console.

The GlassFish administrative console is a JSF application with some tightened security features such as encrypted communication across the internet. To use it, you must first log in with your browser. The URI you should use is http://ukko.d.umn.edu:port/, where port is the Admin port that your server is using. This will bring up the GlassFish Admin Console.

This presentation describes how to perform the following GlassFish administrative tasks. Each is started by clicking on the appropriate button as indicated below.

  1. Deploy an App
  2. Redeploy an App
  3. Create a Connection Pool
  4. Create a JDBC Resource

Some of the information that you need for creating a database pool can be obtained by viewing the glassfish-resources.xml file in your NetBeans project. Values for the following properties are needed:

You will also need the port number for the database that you started with the asadmin start-database command.

The first step is shown below. You need to do four things.

  1. Enter a name for the connection pool in the "Pool Name:" text field. Remember this name — you will need it to create a JDBC resource.
  2. Select "java.sql.ConnectionPoolDataSource" in the "Resource Type:" choice box
  3. Select "JavaDB-30" in the "Database Driver Vendor:" choice box
  4. Click on the "Next" button

This step is shown in two parts. The first part just requires clicking on the "Ping: Enabled" checkbox. The second part requires scrolling to the bottom of the pane and filling in some information.

After scrolling to the bottom you need to fill in four items:

  1. the name of the database
  2. the server machine name (ukko.d.umn.edu)
  3. your team's database port number
  4. your team's database password
  5. Then click on the "Finish" button.

If you see the "Ping Succeeded" message then you are finished with creating the connection pool.

In the "New JDBC Resource pane you need to do three things:

  1. enter the resource name in the "JNDI Name:" text field
  2. select the connection pool in the "Pool Name:" choice box
  3. Then click on the "OK" button.

Deploying and redeploying an application are similar, and both can be started from the list of applications. Be sure you have rebuilt your project. Otherwise you will be deploying an old version of your application.

  1. Click on the "Deploy" button to deploy an application the first time. This will bring up a "Deploy Applications or Modules" pane that you can use to deploy the application.
  2. Click on the "Redeploy" link near the end of the row for the application to redeploy an application. This will bring up a "Redeploy Applications or Modules" pane that you can use to redeploy the application.

The panes that are brought up are identical except for their label so only redeployment is described here.

  1. Click on the "Browse" button. This will bring up a file browser that you can use to locate the project WAR file. It is in the dist folder of your project.
  2. Click on the "OK" button.