* @param props Properties to be used for the transaction manager.
* @return TransactionDemarcation configuration with global transaction handling.
*/
public static TransactionDemarcation createGlobalTransactionDemarcation(
final String name, final Properties props) {
TransactionManager manager = new TransactionManager();
manager.setName(name);
Iterator iter = props.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
String key = (String) entry.getKey();
String value = (String) entry.getValue();
manager.addParam(createParam(key, value));
}
TransactionDemarcation trans = new TransactionDemarcation();
trans.setMode("global");
trans.setTransactionManager(manager);