Tag: cws_src680_utf2 User: kr Date: 06/06/06 00:48:38 Modified: /dba/connectivity/source/cpool/ ZConnectionPool.cxx, ZConnectionPool.hxx, ZPoolCollection.cxx
Log: adapted: to UNO purpose environments File Changes: Directory: /dba/connectivity/source/cpool/ ========================================== File [changed]: ZConnectionPool.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/cpool/ZConnectionPool.cxx?r1=1.15.208.1&r2=1.15.208.2 Delta lines: +14 -12 --------------------- --- ZConnectionPool.cxx 14 Feb 2005 12:14:06 -0000 1.15.208.1 +++ ZConnectionPool.cxx 6 Jun 2006 07:48:35 -0000 1.15.208.2 @@ -2,9 +2,9 @@ * * $RCSfile: ZConnectionPool.cxx,v $ * - * $Revision: 1.15.208.1 $ + * $Revision: 1.15.208.2 $ * - * last change: $Author: kso $ $Date: 2005/02/14 12:14:06 $ + * last change: $Author: kr $ $Date: 2006/06/06 07:48:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,6 +95,9 @@ #include "connectivity/ConnectionWrapper.hxx" #endif +#ifndef INCLUDED_cppu_EnvGuards_hxx +#include <cppu/EnvGuards.hxx> +#endif using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -111,7 +114,7 @@ //========================================================================== void SAL_CALL OPoolTimer::onShot() { - ::comphelper::Apartment::Guard aGuard(m_xApartment); + ::cppu::EnvGuard aGuard(m_env); m_pPool->invalidatePooledConnections(); } namespace @@ -128,8 +131,7 @@ //= OConnectionPool //========================================================================== //-------------------------------------------------------------------------- -OConnectionPool::OConnectionPool(const Reference< XMultiServiceFactory >& _xMSF, - const Reference< XDriver >& _xDriver, +OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver, const Reference< XInterface >& _xDriverNode, const Reference< ::com::sun::star::reflection::XProxyFactory >& _rxProxyFactory) :m_xDriver(_xDriver) @@ -150,7 +152,7 @@ OPoolCollection::getNodeValue(getTimeoutNodeName(),m_xDriverNode) >>= m_nALiveCount; calculateTimeOuts(m_nALiveCount); - m_xInvalidator = new OPoolTimer(_xMSF,this,::vos::TTimeValue(m_nTimeOut,0)); + m_xInvalidator = new OPoolTimer(this,::vos::TTimeValue(m_nTimeOut,0)); m_xInvalidator->start(); } // ----------------------------------------------------------------------------- File [changed]: ZConnectionPool.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/cpool/ZConnectionPool.hxx?r1=1.7.118.1&r2=1.7.118.2 Delta lines: +18 -25 --------------------- --- ZConnectionPool.hxx 14 Feb 2005 12:14:07 -0000 1.7.118.1 +++ ZConnectionPool.hxx 6 Jun 2006 07:48:35 -0000 1.7.118.2 @@ -2,9 +2,9 @@ * * $RCSfile: ZConnectionPool.hxx,v $ * - * $Revision: 1.7.118.1 $ + * $Revision: 1.7.118.2 $ * - * last change: $Author: kso $ $Date: 2005/02/14 12:14:07 $ + * last change: $Author: kr $ $Date: 2006/06/06 07:48:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,9 +64,6 @@ #ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_ #include <com/sun/star/lang/XEventListener.hpp> #endif -#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif #ifndef _COM_SUN_STAR_SDBC_XPOOLEDCONNECTION_HPP_ #include <com/sun/star/sdbc/XPooledConnection.hpp> #endif @@ -91,8 +88,8 @@ #ifndef _COMPHELPER_STLTYPES_HXX_ #include <comphelper/stl_types.hxx> #endif -#ifndef INCLUDED_COMPHELPER_APARTMENTHELPER_HXX -#include "comphelper/apartmenthelper.hxx" +#ifndef _UNO_ENVIRONMENT_HXX_ +#include <uno/environment.hxx> #endif #ifndef _OSL_MUTEX_HXX_ #include <osl/mutex.hxx> @@ -116,15 +113,12 @@ class OPoolTimer : public ::vos::OTimer { OConnectionPool* m_pPool; - ::comphelper::Apartment::ApartmentAwareReference< ::com::sun::star::uno::XApartment > m_xApartment; + com::sun::star::uno::Environment m_env; public: - OPoolTimer( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xMSF, - OConnectionPool* _pPool, - const ::vos::TTimeValue& _Time) + OPoolTimer(OConnectionPool* _pPool,const ::vos::TTimeValue& _Time) : ::vos::OTimer(_Time) ,m_pPool(_pPool) - ,m_xApartment( _xMSF,::comphelper::Apartment::queryCurrentApartment(_xMSF )) + ,m_env( ::com::sun::star::uno::getCurrentEnvironment( )) {} protected: virtual void SAL_CALL onShot(); @@ -206,8 +200,7 @@ // the dtor will be called from the last instance (last release call) virtual ~OConnectionPool(); public: - OConnectionPool(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xMSF, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >& _xDriver, + OConnectionPool(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver >& _xDriver, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xDriverNode, const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XProxyFactory >& _rxProxyFactory); File [changed]: ZPoolCollection.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/cpool/ZPoolCollection.cxx?r1=1.8.182.1&r2=1.8.182.2 Delta lines: +1 -1 ------------------- --- ZPoolCollection.cxx 14 Feb 2005 12:14:08 -0000 1.8.182.1 +++ ZPoolCollection.cxx 6 Jun 2006 07:48:36 -0000 1.8.182.2 @@ -2,9 +2,9 @@ * * $RCSfile: ZPoolCollection.cxx,v $ * - * $Revision: 1.8.182.1 $ + * $Revision: 1.8.182.2 $ * - * last change: $Author: kso $ $Date: 2005/02/14 12:14:08 $ + * last change: $Author: kr $ $Date: 2006/06/06 07:48:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -379,7 +379,7 @@ Reference<XPropertySet> xProp(_xDriverNode,UNO_QUERY); if(xProp.is()) xProp->addPropertyChangeListener(getEnableNodeName(),this); - OConnectionPool* pConnectionPool = new OConnectionPool(m_xServiceFactory,_xDriver,_xDriverNode,m_xProxyFactory); + OConnectionPool* pConnectionPool = new OConnectionPool(_xDriver,_xDriverNode,m_xProxyFactory); pConnectionPool->acquire(); aFind = m_aPools.insert(OConnectionPools::value_type(_sImplName,pConnectionPool)).first; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
