|
From: Calvin S. <ca...@th...> - 2004-12-14 23:53:15
|
*The javadoc for
org.springframework.transaction.support.TransactionSynchronizationManager.getResourceMap()
looks like it's slightly out of synch with the code, since it says that
it returns null in the case of no bound resources, but it actually
returns an empty map, as you can see below.
Here is the relevant snippet from **TransactionSynchronizationManager:*
*
/**
* Return all resources that are bound to the current thread.
* <p>Mainly for debugging purposes. Resource managers should always
invoke
* hasResource for a specific resource key that they are interested in.
* @return Map with resource keys and resource objects,
* or null if currently none bound
* @see #hasResource
*/
public static Map getResourceMap() {
Map map = (Map) resources.get();
if (map == null) {
map = new HashMap();
}
return Collections.unmodifiableMap(map);
}
cheers,
calvin
*
|