Package org.objectweb.speedo.j2eedo.ejb

Examples of org.objectweb.speedo.j2eedo.ejb.StoreServicesLocal


            if (useSessionBean) {
                //The action will be done by the Session bean
                if (localSessionBean) {
                    //Invoke the session bean through the local interface
                    logger.log(BasicLevel.DEBUG, "Use local session bean");
                    StoreServicesLocal lstoreServices = null;
                    try {
                        lstoreServices = lstoreServicesLH.create();
                    } catch (CreateException e) {
                        logger.log(BasicLevel.ERROR, "Error during the creation of Local Session", e);
                        throw new ServletException(e);
                    }
                    try {
                        ServletOutputStream out = resp.getOutputStream();
                        out.println(lstoreServices.doAction(pmh, action));
                    } finally {
                        //release the session bean from the pool
                        lstoreServices.remove();
                    }
                } else {
                    //Invoke the session bean through the Remote interface
                    logger.log(BasicLevel.DEBUG, "Use remote session bean");
                    StoreServicesRemote lstoreServices = null;
                    try {
                        lstoreServices = lstoreServicesRH.create();
                    } catch (CreateException e) {
                        logger.log(BasicLevel.ERROR, "Error during the creation of Local Session", e);
                        throw new ServletException(e);
                    }
                    try {
                        ServletOutputStream out = resp.getOutputStream();
                        out.println(lstoreServices.doAction(action));
                    } finally {
                        //release the session bean from the pool
                        lstoreServices.remove();
                    }
                }
            } else {
                logger.log(BasicLevel.DEBUG, "Use direct call");
                ServletOutputStream out = resp.getOutputStream();
View Full Code Here


      if (useSessionBean) {
          //The action will be done by the Session bean
          if (localSessionBean) {
              //Invoke the session bean through the local interface
          logger.log(BasicLevel.DEBUG, "Use local session bean");
          StoreServicesLocal lstoreServices = null;
          try {
            lstoreServices = lstoreServicesLH.create();
          } catch (CreateException e) {
            logger.log(BasicLevel.ERROR, "Error during the creation of Local Session", e);
            throw new ServletException(e);
          }
          try {
              executeSessionBean(req, resp, lstoreServices, pmh);
          } finally {
              //release the session bean from the pool
              lstoreServices.remove();
          }
          } else {
              //Invoke the session bean through the Remote interface
          logger.log(BasicLevel.DEBUG, "Use remote session bean");
          StoreServicesRemote lstoreServices = null;
          try {
            lstoreServices = lstoreServicesRH.create();
          } catch (CreateException e) {
            logger.log(BasicLevel.ERROR, "Error during the creation of Local Session", e);
            throw new ServletException(e);
          }
          try {
              executeSessionBean(req, resp, lstoreServices);
          } finally {
              //release the session bean from the pool
              lstoreServices.remove();
          }
          }
      } else {
        logger.log(BasicLevel.DEBUG, "Use direct call");
        executeDirectCall(req, resp, pmh);
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.j2eedo.ejb.StoreServicesLocal

Copyright © 2018 www.massapicom. 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.