[Design of Messaging on JBoss (Messaging/JBoss)] - Re: XARecovery - MQ/Messaging merge
by mskonda
"timfox" wrote : Hi Madhu-
|
| A few comments:
|
| 1. We need to make sure that any tests for the recovery functionality live in the functional test suite and don't rely on ejbs, mdbs or any other non jms stuff.
|
| The tests should manipulate the XAConnnection/XASession/XAResource, enlist them in global transactions and test them this way.
|
| You may need to add something to simulate a server "crash".
|
I take your point. I do have stanadaone tests but as you said, I'll make sure they don't depend upon non-jms stuff.
anonymous wrote :
| 2. It's my undertstanding that the transaction manager can call XAResource.recover() at any time, not just after server startup.
|
The JBossTS RecoveryManager calls an implementation of XAResourceRecovery which looks for the appropriate xaresource to carry on the recovery. The recovery is not called until XAResource is found. look at the following code:
/**
| * This method checks whether there's an xa resource available
| *
| * @return
| */
| public boolean hasMoreResources() {
|
| if (working)
| return false;
|
| if (xaRes == null) {
| xaRes = initXAResource();
| }
|
| // test the resource
| try {
|
| xaRes.getTransactionTimeout();
|
| working = true;
|
| } catch (Exception ignored) {
|
| // ignore this exception
| log.warn("Exception:" + ignored.getMessage());
| }
|
| return working;
| }
|
So when it calls recover() we need to do the following sequence of actions:
anonymous wrote :
| a) Look in the database for any transactions in the prepared state. If there are any, create transaction objects corresponding to these rows, and add them to the in memory transaction repository in the prepared state (The prepared transactions may already be in the in-memory transaction repository so be careful to avoid duplicates)
|
| b) Return this list to the transaction manager
|
| c) Transaction manager will then call commit on those transactions.
|
Yes, this is the process I've employed. When a transaction is committed, in this case, the message is recvoered and published for the first time. So the subscriber should be able to get it.
However, although, the tx is committed and the message is updated with relevant state, it comes to the same point as I mentioned, the message isn't received by the subscriber!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969485#3969485
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969485
19 years, 7 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: XARecovery - MQ/Messaging merge
by timfox
Hi Madhu-
A few comments:
1. We need to make sure that any tests for the recovery functionality live in the functional test suite and don't rely on ejbs, mdbs or any other non jms stuff.
The tests should manipulate the XAConnnection/XASession/XAResource, enlist them in global transactions and test them this way.
You may need to add something to simulate a server "crash".
2. It's my undertstanding that the transaction manager can call XAResource.recover() at any time, not just after server startup.
So when it calls recover() we need to do the following sequence of actions:
a) Look in the database for any transactions in the prepared state. If there are any, create transaction objects corresponding to these rows, and add them to the in memory transaction repository in the prepared state (The prepared transactions may already be in the in-memory transaction repository so be careful to avoid duplicates)
b) Return this list to the transaction manager
c) Transaction manager will then call commit on those transactions.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969482#3969482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969482
19 years, 7 months
[Design of JBoss jBPM] - build and deploy
by worthp
i am sorry for the newb taste of this post.
i have downloaded CVS head and successfully built all projects. i am interested in the task specific form functionality that you are working on. i have read all the docs that i could find trying to find steps to deploy designer and jBPM (core and webapp) to jboss. i started the starter kit and went thru the tutorials and docs. i want to be able to build and deploy both designer and jBPM to my eclipse instance and the jboss starter kit instance. i've spent some time going thru the build scripts and there is a lot in them to try to get the 'simple facts'. i'd rather not completely break
is there a step by step process (either a target(s) in the build scripts or some doc in the source tree that will point me at build/deploy designer and webapp as well as anything that i need to do to sync the DB with the latest build?
any help would be appreciated.
pat.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969475#3969475
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969475
19 years, 7 months