小编Bal*_*i V的帖子

HttpClientError:目标服务器无法响应

我正在尝试使用http客户端使用PoolingClientConnectionManager为各个主机设置最大连接来命中服务器

 //Code that inilizes my connection mananger and http client 
Run Code Online (Sandbox Code Playgroud)

HttpParams httpParam = httpclient.getParams(); HttpConnectionParams.setSoTimeout(httpParam,SOCKET_TIMEOUT);

    HttpConnectionParams.setConnectionTimeout(httpParam, CONN_TIMEOUT);

    httpclient.setParams(httpParam);

    //Run a thread which closes Expired connections
    new ConnectionManager(connManager).start(); 

        //Code that executes my request 
    HttpPost httpPost = new HttpPost(url);
            HttpEntity httpEntity = new StringEntity(request, "UTF-8");
    httpPost.setEntity(httpEntity);

    Header acceptEncoding = new BasicHeader("Accept-Encoding", "gzip,deflate");
    httpPost.setHeader(acceptEncoding);     

    if(contenttype != null && !contenttype.equals("")){
        Header contentType = new BasicHeader("Content-Type", contenttype);
        httpPost.setHeader(contentType);
    }
            InputStream inputStream = null;
    LOG.info(dataSource + URL + url + REQUEST + request);

    HttpResponse …
Run Code Online (Sandbox Code Playgroud)

java apache connection-pooling httpclient

13
推荐指数
2
解决办法
5万
查看次数

AWS Cloudformation:将环境变量作为参数传递给 lambda 函数

我正在为 lambda 创建一个云层。我想要一个创建 lambda 的通用 lambda 脚本。我在从外部注入“环境”参数时遇到问题。

我想将键值对对象作为参数传递。有人能告诉我怎么做吗。我在下面强调了它

{
  "Variables" : **{ String:String, ... }**
}

{
  "Type" : "AWS::Lambda::Function",
  "Properties" : {
    "Code" : Code,
    "DeadLetterConfig" : DeadLetterConfig,
    "Description" : String,
    "Environment" : Environment,
    "FunctionName" : String,
    "Handler" : String,
    "KmsKeyArn" : String,
    "MemorySize" : Integer,
    "ReservedConcurrentExecutions" : Integer,
    "Role" : String,
    "Runtime" : String,
    "Timeout" : Integer,
    "TracingConfig" : TracingConfig,
    "VpcConfig" : VPCConfig,
    "Tags" : [ Resource Tag, ... ]
  }
}
Run Code Online (Sandbox Code Playgroud)

cloud amazon-web-services aws-cloudformation aws-lambda

8
推荐指数
1
解决办法
2万
查看次数

在Cloudformation中的Fn :: Sub内部使用Ref

我正在尝试使用fn::sub其中的Ref。

我有一个字符串“ Comment xyz $ {NAME}”。该字符串作为堆栈的参数。假设参数名称为“ test”。

我现在想使用fn::subCloudformation脚本中的函数替换字符串中的$ {NAME} 。

fn::sub:[{"Ref":"test"},{"NAME":"balaji"}]
Run Code Online (Sandbox Code Playgroud)

预期输出为“评论xyz balaji”。

但是,这是我得到的错误:

模板验证错误:模板错误:一个或多个Fn :: Sub内部函数未指定期望的参数。指定一个字符串作为第一个参数,并指定一个可选的第二个参数来指定要替换的值的映射

让我知道这里需要解决的问题。

amazon-web-services aws-cloudformation

5
推荐指数
1
解决办法
4225
查看次数

jboss中同一战争的多个上下文路径

我正在部署我的网络应用程序 jboss-EAP-6.1

我想为同一场战争提供不同的背景路径:

http://localhost:8080/path1/xyx

http://localhost:8080/path2/xyx
Run Code Online (Sandbox Code Playgroud)

你能告诉我怎么做吗?

jboss contextroot jboss6.x web

4
推荐指数
1
解决办法
2391
查看次数

React-Highcharts滚动条功能不起作用

我正在使用react-highchart。滚动条功能似乎不起作用。下面是一段代码。滚动条在xaxis中处于启用状态,并且似乎没有滚动。

请参考highcharts实现:

http://jsfiddle.net/gh/get/jquery/1.7.2/highcharts/highcharts/tree/master/samples/stock/yaxis/inverted-bar-scrollbar/

var config = {
  title: {
    text: 'Hello, World!'
  },
  chart :{
  type:'bar'
  },
  xAxis: {
    scrollbar:{
    enabled:true
    },
    min:0,
    max:4,
    categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  },
  series: [{
    data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
  }]
};
Run Code Online (Sandbox Code Playgroud)

javascript highcharts reactjs react-highcharts

4
推荐指数
1
解决办法
693
查看次数