XmlContainerConfig::setTransactional |
![]() ![]() |
#include <DbXml.hpp>void XmlContainerConfig::setTransactional(bool value)
bool XmlContainerConfig::getTransactional() const
If set to true it causes the container to use transactions. Even if the environment has been configured for transactions, this property must be used in order to create or open a transactional container. In other words, a transactional environment can support both transactional and non-transactional containers. If the environment has not also been configured for transactions then use of this property when opening a container will result in an exception.
If this property is set an XmlTransaction object can and should be passed to any method that supports it. If a container is transactional and an explicit XmlTransaction object is not passed to a modifying method (e.g. XmlContainer::putDocument a transaction is automatically created, used and committed on behalf of the application. While this is handy it is highly recommended that applications manage their own transactions in order to better handle deadlock and other exceptions that may occur. The default value for this property is false and it affects containers being created and containers that already exist.
Parameters
![]() ![]() |
Copyright (c) 1996-2009 Oracle. All rights reserved.