atom feed1 message in com.googlegroups.castle-project-usersCastle.MicroKernel.ComponentNotFoundE...
FromSent OnAttachments
shanyouAug 11, 2007 3:52 am 
Subject:Castle.MicroKernel.ComponentNotFoundException : No component for supporting the service Castle.Services.Transaction.ITransactionManager was found
From:shanyou (zhan@gmail.com)
Date:Aug 11, 2007 3:52:23 am
List:com.googlegroups.castle-project-users

I use castle lib with castleproject-1.1-build_470-net-2.0,I get this error when I try to add transaction support

:No component for supporting the service Castle.Services.Transaction.ITransactionManager was found

I already register the transaction facility

Code:

AddFacility("auto.transaction", new TransactionFacility());

and add reference to all of the assemblies such as

Castle.Core Castle.DynamicProxy Castle.Facilities.AutomaticTransactionManagement Castle.MicroKernel Castle.Services.Transaction

I added the virtual to the method also

Code:

/// <summary> /// Determines whether or not the given application name has already been registered; if not; creates the corresponding /// application instance. /// </summary> /// <param name="appName">name of the application for which to get the details.</param> /// <returns><see cref="Application"/> instance representing the given application name.</returns> //[Transaction(TransactionMode.Requires)] public virtual Application CreateOrLoadApplication(string appName) {

// Prepare a place-holder for the application. Application app = GetApplication(appName); // Determine if the application record does not exists in the data store. if (null == app) { // Create a new application instance. app = new Application(appName); // Update it in the data store. app = _appDao.CreateApplication(app); }

// Return the resulting application instance. return app; }