01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * 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()
54: throws javax.naming.NamingException;
55:
56: /**
57: * Returns the metadata of this container.
58: * @return metaData; */
59: org.jboss.metadata.BeanMetaData getBeanMetaData();
60:
61: /**
62: * Creates the single Timer Servic for this container if not already created
63: * @param pKey Bean id
64: * @return Container Timer Service
65: * @throws IllegalStateException If the type of EJB is not allowed to use the timer service
66: * @see javax.ejb.EJBContext#getTimerService
67: */
68: javax.ejb.TimerService getTimerService(java.lang.Object pKey)
69: throws java.lang.IllegalStateException;
70:
71: /**
72: * Removes Timer Servic for this container
73: * @param pKey Bean id
74: * @throws IllegalStateException If the type of EJB is not allowed to use the timer service
75: */
76: void removeTimerService(java.lang.Object pKey)
77: throws java.lang.IllegalStateException;
78:
79: /**
80: * The detached invoker operation.
81: * @param mi - the method invocation context
82: * @return the value of the ejb invocation
83: * @throws Exception on error */
84: java.lang.Object invoke(org.jboss.invocation.Invocation mi)
85: throws java.lang.Exception;
86:
87: }
|