⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mailerejb.java~

📁 J2EE & Tomcat books published by hope
💻 JAVA~
字号:
/*
 * $Id: MailerEJB.java~,v 1.3 2002/04/26 00:52:03 jc123804 Exp $
 * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
 * Copyright 2001 Sun Microsystems, Inc. Tous droits r閟erv閟.
 */

package com.sun.j2ee.blueprints.mail.ejb;

import java.rmi.RemoteException;

import javax.ejb.EJBException;
import javax.ejb.FinderException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;

import com.sun.j2ee.blueprints.mail.exceptions.MailerAppException;

/**
 *  Session Bean implementation of MailerEJB.
 *  Used to send a mail messageconfirmation such as anemail
 *  to a customer after a purchase is completed.
 *  This functionality is enabled by the petstore by modifying the
 *  sendConfirmationMail property of the petstore at deployment time.
 *
 *  @see MailHelper
*/

public class MailerEJB implements SessionBean {

    public void ejbCreate() {}

    public void setSessionContext(SessionContext sc) {}

    public void ejbRemove() {}

    public void ejbActivate() {}

    public void ejbPassivate() {}

    /**
     * This method sends an email message. Most of the mailing logic
     * is in the MailHelper class.
     *
     * @param  eMess  content  for the email message and also the
     *                information such as recipient required to
     *                send the message.
     * @see    EMailMessage
     * @see    MailHelper
     */
    public void sendMail(EMailMessage eMess) throws MailerAppException {

        // Exception is just declared as there is only one recoverable
        // app exception that is thrown by the MailHelper which should be
        // passed on as it is

        getMailHelper().createAndSendMail(eMess);
    }

    private MailHelper getMailHelper() {
        return (new MailHelper());
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -