davybrion / agatha Goto Github PK
View Code? Open in Web Editor NEWAgatha Request-Response Service Layer for .NET
Home Page: http://davybrion.github.com/Agatha/
License: Other
Agatha Request-Response Service Layer for .NET
Home Page: http://davybrion.github.com/Agatha/
License: Other
It looks like Ninject 3.0 has removed a method that the Agatha Ninject container relies on. When i try to run it, i get the following error:
[MissingMethodException: Method not found: 'Ninject.Syntax.IBindingToSyntax`1<System.Object> Ninject.Syntax.IBindingRoot.Bind(System.Type)'.]
Agatha.Ninject.Container.Register(Type componentType, Type implementationType, Lifestyle lifeStyle) in c:\src\agatha\Agatha.Ninject\Container.cs:23
Agatha.ServiceLayer.ServiceLayerConfiguration.RegisterRequestHandlerInterceptor() in c:\src\agatha\Agatha.ServiceLayer\ServiceLayerConfiguration.cs:190
Agatha.ServiceLayer.ServiceLayerAndClientConfiguration.RegisterRequestHandlerInterceptor() in c:\src\agatha\Agatha.ServiceLayer\ServiceLayerAndClientConfiguration.cs:108
Is there a work-around for this? or a planned update to support Ninject 3.0?
Thanks,
Michael.
Hello,
We've got a Web Api service layer that uses Agatha, specifically Agatha.Common 1.3.0.0, and we are trying to pull together some unit tests around the ApiControllers, for starters.
We are wiring things up through the Castle Windsor as expected, as far as I can tell. I see the ApiController under test instantiate fine through DI resolution.
However, when it comes time to actually run the controller method under test, we receive the following exception. Is there another assembly that we need to include to satisfy the Agatha runtime that we should know about?
System.IO.FileLoadException : Could not load file or assembly 'Agatha.Common, Version=1.3.0.0, Culture=neutral, PublicKeyToken=6f21cf452a4ffa13' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Thank you...
I am going to develop an application with AngularJs+HTML5 and agatha Rest service in our latest project. currently i am facing an issue with integration agatha WCF rest service to angularJs. could you be able to send me some sample how we can integrate and how we can call agatha service using $http post.
Lilan Sameera
Hey,
from time to time (cannot reproduce this, it happens after some time working with our silverlight app) I get this exception (see below).
Using the latest (1.3) from NuGet.
Any idea?
Remco Ros
Default.aspx:59Uncaught Error: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.UnauthorizedAccessException: Invalid cross-thread access.
at MS.Internal.XcpImports.CheckThread()
at MS.Internal.XcpImports.CreateObjectByTypeIndex(UInt32 typeIndex)
at System.Windows.Threading.DispatcherTimer..ctor(UInt32 nativeTypeIndex)
at System.Windows.Threading.DispatcherTimer..ctor()
at Agatha.Common.Caching.Timers.TimerWrapper.Start()
at Agatha.Common.Caching.InMemoryCache.Store(Request request, Response response, TimeSpan expiration)
at Agatha.Common.Caching.CacheManager.StoreInCache(Request request, Response response, TimeSpan expiration, String region)
at Agatha.Common.Caching.CacheManager.StoreInCache(Request request, Response response)
at Agatha.Common.ResponseReceiver.AddCacheableResponsesToCache(Response[] receivedResponses, Request[] requestsToSend)
at Agatha.Common.ResponseReceiver.ReceiveResponses(ProcessRequestsAsyncCompletedArgs args, Response[] tempResponseArray, Request[] requestsToSendAsArray)
at Agatha.Common.AsyncRequestDispatcher.OnProcessRequestsCompleted(ProcessRequestsAsyncCompletedArgs args, ResponseReceiver responseReciever, Response[] tempResponseArray, Request[] requestsToSendAsArray)
at Agatha.Common.AsyncRequestDispatcher.<>c__DisplayClass4.b__0(ProcessRequestsAsyncCompletedArgs a)
at Agatha.Common.WCF.AsyncRequestProcessorProxy.OnProcessRequestsCompleted(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Hello,
I want to unit test Agatha handlers.
In the Web Api way, we might setup an HttpConfiguration, some routes, an in memory HttpServer, and HttpMessageInvoker invoke a Request, receive a Response back, and verify it.
In the Agatha way, how might we go about doing this?
Understanding there are network stacks potentially involved, if we can do this in memory as much as possible, that is preferred.
Best regards and thank you...
Is it possible to have a more generic handler that can handle multiple types of requests. For example:
public class ParentRequest : Request{ }
public class ChildRequest : ParentRequest { }
public class TestRequestHandler : RequestHandler<ParentRequest, TestResponse>
{
public override Response Handle(ParentRequest request)
{
return new TestResponse();
}
}
This TestRequestHandler
would then be able to handle a ChildRequest
too.
You can view a full test here: https://gist.github.com/michelgrootjans/284aa97119a9daa4ea1a
Are there any plans to use Castle.Windsor 2.5.3 and Castle.Core 2.5.2 in Agatha Castle adapter? In my local clone all tests passed. (Or we wait for Castle.Windsor 3.x which is going to be released soon?)
It would be good if we could add methods to the IContainer interface for returning a component instance by key:
TComponent Resolve(String key);
Then we could just write:
ConcreteA a = IoC.Container.Resolve("KeyA");
ConcreteB b = IoC.Container.Resolve("KeyB");
(The above is not possible for now).
Hello,
I would like to report an issue with Common Logging in Agatha:
The latest change in RequestProcessor.cs was incomplete. Now each error is logged twice:
1 - First one with "RequestProcessor: unhandled exception while handling request!" as message;
2 - Second one with exception message as message.
I think the same change must be done in RequestProcessor LINE 260:
protected virtual void OnHandlerException(OneWayRequest request, Exception exception) {
logger.Error("RequestProcessor: unhandled exception while handling request!", exception);
}
Finally, I have a suggestion:
On RequestIProcessor.cs, LINE 12, there is the following:
private readonly ILog logger = LogManager.GetLogger(typeof(RequestProcessor));
Could this be changed to something like:
private readonly ILog logger = LogManager.GetLogger(loggerName));
Where loggerName would be defined on Agatha Setup.
If it is not defined then it would get the default value: typeof(RequestProcessor)
Thank You,
Miguel
I've downloaded the latest nuget package (1.3.1) of Agatha.Common.Castle.
I was stuck on a stack overflow exception on a simple HelloWorld app. So I started to investigate.
I've found that the problem is something related on implementation of IContainer.Release method, so as a temporary work-around, I've disabled its execution.
The interceptor is here: https://gist.github.com/4625678
public SimulatorAsyncRequestDispatcher(IAsyncRequestProcessor requestProcessor, IApplicationConfiguration applicationConfiguration) : base(requestProcessor)
So please help me toresolve this issue..Thanks
Hello,
I'm not sure what issue 22 is, but I'd like to encourage the Agatha team to strongly consider abstracting away through some sort of adapter layer the logging concern(s).
I am finding that these dependencies are killing the forward momentum in one of my projects and being able to choose whether I want Common.Logging, log4net, or something completely different, or nothing at all, would be great.
Thank you...
Hi, thanks for this great piece of work!
I've updated the sources of Agatha to Castle 3.0, because there where problems with the Castle 3.0 (actually the restrictions in Container.ComponentRegistration changed a little bit). It seems to work without problems, at least in my projects.
So for now:
Questions:
Thanks,
Harald
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.