![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
流量回放 & sandbox
流量回放 & sandbox
wuwh无非
这个作者很懒,什么都没留下…
展开
-
sandbox = 配置文件&javabean 映射关系
#${sandbox_home}/bin/.sandbox.sh com.alibaba.jvm.sandbox.core.CoreLauncher.main(jvm_pid,sandbox-agent.jar,【home=${SANDBOX_HOME_DIR};token=${token};server.ip=${TARGET_SERVER_IP};server.port=${TARGET_SERVER_PORT};namespace=${TARGET_NAMESPACE}】-》 com.aliba原创 2020-11-17 11:21:50 · 356 阅读 · 0 评论 -
sandbox = 源码解析04 - 结果比对
待定原创 2020-11-17 11:21:01 · 196 阅读 · 0 评论 -
sandbox = 源码解析03-流量回放
文件路径 所属类.方法 逻辑 备注 ${repeater_home}/repeater-module.jar com.alibaba.jvm.sandbox.repeater.module.RepeaterModule.initialize // 装载消息订阅器 List<SubscribeSupporter> subscribes = lifecycleManager.l...原创 2020-11-17 11:20:01 · 258 阅读 · 0 评论 -
sandbox = 源码解析02-流量录制
文件路径 所属类.方法 逻辑 备注 ${sandbox_home}/lib/sandbox-core.jar com.alibaba.jvm.sandbox.core.manager.impl.SandboxClassFileTransformer._transform final byte[] toByteCodeArray = new EventE...原创 2020-11-17 11:19:04 · 513 阅读 · 0 评论 -
sandbox = 源码解析01-启动加载过程
文件路径 所属类.方法 逻辑 备注 ${sandbox_home}/bin/sandbox.sh attach_jvm java -jar "${SANDBOX_LIB_DIR}/sandbox-core.jar" ${SANDBOX_JVM_OPS} "${TARGET_JVM_PID}" "${SANDBOX_LIB_DIR}/sandbox-agent.jar" \ "home=...原创 2020-11-17 11:17:55 · 1265 阅读 · 0 评论 -
Java SPI
SPI全称为Service Provider Interface,是JDK内置的一种服务提供发现机制。简单来说,它就是一种动态替换发现机制。 例如:有个接口想在运行时才发现具体的实现类,那么你只需要在程序运行前添加一个实现即可,并把新加的实现描述给JDK即可。 此外,在程序的运行过程中,也可以随时对该描述进行修改,完成具体实现的替换。 Java提供了很多服务提供者接口(Service Provider Interface,SPI),允许第三方为这些接口提供实现。常见的SPI有JDBC、JCE、JNDI原创 2020-11-17 11:16:39 · 191 阅读 · 0 评论 -
java的双亲委派机制
类加载器 java中通过类加载器ClassLoader把xxx.class文件加载到JVM中。 启动类加载器bootstrap classloader :加载jre/lib/rt.jar 扩展类加载器extension classloader :加载jre/lib/ext/*.jar 应用程序类加载器applicationclassloader:加载classpath上指定的类库 双亲委派机制 双亲委派机制是指当一个类加载器收到一个类加载请求时,该类加载器首先会把请求委派给...原创 2020-11-17 11:15:57 · 246 阅读 · 0 评论 -
Instrumentation
#Introduce * This class provides services needed to instrument Java * programming language code. *Instrumentationis the addition of byte-codes to methodsfor the * purpose of gathering data to be utilized by tools. * Since the changes are purely additi...原创 2020-11-17 11:13:35 · 159 阅读 · 0 评论 -
ClassFileTransformer
java.lang.instrument.ClassFileTransformer /** An agent provides an implementation of this interface in order to transform class files. The transformation occurs before the class is defined by the JVM. /** The implementation of this method may transform原创 2020-11-17 11:12:17 · 635 阅读 · 0 评论