Package com.sun.enterprise.admin.monitor.callflow

Examples of com.sun.enterprise.admin.monitor.callflow.Agent


            }
        }
    }

    public void setFlushMode(FlushModeType flushMode) {
        Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
        try {
            if(callFlowAgent.isEnabled()) {
                callFlowAgent.entityManagerMethodStart(EntityManagerMethod.SET_FLUSH_MODE);
            }
            _getDelegate().setFlushMode(flushMode);
        } finally {
            if( nonTxEntityManager != null ) {
                cleanupNonTxEntityManager();
            }
            if(callFlowAgent.isEnabled()) {
                callFlowAgent.entityManagerMethodEnd();
            }
        }
    }
View Full Code Here


    public void joinTransaction() {
        // Doesn't apply to the container-managed case, but all the
        // spec says is that an exception should be thrown if called
        // without a tx.
        doTxRequiredCheck();
        Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
        if(callFlowAgent.isEnabled()) {
            callFlowAgent.entityManagerMethodStart(EntityManagerMethod.JOIN_TRANSACTION);
            callFlowAgent.entityManagerMethodEnd();
        }

        // There's no point in calling anything on the physical
        // entity manager since in all tx cases it will be
        // correctly associated with a tx already.
View Full Code Here

    public void destroy() {}

    public void receive_request(ServerRequestInfo sri)   
    {
        Socket s = null;
        Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
        // callFlowAgent should never be null.
  // If the else block is executed, its a bug.
  // more investigation needed
  if (callFlowAgent != null) {
      boolean callFlowEnabled = callFlowAgent.isEnabled();
      if (callFlowEnabled){
          // Only do callflow RequestStart,
          // If it is a ejb call and not a is_a call. For everything else
          // do a startTime for OTHER Container
          if (isEjbCall(sri)){
        try {
            try{
          Connection c = ((RequestInfoExt)sri).connection();
          if (c != null) {
              s = c.getSocket();
          }
      } finally {
          String callerIPAddress = null;
          if (s != null) {
                                callerIPAddress = s.getInetAddress().getHostAddress();
          }
          callFlowAgent.requestStart(RequestType.REMOTE_EJB);
          callFlowAgent.addRequestInfo(
               RequestInfo.CALLER_IP_ADDRESS, callerIPAddress);
      }
        } catch (Exception ex){
            _logger.log( Level.WARNING,
             "Callflow Agent's requestStart exception" + ex);
        }
    } else {
        try {
            callFlowAgent.startTime(ContainerTypeOrApplicationType.ORB_CONTAINER);
        } catch (Exception ex){
            _logger.log( Level.WARNING,
             "Callflow Agent's starttime exception" + ex);
        }
    }
View Full Code Here

            checkTransaction(sri);
        } finally {
            if (isEjbCall(sri)) {
                Switch.getSwitch().getTransactionManager().cleanTxnTimeout();
            }
            Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
      // callFlowAgent should never be null.
      // If the else block is executed, its a bug.
      // more investigation needed
            if (callFlowAgent != null) {
          boolean callFlowEnabled = callFlowAgent.isEnabled();
    if(callFlowEnabled){
        if (isEjbCall(sri)){
            try {
          callFlowAgent.requestEnd();
      } catch (Exception ex) {
          _logger.log(
              Level.WARNING,
              "Callflow Agent's requestEnd method exception" + ex);
      }
        } else {
            try {
          callFlowAgent.endTime();
      } catch (Exception ex) {
          _logger.log(
          Level.WARNING,
          "Callflow Agent's endtime method exception" + ex);
      }
View Full Code Here

            checkTransaction(sri);
        } finally {
            if (isEjbCall(sri)) {
                Switch.getSwitch().getTransactionManager().cleanTxnTimeout();
            }
            Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
      // callFlowAgent should never be null.
      // If the else block is executed, its a bug.
      // more investigation needed
             if (callFlowAgent != null) {        
           boolean callFlowEnabled = callFlowAgent.isEnabled();
     if(callFlowEnabled){
         if (isEjbCall(sri)){
             try {
           callFlowAgent.requestEnd();
       } catch (Exception ex) {
           _logger.log(
               Level.WARNING,
               "Callflow Agent's requestEnd method exception" + ex);
       }
         } else {
             try {
           callFlowAgent.endTime();
       } catch (Exception ex) {
           _logger.log(
           Level.WARNING,
           "Callflow Agent's endtime method exception" + ex);
       }
View Full Code Here

            checkTransaction(sri);
        } finally {
            if (isEjbCall(sri)) {
                Switch.getSwitch().getTransactionManager().cleanTxnTimeout();
            }
            Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
      // callFlowAgent should never be null.
      // If the else block is executed, its a bug.
      // more investigation needed
      if (callFlowAgent != null) {
          boolean callFlowEnabled = callFlowAgent.isEnabled();
    if(callFlowEnabled){
        if (isEjbCall(sri)) {
            try {
          callFlowAgent.requestEnd();
      } catch (Exception ex) {
          _logger.log(
          Level.WARNING,
          "Callflow Agent's requestEnd method exception" + ex);
      }
        } else {
            try {
          callFlowAgent.endTime();
      } catch (Exception ex) {
          _logger.log(
          Level.WARNING,
          "Callflow Agent's endtime method exception" + ex);
      }
View Full Code Here

        setterInvocations = new LinkedList<SetterData>();
    }

    public List getResultList() {
        Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
        try {
            if(callFlowAgent.isEnabled()) {
                callFlowAgent.entityManagerQueryStart(EntityManagerQueryMethod.GET_RESULT_LIST);
            }
            Query delegate = getQueryDelegate();
            return delegate.getResultList();
        } finally {
            clearDelegates();
            if(callFlowAgent.isEnabled()) {
                callFlowAgent.entityManagerQueryEnd();
            }
        }
    }
View Full Code Here

            }
        }
    }

    public Object getSingleResult() {
        Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
        try {
            if(callFlowAgent.isEnabled()) {
                callFlowAgent.entityManagerQueryStart(EntityManagerQueryMethod.GET_SINGLE_RESULT);
            }
            Query delegate = getQueryDelegate();
            return delegate.getSingleResult();

        } finally {
            clearDelegates();
            if(callFlowAgent.isEnabled()) {
                callFlowAgent.entityManagerQueryEnd();
            }
        }
    }
View Full Code Here

            }
        }
    }

    public int executeUpdate() {
        Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
        if(callFlowAgent.isEnabled()) {
            callFlowAgent.entityManagerQueryStart(EntityManagerQueryMethod.EXECUTE_UPDATE);
            callFlowAgent.entityManagerQueryEnd();
        }
        throw new TransactionRequiredException("executeUpdate is not supported for a Query object obtained through non-transactional access of a container-managed transactional EntityManager");
    }
View Full Code Here

        }
        throw new TransactionRequiredException("executeUpdate is not supported for a Query object obtained through non-transactional access of a container-managed transactional EntityManager");
    }

    public Query setMaxResults(int maxResults) {
        Agent callFlowAgent = Switch.getSwitch().getCallFlowAgent();
       
        try {
            if(callFlowAgent.isEnabled()) {
                callFlowAgent.entityManagerQueryStart(EntityManagerQueryMethod.SET_MAX_RESULTS);
            }
            if( maxResults < 0 ) {
                throw new IllegalArgumentException("maxResult cannot be negative");
            }
           
            Query delegate = getQueryDelegate();
            delegate.setMaxResults(maxResults);
           
            SetterData setterData = SetterData.createMaxResults(maxResults);
            setterInvocations.add(setterData);
        } finally {
            if(callFlowAgent.isEnabled()) {
                callFlowAgent.entityManagerQueryEnd();
            }
        }
       
        return this;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.monitor.callflow.Agent

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.