此内容没有您所选择的语言版本。

30.3.2. Container Plug-in Framework


The JBoss EJB container uses a framework pattern that allows one to change implementations of various aspects of the container behavior. The container itself does not perform any significant work other than connecting the various behavioral components together. Implementations of the behavioral components are referred to as plug-ins, because you can plug in a new implementation by changing a container configuration. Examples of plug-in behavior you may want to change include persistence management, object pooling, object caching, container invokers and interceptors. There are four subclasses of the org.jboss.ejb.Container class, each one implementing a particular bean type:
  • org.jboss.ejb.EntityContainer: handles javax.ejb.EntityBean types
  • org.jboss.ejb.StatelessSessionContainer: handles Stateless javax.ejb.SessionBean types
  • org.jboss.ejb.StatefulSessionContainer: handles Stateful javax.ejb.SessionBean types
  • org.jboss.ejb.MessageDrivenContainer handles javax.ejb.MessageDrivenBean types
The EJB containers delegate much of their behavior to components known as container plug-ins. The interfaces that make up the container plug-in points include the following:
  • org.jboss.ejb.ContainerPlugin
  • org.jboss.ejb.ContainerInvoker
  • org.jboss.ejb.Interceptor
  • org.jboss.ejb.InstancePool
  • org.jboss.ejb.InstanceCache
  • org.jboss.ejb.EntityPersistanceManager
  • org.jboss.ejb.EntityPersistanceStore
  • org.jboss.ejb.StatefulSessionPersistenceManager
The container's main responsibility is to manage its plug-ins. This means ensuring that the plug-ins have all the information they need to implement their functionality.

30.3.2.1. org.jboss.ejb.ContainerPlugin

The ContainerPlugin interface is the parent interface of all container plug-in interfaces. It provides a callback that allows a container to provide each of its plug-ins a pointer to the container the plug-in is working on behalf of. The ContainerPlugin interface is given below.

Example 30.4. The org.jboss.ejb.ContainerPlugin interface

public interface ContainerPlugin
    extends Service, AllowedOperationsFlags
{
    /** co
     * This callback is set by the container so that the plugin
     * may access its container
     *
     * @param con the container which owns the plugin
     */
    public void setContainer(Container con);
}
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat