[Clustering/JBoss] - Connecting to Tomcat failed - JBoss Cluster with Apache mod_
by ezradibiase
Hi all,
Our architecture consists of 2 JBoss 4.0.2.GA servers on Red Hat AS 4 UP7 and one Apache 2.0.52 node with mod_jk-ap20-1.2.19-1jpp_1rh on a Red Hat AS4 UP4.
We ran into this issue several month ago and we cannot find a solution yet - from the mod_jk.log:
[Mon Jan 19 14:10:58 2009] [11956:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:00 2009] [11517:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:04 2009] [11654:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:08 2009] [11515:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:10 2009] [11915:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:10 2009] [11915:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:12 2009] [11605:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:15 2009] [11938:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:15 2009] [11938:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:21 2009] [11787:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:21 2009] [11787:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:24 2009] [11902:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:24 2009] [11902:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:25 2009] [11844:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:25 2009] [11844:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:33 2009] [11608:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:37 2009] [11808:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:37 2009] [11808:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:41 2009] [11637:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:44 2009] [12009:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:44 2009] [12009:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:45 2009] [11533:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:47 2009] [11834:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
[Mon Jan 19 14:11:47 2009] [11834:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (fe01) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:49 2009] [11562:59072] [error] ajp_get_reply::jk_ajp_common.c (1536): (rllas02) Tomcat is down or refused connection. No response has been sent to the client (yet)
[Mon Jan 19 14:11:49 2009] [11562:59072] [error] ajp_service::jk_ajp_common.c (1879): (rllas02) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[Mon Jan 19 14:11:51 2009] [12003:59072] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (947): (fe01) can't receive the response message from tomcat, network problems or tomcat is down (10.2.70.55:8
009), err=-104
workers.properties:
# Cluster members
worker.as01.host=10.2.xxx.xxx
worker.as01.port=8009
worker.as01.type=ajp13
worker.as02.host=10.2.xxx.xxx
worker.as02.port=8009
worker.as02.type=ajp13
worker.cluster01.type=lb
worker.cluster01.balanced_workers=as01,as02
worker.status.type=status
Only a restart of the two AS restores the correct operation.
I'll appreciate any help.
thanks in advance
Ezra Di Biase
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204325#4204325
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204325
17 years, 3 months
[Installation, Configuration & DEPLOYMENT] - Re: Copy JBOSS
by ran_sushmi
thanks, for your answer. The contents of run.sh are as follows:-
----------------------------------------------------------------------------------
### ====================================================================== ###
## ##
## JBoss Bootstrap Script ##
## ##
### ====================================================================== ###
### $Id: run.sh,v 1.9.2.5 2004/01/01 01:20:38 starksm Exp $ ###
export LD_LIBRARY_PATH=$BILLING_HOME/billmodules/licensing/
JAVA_OPTS="$JAVA_OPTS -Xms328m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m"
#JAVA_OPTS="$JAVA_OPTS -Xms328m -Xmx720m"
#JAVA_OPTS: -server -Dprogram.name=run.sh -Xms200m -Xmx900m -XX:NewSize=128m -XX:MaxNewSize=128m
DIRNAME=`dirname $0`
PROGNAME=`basename $0`
GREP="grep"
# Use the maximum available, or set MAX_FD != -1 to use that
MAX_FD="maximum"
#
# Helper to complain.
#
warn() {
echo "${PROGNAME}: $*"
}
#
# Helper to puke.
#
die() {
warn $*
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
Darwin*)
darwin=true
;;
esac
# Read an optional running configuration file
if [ "x$RUN_CONF" = "x" ]; then
RUN_CONF="$DIRNAME/run.conf"
fi
if [ -r $RUN_CONF ]; then
. $RUN_CONF
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JBOSS_HOME" ] &&
JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$JAVAC_JAR" ] &&
JAVAC_JAR=`cygpath --unix "$JAVAC_JAR"`
fi
# Setup JBOSS_HOME
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=`cd $DIRNAME/..; pwd`
fi
export JBOSS_HOME
# Increase the maximum file descriptors if we can
if [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ]; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
# use the system max
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ]; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="java"
fi
fi
# Setup the classpath
runjar="$JBOSS_HOME/bin/run.jar"
if [ ! -f $runjar ]; then
die "Missing required file: $runjar"
fi
JBOSS_BOOT_CLASSPATH="$runjar"
# Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
# compatible distribution which JAVA_HOME points to
if [ "x$JAVAC_JAR" = "x" ]; then
JAVAC_JAR="$JAVA_HOME/lib/tools.jar"
fi
if [ ! -f "$JAVAC_JAR" ]; then
# MacOSX does not have a seperate tools.jar
if [ "$darwin" != "true" ]; then
warn "Missing file: $JAVAC_JAR"
warn "Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE."
fi
fi
if [ "x$JBOSS_CLASSPATH" = "x" ]; then
JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
else
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
fi
# If JAVA_OPTS is not set try check for Hotspot
if [ "x$JAVA_OPTS" = "x" ]; then
# Check for SUN(tm) JVM w/ HotSpot support
if [ "x$HAS_HOTSPOT" = "x" ]; then
HAS_HOTSPOT=`$JAVA -version 2>&1 | $GREP -i HotSpot`
fi
# Enable -server if we have Hotspot, unless we can't
if [ "x$HAS_HOTSPOT" != "x" ]; then
#!/bin/sh
### ====================================================================== ###
## ##
## JBoss Bootstrap Script ##
## ##
### ====================================================================== ###
### $Id: run.sh,v 1.9.2.5 2004/01/01 01:20:38 starksm Exp $ ###
export LD_LIBRARY_PATH=$BILLING_HOME/billmodules/licensing/
JAVA_OPTS="$JAVA_OPTS -Xms328m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m"
#JAVA_OPTS="$JAVA_OPTS -Xms328m -Xmx720m"
#JAVA_OPTS: -server -Dprogram.name=run.sh -Xms200m -Xmx900m -XX:NewSize=128m -XX:MaxNewSize=128m
DIRNAME=`dirname $0`
PROGNAME=`basename $0`
GREP="grep"
# Use the maximum available, or set MAX_FD != -1 to use that
MAX_FD="maximum"
#
# Helper to complain.
#
warn() {
echo "${PROGNAME}: $*"
}
#
# Helper to puke.
#
die() {
warn $*
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
Darwin*)
darwin=true
;;
esac
# Read an optional running configuration file
if [ "x$RUN_CONF" = "x" ]; then
RUN_CONF="$DIRNAME/run.conf"
fi
if [ -r $RUN_CONF ]; then
. $RUN_CONF
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JBOSS_HOME" ] &&
JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$JAVAC_JAR" ] &&
JAVAC_JAR=`cygpath --unix "$JAVAC_JAR"`
fi
# Setup JBOSS_HOME
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=`cd $DIRNAME/..; pwd`
fi
export JBOSS_HOME
# Increase the maximum file descriptors if we can
if [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ]; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
# use the system max
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ]; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="java"
fi
fi
# Setup the classpath
runjar="$JBOSS_HOME/bin/run.jar"
if [ ! -f $runjar ]; then
die "Missing required file: $runjar"
fi
JBOSS_BOOT_CLASSPATH="$runjar"
# Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
# compatible distribution which JAVA_HOME points to
if [ "x$JAVAC_JAR" = "x" ]; then
JAVAC_JAR="$JAVA_HOME/lib/tools.jar"
fi
if [ ! -f "$JAVAC_JAR" ]; then
# MacOSX does not have a seperate tools.jar
if [ "$darwin" != "true" ]; then
warn "Missing file: $JAVAC_JAR"
warn "Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE."
fi
fi
if [ "x$JBOSS_CLASSPATH" = "x" ]; then
JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
else
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
fi
# If JAVA_OPTS is not set try check for Hotspot
if [ "x$JAVA_OPTS" = "x" ]; then
# Check for SUN(tm) JVM w/ HotSpot support
if [ "x$HAS_HOTSPOT" = "x" ]; then
HAS_HOTSPOT=`$JAVA -version 2>&1 | $GREP -i HotSpot`
fi
# Enable -server if we have Hotspot, unless we can't
if [ "x$HAS_HOTSPOT" != "x" ]; then
# MacOS does not support -server flag
if [ "$darwin" != "true" ]; then
JAVA_OPTS="-server"
fi
fi
fi
# Setup JBoss sepecific properties
JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
JBOSS_CLASSPATH=`cygpath --path --windows "$JBOSS_CLASSPATH"`
fi
#JAVA_OPTS="$JAVA_OPTS -Xms400m -Xmx600m -XX:NewSize=256m -XX:MaxNewSize=512m"
# Display our environment
echo "========================================================================="
echo ""
echo " JBoss Bootstrap Environment"
echo ""
echo " JBOSS_HOME: $JBOSS_HOME"
echo ""
echo " JAVA: $JAVA"
echo ""
echo " JAVA_OPTS: $JAVA_OPTS"
echo ""
echo " CLASSPATH: $JBOSS_CLASSPATH"
echo ""
echo "========================================================================="
echo ""
STATUS=10
while [ $STATUS -eq 10 ]
do
# Execute the JVM
"$JAVA" $JAVA_OPTS \
-classpath "$JBOSS_CLASSPATH" \
org.jboss.Main "$@"
STATUS=$?
# if it doesn't work, you may want to take a look at this:
# http://developer.java.sun.com/developer/bugParade/bugs/4465334.html
done
--------------------------------------------------------------------------------------
regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204324#4204324
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204324
17 years, 3 months
[JCA/JBoss] - TxConnectionManager error IllegalMonitorStateException
by bcoutinho
We are migrating our app from JBossAS 4.2.0 to 4.2.3. The app worked ok in 4.2.0. As far as we can tell, everything is also working fine in 4.2.3 but for one problem. We started getting the following exception:
| 2009-01-14 00:42:02,091 WARN [org.jboss.resource.connectionmanager.TxConnectionManager] Error during tidyup org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@69ad0281[state=DESTROYED mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@6b29832c handles=0 lastUse=1231900880359 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@6af48216 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@674558d9 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@69ad027b txSync=null]
| java.lang.IllegalMonitorStateException
| at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:125)
| at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1102)
| at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
| at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.unlock(BaseWrapperManagedConnection.java:278)
| at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.rollback(LocalManagedConnection.java:94)
| at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.tidyup(TxConnectionManager.java:698)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:359)
| at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:632)
| at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:363)
| at org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:155)
| at com.wxyz.ejb.SequentialSetterBean.closeConnection(SequentialSetterBean.java:123)
| at com.wxyz.ejb.SequentialSetterBean.getNextSequential(SequentialSetterBean.java:61)
| at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
| at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;J)Ljava.lang.Object;(Unknown Source)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:116)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
| at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
|
Our SequentialSetterBean code is:
| package com.wxyz.ejb;
| ...
| @Stateless
| @Remote(com.wxyz.ejb.SequentialSetter.class)
| @Local(com.wxyz.ejb.SequentialSetter.class)
| public class SequentialSetterBean implements SequentialSetter {
|
| @Resource(mappedName="java:wxyzDS") DataSource wxyzDS;
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public Integer getNextSequential(String name) {
| Connection connection = null;
| CallableStatement statement = null;
| Integer sequential = null;
| try {
| connection = wxyzDS.getConnection();
| statement = connection.prepareCall("{call wxyz.next_sequential(?, ?)}");
| statement.setString(1, name);
| statement.registerOutParameter(2, Types.INTEGER);
| statement.execute();
| sequential = statement.getInt(2);
| if (sequential == null || 0 == sequential) {
| throw new UncheckedException("Invalid sequential " + sequential + " returned to " + name);
| }
| return sequential;
| } catch (Exception e) {
| throw new UncheckedException(e.getMessage(), e);
| } finally {
| closeStatement(statement);
| closeConnection(connection);
| }
| }
|
| private void closeResultSet(ResultSet resultSet) {
| if (resultSet != null) {
| try {
| resultSet.close();
| } catch (SQLException e) {
| logger.error(e);
| }
| }
| }
|
| private void closeStatement(Statement statement) {
| if (statement != null) {
| try {
| statement.close();
| } catch (SQLException e) {
| logger.error(e);
| }
| }
| }
|
| private void closeConnection(Connection connection) {
| if (connection != null) {
| try {
| connection.close();
| } catch (SQLException e) {
| logger.error(e);
| }
| }
| }
| }
|
Note that we are using trans atrribute NOT_SUPPORTED because we want the procedure to control the transaction.
Our DataSource is:
| <datasources>
| <local-tx-datasource>
| <jndi-name>wxyzDS</jndi-name>
| <connection-url><![CDATA[jdbc:mysql:loadbalance://192.168.11.5:3306,192.168.11.6:3306/?loadBalanceStrategy=random&loadBalanceBlacklistTimeout=5000&useServerPrepStmts=false&useConfigs=maxPerformance]]></connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>user</user-name>
| <password>********</password>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <min-pool-size>2</min-pool-size>
| <max-pool-size>50</max-pool-size>
| <blocking-timeout-millis>5000</blocking-timeout-millis>
| <idle-timeout-minutes>5</idle-timeout-minutes>
|
| <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
| <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
| <check-valid-connection-sql>select 1</check-valid-connection-sql>
| <new-connection-sql>select 1</new-connection-sql>
|
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
Inspecting BaseWrapperManagedConnection, we've noticed that the above unlock() method was introduced only in 4.2.3, so we suspect that this issue is related to this new implementation.
Has someone some clue to this error?
TIA.
--
Bill Coutinho.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204321#4204321
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204321
17 years, 3 months