[jbossts-issues] [JBoss JIRA] (JBTM-3005) Add a quickstart showing the Tomcat and DBCP2

Ondra Chaloupka (JIRA) issues at jboss.org
Thu Apr 12 15:10:00 EDT 2018


    [ https://issues.jboss.org/browse/JBTM-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13560477#comment-13560477 ] 

Ondra Chaloupka commented on JBTM-3005:
---------------------------------------

[~mbabacek] my two cents, I'm returning to your previous [comment|https://issues.jboss.org/browse/JBTM-3005?focusedCommentId=13558264#comment-13558264] as you say that it's still valid (is that right?)
I seems there is recovery manager not running at all. Could be there is some misconfiguration in your war file? The point is to have configured {{NarayanaJtaServletContextListener}} which configures the recovery manager (https://github.com/jbosstm/narayana/blob/master/tomcat/tomcat-jta/src/main/java/org/jboss/narayana/tomcat/jta/NarayanaJtaServletContextListener.java#L91).

Either way I tried the test where I borrowed your {{context.xml}} and run it as it is in the {{tomcat-jta}} repo: https://github.com/ochaloup/narayana/commit/548aa471686dc40260bf7653e5178aeee4880d1b and that way the test passes.

{code}
docker run -p 5432:5432 --rm  -ePOSTGRES_USER=test -e POSTGRES_PASSWORD=test postgres:9.4 -c max-prepared-transactions=110 -c log-statement=all

git clone https://github.com/ochaloup/narayana.git -b dbcp2
cd narayana
./build.sh clean install -Pcommunity -DskipTests -Didlj-enabled=true
cd tomcat/tomcat-jta
export CATALINA_HOME=...
# need to be configured  $CATALINA_HOME/conf/tomcat-users.xml with '<user username="test" password="test" roles="manager-script"/>'
mvn clean verify -Parq-tomcat -Dit.test=BaseITCase#testRecovery
{code}

> Add a quickstart showing the Tomcat and DBCP2
> ---------------------------------------------
>
>                 Key: JBTM-3005
>                 URL: https://issues.jboss.org/browse/JBTM-3005
>             Project: JBoss Transaction Manager
>          Issue Type: Task
>          Components: Demonstrator
>            Reporter: Amos Feng
>            Assignee: Amos Feng
>             Fix For: 5.8.1.Final
>
>
> This quickstart needs to show how to use the DBCP2 in Tomcat to support the XA transaction.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jbossts-issues mailing list