Java Doc for Container.java in  » EJB-Server-JBoss-4.2.1 » server » org » jboss » ejb » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server JBoss 4.2.1 » server » org.jboss.ejb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jboss.ejb.Container

All known Subclasses:   org.jboss.ejb.EntityContainer,  org.jboss.ejb.SessionContainer,  org.jboss.ejb.MessageDrivenContainer,
Container
abstract public class Container extends ServiceMBeanSupport implements ContainerMBean,AllowedOperationsFlags(Code)
This is the base class for all EJB-containers in JBoss. A Container functions as the central hub of all metadata and plugins. Through this the container plugins can get hold of the other plugins and any metadata they need.

The EJBDeployer creates instances of subclasses of this class and calls the appropriate initialization methods.

A Container does not perform any significant work, but instead delegates to the plugins to provide for all kinds of algorithmic functionality.
See Also:   EJBDeployer
author:
   Rickard �berg
author:
   Marc Fleury
author:
   Scott Stark.
author:
   Bill Burke
author:
   David Jencks
author:
   Christoph G. Jung
author:
   Dimitris Andreadis
version:
   $Revision: 61864 $


Inner Class :abstract protected class AbstractContainerInterceptor implements Interceptor
Inner Class :class MBeanServerAction implements PrivilegedExceptionAction

Field Summary
final public static  StringBASE_EJB_CONTAINER_NAME
    
final protected static  MethodEJBOBJECT_REMOVE
    
final public static  ObjectNameEJB_CONTAINER_QUERY_NAME
    
final protected static  MethodEJB_TIMEOUT
     A reference to javax.ejb.TimedObject.ejbTimeout .
final public static  ObjectNameORB_NAME
    
protected  ClassbeanClass
    
protected  ClassLoaderclassLoader
     This is the classloader of this container.
protected  longcreateCount
    
protected  EjbModuleejbModule
    
protected  ClasshomeInterface
    
protected  InvocationStatisticsinvokeStats
    
protected  booleanisJaccEnabled
    
protected  StringjaccContextID
    
protected  ClassLoaderlocalClassLoader
     This is the local classloader of this container.
protected  ClasslocalHomeInterface
    
protected  ClasslocalInterface
    
protected  LocalProxyFactorylocalProxyFactory
    
protected  BeanLockManagerlockManager
    
protected  MapmarshalledInvocationMapping
    
protected  BeanMetaDatametaData
     This is the new metadata.
protected  HashMapproxyFactories
    
protected  ThreadLocalproxyFactoryTL
     The Proxy factory is set in the Invocation.
protected  ClassremoteInterface
    
protected  longremoveCount
    
protected  RealmMappingrm
    
protected  ObjectsecurityProxy
    
protected  AuthenticationManagersm
    
protected  TransactionManagertm
    
protected  ClassLoaderwebClassLoader
    


Method Summary
abstract public  voidaddInterceptor(Interceptor in)
    
public  voidaddProxyFactory(String invokerBinding, EJBProxyFactory factory)
    
public  ObjectcreateBeanClassInstance()
     Returns a new instance of the bean class or a subclass of the bean class. This factory style method is speciffically used by a container to supply an implementation of the abstract accessors in EJB2.0, but could be usefull in other situations.
abstract  InterceptorcreateContainerInterceptor()
    
protected  voidcreateService()
     The EJBDeployer calls this method.
protected  voiddestroyService()
     A default implementation of destroying the container service (no-op).
public  ClassgetBeanClass()
     Returns the bean class instance of this container.
public  BeanMetaDatagetBeanMetaData()
     Returns the metadata of this container.
public  ClassLoadergetClassLoader()
     Returns the classloader for this container.
public  longgetCreateCount()
    
final public  DeploymentInfogetDeploymentInfo()
    
public  EjbModulegetEjbModule()
     Gets the application deployment unit for this container.
public  ContextgetEnvContext()
    
public  ClassgetHomeClass()
    
public  InvocationStatisticsgetInvokeStats()
    
public  StringgetJaccContextID()
    
public  ObjectNamegetJmxName()
     Build a JMX name using the pattern jboss.j2ee:service=EJB,jndiName=[jndiName] where the [jndiName] is either the bean remote home JNDI binding, or the local home JNDI binding if the bean has no remote interfaces.
public  ClassgetLocalClass()
    
public  ClassLoadergetLocalClassLoader()
     Returns the local classloader for this container.
public  ClassgetLocalHomeClass()
    
public  BeanLockManagergetLockManager()
    
public  MessageDestinationMetaDatagetMessageDestination(String link)
    
public  SetgetMethodPermissions(Method m, InvocationType iface)
     Returns the permissions for a method.
public  EJBProxyFactorygetProxyFactory()
    
public  RealmMappinggetRealmMapping()
    
public  ClassgetRemoteClass()
    
public  longgetRemoveCount()
    
public  AuthenticationManagergetSecurityManager()
    
public  ObjectgetSecurityProxy()
    
public  TimerServicegetTimerService(Object pKey)
    
public  TransactionManagergetTransactionManager()
     Returns this container's transaction manager.
public  ClassLoadergetWebClassLoader()
     Get the class loader for dynamic class loading via http.
abstract public  ObjectinternalInvoke(Invocation mi)
     This method is called when a method call comes in on an EJBObject.
abstract public  ObjectinternalInvokeHome(Invocation mi)
     This method is called when a method call comes in on the Home object.
public  Objectinvoke(Invocation mi)
     The detached invoker operation.
public  booleanisCallByValue()
    
public  booleanisJaccEnabled()
    
public  EJBProxyFactorylookupProxyFactory(String binding)
    
public  voidremoveTimerService(Object pKey)
    
protected  voidrestoreTimers()
    
public  voidsetBeanMetaData(BeanMetaData metaData)
     Sets the meta data for this container.
public  voidsetClassLoader(ClassLoader cl)
     Sets the class loader for this container.
final public  voidsetDeploymentInfo(DeploymentInfo di)
    
public  voidsetEjbModule(EjbModule app)
     Sets the application deployment unit for this container.
public  voidsetJaccContextID(String id)
    
public  voidsetJaccEnabled(boolean isJaccEnabled)
    
public  voidsetLocalClassLoader(ClassLoader cl)
     Sets the local class loader for this container.
public  voidsetLockManager(BeanLockManager lockManager)
    
public  voidsetProxyFactory(Object factory)
    
public  voidsetRealmMapping(RealmMapping rm)
    
public  voidsetSecurityManager(AuthenticationManager sm)
    
public  voidsetSecurityProxy(Object proxy)
    
public  voidsetTransactionManager(TransactionManager tm)
     Sets a transaction manager for this container.
public  voidsetWebClassLoader(ClassLoader webClassLoader)
     Set the class loader for dynamic class loading via http.
protected  voidstartService()
     A default implementation of starting the container service.
protected  voidstopService()
     A default implementation of stopping the container service (no-op).

Field Detail
BASE_EJB_CONTAINER_NAME
final public static String BASE_EJB_CONTAINER_NAME(Code)



EJBOBJECT_REMOVE
final protected static Method EJBOBJECT_REMOVE(Code)



EJB_CONTAINER_QUERY_NAME
final public static ObjectName EJB_CONTAINER_QUERY_NAME(Code)



EJB_TIMEOUT
final protected static Method EJB_TIMEOUT(Code)
A reference to javax.ejb.TimedObject.ejbTimeout .



ORB_NAME
final public static ObjectName ORB_NAME(Code)



beanClass
protected Class beanClass(Code)
This is the EnterpriseBean class



classLoader
protected ClassLoader classLoader(Code)
This is the classloader of this container. All classes and resources that the bean uses will be loaded from here. By doing this we make the bean re-deployable



createCount
protected long createCount(Code)
The number of create invocations that have been made



ejbModule
protected EjbModule ejbModule(Code)
This is the application that this container is a part of



homeInterface
protected Class homeInterface(Code)
This is the Home interface class



invokeStats
protected InvocationStatistics invokeStats(Code)
Time statistics for the invoke(Invocation) methods



isJaccEnabled
protected boolean isJaccEnabled(Code)
Flag to denote whether a JACC configuration has been fitted for authorization



jaccContextID
protected String jaccContextID(Code)
The JACC context id for the container



localClassLoader
protected ClassLoader localClassLoader(Code)
This is the local classloader of this container. Used for loading resources that must come from the local jar file for the container. NOT for loading classes!



localHomeInterface
protected Class localHomeInterface(Code)
The local home interface class



localInterface
protected Class localInterface(Code)
The local inteface class



localProxyFactory
protected LocalProxyFactory localProxyFactory(Code)
???



lockManager
protected BeanLockManager lockManager(Code)
This is the bean lock manager that is to be used



marshalledInvocationMapping
protected Map marshalledInvocationMapping(Code)
Maps for MarshalledInvocation mapping



metaData
protected BeanMetaData metaData(Code)
This is the new metadata. it includes information from both ejb-jar and jboss.xml the metadata for the application can be accessed trough metaData.getApplicationMetaData()



proxyFactories
protected HashMap proxyFactories(Code)
HashMap for the invoker bindings



proxyFactoryTL
protected ThreadLocal proxyFactoryTL(Code)
The Proxy factory is set in the Invocation. This TL is used for methods that do not have access to the Invocation.



remoteInterface
protected Class remoteInterface(Code)
This is the Remote interface class



removeCount
protected long removeCount(Code)
The number of create invocations that have been made



rm
protected RealmMapping rm(Code)
This is the realm mapping



securityProxy
protected Object securityProxy(Code)
The custom security proxy used by the SecurityInterceptor



sm
protected AuthenticationManager sm(Code)
This is the SecurityManager



tm
protected TransactionManager tm(Code)
This is the TransactionManager



webClassLoader
protected ClassLoader webClassLoader(Code)
The class loader for remote dynamic classloading





Method Detail
addInterceptor
abstract public void addInterceptor(Interceptor in)(Code)



addProxyFactory
public void addProxyFactory(String invokerBinding, EJBProxyFactory factory)(Code)



createBeanClassInstance
public Object createBeanClassInstance() throws Exception(Code)
Returns a new instance of the bean class or a subclass of the bean class. This factory style method is speciffically used by a container to supply an implementation of the abstract accessors in EJB2.0, but could be usefull in other situations. This method should ALWAYS be used instead of getBeanClass().newInstance(); the new instance
See Also:   java.lang.Class.newInstance



createContainerInterceptor
abstract Interceptor createContainerInterceptor()(Code)



createService
protected void createService() throws Exception(Code)
The EJBDeployer calls this method. The EJBDeployer has set all the plugins and interceptors that this bean requires and now proceeds to initialize the chain. The method looks for the standard classes in the URL, sets up the naming environment of the bean. The concrete container classes should override this method to introduce implementation specific initialization behaviour.
throws:
  Exception - if loading the bean class failed(ClassNotFoundException) or setting up "java:"naming environment failed (DeploymentException)



destroyService
protected void destroyService() throws Exception(Code)
A default implementation of destroying the container service (no-op). The concrete container classes should override this method to introduce implementation specific destroy behaviour.



getBeanClass
public Class getBeanClass()(Code)
Returns the bean class instance of this container. instance of the Enterprise bean class.



getBeanMetaData
public BeanMetaData getBeanMetaData()(Code)
Returns the metadata of this container. metaData;



getClassLoader
public ClassLoader getClassLoader()(Code)
Returns the classloader for this container.



getCreateCount
public long getCreateCount()(Code)
Gets the number of create invocations that have been made



getDeploymentInfo
final public DeploymentInfo getDeploymentInfo()(Code)
Gets the DeploymentInfo for this Container The DeploymentInfo for this Container



getEjbModule
public EjbModule getEjbModule()(Code)
Gets the application deployment unit for this container. All the bean containers within the same application unit share the same instance.



getEnvContext
public Context getEnvContext() throws NamingException(Code)
Get the components environment context Environment Context



getHomeClass
public Class getHomeClass()(Code)
this actually should be called remotehome, but for interface compliance purposes we keep it like that



getInvokeStats
public InvocationStatistics getInvokeStats()(Code)
Gets the invocation statistics collection



getJaccContextID
public String getJaccContextID()(Code)



getJmxName
public ObjectName getJmxName()(Code)
Build a JMX name using the pattern jboss.j2ee:service=EJB,jndiName=[jndiName] where the [jndiName] is either the bean remote home JNDI binding, or the local home JNDI binding if the bean has no remote interfaces.



getLocalClass
public Class getLocalClass()(Code)



getLocalClassLoader
public ClassLoader getLocalClassLoader()(Code)
Returns the local classloader for this container. The local classloader for this container.



getLocalHomeClass
public Class getLocalHomeClass()(Code)



getLockManager
public BeanLockManager getLockManager()(Code)



getMessageDestination
public MessageDestinationMetaData getMessageDestination(String link)(Code)



getMethodPermissions
public Set getMethodPermissions(Method m, InvocationType iface)(Code)
Returns the permissions for a method. (a set of roles) assemblyDescriptor;



getProxyFactory
public EJBProxyFactory getProxyFactory()(Code)



getRealmMapping
public RealmMapping getRealmMapping()(Code)



getRemoteClass
public Class getRemoteClass()(Code)



getRemoveCount
public long getRemoveCount()(Code)
Gets the number of remove invocations that have been made



getSecurityManager
public AuthenticationManager getSecurityManager()(Code)



getSecurityProxy
public Object getSecurityProxy()(Code)



getTimerService
public TimerService getTimerService(Object pKey) throws IllegalStateException(Code)
Creates the single Timer Service for this container if not already created
Parameters:
  pKey - Bean id Container Timer Service
throws:
  IllegalStateException - If the type of EJB is not allowed to use thetimer service, or the bean class does not implement javax.ejb.TimedObject
See Also:   javax.ejb.EJBContext.getTimerService



getTransactionManager
public TransactionManager getTransactionManager()(Code)
Returns this container's transaction manager. A concrete instance of javax.transaction.TransactionManager



getWebClassLoader
public ClassLoader getWebClassLoader()(Code)
Get the class loader for dynamic class loading via http.



internalInvoke
abstract public Object internalInvoke(Invocation mi) throws Exception(Code)
This method is called when a method call comes in on an EJBObject. The Container forwards this call to the interceptor chain for further processing.



internalInvokeHome
abstract public Object internalInvokeHome(Invocation mi) throws Exception(Code)
This method is called when a method call comes in on the Home object. The Container forwards this call to the interceptor chain for further processing.
Parameters:
  mi - the object holding all info about this invocation the result of the home invocation
throws:
  Exception -



invoke
public Object invoke(Invocation mi) throws Exception(Code)
The detached invoker operation.
Parameters:
  mi - - the method invocation context the value of the ejb invocation
throws:
  Exception - on error



isCallByValue
public boolean isCallByValue()(Code)
Whether the bean is call by value true for call by value



isJaccEnabled
public boolean isJaccEnabled()(Code)
Get the flag whether JACC is enabled



lookupProxyFactory
public EJBProxyFactory lookupProxyFactory(String binding)(Code)



removeTimerService
public void removeTimerService(Object pKey) throws IllegalStateException(Code)
Removes Timer Service for this container
Parameters:
  pKey - Bean id
throws:
  IllegalStateException - If the type of EJB is not allowed to use the timer service



restoreTimers
protected void restoreTimers()(Code)
Restore any timers previously persisted for this container



setBeanMetaData
public void setBeanMetaData(BeanMetaData metaData)(Code)
Sets the meta data for this container. The meta data consists of the properties found in the XML descriptors.
Parameters:
  metaData -



setClassLoader
public void setClassLoader(ClassLoader cl)(Code)
Sets the class loader for this container. All the classes and resources used by the bean in this container will use this classloader.
Parameters:
  cl -



setDeploymentInfo
final public void setDeploymentInfo(DeploymentInfo di)(Code)
Sets the DeploymentInfo of this Container
Parameters:
  di - The new DeploymentInfo to be used



setEjbModule
public void setEjbModule(EjbModule app)(Code)
Sets the application deployment unit for this container. All the bean containers within the same application unit share the same instance.
Parameters:
  app - application for this container



setJaccContextID
public void setJaccContextID(String id)(Code)



setJaccEnabled
public void setJaccEnabled(boolean isJaccEnabled)(Code)
Set the flag that JACC is enabled
Parameters:
  isJaccEnabled -



setLocalClassLoader
public void setLocalClassLoader(ClassLoader cl)(Code)
Sets the local class loader for this container. Used for loading resources from the local jar file for this container. NOT for loading classes!
Parameters:
  cl -



setLockManager
public void setLockManager(BeanLockManager lockManager)(Code)



setProxyFactory
public void setProxyFactory(Object factory)(Code)



setRealmMapping
public void setRealmMapping(RealmMapping rm)(Code)



setSecurityManager
public void setSecurityManager(AuthenticationManager sm)(Code)



setSecurityProxy
public void setSecurityProxy(Object proxy)(Code)



setTransactionManager
public void setTransactionManager(TransactionManager tm)(Code)
Sets a transaction manager for this container.
See Also:   javax.transaction.TransactionManager
Parameters:
  tm -



setWebClassLoader
public void setWebClassLoader(ClassLoader webClassLoader)(Code)
Set the class loader for dynamic class loading via http.



startService
protected void startService() throws Exception(Code)
A default implementation of starting the container service. The container registers it's dynamic MBean interface in the JMX base. The concrete container classes should override this method to introduce implementation specific start behaviour. todo implement the service lifecycle methods in an xmbean interceptor so non lifecycle managed ops are blocked when mbean is not started.
throws:
  Exception - An exception that occured during start



stopService
protected void stopService() throws Exception(Code)
A default implementation of stopping the container service (no-op). The concrete container classes should override this method to introduce implementation specific stop behaviour.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.