Sun GlassFish Enterprise Manager Performance Advisor 1.0 Installation and Quick Start Guide

Configuring a JavaMail Resource

You can configure a JavaMailTM resource in the Enterprise Server for use in management rule notifications. This is optional; you can specify a mail server without specifying a JavaMail resource.

    To use the Admin Console, follow these steps:

  1. Open the Resources node in the left pane.

  2. Select JavaMail Sessions.

  3. Select the New button.

  4. Supply the required information:

    • JNDI Name — Specify a unique name for the JavaMail resource.

    • Mail Host — Specify the hostname of the mail server.

    • Default User — Specify the username of the mail server administrator.

    • Default Return Address — Specify the email address to which replies are sent by default.

  5. Specify the target server instances or clusters that will use the mail server. To specify a target, select the target in the Available Targets list and select the Add button to move it to the Selected Targets list.

    The JavaMail resource must have at least the same targets as the management rules that use it.

  6. Select the OK Button.

You can also use the asadmin create-javamail-resource and asadmin create-resource-ref commands. For example:


asadmin create-javamail-resource --mailhost localhost --mailuser admin 
--fromaddress admin\@company22\.com mail/MyMailSession
asadmin create-resource-ref --target Cluster1 mail/MyMailSession

For more information about the asadmin create-javamail-resource and asadmin create-resource-ref commands, see the Sun GlassFish Enterprise Server 2.1 Reference Manual.