Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
2bc6bfbf
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2bc6bfbf
编写于
2月 19, 2019
作者:
C
cherrylzhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor raw-jdbc-orche-example.
上级
e19e5d69
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
36 addition
and
27 deletion
+36
-27
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/JavaConfigurationTransactionExample.java
...ample/jdbc/nodep/JavaConfigurationTransactionExample.java
+6
-6
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/YamlConfigurationExample.java
...ngsphere/example/jdbc/nodep/YamlConfigurationExample.java
+6
-6
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/YamlConfigurationTransactionExample.java
...ample/jdbc/nodep/YamlConfigurationTransactionExample.java
+6
-6
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/JavaConfigurationExample.java
...ngsphere/example/jdbc/orche/JavaConfigurationExample.java
+3
-2
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/JavaConfigurationTransactionExample.java
...ample/jdbc/orche/JavaConfigurationTransactionExample.java
+6
-2
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/YamlConfigurationExample.java
...ngsphere/example/jdbc/orche/YamlConfigurationExample.java
+3
-3
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/YamlConfigurationTransactionExample.java
...ample/jdbc/orche/YamlConfigurationTransactionExample.java
+6
-2
未找到文件。
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/JavaConfigurationTransactionExample.java
浏览文件 @
2bc6bfbf
...
...
@@ -28,14 +28,14 @@ import java.sql.SQLException;
*/
public
class
JavaConfigurationTransactionExample
{
private
static
ShardingType
t
ype
=
ShardingType
.
SHARDING_DATABASES
;
// private static ShardingType
t
ype = ShardingType.SHARDING_TABLES;
// private static ShardingType
t
ype = ShardingType.SHARDING_DATABASES_AND_TABLES;
// private static ShardingType
t
ype = ShardingType.MASTER_SLAVE;
// private static ShardingType
t
ype = ShardingType.SHARDING_MASTER_SLAVE;
private
static
ShardingType
shardingT
ype
=
ShardingType
.
SHARDING_DATABASES
;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_TABLES;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_DATABASES_AND_TABLES;
// private static ShardingType
shardingT
ype = ShardingType.MASTER_SLAVE;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_MASTER_SLAVE;
public
static
void
main
(
final
String
[]
args
)
throws
SQLException
{
TransactionService
transactionService
=
CommonTransactionServiceFactory
.
newInstance
(
t
ype
);
TransactionService
transactionService
=
CommonTransactionServiceFactory
.
newInstance
(
shardingT
ype
);
transactionService
.
initEnvironment
();
transactionService
.
processSuccessWithLocal
();
transactionService
.
processSuccessWithXA
();
...
...
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/YamlConfigurationExample.java
浏览文件 @
2bc6bfbf
...
...
@@ -29,14 +29,14 @@ import java.sql.SQLException;
*/
public
class
YamlConfigurationExample
{
private
static
ShardingType
t
ype
=
ShardingType
.
SHARDING_DATABASES
;
// private static ShardingType
t
ype = ShardingType.SHARDING_TABLES;
// private static ShardingType
t
ype = ShardingType.SHARDING_DATABASES_AND_TABLES;
// private static ShardingType
t
ype = ShardingType.MASTER_SLAVE;
// private static ShardingType
t
ype = ShardingType.SHARDING_MASTER_SLAVE;
private
static
ShardingType
shardingT
ype
=
ShardingType
.
SHARDING_DATABASES
;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_TABLES;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_DATABASES_AND_TABLES;
// private static ShardingType
shardingT
ype = ShardingType.MASTER_SLAVE;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_MASTER_SLAVE;
public
static
void
main
(
final
String
[]
args
)
throws
SQLException
,
IOException
{
CommonService
commonService
=
YamlCommonServiceFactory
.
newInstance
(
t
ype
);
CommonService
commonService
=
YamlCommonServiceFactory
.
newInstance
(
shardingT
ype
);
commonService
.
initEnvironment
();
commonService
.
processSuccess
();
commonService
.
cleanEnvironment
();
...
...
sharding-jdbc-example/raw-jdbc-nodep-example/src/main/java/io/shardingsphere/example/jdbc/nodep/YamlConfigurationTransactionExample.java
浏览文件 @
2bc6bfbf
...
...
@@ -29,14 +29,14 @@ import java.sql.SQLException;
*/
public
class
YamlConfigurationTransactionExample
{
private
static
ShardingType
t
ype
=
ShardingType
.
SHARDING_DATABASES
;
// private static ShardingType
t
ype = ShardingType.SHARDING_TABLES;
// private static ShardingType
t
ype = ShardingType.SHARDING_DATABASES_AND_TABLES;
// private static ShardingType
t
ype = ShardingType.MASTER_SLAVE;
// private static ShardingType
t
ype = ShardingType.SHARDING_MASTER_SLAVE;
private
static
ShardingType
shardingT
ype
=
ShardingType
.
SHARDING_DATABASES
;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_TABLES;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_DATABASES_AND_TABLES;
// private static ShardingType
shardingT
ype = ShardingType.MASTER_SLAVE;
// private static ShardingType
shardingT
ype = ShardingType.SHARDING_MASTER_SLAVE;
public
static
void
main
(
final
String
[]
args
)
throws
SQLException
,
IOException
{
TransactionService
transactionService
=
YamlCommonTransactionServiceFactory
.
newInstance
(
t
ype
);
TransactionService
transactionService
=
YamlCommonTransactionServiceFactory
.
newInstance
(
shardingT
ype
);
transactionService
.
initEnvironment
();
transactionService
.
processSuccessWithLocal
();
transactionService
.
processSuccessWithXA
();
...
...
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/JavaConfigurationExample.java
浏览文件 @
2bc6bfbf
...
...
@@ -44,7 +44,8 @@ public class JavaConfigurationExample {
public
static
void
main
(
final
String
[]
args
)
throws
Exception
{
CommonService
commonService
=
CommonServiceFactory
.
newInstance
(
shardingType
,
registryCenterType
,
loadConfigFromRegCenter
);
CommonServiceScenario
scenario
=
new
CommonServiceScenario
(
commonService
);
scenario
.
process
();
commonService
.
initEnvironment
();
commonService
.
processSuccess
();
commonService
.
cleanEnvironment
();
}
}
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/JavaConfigurationTransactionExample.java
浏览文件 @
2bc6bfbf
...
...
@@ -44,7 +44,11 @@ public class JavaConfigurationTransactionExample {
public
static
void
main
(
final
String
[]
args
)
throws
Exception
{
TransactionService
transactionService
=
CommonTransactionServiceFactory
.
newInstance
(
shardingType
,
registryCenterType
,
loadConfigFromRegCenter
);
TransactionServiceScenario
scenario
=
new
TransactionServiceScenario
(
transactionService
);
scenario
.
process
();
transactionService
.
initEnvironment
();
transactionService
.
processSuccessWithLocal
();
transactionService
.
processSuccessWithXA
();
transactionService
.
processFailureWithLocal
();
transactionService
.
processFailureWithXA
();
transactionService
.
cleanEnvironment
();
}
}
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/YamlConfigurationExample.java
浏览文件 @
2bc6bfbf
...
...
@@ -18,7 +18,6 @@
package
io.shardingsphere.example.jdbc.orche
;
import
io.shardingsphere.example.jdbc.orche.factory.YamlCommonServiceFactory
;
import
io.shardingsphere.example.repository.api.senario.CommonServiceScenario
;
import
io.shardingsphere.example.repository.api.service.CommonService
;
import
io.shardingsphere.example.type.RegistryCenterType
;
import
io.shardingsphere.example.type.ShardingType
;
...
...
@@ -44,7 +43,8 @@ public class YamlConfigurationExample {
public
static
void
main
(
final
String
[]
args
)
throws
Exception
{
CommonService
commonService
=
YamlCommonServiceFactory
.
newInstance
(
shardingType
,
registryCenterType
,
loadConfigFromRegCenter
);
CommonServiceScenario
scenario
=
new
CommonServiceScenario
(
commonService
);
scenario
.
process
();
commonService
.
initEnvironment
();
commonService
.
processSuccess
();
commonService
.
cleanEnvironment
();
}
}
sharding-jdbc-example/raw-jdbc-orche-example/src/main/java/io/shardingsphere/example/jdbc/orche/YamlConfigurationTransactionExample.java
浏览文件 @
2bc6bfbf
...
...
@@ -44,7 +44,11 @@ public class YamlConfigurationTransactionExample {
public
static
void
main
(
final
String
[]
args
)
throws
Exception
{
TransactionService
transactionService
=
YamlCommonTransactionServiceFactory
.
newInstance
(
shardingType
,
registryCenterType
,
loadConfigFromRegCenter
);
TransactionServiceScenario
scenario
=
new
TransactionServiceScenario
(
transactionService
);
scenario
.
process
();
transactionService
.
initEnvironment
();
transactionService
.
processSuccessWithLocal
();
transactionService
.
processSuccessWithXA
();
transactionService
.
processFailureWithLocal
();
transactionService
.
processFailureWithXA
();
transactionService
.
cleanEnvironment
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录