users@glassfish.java.net

Re: Does Glassfish do email notification?

From: Arun Gupta <arun.gupta_at_gmail.com>
Date: Thu, 17 Oct 2013 20:12:00 -0700

Martin,

Not directly answering your question but
https://github.com/arun-gupta/javaee7-samples/tree/master/javamail/definition
shows a sample on how to use newly added @MailSessionDefinition
annotation. There is no need to invoke asadmin command in this case.

Thanks
Arun

On Thu, Oct 17, 2013 at 6:49 PM, Martin Gainty <mgainty_at_hotmail.com> wrote:
> asadmin>help create-javamail-resource
>
> <Command name="create-javamail-resource"
> classname="com.sun.enterprise.cli.commands.GenericCommand"
> numberofoperands="1" usage-text="create-javamail-resource --mailhost
> hostname --mailuser username --fromaddress address [--terse=false]
> [--echo=false] [--interactive=true] [--host localhost] [--port 5848|4849]
> [--secure | -s] [--user admin_user] [--passwordfile file_name]
> [--storeprotocol imap] [--storeprotocolclass com.sun.mail.imap.IMAPStore]
> [--transprotocol smtp] [--transprotocolclass
> com.sun.mail.smtp.SMTPTransport] [--debug=false] [--enabled=true]
> [--description text] [--property (name=value)[:name=value]*] [--target
> target(Default server)] jndi_name">
> <DeprecatedOption>instance</DeprecatedOption>
> <RequiredOption name="mailhost"/>
> <RequiredOption name="mailuser"/>
> <RequiredOption name="fromaddress"/>
> <ValidOption name="user"/>
> <ValidOption name="password"/>
> <ValidOption name="passwordfile"/>
> <ValidOption name="host"/>
> <ValidOption name="port"/>
> <ValidOption name="secure"/>
> <ValidOption name="interactive"/>
> <ValidOption name="terse"/>
> <ValidOption name="echo"/>
> <ValidOption name="target"/>
> <ValidOption name="storeprotocol"/>
> <ValidOption name="storeprotocolclass"/>
> <ValidOption name="transprotocol"/>
> <ValidOption name="transprotocolclass"/>
> <ValidOption name="debug"/>
> <ValidOption name="description"/>
> <ValidOption name="enabled"/>
> <ValidOption name="property"/>
> <properties>
> <property name="objectname">
> <value>com.sun.appserv:type=resources,category=config</value>
> </property>
> <property name="operation">
> <value>createMailResource</value>
> </property>
> <property name="params">
>
> <value>debug={$debug},store_protocol={$storeprotocol},transport_protocol={$transprotocol},jndi_name={#1},user={$mailuser},enabled={$enabled},from={$fromaddress},transport_protocol_class={$transprotocolclass},description={$description},host={$mailhost},store_protocol_class={$storeprotocolclass}</value>
> <value>{$property}</value>
> <value>{$target}</value>
> </property>
> <property name="paramtypes">
> <value>javax.management.AttributeList</value>
> <value>java.util.Properties</value>
> <value>java.lang.String</value>
> </property>
> <property name="returntype">
> <value>javax.management.ObjectName</value>
> </property>
> <property name="manpage">
> <value>com.sun.enterprise.tools.cli.help</value>
> </property>
> <property name="command-type">
> <value>create</value>
> </property>
> </properties>
> </Command>
>
> I dont see notification in params..possible options i would try
> 1)--property (name=value)
> OR
> 2)write a Q&D replacement for com.sun.enterprise.cli.commands.GenericCommand
> passing the notification=
>
> would be helpful for the person who wrote GenericCommand to weigh in with a
> solution here
>
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
> ________________________________
> From: JHZhang_at_mdanderson.org
> To: users_at_glassfish.java.net
> Subject: Does Glassfish do email notification?
> Date: Thu, 17 Oct 2013 20:59:43 +0000
>
> I noticed that there are monitoring items to be checked for an instance, one
> can set for example HTTP Service to be HIGH. How about notification?
>
>
>
> Jun



-- 
Java EE 7 Essentials: http://shop.oreilly.com/product/0636920030614.do
Java EE 6 Pocket Guide from OReilly:
http://shop.oreilly.com/product/0636920026464.do