001 /*
002 * Copyright (C) The Apache Software Foundation. All rights reserved.
003 *
004 * This software is published under the terms of the Apache Software License
005 * version 1.1, a copy of which has been included with this distribution in
006 * the LICENSE file.
007 *
008 * $Id: MessageDrivenObject.java 155459 2005-02-26 13:24:44Z dirkv $
009 */
010 package org.apache.commons.messagelet;
011
012 import javax.jms.MessageListener;
013 import javax.servlet.ServletContext;
014 import javax.servlet.ServletException;
015
016 /** <p><code>MessageDrivenObject</code> is a message driven bean
017 * which is deployed in a Servlet engine as its application server.</p>
018 *
019 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
020 * @version $Revision: 155459 $
021 */
022 public interface MessageDrivenObject extends MessageListener {
023
024 /**
025 * Called when this message listener bean is initialized
026 * by the Serlvet container.
027 */
028 public void init(ServletContext context) throws ServletException;
029
030
031 /**
032 * Called when the web application (servlet context) is being
033 * destroyed, giving the bean chance to do a graceful shutdown
034 */
035 public void destroy();
036 }
037