使用JNDI的方式从Jboss里获取数据连接(Connection)的方式,Jboss会管理connection,不需要自己手动去关闭,但Jboss老是提示需要自己来关闭connection,针对Jboss6的解决方法如下:

Step One:修改%JBOSS_HOME%\server\default\deploy\jbossweb.sar\server.xml,将

<Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"                 cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"                 transactionManagerObjectName="jboss:service=TransactionManager" />

注释或删除。

Step Two: 修改%JBOSS_HOME%\server\default\deploy\jbossweb.sar\META-INF\jboss-beans.xml,将

<depends>jboss.jca:service=CachedConnectionManager</depends>

注释或删除。

Step Three: 修改%JBOSS_HOME%\server\default\conf\standardjboss.xml,查找所有的CachedConnectionInterceptor,将每一行注释。

Step Four:  重启Jboss,测试。

关于JBoss -“Closing a connection for you,please close them yourself”的更多相关文章

  1. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)

    [2017-05-19 13:32:14,933] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient) ...

  2. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn) java.net.ConnectException: Connection refused

    1.启动kafka的脚本程序报如下所示的错误: [hadoop@slaver1 script_hadoop]$ kafka-start.sh start kafkaServer... [-- ::,] ...

  3. hadoop mapreduce 写入hbase报错 Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

    现象:map任务构造数据正常,reduce任务,开始也正常,速度很快 ,在hbase 的管理界面,可以看到,5W以上的请求数 当reduce 执行到 70% 左右的时候,就堵住了,查看yarn的web ...

  4. Linux下启动tomcat报错,WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException:

    tomcat启动完了之后,一直不停的打印这种错误信息,看表面上,应该是zk节点下的数据是空的,连接不上服务,所以一直在尝试连接,然后一直又连不上: 完整的错误信息: 407662 [usf-ZooKe ...

  5. TCP closing a connection

    client closes socket: clientSocket.close(); step1 :client sends TCP FIN control segment to server st ...

  6. jboss jms 实例

      最近温习了下EJB和JMS,整理了下思路,和大家分享下P2P和Pub/Sub的demo :JBoss 7 集成了HornetQ,JMS可以在HornetQ中间件运行,有时间在和大家分享关于Horn ...

  7. RT:How HTTP use TCP connection

    In HTTP/0.9 (not used anymore), each request uses a separate TCP connection, and the end of a respon ...

  8. filezilla Can't open data connection.

    (000003)2016/7/4 9:31:42 - (not logged in) (10.61.41.57)> Connected, sending welcome message... ( ...

  9. 解决Lost connection to MySQL server during query错误方法

    昨天使用Navicat for MySQL导入MySQL数据库的时候,出现了一个严重的错误,Lost connection to MySQL server during query,字面意思就是在查询 ...

随机推荐

  1. Hadoop学习笔记(一):安装与配置

    1. 查看VM的网络配置 2. 打开虚拟机,配置网络: a). vim /etc/sysconfig/network-scripts/ifcfg-eno16777736 注意:这里的192.168.9 ...

  2. leetcode — first-missing-positive

    /** * * Source : https://oj.leetcode.com/problems/first-missing-positive/ * * Created by lverpeng on ...

  3. SQL 操作字符串

    SQL操作字符串相对来说比较难一点,现在总结几个常用的SQL 对字符串的操作: declare @dd nvarchar(12) set @dd='2015-03-13' print @dd decl ...

  4. Deeplearning.ai课程笔记--汇总

    从接触机器学习就了解到Andrew Ng的机器学习课程,后来发现又出来深度学习课程,就开始在网易云课堂上学习deeplearning.ai的课程,Andrew 的课真是的把深入浅出.当然学习这些课程还 ...

  5. 2017 ACM/ICPC Asia Regional Shenyang Online(部分题解)

    HDU 6197 array array array 题意 输入n和k,表示输入n个整数和可以擦除的次数k,如果至多擦除k次能是的数组中的序列是不上升或者是不下降序列,就是魔力数组,否则不是. 解题思 ...

  6. vue+vue-router+vuex实战

    shopping vue + vue-router + vuex实现电商网站 效果展示 install 下载代码: git clone https://github.com/chenchangyuan ...

  7. SHELL脚本--管道和重定向基础

    bash&shell系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html 1.8.1 匿名管道"|" 管道符号意如其 ...

  8. SPI 方式初始化 SD 卡总流程图(V2.0)

  9. MySQL之实现Oracle中的rank()函数的功能

      假设表格为student, 数据如下:   我们要在MySQL中实现Oracle中的rank()函数功能,即组内排序,具体来说: 就是对student表中按照课程(course)对学生(name) ...

  10. .net DBHelper

    DBHelper.cs是程序来连接数据的,也是一个程序必不可少的一个类(本人道行浅,目前这样认为).由于一个程序基本写一次,容易忘记.所有写在这里备注 首先是引用 using System.Data; ...