Git Product home page Git Product logo

agatha's People

Contributors

bartdeleye avatar bennym avatar davybrion avatar jackleitch avatar kilfour avatar mantasaudickas avatar michaelaird avatar moodmosaic avatar nabils avatar one75 avatar whut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agatha's Issues

Agatha and Ninject 3.0

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.

FileLoadException running ApiController method under test

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...

Agatha REST implementation with angularJs

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

Caching & Cross Thread exception

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()

How to unit test Agatha handlers

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...

Polymorphic RequestHandler

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

IContainer.Resolve method - Return a component instance by the key.

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).

Common Logging

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

Castle.Core StackOverflow on Silverlight Client when calling Release Method of IContainer

  • Castle.Core StackOverflow on Silverlight Client when calling Release Method of IContainer

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

Decouple "logging" from Agatha

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...

Question regarding update to Castle 3.0 and nuget package

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:

  • Silverlight-Components are missing, cause I haven't installed it right now.
  • I couldn't test it thoroughly, cause I don't have xUnit installed, but so far I have no problems.

Questions:

  • Should I test silverlight and xUnit or may someone other look over this? (I could even make the changes for silverlight, even if I can't open these projects in visual studio, they should be similar to my other changes)
  • I have now Castle.Windsor.3.0.0.4001 and Castle.Core.3.0.0.4001 in my packages-folder (besides Castle.Core.2.5.2 and Castle.Windsor.2.5.3). Should I just delete the old packages (cause they are not used any more after my changes) and checkin the new packages? At work we have packagerestore enabled, but agatha seems to have nuget-packages checked in.
  • Are there any plans to update nuget.packages to 1.4? (or to 1.3.1, if we aren't this far). Perhaps other IoC should be updated as well?

Thanks,
Harald

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.