01: /**
02: * JOnAS: Java(TM) Open Application Server Copyright (C) 1999-2004 Bull S.A. Contact:
03: * jonas-team@objectweb.org This library is free software; you can redistribute
04: * it and/or modify it under the terms of the GNU Lesser General Public License
05: * as published by the Free Software Foundation; either version 2.1 of the
06: * License, or any later version. This library is distributed in the hope that
07: * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
08: * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
09: * Lesser General Public License for more details. You should have received a
10: * copy of the GNU Lesser General Public License along with this library; if
11: * not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
12: * Boston, MA 02111-1307 USA
13: * --------------------------------------------------------------------------
14: * $Id: JTAResourceMBean.java 9118 2006-07-05 13:23:44Z sauthieg $
15: * --------------------------------------------------------------------------
16: */package org.objectweb.jonas.jtm;
17:
18: import javax.management.MBeanException;
19: import javax.management.NotificationFilter;
20: import javax.management.NotificationListener;
21:
22: import org.apache.commons.modeler.BaseModelMBean;
23:
24: /**
25: * MBean class for JTA resource management.
26: * @author Adriana Danes
27: */
28:
29: public class JTAResourceMBean extends BaseModelMBean {
30:
31: // ----------------------------- Contructors
32:
33: public JTAResourceMBean() throws MBeanException {
34: super ();
35: }
36:
37: // ------------------------------- Public methods
38:
39: /**
40: * Add a new listener.
41: * @param pListener Listener to notify
42: * @param pFilter Notification filter
43: * @param pHandback handback object reference
44: * @throws java.lang.IllegalArgumentException Listener parameter is null
45: */
46: public void addNotificationListener(NotificationListener pListener,
47: NotificationFilter pFilter, java.lang.Object pHandback)
48: throws java.lang.IllegalArgumentException {
49: ((JTAResource) (this.resource)).addNotificationListener(
50: pListener, pFilter, pHandback);
51: }
52: }
|