Skip to content

Commit 7cf46bb

Browse files
committed
remove trace
1 parent f0b44be commit 7cf46bb

File tree

21 files changed

+19
-350
lines changed

21 files changed

+19
-350
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>net.csdn</groupId>
66
<artifactId>ServiceFramework_2.11</artifactId>
77
<packaging>pom</packaging>
8-
<version>2.0.0</version>
8+
<version>2.0.1</version>
99
<name>ServiceFramework</name>
1010
<description>Java MVC framework, agile, fast, rich domain model, made especially for server side of mobile
1111
application

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
mvn clean deploy -DskipTests -Prelease-sign-artifacts
1+
mvn clean deploy -DskipTests -Prelease-sign-artifacts -Pscala-2.12
22
#https://oss.sonatype.org/#stagingRepositories
33
#mvn versions:set -DnewVersion={version}

serviceframework-common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>ServiceFramework_2.11</artifactId>
88
<groupId>net.csdn</groupId>
9-
<version>2.0.0</version>
9+
<version>2.0.1</version>
1010
</parent>
1111
<artifactId>serviceframework-common_2.11</artifactId>
1212

serviceframework-dispatcher/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>ServiceFramework_2.11</artifactId>
77
<groupId>net.csdn</groupId>
8-
<version>2.0.0</version>
8+
<version>2.0.1</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

serviceframework-jetty-9-server/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<artifactId>ServiceFramework_2.11</artifactId>
77
<groupId>net.csdn</groupId>
8-
<version>2.0.0</version>
8+
<version>2.0.1</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>
1212

13-
<artifactId>serviceframework-jetty-9-server</artifactId>
13+
<artifactId>serviceframework-jetty-9-server_2.11</artifactId>
1414

1515
<dependencies>
1616
<dependency>

serviceframework-mongo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>ServiceFramework_2.11</artifactId>
77
<groupId>net.csdn</groupId>
8-
<version>2.0.0</version>
8+
<version>2.0.1</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

serviceframework-orm/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>ServiceFramework_2.11</artifactId>
77
<groupId>net.csdn</groupId>
8-
<version>2.0.0</version>
8+
<version>2.0.1</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

serviceframework-orm/src/main/java/net/csdn/jpa/model/Model.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.csdn.jpa.model;
22

33
import net.csdn.common.exception.AutoGeneration;
4+
import net.csdn.jpa.JPA;
45
import net.csdn.jpa.exception.JPAQueryException;
56
import net.csdn.modules.persist.mysql.MysqlClient;
67

@@ -175,6 +176,10 @@ public static int delete(String query, Object... params) {
175176
throw new AutoGeneration();
176177
}
177178

179+
public static void commit() {
180+
JPA.getJPAConfig().getJPAContext().closeTx(false);
181+
}
182+
178183
/**
179184
* Delete all entities
180185
*

serviceframework-web/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<parent>
66
<artifactId>ServiceFramework_2.11</artifactId>
77
<groupId>net.csdn</groupId>
8-
<version>2.0.0</version>
8+
<version>2.0.1</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>
1212
<artifactId>serviceframework-web_2.11</artifactId>
1313
<dependencies>
1414
<dependency>
1515
<groupId>net.csdn</groupId>
16-
<artifactId>serviceframework-jetty-9-server</artifactId>
16+
<artifactId>serviceframework-jetty-9-server_2.11</artifactId>
1717
<version>${parent.version}</version>
1818
</dependency>
1919

serviceframework-web/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestClientProxy.java

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
import net.csdn.common.path.Url;
99
import net.csdn.modules.http.RestRequest;
1010
import net.csdn.modules.transport.HttpTransportService;
11-
import net.csdn.trace.RemoteTraceElementKey;
12-
import net.csdn.trace.Trace;
13-
import net.csdn.trace.TraceContext;
14-
import net.csdn.trace.VisitType;
15-
import org.apache.commons.lang3.exception.ExceptionUtils;
1611
import scala.collection.JavaConversions;
1712

1813
import java.io.UnsupportedEncodingException;
@@ -113,10 +108,6 @@ public Object invoke(Object o, Method method, Object[] objects) throws Throwable
113108
if (!methodSupport) throw new RuntimeException(reqMethod + "not support in invoke " + url);
114109

115110

116-
117-
118-
119-
120111
//支持rest接口
121112
List<String> replaceKeys = new ArrayList<String>();
122113
String remenberPath = path;
@@ -132,15 +123,8 @@ public Object invoke(Object o, Method method, Object[] objects) throws Throwable
132123
}
133124
Url finalUrl = new Url(url + "/" + remenberPath);
134125

135-
TraceContext traceContext = Trace.get();
136-
if (traceContext != null) {
137-
traceContext.start(finalUrl.toString(), VisitType.HTTP_SERVICE());
138-
finalUrl.addParam(RemoteTraceElementKey.TRACEID(), traceContext.traceId());
139-
finalUrl.addParam(RemoteTraceElementKey.RPCID(), traceContext.currentRpcId());
140-
}
141126

142127
HttpTransportService.SResponse response = null;
143-
String message = null;
144128
try {
145129
if (reqMethod.equals(RestRequest.Method.GET)) {
146130
response = httpTransportService.get(finalUrl, params);
@@ -154,15 +138,7 @@ public Object invoke(Object o, Method method, Object[] objects) throws Throwable
154138

155139
}
156140
} catch (Exception e) {
157-
message = ExceptionUtils.getStackTrace(e).replaceAll("\n", "\\n");
158-
} finally {
159-
int responseStatus = -1;
160-
long responseLength = -1;
161-
if (response != null) responseStatus = response.getStatus();
162-
if (response != null) responseLength = response.getContent().length();
163-
if (traceContext != null) {
164-
traceContext.finish(responseStatus, responseLength, message, logger);
165-
}
141+
logger.info("call remote fail", e);
166142
}
167143

168144
if (response == null)

0 commit comments

Comments
 (0)