1 /* 2 * JBoss, Home of Professional Open Source 3 * Copyright 2005, JBoss Inc., and individual contributors as indicated 4 * by the @authors tag. See the copyright.txt in the distribution for a 5 * full listing of individual contributors. 6 * 7 * This is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU Lesser General Public License as 9 * published by the Free Software Foundation; either version 2.1 of 10 * the License, or (at your option) any later version. 11 * 12 * This software is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this software; if not, write to the Free 19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 */ 22 package org.jboss.ejb; 23 24 /** 25 * MBean interface. 26 * @see EJBDeployer 27 */ 28 public interface ContainerMBean extends org.jboss.system.ServiceMBean { 29 30 /** 31 * Gets the application deployment unit for this container. All the bean containers within the same application unit share the same instance. 32 */ 33 org.jboss.ejb.EjbModule getEjbModule() ; 34 35 /** 36 * Gets the number of create invocations that have been made 37 */ 38 long getCreateCount() ; 39 40 /** 41 * Gets the number of remove invocations that have been made 42 */ 43 long getRemoveCount() ; 44 45 /** 46 * Gets the invocation statistics collection 47 */ 48 org.jboss.invocation.InvocationStatistics getInvokeStats() ; 49 50 /** 51 * Get the components environment context 52 * @return Environment Context */ 53 javax.naming.Context getEnvContext() throws javax.naming.NamingException; 54 55 /** 56 * Returns the metadata of this container. 57 * @return metaData; */ 58 org.jboss.metadata.BeanMetaData getBeanMetaData() ; 59 60 /** 61 * Creates the single Timer Servic for this container if not already created 62 * @param pKey Bean id 63 * @return Container Timer Service 64 * @throws IllegalStateException If the type of EJB is not allowed to use the timer service 65 * @see javax.ejb.EJBContext#getTimerService 66 */ 67 javax.ejb.TimerService getTimerService(java.lang.Object pKey) throws java.lang.IllegalStateException; 68 69 /** 70 * Removes Timer Servic for this container 71 * @param pKey Bean id 72 * @throws IllegalStateException If the type of EJB is not allowed to use the timer service 73 */ 74 void removeTimerService(java.lang.Object pKey) throws java.lang.IllegalStateException; 75 76 /** 77 * The detached invoker operation. 78 * @param mi - the method invocation context 79 * @return the value of the ejb invocation 80 * @throws Exception on error */ 81 java.lang.Object invoke(org.jboss.invocation.Invocation mi) throws java.lang.Exception; 82 83 } 84