Save This Page
Home » openejb-3.1.2-src » org.apache » openejb » core » stateless » [javadoc | source]
org.apache.openejb.core.stateless
public class: StatelessInstanceManager [javadoc | source]
java.lang.Object
   org.apache.openejb.core.stateless.StatelessInstanceManager
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Field Summary
protected  int poolLimit     
protected  Duration timeout     
protected  int beanCount     
protected  boolean strictPooling     
protected final  SafeToolkit toolkit     
Constructor:
 public StatelessInstanceManager(SecurityService securityService,
    Duration timeout,
    int poolSize,
    boolean strictPooling) 
Method from org.apache.openejb.core.stateless.StatelessInstanceManager Summary:
deploy,   discardInstance,   getInstance,   poolInstance,   undeploy
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openejb.core.stateless.StatelessInstanceManager Detail:
 public  void deploy(CoreDeploymentInfo deploymentInfo) 
 public  void discardInstance(ThreadContext callContext) 
    This method is called to release the semaphore in case of the business method throwing a system exception
 public Object getInstance(ThreadContext callContext) throws OpenEJBException 
    Removes an instance from the pool and returns it for use by the container in business methods. If the pool is at it's limit the StrictPooling flag will cause this thread to wait. If StrictPooling is not enabled this method will create a new stateless bean instance performing all required injection and callbacks before returning it in a method ready state.
 public  void poolInstance(ThreadContext callContext,
    Object bean) throws OpenEJBException 
    All instances are removed from the pool in getInstance(...). They are only returned by the StatelessContainer via this method under two circumstances. 1. The business method returns normally 2. The business method throws an application exception Instances are not returned to the pool if the business method threw a system exception.
 public  void undeploy(CoreDeploymentInfo deploymentInfo)