Comments (3)
您好,请问下你是怎么测试的?我用github上面最新的版本,运行成功,没有出现卡死。
能不能给出代码和测试用例?附上我的测试步骤:
1、加载maven依赖:
org.springframework
spring-tx
4.1.1.RELEASE
2、测试服务代码:
import com.newlandframework.rpc.services.PersonManage;
import com.newlandframework.rpc.services.pojo.Person;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@service
public class PersonManageImpl implements PersonManage {
@transactional
public int save(Person p) {
//your business logic code here!
System.out.println("Transactional person data[" + p + "] has save!!!");
return 0;
}
public void query(Person p) {
//your business logic code here!
System.out.println("person data[" + p + "] has query!");
}
}
from nettyrpc.
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!--驱动类-->
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<!--数据库地址,指向库 -->
<property name="url" value="jdbc:mysql://127.0.0.1:3306/134"/>
<!--用户名 -->
<property name="username" value="1111"/>
<!--密码 -->
<property name="password" value="1111"/>
</bean>
<!-- 定义JdbcTemplate的Bean -->
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<constructor-arg name="dataSource" ref="dataSource"/>
</bean>
<bean id="sqlTxManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:annotation-driven transaction-manager="sqlTxManager"/>
我就加了这个配置,然后其余和你一样,加了tx,jdbc包,加了注解事务的xml,然后测试的
from nettyrpc.
这个应该和NettyRPC没有太大关系。我手头没有mysql运行环境,所以测试样例以oracle来替代,参考你提供的配置。可以看这里:JDBC服务参考代码链接。oracle测试是没有问题的,你更新一下最新NettyRPC版本试一下。
from nettyrpc.
Related Issues (20)
- 项目启动时报死锁io.netty.util.concurrent.BlockingOperationException: AbstractChannel$CloseFuture@5a74c9ec(incomplete) HOT 7
- BlockingOperationException Occurred HOT 1
- 感谢提供该项目学习,另外请问下zookeeper的支持最近有开始了吗? HOT 1
- 项目代码结构建议
- 多个同名方法时,第一个参数类型不匹配就直接退出循环是不是不对? HOT 2
- 手游服务端网络层框架的困惑 HOT 1
- 客户端对不同地址的服务器进行RPC调用问题 HOT 2
- RPC服务的过滤器设置问题
- Closer线程安全问题 HOT 1
- 一个ip地址提供多个服务时,会不会重复发起连接
- 能否避免Timeout request HOT 2
- this project is awesome
- 结果回调通知疑问
- 权限校验疑问
- 超时问题:Timeout request,NettyRPC server request timeout! HOT 1
- Listener监听器的作用是什么?
- Netty 和 Spring 在一个线程中吧,这样不就阻塞了 Spring 吗?
- 大佬现在有写公众号之类的吗 我关注下
- 重连机制问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nettyrpc.