Examples of ApiJar


Examples of com.alu.e3.data.model.ApiJar

      api.setTdr(new TdrData());
    }
  }

  protected void deployApi(Api api, ExchangeData exchange) throws RollbackException, ProvisionException {
    ApiJar oldApiJar = null;
    try {
      oldApiJar = dataManager.getApiJar(api.getId());

      byte[] apiNewJarBytes = apiBuilder.build(api, exchange);

      if (apiNewJarBytes != null) {
        deploymentManager.deployApi(exchange, apiNewJarBytes);
      } else {
        LOG.error("No Jar data created for for Api ID: " + api.getId());
      }
    } catch (DeploymentException e) {
      LOG.error("Deployment failed for Api ID: " + api.getId(), e);

      deploymentManager.undeployApi(exchange, api.getId());

      // Roll back old API
      if (oldApiJar != null) {
        try {
          // Deploy N-1 jar
          deploymentManager.deployApi(exchange, oldApiJar.getData());
          // throw this status for error mgmt 
          throw new RollbackException(ApplicationCodeConstants.ROUTE_CREATION_FAILED_ROLLBACK_OK, "Route edition failed, rollback ok.");

        } catch (DeploymentException e1) {         
          throw new RollbackException(ApplicationCodeConstants.ROLLBACK_FAILED, "Second try deployment, give up", e1);
View Full Code Here

Examples of com.alu.e3.data.model.ApiJar

   
    // A location which will identify the bundle in the bundle context
    String location = BUNDLE_LOCATION_URI_PREFIX + event.getKey();
   
    // The ApiJar object extracted from the event, containing the queueName to post ACKs and bundle's data
    ApiJar jar = event.getValue();
   
    // Start bundle installation
    handleAddOrUpdateEvent(location, jar, event.getKey());
    if(logger.isDebugEnabled()) { 
      logger.debug("[EntryAdded] Finished handling event for apiId " + event.getKey());
View Full Code Here

Examples of com.alu.e3.data.model.ApiJar

   
    // A location which will identify the bundle in the bundle context
    String location = BUNDLE_LOCATION_URI_PREFIX + event.getKey();
   
    // The ApiJar object extracted from the event, containing the queueName to post ACKs and bundle's data
    ApiJar jar = event.getValue();
   
    // Start bundle update
    handleAddOrUpdateEvent(location, jar, event.getKey());
   
    if(logger.isDebugEnabled()) {
View Full Code Here

Examples of com.alu.e3.data.model.ApiJar

  // Gateways are listening on cachingTableApiJars map to be
  // notified of bundle updates through cache mechanism
  //----------------------------------------------------------------
  @Override
  public boolean deployApi(String apiId, byte[] jarData) {
    ApiJar data = new ApiJar();
    data.setId(apiId);
    data.setData(jarData);
    boolean result = cachingTableApiJars.set(apiId, data);
    return result;
  }
View Full Code Here

Examples of com.alu.e3.data.model.ApiJar

    return cachingTableApiJars.get(apiId);
  }

  @Override
  public boolean undeployApi(String apiId) {
    ApiJar undeployed = cachingTableApiJars.remove(apiId);
    return undeployed != null;
  }
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.