Skip to content

Commit dc088cb

Browse files
authored
Revert "Release 0.6.0 (#1106)" (#1107)
1 parent 7ca3332 commit dc088cb

File tree

137 files changed

+845
-8733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+845
-8733
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ target/
77
*.tar.gz
88
*.class
99
.flattened-pom.xml
10-
dependency-reduced-pom.xml
1110

1211
# eclipse ignore
1312
.settings/
@@ -37,4 +36,4 @@ dependency-reduced-pom.xml
3736
# system ignore
3837
.DS_Store
3938
Thumbs.db
40-
*.orig
39+
*.orig

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ For more details about principle and design, please go to [Seata wiki page](http
8181

8282
## Maven dependency
8383
```xml
84-
<seata.version>0.5.2</seata.version>
84+
<seata.version>0.5.1</seata.version>
8585

8686
<dependency>
8787
<groupId>io.seata</groupId>

all/pom.xml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<groupId>io.seata</groupId>
2323
<artifactId>seata-all</artifactId>
24-
<version>0.6.0</version>
24+
<version>0.5.2</version>
2525

2626
<name>Seata All-in-one ${project.version}</name>
2727
<url>http://seata.io</url>
@@ -112,11 +112,6 @@
112112
<artifactId>seata-config-consul</artifactId>
113113
<version>${project.version}</version>
114114
</dependency>
115-
<dependency>
116-
<groupId>io.seata</groupId>
117-
<artifactId>seata-config-etcd3</artifactId>
118-
<version>${project.version}</version>
119-
</dependency>
120115
<dependency>
121116
<groupId>io.seata</groupId>
122117
<artifactId>seata-core</artifactId>
@@ -428,7 +423,7 @@
428423
<createSourcesJar>true</createSourcesJar>
429424
<promoteTransitiveDependencies>false</promoteTransitiveDependencies>
430425
<keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
431-
<createDependencyReducedPom>true</createDependencyReducedPom>
426+
<createDependencyReducedPom>false</createDependencyReducedPom>
432427
<artifactSet>
433428
<includes>
434429
<include>io.seata:seata-common</include>
@@ -438,7 +433,6 @@
438433
<include>io.seata:seata-config-nacos</include>
439434
<include>io.seata:seata-config-zk</include>
440435
<include>io.seata:seata-config-consul</include>
441-
<include>io.seata:seata-config-etcd3</include>
442436
<include>io.seata:seata-discovery-core</include>
443437
<include>io.seata:seata-discovery-consul</include>
444438
<include>io.seata:seata-discovery-eureka</include>
@@ -479,12 +473,6 @@
479473
<exclude>registry.conf</exclude>
480474
</excludes>
481475
</filter>
482-
<filter>
483-
<artifact>*:*</artifact>
484-
<excludes>
485-
<exclude>META-INF/maven/**</exclude>
486-
</excludes>
487-
</filter>
488476
</filters>
489477
</configuration>
490478
</execution>
@@ -509,12 +497,20 @@
509497
<artifactId>maven-javadoc-plugin</artifactId>
510498
<version>2.10.4</version>
511499
<configuration>
512-
<charset>${project.build.sourceEncoding}</charset>
513-
<failOnError>false</failOnError>
500+
<encoding>${project.build.sourceEncoding}</encoding>
501+
<detectOfflineLinks>true</detectOfflineLinks>
502+
<breakiterator>true</breakiterator>
503+
<author>false</author>
504+
<keywords>true</keywords>
505+
<quiet>true</quiet>
506+
<includeDependencySources>true</includeDependencySources>
507+
<dependencySourceIncludes>
508+
<dependencySourceInclude>io.seata:seata-*</dependencySourceInclude>
509+
</dependencySourceIncludes>
514510
</configuration>
515511
<executions>
516512
<execution>
517-
<phase>package</phase>
513+
<id>attach-javadocs</id>
518514
<goals>
519515
<goal>jar</goal>
520516
</goals>

bom/pom.xml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<groupId>io.seata</groupId>
2222
<artifactId>seata-bom</artifactId>
23-
<version>0.6.0</version>
23+
<version>0.5.2</version>
2424

2525
<modelVersion>4.0.0</modelVersion>
2626
<packaging>pom</packaging>
@@ -30,28 +30,29 @@
3030
<properties>
3131
<spring.version>4.3.23.RELEASE</spring.version>
3232
<netty4.version>4.1.24.Final</netty4.version>
33+
<junit.version>4.12</junit.version>
3334
<dubbo.version>2.7.0</dubbo.version>
3435
<dubbo.alibaba.version>2.6.5</dubbo.alibaba.version>
3536
<sofa.rpc.version>5.5.3</sofa.rpc.version>
36-
<fastjson.version>1.2.58</fastjson.version>
37+
<fastjson.version>1.2.48</fastjson.version>
3738
<config.version>1.2.1</config.version>
3839
<slf4j-api.version>1.7.22</slf4j-api.version>
3940
<logback-classic.version>1.2.0</logback-classic.version>
4041
<commons-lang.version>2.6</commons-lang.version>
4142
<commons-pool2.version>2.4.2</commons-pool2.version>
4243
<commons-pool.version>1.6</commons-pool.version>
43-
<commons-dbcp.version>1.3</commons-dbcp.version>
4444
<cglib.version>3.1</cglib.version>
4545
<aopalliance.version>1.0</aopalliance.version>
4646
<zkclient.version>0.10</zkclient.version>
4747
<curator-test.version>2.9.1</curator-test.version>
4848
<spring-context-support.version>1.0.2</spring-context-support.version>
49+
<testng.version>6.4</testng.version>
4950
<jacoco-maven-plugin.version>0.8.3</jacoco-maven-plugin.version>
5051
<apollo-client.version>1.1.0</apollo-client.version>
5152
<redis-clients.version>2.9.0</redis-clients.version>
5253
<eureka-clients.version>1.9.5</eureka-clients.version>
5354
<consul-clients.version>1.4.2</consul-clients.version>
54-
<nacos-client.version>1.0.0</nacos-client.version>
55+
<nacos-client.version>0.9.1</nacos-client.version>
5556
<etcd-client-v3.version>0.3.0</etcd-client-v3.version>
5657
<testcontainers.version>1.11.2</testcontainers.version>
5758
<guava.version>27.0.1-jre</guava.version>
@@ -62,9 +63,6 @@
6263
<httpcore.version>4.4.11</httpcore.version>
6364
<druid.version>1.1.12</druid.version>
6465
<caffeine.version>2.7.0</caffeine.version>
65-
<oracle.client.version>10.2.0.3.0</oracle.client.version>
66-
<mysql.client.version>5.1.30</mysql.client.version>
67-
<h2.version>1.4.181</h2.version>
6866
</properties>
6967

7068
<dependencyManagement>
@@ -272,21 +270,6 @@
272270
<artifactId>caffeine</artifactId>
273271
<version>${caffeine.version}</version>
274272
</dependency>
275-
<dependency>
276-
<groupId>commons-dbcp</groupId>
277-
<artifactId>commons-dbcp</artifactId>
278-
<version>${commons-dbcp.version}</version>
279-
</dependency>
280-
<dependency>
281-
<groupId>com.h2database</groupId>
282-
<artifactId>h2</artifactId>
283-
<version>${h2.version}</version>
284-
</dependency>
285-
<dependency>
286-
<groupId>mysql</groupId>
287-
<artifactId>mysql-connector-java</artifactId>
288-
<version>${mysql.client.version}</version>
289-
</dependency>
290273

291274
</dependencies>
292275
</dependencyManagement>

common/src/main/java/io/seata/common/Constants.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package io.seata.common;
1717

18-
import java.nio.charset.Charset;
19-
2018
/**
2119
* The type Constants.
2220
*
@@ -99,13 +97,4 @@ public class Constants {
9997
*/
10098
public final static String TCC_ACTION_CONTEXT = "actionContext";
10199

102-
/**
103-
* default charset name
104-
*/
105-
public static final String DEFAULT_CHARSET_NAME = "UTF-8";
106-
107-
/**
108-
* default charset is utf-8
109-
*/
110-
public static final Charset DEFAULT_CHARSET = Charset.forName(DEFAULT_CHARSET_NAME);
111100
}

common/src/main/java/io/seata/common/loader/EnhancedServiceLoader.java

Lines changed: 12 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
import java.io.BufferedReader;
1919
import java.io.IOException;
2020
import java.io.InputStreamReader;
21-
import java.lang.reflect.Constructor;
22-
import java.lang.reflect.InvocationTargetException;
2321
import java.net.URL;
2422
import java.util.ArrayList;
2523
import java.util.Collections;
@@ -29,7 +27,6 @@
2927
import java.util.Map;
3028
import java.util.concurrent.ConcurrentHashMap;
3129

32-
import io.seata.common.Constants;
3330
import io.seata.common.executor.Initialize;
3431
import io.seata.common.util.CollectionUtils;
3532

@@ -105,48 +102,12 @@ public static <S> S load(Class<S> service, String activateName, ClassLoader load
105102
return loadFile(service, activateName, loader);
106103
}
107104

108-
/**
109-
* Load s.
110-
*
111-
* @param <S> the type parameter
112-
* @param service the service
113-
* @param activateName the activate name
114-
* @param args the args
115-
* @return the s
116-
* @throws EnhancedServiceNotFoundException the enhanced service not found exception
117-
*/
118-
public static <S> S load(Class<S> service, String activateName, Object[] args) throws EnhancedServiceNotFoundException {
119-
Class[] argsType = null;
120-
if(args != null && args.length > 0){
121-
argsType = new Class[args.length];
122-
for(int i = 0; i < args.length; i ++){
123-
argsType[i] = args[i].getClass();
124-
}
125-
}
126-
return loadFile(service, activateName, findClassLoader(), argsType, args);
127-
}
128-
129-
/**
130-
* Load s.
131-
*
132-
* @param <S> the type parameter
133-
* @param service the service
134-
* @param activateName the activate name
135-
* @param argsType the args type
136-
* @param args the args
137-
* @return the s
138-
* @throws EnhancedServiceNotFoundException the enhanced service not found exception
139-
*/
140-
public static <S> S load(Class<S> service, String activateName, Class[] argsType, Object[] args) throws EnhancedServiceNotFoundException {
141-
return loadFile(service, activateName, findClassLoader(), argsType, args);
142-
}
143-
144105
/**
145106
* get all implements
146107
*
147108
* @param <S> the type parameter
148109
* @param service the service
149-
* @return list list
110+
* @return list
150111
*/
151112
public static <S> List<S> loadAll(Class<S> service) {
152113
List<S> allInstances = new ArrayList<>();
@@ -156,7 +117,7 @@ public static <S> List<S> loadAll(Class<S> service) {
156117
}
157118
try {
158119
for (Class clazz : allClazzs) {
159-
allInstances.add(initInstance(service, clazz, null, null));
120+
allInstances.add(initInstance(service, clazz));
160121
}
161122
} catch (Throwable t) {
162123
throw new EnhancedServiceNotFoundException(t);
@@ -189,12 +150,8 @@ public static <S> List<Class> getAllExtensionClass(Class<S> service, ClassLoader
189150
return findAllExtensionClass(service, null, loader);
190151
}
191152

153+
@SuppressWarnings("rawtypes")
192154
private static <S> S loadFile(Class<S> service, String activateName, ClassLoader loader) {
193-
return loadFile(service, activateName, loader, null, null);
194-
}
195-
196-
@SuppressWarnings("rawtypes")
197-
private static <S> S loadFile(Class<S> service, String activateName, ClassLoader loader, Class[] argTypes, Object[] args) {
198155
try {
199156
boolean foundFromCache = true;
200157
List<Class> extensions = providers.get(service);
@@ -216,7 +173,7 @@ private static <S> S loadFile(Class<S> service, String activateName, ClassLoader
216173
Class clz = extensions.get(i);
217174
@SuppressWarnings("unchecked")
218175
LoadLevel activate = (LoadLevel)clz.getAnnotation(LoadLevel.class);
219-
if (activate != null && activateName.equalsIgnoreCase(activate.name())) {
176+
if (activate != null && activateName.equals(activate.name())) {
220177
activateExtensions.add(clz);
221178
}
222179
}
@@ -230,7 +187,7 @@ private static <S> S loadFile(Class<S> service, String activateName, ClassLoader
230187
+ "] and classloader : " + ObjectUtils.toString(loader));
231188
}
232189
Class<?> extension = extensions.get(extensions.size() - 1);
233-
S result = initInstance(service, extension, argTypes, args);
190+
S result = initInstance(service, extension);
234191
if (!foundFromCache && LOGGER.isInfoEnabled()) {
235192
LOGGER.info("load " + service.getSimpleName() + "[" + activateName + "] extension by class[" + extension
236193
.getName() + "]");
@@ -302,7 +259,7 @@ private static void loadFile(Class<?> service, String dir, ClassLoader classLoad
302259
java.net.URL url = urls.nextElement();
303260
BufferedReader reader = null;
304261
try {
305-
reader = new BufferedReader(new InputStreamReader(url.openStream(), Constants.DEFAULT_CHARSET));
262+
reader = new BufferedReader(new InputStreamReader(url.openStream(), "utf-8"));
306263
String line = null;
307264
while ((line = reader.readLine()) != null) {
308265
final int ci = line.indexOf('#');
@@ -335,26 +292,13 @@ private static void loadFile(Class<?> service, String dir, ClassLoader classLoad
335292
* @param <S> the type parameter
336293
* @param service the service
337294
* @param implClazz the impl clazz
338-
* @param argTypes the arg types
339-
* @param args the args
340-
* @return s s
341-
* @throws IllegalAccessException the illegal access exception
342-
* @throws InstantiationException the instantiation exception
343-
* @throws NoSuchMethodException the no such method exception
344-
* @throws InvocationTargetException the invocation target exception
295+
* @return s
296+
* @throws IllegalAccessException the illegal access exception
297+
* @throws InstantiationException the instantiation exception
345298
*/
346-
protected static <S> S initInstance(Class<S> service, Class implClazz, Class[] argTypes, Object[] args)
347-
throws IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException {
348-
S s = null;
349-
if(argTypes != null && args != null){
350-
// Constructor with arguments
351-
Constructor<S> constructor = implClazz.getDeclaredConstructor(argTypes);
352-
constructor.setAccessible(true);
353-
s = service.cast(constructor.newInstance(args));
354-
}else {
355-
// default Constructor
356-
s = service.cast(implClazz.newInstance());
357-
}
299+
protected static <S> S initInstance(Class<S> service, Class implClazz)
300+
throws IllegalAccessException, InstantiationException {
301+
S s = service.cast(implClazz.newInstance());
358302
if (s instanceof Initialize) {
359303
((Initialize)s).init();
360304
}

common/src/main/java/io/seata/common/loader/LoadLevel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@
4343
*
4444
* @return the int
4545
*/
46-
int order() default 0;
46+
int order();
4747
}

0 commit comments

Comments
 (0)