- 浏览: 272890 次
- 性别:
- 来自: 北京
-
最新评论
文章列表
一、Apache相关
1、Apache默认是采用HTTP1.0的,开启HTTP1.1的方式如下:
SetEnv force-proxy-request-1.1 1
2、采用反向代理的参数:ProxyRequests off;
3、通过Apache代理目标系统,可以修改目标系统response中Set-Cookie中的参数,
如:domain、path等的修改,格式如下:
(1)ProxyPassReverseCookieDomain <des_sys_domain> <apache_located_domain>
例如:ProxyPassReverse ...
1、
2、
3、
4、
5、
wireshark使用Filter的方式:
表达式变量如下:
(1)、ip.src ==
(2)、ip.dst ==
(3)、ip.addr ==
1.ip.addr == 10.3.20.208 and http
2.ip.addr == 10.3.20.208 and tcp
3.ip.src == 10.3.20.208 and tcp
前提:RedHat Linux i686 i686 i386 GNU/Linux
1、如果要安装gcc,不能安装源码的,可以通过已编译过rpm包本地安装,也可以通过yum install gcc远程安装;
2、本地安装需要的10个包列表:
cpp-4.1.2-54.el5.i386.rpm
gcc-4.1.2-54.el5.i386.rpm
libgcc-4.1.2-54.el5.i386.rpm
libgomp-4.4.7-1.el5.i386.rpm
glibc-2.5-118.el5_10.2.i686.rpm
glibc-comm ...
>>Producer flow-control
Note that, since the introduction of the new file cursor in ActiveMQ 5.x, non-persisted messages are shunted into the temporary file store to reduce the amount of memory used for non-persistent messaging. As a result, you may find that a queue's memoryLimit is never reac ...
1.ThreadPoolExecutor =>
线程池在启动后,不管有没有任务来时,就会先创建coreSize个线程数。
(1)、使用有界队列(ArrayBlockingQueue):=>maxPoolSize和队列大小需要平衡。
当要执行的任务数小于coreSize时,就用coreSize个线程执行任务,
当任务数等于coreSize的大小时,新来一个任务,则首先将任务放入队列中,以此类推,直到队列满;
当队列满时,再新来一个任务,则新开一个线程,以此类推,直到达到线程池的最大值。
当队列满并且最大线程数到达时,再新来一个任务,执行拒绝策略。
/////////begin//// ...
0.IBM WMQ vs TIBCO RV(Rendzvous) vs JMS Provider==>
I、三类MOM的共同点==>
>>>实现消息的异步发送接收,发布订阅,使得两端的应用解耦。
>>>实现消息持久化机制,保证消息可靠性传输。
>>>优化网络传输,支持断点续传。
II、三类MOM的不同点==>
1、分布式结构 VS 星型结构 ,推送 VS 拉取, 服务端缓存 VS 客户端缓存
分布式结构==>WMQ || RV (注意:AMQ已经做到分布式,节点网络)==>分布式表明是对等节点
星型结构= ...
1、EL表达式实现的if...else 如下:
/////////begin//////
<c:choose>
<c:when test="${fn:startsWith(row.name, 'CND_00_21_CC_C3_06_20_') || fn:endsWith(row.name, '_00A21BCCCC3D06E20_')}">
</c:when>
<c:otherwise>
<a href="<c:url value="send.jsp"> ...
1、Windows下将某个命令执行结果为单行时,转化为给某个变量的方式如下:
*************************************
REM retrieve the hostname =begin=
hostname > hostname.cnd
for /F %%i in (hostname.cnd) do (
set host=%%i
goto done
)
:done
del hostname.cnd
REM retrieve the hostname =end=
************************************
2、Linux下将某个 ...
1、Jetty的版本为:【jetty-7.6.7.v20120910】
2、使用了spring bean格式的Jetty配置文件【jetty.xml】,需要修改如下配置段
//////////begin/////////
<!-- modified by can_do on web app security login not for [/*]=begin= -->
<bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">
& ...
>>测试代码
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.jolokia.client.J4pClient;
import org.jolokia.client.request.J4pExecRequest;
import org.jolokia.client.request.J4pExecResponse;
import org.jolokia.client.request.J4pReadRequest;
import org.jolokia.clie ...
java.rmi.ConnectException: Connection refused to host: 10.88.112.165; nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun ...
>>代码示例如下:
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import com.cnd.mq.AMQSession;
import com.cnd.mq.command.AMQQueue;
import com.cnd.mq.jms.pool.PooledSession;
import com.cnd.mq.pool.PooledConnection;
import com.cnd.mq.pool.PooledConnectionFactory;
public class PooledC ...
*************************************
http://mqtt-client.fusesource.org/
*************************************
MQTT is a machine-to-machine (M2M)/"Internet of Things” connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for conn ...
关键特征:
1、可靠性(一般通过消息持久化实现,可持久化到磁盘、数据库等,没有持久化的可靠性如何保证)
2、优先级(0-9,这个是JMS的规范)
3、节点间组网(分布式特性,实现消息跨节点路由)
4、消息模型(PTP || Pub/Sub,这个是JMS的规范)
性能指标:
4、高吞吐量
5、低延迟
1、AMQ是完全遵循JMS1.1规范的;有多种协议支持:openwire(nio)、stomp、mqtt、amqp
2、Moquette不遵循JMS1.1规范,实现了MQTT协议,能做到高吞吐量和低延迟==>注意:moquette是基于Netty实现的,其是一个客户端/服务器端模式,因此其不支 ...
【日志】警告信息如下:
//////////begin//////
2014-01-15 16:39:46,030 | WARN | Transport Connection to: tcp://10.88.112.165:58072 failed: com.cnd.emq.transport.InactivityIOException: Cha
nnel was inactive for too (>30000) long: tcp://10.88.112.165:58072
2014-01-15 16:39:46,030 | INFO | =catch IOException an ...