Package org.apache.openejb.util

Examples of org.apache.openejb.util.Stack.push()


        CoreDeploymentInfo deploymentInfo = callContext.getDeploymentInfo();
        Data data = (Data) deploymentInfo.getContainerData();
        Stack pool = data.getPool();

        if (strictPooling) {
            pool.push(bean);
            data.getSemaphore().release();
        } else {
            if (pool.size() >= poolLimit) {
                freeInstance(callContext, (Instance)bean);
            } else {
View Full Code Here


            data.getSemaphore().release();
        } else {
            if (pool.size() >= poolLimit) {
                freeInstance(callContext, (Instance)bean);
            } else {
                pool.push(bean);
            }
        }
    }

    private void freeInstance(ThreadContext callContext, Instance instance) {
View Full Code Here

                    /*
                    * If the bean has been removed then the bean instance is no longer needed and can return to the methodReadyPool
                    * to service another identity.
                    */
                    Stack methodReadyPool = poolMap.get(callContext.getDeploymentInfo().getDeploymentID());
                    methodReadyPool.push(bean);
                } else {
                    if (callContext.getCurrentOperation() == Operation.CREATE) {
                        // Bean is being recreated (new-delete-new) so we need to reassociate it
                        wrapper.associate();
                    }
View Full Code Here

            * The bean is returned to the method ready pool if its returned after servicing a find, ejbHome, business or create
            * method and is not still part of a tx.  While in the method ready pool the bean instance is not associated with a
            * primary key and may be used to service a request for any bean of the same class.
            */
            Stack methodReadyPool = poolMap.get(callContext.getDeploymentInfo().getDeploymentID());
            methodReadyPool.push(bean);
        }

    }

    public void freeInstance(ThreadContext callContext, EntityBean bean) throws SystemException {
View Full Code Here

        CoreDeploymentInfo deploymentInfo = callContext.getDeploymentInfo();
        Data data = (Data) deploymentInfo.getContainerData();
        Stack pool = data.getPool();

        if (strictPooling) {
            pool.push(bean);
            poolQueue.notifyWaitingThreads();
        } else {
            if (pool.size() >= poolLimit) {
                freeInstance(callContext, (Instance)bean);
            } else {
View Full Code Here

            poolQueue.notifyWaitingThreads();
        } else {
            if (pool.size() >= poolLimit) {
                freeInstance(callContext, (Instance)bean);
            } else {
                pool.push(bean);
            }
        }
    }

    private void freeInstance(ThreadContext callContext, Instance instance) {
View Full Code Here

                    /*
                    * If the bean has been removed then the bean instance is no longer needed and can return to the methodReadyPool
                    * to service another identity.
                    */
                    Stack methodReadyPool = poolMap.get(callContext.getBeanContext().getDeploymentID());
                    methodReadyPool.push(bean);
                } else {
                    if (callContext.getCurrentOperation() == Operation.CREATE) {
                        // Bean is being recreated (new-delete-new) so we need to reassociate it
                        wrapper.associate();
                    }
View Full Code Here

            * The bean is returned to the method ready pool if its returned after servicing a find, ejbHome, business or create
            * method and is not still part of a tx.  While in the method ready pool the bean instance is not associated with a
            * primary key and may be used to service a request for any bean of the same class.
            */
            Stack methodReadyPool = poolMap.get(callContext.getBeanContext().getDeploymentID());
            methodReadyPool.push(bean);
        }

    }

    public void freeInstance(ThreadContext callContext, EntityBean bean) throws SystemException {
View Full Code Here

        CoreDeploymentInfo deploymentInfo = callContext.getDeploymentInfo();
        Data data = (Data) deploymentInfo.getContainerData();
        Stack pool = data.getPool();

        if (strictPooling) {
            pool.push(bean);
            poolQueue.notifyWaitingThreads();
        } else {
            if (pool.size() >= poolLimit) {
                freeInstance(callContext, (Instance)bean);
            } else {
View Full Code Here

            poolQueue.notifyWaitingThreads();
        } else {
            if (pool.size() >= poolLimit) {
                freeInstance(callContext, (Instance)bean);
            } else {
                pool.push(bean);
            }
        }
    }

    private void freeInstance(ThreadContext callContext, Instance instance) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.