Configure GlassFish

Use the GlassFish Admin Console to configure the server:

  1. Start the server.
  2. Open a browser on the server and go to the following URL:
    http://<hostname>:4848
  3. Log in to the console.
    The default user name is admin, and the default password is adminadmin.
  4. After you complete all configuration tasks, restart GlassFish server to make the configuration take effect.

Perform the following configuration from the Admin Console. The order in which you configure these components is not important:

Configure Resources for JDBC Connections

Configure new Resources for the JDBC with the following settings:

  1. Add a new Connection Pools entry:
    • Name: dvnDbPool
    • Resource Type: javax.sql.DataSource
    • Database Vendor: PostgreSQL
    • DataSource ClassName: org.postgresql.ds.PGPoolingDataSource
    • Additional Properties:
      • ConnectionAttributes: ;create=true
      • User: dvnApp
      • PortNumber: 5432 (Port 5432 is the PostgreSQL default port.)
      • Password: <DVN application database password>
      • DatabaseName: <your database name>
      • ServerName: localhost
      • JDBC30DataSource: true
  2. Configure a new JDBC Resources entry:
    • JNDI Name: jdbc/VDCNetDS
    • Pool Name: dvnDbPool
  3. To verify connectivity to the database, for the new Connection Pool use the
    General functions and perform a Ping operation.
    If the Ping succeeds, you see the message Ping Succeeded.
    If the Ping does not succeed, you see an error message. Verify the database
    configuration, existence, and user account, and confirm access to port 5432.

Configure Resources for JMS Resources

Configure new Resources for the JMS Resources:

  1. Add a new Connection Factory for the DSB Queue:
    • JNDI Name: jms/DSBQueueConnectionFactory
    • Resource Type: javax.jms.QueueConnectionFactory
  2. Add a new Connection Factory for the Index Message:
    • JNDI Name: jms/IndexMessageFactory
    • Resource Type: javax.jms.QueueConnectionFactory
  3. Add a new Destination Resource for the DSB Queue:
    • JNDI Name: jms/DSBIngest
    • Physical Destination Name: DSBIngest
    • Resource Type: javax.jms.Queue
  4. Add a new Destination Resource for the Index Message:
    • JNDI Name: jms/IndexMessage
    • Physical Destination Name: IndexMessage
    • Resource Type: javax.jms.Queue

Configure Resources for JavaMail Sessions

Configure a new Resource for the JavaMail Sessions:

  • JNDI Name: mail/notifyMailSession
  • Mail Host: <your mail server>
    Note: The Project recommends that you install a mail server on the same
    machine as GlassFish and use localhost for this entry.
  • Default User: dataversenotify
    This does not need to be a real mail account.
  • Default Return Address: do-not-reply@<your mail server>

Configure Application Server for JVM Options

For the Application Server, configure the JVM Settings to add, change, or delete the following JVM Options:

  1. Delete the following options:

    -Dsun.rmi.dgc.server.gcInterval=3600000
    -Dsun.rmi.dgc.client.gcInterval=3600000
  2. Change the following options’ settings:
    • Change -client to -server.
    • Change -Xmx512m to whatever size you can allot for the maximum Java heap space.
    • Set –Xms512m to the same value to which you set –Xmx512m.
  3. Add the following options:
    • Add all of the following:


      -XX:MaxPermSize=192m 

      -XX:+AggressiveHeap

      -Xss128k

      -XX:+DisableExplicitGC
      
-Dcom.sun.enterprise.ss.ASQuickStartup=false

      -Djhove.conf.dir=${com.sun.aas.instanceRoot}/config
      
-Ddvn.inetAddress=<address of server on which DVN runs>
    • To install on a multi-processor machine, add the following:

      -XX:+UseParallelOldGC
    • To enable the optional Google Analytics option on the Network Options page and provide access to site usage reports, add the following (see Configure Google Analytics for details): 

      -Ddvn.googleanalytics.key=<googleAnalyticsTrackingCode>
    • To configure permanent file storage (data and documentation files uploaded to studies) set the following: 

      -Dvdc.study.file.dir=${com.sun.aas.instanceRoot}/config/files/studies
    • To configure the temporary location used in file uploads add the following:
      -Dvdc.temp.file.dir=${com.sun.aas.instanceRoot}/config/files/temp
    • To configure export and import logs (harvesting and importing), add the following:
      -Dvdc.export.log.dir=${com.sun.aas.instanceRoot}/logs/export
      -Dvdc.import.log.dir=${com.sun.aas.instanceRoot}/logs/import
    • To manage calls to RServe and the R host (analysis and file upload), add the following:
      -Dvdc.dsb.host=<DSB server hostname>
      -Dvdc.dsb.rserve.user=<account>
      -Dvdc.dsb.rserve.pwrd=<password>
      -Dvdc.dsb.rserve.port=<port number>
      See Install RServe for information about configuring these values in the Rserv.conf and Rserv.pwd files.
      These settings must be configured for subsettable file uploads, downloads, and subsetting and analysis to work. The Dvdc.dsb.host setting requires either a preconfigured DSB server or the DSB server must be an Apache web server. The hostname alone is adequate if using the default, port 80. Otherwise, set the following:
      -Dvdc.dsb.port=<DSB server host port>
  4. The following options configure locations for files that you download when you install the DVN application. You can configure these settings before you download the files, but you must copy the configuration files into the appropriate location after download for these options to function:
    • To configure search index files set the following:

      -Ddvn.index.location=${com.sun.aas.instanceRoot}/config
    • To use the optional customized error logging and add more information to your log files, set the following: 

      -Djava.util.logging.config.file= ${com.sun.aas.instanceRoot}/config/logging.properties
      Note: To customize the logging, edit the logging.properties file to change WARNING to INFO.

Set Up Configuration for HTTP Service

The HTTP Service configuration settings described in this section are suggested defaults. These settings are very important. There are no right values to define; the values depend on the specifics of your web traffic, how many requests you get, how long they take to process on average, and your hardware. For detailed information, refer to the Java Application Server Administration Guide, available at the Sun Microsystems Documentation web site at the following URL:
http://docs.sun.com/app/docs

Note: If your server becomes so busy that it drops connections, adjust the Thread Counts to improve performance.

To configure the GlassFish server’s HTTP Service, set the server’s Configuration options as follows:

  1. Configure the HTTP Service option for HTTP Listeners with the following settings for http-listener-1:
    • General Settings option for Listener Port - 80
    • Advanced option for Acceptor Threads - The number of CPUs (or cores, if multicore) on your server
  2. Configure the HTTP Service option for RequestProcessing with the following initial recommended settings:
    • Thread Count - Twice the number of CPUs (cores) on your server
    • Initial Thread Count - The number of CPUs (cores)
    • Thread Increment - 1

Set Up Configuration for EJB Container

The EJB Container timer service potentially can get corrupted if the Derby database files that store timer data get out of sync. To avoid this problem, use PostgreSQL to store the timer data.

To configure this timer, set the following GlassFish server’s Configuration option:

  1. Go to the EJB Container option for EJB Timer Service.
  2. Configure the Timer Datasource to the following:
    jdbc/VDCNetDS
  3. Save the configuration.