コード例 #1
0
  // handle the fault, this will be called during interceptor unwind when any exception/fault
  // occurred in
  // any interceptor after this interceptor. we need to release the service call handler
  @Override
  public void handleFault(Message message) {

    Channel channel = GrahakHelper.getChannel(message);

    serviceCallHandler.releaseHandle(channel);

    if (log.isDebugEnabled())
      log.debug("releasing service handle in handlefault for channel " + channel.getId());
  }
コード例 #2
0
    public void handleMessage(Message message) throws Fault {

      // channel can not be instance variable
      Channel channel = GrahakHelper.getChannel(message);

      serviceCallHandler.releaseHandle(channel);

      if (log.isDebugEnabled())
        log.debug("releasing service handle for channel " + channel.getId());
    }
コード例 #3
0
  @Override
  public void handleMessage(Message message) throws Fault {

    Channel channel = GrahakHelper.getChannel(message);

    message.getInterceptorChain().add(ending);

    if (!serviceCallHandler.isCallAllowed(channel)) {
      String msg =
          "Not more than "
              + channel.getConnection().getMaxThreads()
              + " calls are allowed for "
              + channel.getPrimaryEndpointUrl();
      log.error(msg);

      throw new Fault(
          Thread.currentThread().getId() + msg,
          java.util.logging.Logger.getLogger(ThrottleServiceCallsInterceptor.class.getName()));
    }

    if (log.isDebugEnabled()) log.debug("calling service for channel " + channel.getId());
  }