[JBoss Transactions Development] - Re: Starting with JBoss Transactions
by adinn
Ben is right to recommend this course of action. However, you would be much better off using a later version of JBossAS and JBossTS/XTS.
I recommend that you download JBossAS 5.1.0.GA and the corresponding transaction code in JBossTS 4.6.0.GA from the JBoss svn repository. The programmer's guide in this version includes full documentation of both the WSAT and WSBA APIs. The implementation of XTS in this version includes full support for WSAT and WSBA crash recovery.
After download you need to build the AS, then TS and finally XTS as follows
-- build AS
| cd <AStree>/build
| bash build.sh (or run build.bat for windows)
|
-- set JBOSS_HOME
| export JBOSS_HOME=<ASdir>/build/output/jboss-5.1.0.GA//
|
-- build JBossTS
| cd <TStree>
| ant jbossjta
|
-- build and deploy XTS
| cd <TStree>/XTS
| ant install
| cp xts-install/sar/jbossxts.sar $JBOSS_HOME/server/default/deploy
|
-- build the demo
| cd <TSTree>/XTS/demo
| bash build.sh jboss
|
| cd <TSTree>/XTS/xts-install/demo
| -- edit file jboss.properties and replace HOSTNAME etc as directed
| bash build.sh jboss clean build
|
-- deploy the demo
| cp <TSTree>/XTS/xts-install/xts-demo.ear $JBOSS_HOME/server/default/deploy
|
Now start jboss and run the demo from URL
[url]
http://localhost:8080/xts-demo/
[/url]
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256642#4256642
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256642
16 years, 6 months
[JBoss ESB Development] - Re: XPath Routing
by mvecera@redhat.com
"tfennelly" wrote : "mvecera(a)redhat.com" wrote : I think that is should be possible to specify a message part as a location. Like this:
| | <property name="XPathQueryLocation" value="message.body.myQuery" />
| | or
| | <property name="XPathQueryLocation" value="message.property.myQuery" />
| | |
| | For the dynamic query creation...
|
| Not sure I follow! The incoming message is specifying its own filtering parameter?? Can you outline the full use case more clearly please Martin i.e. when/how would this be used?
Yes, exactly. Here is a sample scenario:
* A message contains an order. Each order item carries a store code and a weight.
* For minimizing postage cost, a custom action will compose an XPath query that points to the store code of the heaviest item in the order.
* CBR will use this query to route the message to the corresponding store for process.
Does it make sense?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256582#4256582
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256582
16 years, 6 months
[JBoss Microcontainer Development POJO Server] - Re: kernel unit test failures
by alesj
Wrt the Set|Collection|...|JaxbTestCase tests, you can ignore them for now.
It's a XB issue:
anonymous wrote :
| The thing is the wildcard in XSD is in the choice. While in the Java
| class it's a separate particle.
|
| > > It does fail for me as well. That's a binding validation issue.
| > >
| > > 859 TRACE [SchemaBindingValidator] complex type
| > > {urn:jboss:javabean:1.0}propertyType
| > > 859 TRACE [SchemaBindingValidator] sequence
| > > 859 TRACE [SchemaBindingValidator] expected particles:
| > > - sequence
| > > - sequence
| > > actual particles:
| > > - wildcard
| > > 859 TRACE [SchemaBindingValidator] flattened ModelGroupBinding is missing:
| > > 859 TRACE [SchemaBindingValidator] flattened XSModelGroup is missing:
| > > 859 TRACE [SchemaBindingValidator] - {wildcard}wildcard
|
And I'm already discussing it with Alexey on how to fix it.
What you're seeing is Asynch ControllerMode tests failing.
I sometimes get that as well, so perhaps we're still not doing those test in proper synch deterministic manner?
Or it could be Byteman bug?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256560#4256560
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256560
16 years, 6 months
[JBoss Transactions Development] - Re: Asynchronicity and transaction context propagation
by chtimi2
Are you referring to the TrCoreProgrammersGuide pdf? I think so (was probably renamed) but just to be sure.
I did find something of interest in it:
"TrCoreProgrammersGuide.pdf page33 (Checking transactions)" wrote :
| When a thread attempts to terminate the transaction and there are active threads within it, the system will invoke the check method on the transactionâÂÂs CheckedAction object.
| The parameters to the check method are:
| - isCommit: indicates whether the transaction is in the process of committing or rolling back.
| - actUid: the transaction identifier.
| - list: a list of all of the threads currently marked as active within this transaction.
| When check returns, the transaction termination will continue. Obviously the state of the transaction at this point may be different from that when check was called, e.g., the transaction may subsequently have been committed.
As i thought, the check method is passed a list of the active threads.
If i'm not mistaken, i would just need to implement a BlockingCheckedAction, that calls join() on all those threads, and use it for the global transaction.
To sum it up:
1/ Launch the server with -Dcom.arjuna.ats.jts.checkedTransactions=YES to enable checked transactions
2/ Implement BlockingCheckedAction that does: for (Thread t: list) { t.join() }
3/ Just after the global transaction has started i would need to do
Current current = OTSManager.get_current().
| current.setCheckedAction ( new BlockingCheckedAction() );
I thought of a simple unit test to verify the correctness of the transactional behaviour.
Do you think this would work? I prefer asking before i start spending time integrating another TransactionManager in Spring.
1/ UnitTest (UT) calls transactional service void updateXY ( int X , int Y , boolean failOnUpdatingY ) synchronously
2/ The global transaction is initiated and updateXY updates X
3/ updateXY then calls transactional service updateY ( int Y , boolean failOnUpdatingY ) asynchronously
4/ updateY executes within the same global transaction; if (failOnUpdatingY) a RuntimeException is thrown, which must rollback the global transaction
5/ UT sleeps for a second, by then the transaction should have been committed or rolled back
6/ UT calls getX and getY
7/ Verifications:
Case ! failOnUpdatingY: X and Y should have their new values because the global transaction has been committed
Case failOnUpdatingY: X and Y should have their old values because the global transaction has been rolled back
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256543#4256543
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256543
16 years, 6 months