了解cjdbc结构

cjdbc 源码 以及 二进制包下载地址

http://forge.ow2.org/project/showfiles.php?group_id=42


cjdbc的启动类  org.objectweb.cjdbc.controller.core.Controller

cjdbc的工厂类 org.objectweb.cjdbc.controller.core.ControllerFactory

cjdbc的监听线程类org.objectweb.cjdbc.controller.core.ControllerServerThread

通过ControllerFactory 读取config\controller 下的指定控制文件 参数为:-f config/controller/testcontroller.xml

未指定参数默认读取 controller.xml【这里是采用SAX读取xml 实现了DefaultHandler 】


通过控制文件下的

<VirtualDatabase configFile="oracle_test.xml" virtualDatabaseName="testDB" autoEnableBackends="true" checkpointName="Initial_test_oracle_recovery_log" />

找到指定的 虚拟数据库配置文件

加载 数据库配置 以及集群的冗余阵列模式以及恢复日志等


配置加载完毕后 拼装 Controller类的实例

创建ControllerServerThread 监听 监听jdbc操作


具体其他怎么做恢复日志啊  怎么处理oracle结构参考源码




原文地址:https://www.cnblogs.com/liaomin416100569/p/9331375.html