JBoss API: Class SingletonStatelessSessionInstancePool

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.ejb.plugins
Class SingletonStatelessSessionInstancePool

    java.lang.Object
      |
      +--org.jboss.ejb.plugins.SingletonStatelessSessionInstancePool

All Implemented Interfaces:
  ContainerPlugin, InstancePool, Service, XmlLoadable

public class SingletonStatelessSessionInstancePool
extends java.lang.Object
implements InstancePool, XmlLoadable

Singleton pool for session beans. This lets you have singletons in EJB!

Version:
  $Revision: 1.6.6.5 $
Author:
  Rickard Öberg (rickard.oberg@telkel.com)
See Also:

Constructor Summary
`SingletonStatelessSessionInstancePool()`

Method Summary
`void` | `add()` Add a instance in the pool
`protected EnterpriseContext` | `create(java.lang.Object instance, Container con)`
`void` | `destroy()`
`void` | `discard(EnterpriseContext ctx)` Discard an anonymous instance after invocation.
`void` | `free(EnterpriseContext ctx)` Return an instance after invocation.
`EnterpriseContext` | `get()` Get the singleton instance
`int` | `getCurrentSize()` Return the size of the pool.
`int` | `getMaxSize()` Get the maximum size of the pool.
`void` | `importXml(org.w3c.dom.Element element)`
`void` | `init()`
`void` | `setContainer(Container c)` Set the callback to the container.
`void` | `start()`
`void` | `stop()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SingletonStatelessSessionInstancePool

    public SingletonStatelessSessionInstancePool()

Method Detail

### setContainer

    public void setContainer(Container c)

  Set the callback to the container. This is for initialization. The pool may extract the configuration from the container.
  Specified by:
    `setContainer` in interface `ContainerPlugin`
  Parameters:
    `c` -

### init

    public void init()
              throws java.lang.Exception

  Specified by:
    `init` in interface `Service`

### start

    public void start()
               throws java.lang.Exception

  Specified by:
    `start` in interface `Service`

### stop

    public void stop()

  Specified by:
    `stop` in interface `Service`

### destroy

    public void destroy()

  Specified by:
    `destroy` in interface `Service`

### get

    public EnterpriseContext get()
                          throws java.lang.Exception

  Get the singleton instance
  Specified by:
    `get` in interface `InstancePool`
  Returns:
    Context /w instance
  Throws:
    `java.rmi.RemoteException` -

### free

    public void free(EnterpriseContext ctx)

  Return an instance after invocation. Called in 2 cases: a) Done with finder method b) Just removed
  Specified by:
    `free` in interface `InstancePool`
  Parameters:
    `ctx` -

### discard

    public void discard(EnterpriseContext ctx)

  Description copied from interface: `InstancePool`
  Discard an anonymous instance after invocation. This is called if the instance should not be reused, perhaps due to some exception being thrown from it.
  Specified by:
    `discard` in interface `InstancePool`
  Following copied from interface: `org.jboss.ejb.InstancePool`
  Parameters:
    `ctx` -

### add

    public void add()
             throws java.lang.Exception

  Add a instance in the pool
  Specified by:
    `add` in interface `InstancePool`
  Following copied from interface: `org.jboss.ejb.InstancePool`
  Throws:
    `java.lang.Exception` - when an Instance can not be instantiated

### getCurrentSize

    public int getCurrentSize()

  Description copied from interface: `InstancePool`
  Return the size of the pool.
  Specified by:
    `getCurrentSize` in interface `InstancePool`
  Following copied from interface: `org.jboss.ejb.InstancePool`
  Returns:
    the size of the pool.

### getMaxSize

    public int getMaxSize()

  Description copied from interface: `InstancePool`
  Get the maximum size of the pool.
  Specified by:
    `getMaxSize` in interface `InstancePool`
  Following copied from interface: `org.jboss.ejb.InstancePool`
  Returns:
    the size of the pool.

### importXml

    public void importXml(org.w3c.dom.Element element)
                   throws java.lang.Exception

  Specified by:
    `importXml` in interface `XmlLoadable`

### create

    protected EnterpriseContext create(java.lang.Object instance,
                                       Container con)
                                throws java.lang.Exception

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 The JBoss Organization. All Rights Reserved.