getTrxName must return null instead of empty string is trx name is not set in context.

This commit is contained in:
Heng Sin Low 2010-12-27 08:44:31 +08:00
parent c66f9c6f10
commit 3f6be1c60d
1 changed files with 5 additions and 1 deletions

View File

@ -348,7 +348,11 @@ public abstract class AbstractElementHandler implements ElementHandler {
* @return transaction name * @return transaction name
*/ */
protected String getTrxName(Properties ctx) { protected String getTrxName(Properties ctx) {
return Env.getContext(ctx, "TrxName"); String trxName = Env.getContext(ctx, "TrxName");
if (trxName != null && trxName.trim().length() > 0)
return trxName;
else
return null;
} }
/** /**