[jboss-user] [JCA/JBoss] - Re: MSSQL XA datasource throws RollbackException on cluster
ratrask
do-not-reply at jboss.com
Fri Nov 30 13:21:20 EST 2007
Last things first:
anonymous wrote : Do you mean to say that every time you restart the MSSQL server it listens on different ports? There should be some way to configure the fixed port , I wanted to try this but I have fedora installed on my laptop .
|
| Ronald , I don't believe that the MS doesn't provide a way to configure the fixed port to listen :) , google to know more configuration
No that is not what I mean to say. The default port the SQL Server listens on is 1433. But it must have an algorithm for picking a different port if it discovers that that port is in use, because on my laptop it came up on port 1961. This caused me some delay in trackinig down what happened, because there was no indication that it had changed from 1433 other than a connection refused message. After Googling around I bit I found a hint that I needed to check at the place I described in the post to find out what port it was listening on.
You can also set the port that it listens on at the same location. I have not researched it enough to know why / when it changes, but I suspect it only occurs the first time that the TCP/IP connectivity is enabled.
Sorry for any confusion that this may have caused. My intent was good. I was just trying to help anyone who was following in my tracks.
Now to the real point of the post. Perhaps I am doing this wrong, but I have not seen any difference after enabeling trace The same information goes to the console, and there is no error displayed in the server log, or any indicative information in the server.log
This is how I am enabeling trace.
In the conf directory of my server, I edit the file jboss-log4j.xml. i.e. (jboss-4.2.1.GA/server/fast2market/conf/jboss-log4j.xml
I add the following:
<category name="org.jboss.tm">
| <priority value="TRACE" class="org.jboss.logging.XLevel"/>
| </category>
| <category name="org.jboss.jdbc">
| <priority value="TRACE" class="org.jboss.logging.XLevel"/>
| </category>
| <category name="org.jboss.mq.sm.jdbc.JDBCStateManar">
| <priority value="TRACE" class="org.jboss.logging.XLevel"/>
| </category>
Is there something that I am doing wrong?
This is the information in the service.log:
2007-11-30 10:35:00,778 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying jbossmq-httpil.sar
| 2007-11-30 10:35:00,778 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/JBoss/jboss-4.2.1.GA/server/fast2market/deploy-hasingleton/jms/hsqldb-jdbc-state-service.xml
| 2007-11-30 10:35:00,778 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, create step: url file:/C:/JBoss/jboss-4.2.1.GA/server/fast2market/deploy-hasingleton/jms/hsqldb-jdbc-state-service.xml
| 2007-11-30 10:35:00,778 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.mq:service=StateManager with code: org.jboss.mq.sm.jdbc.JDBCStateManager
| 2007-11-30 10:35:00,841 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.mq:service=StateManager
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceController] recording that jboss.mq:service=StateManager depends on jboss.jca:service=DataSourceBinding,name=DefaultDS
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceConfigurator] considering ConnectionManager with object name jboss.jca:service=DataSourceBinding,name=DefaultDS
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceConfigurator] SqlProperties set to CREATE_TABLES_ON_STARTUP = TRUE
| CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \
| CLIENTID VARCHAR(128) NULL, PRIMARY KEY(USERID))
| CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \
| PRIMARY KEY(USERID, ROLEID))
| CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \
| SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \
| SELECTOR VARCHAR(255) NULL, PRIMARY KEY(CLIENTID, SUBNAME))
| GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
| LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
| GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
| INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
| UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
| REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
| GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
| GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
| POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest')
| POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee')
| POPULATE.TABLES.03 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('john', 'needle', 'DurableSubscriberExample')
| POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')
| POPULATE.TABLES.05 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('dynsub', 'dynsub')
| POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')
| POPULATE.TABLES.07 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('j2ee','guest')
| POPULATE.TABLES.08 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('john','guest')
| POPULATE.TABLES.09 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('subscriber','john')
| POPULATE.TABLES.10 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','john')
| POPULATE.TABLES.11 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('publisher','dynsub')
| POPULATE.TABLES.12 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','john')
| POPULATE.TABLES.13 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('durpublisher','dynsub')
| POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody') in jboss.mq:service=StateManager
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceController] Creating service jboss.mq:service=StateManager
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceController] waiting in create of jboss.mq:service=StateManager waiting on jboss.jca:service=DataSourceBinding,name=DefaultDS
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying hsqldb-jdbc-state-service.xml
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/JBoss/jboss-4.2.1.GA/server/fast2market/deploy-hasingleton/jms/jbossmq-destinations-service.xml
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, create step: url file:/C:/JBoss/jboss-4.2.1.GA/server/fast2market/deploy-hasingleton/jms/jbossmq-destinations-service.xml
| 2007-11-30 10:35:00,856 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss.mq.destination:service=Topic,name=testTopic with code: org.jboss.mq.server.jmx.Topic
| 2007-11-30 10:35:00,903 DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.mq.destination:service=Topic,name=testTopic
Here is the console output for the same run:
| 10:35:19,888 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
| 10:35:20,138 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
| 10:35:22,513 WARN [JDBCStateManager] Error initialising state manager db
| org.jboss.mq.SpyJMSException: Could not commit/rollback a transaction with the transaction manager.; - nested throwable: (javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state)
| at org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.close(JDBCStateManager.java:638)
| at org.jboss.mq.sm.jdbc.JDBCStateManager.initDB(JDBCStateManager.java:485)
| at org.jboss.mq.sm.jdbc.JDBCStateManager.startService(JDBCStateManager.java:393)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
There is no relevant entry in the boot.log. except that it is picking up the jboss-log4j.xml configuration.
10:34:36,372 DEBUG [ServiceController] Creating service jboss.system:type=Log4jService,service=Logging
| 10:34:36,372 DEBUG [Log4jService] Creating jboss.system:type=Log4jService,service=Logging
| 10:34:36,388 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109417#4109417
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109417
More information about the jboss-user
mailing list