Re: WCF Facility - Client proxy async calls

2009-05-06 Thread Krzysztof Koźmic
John, Are you familiar with how async pattern works? What you suggested looks great except that it won't work. The GetSize syncronous method can't be used to return a value, because to do that it'd have to execute syncronousely, rendering the whole effort useless. Since it can't return IAsyncRes

ActiveRecord initialization question

2009-05-06 Thread Darius Damalakas
I am doing a performance upgrade for my desktop app, and i want to make it start faster. Now, the time between login screen is closed when the user enters his username and password, and the main screen appears is 4 seconds. >From those two seconds the time is spent as follows: 1. Show login fo

Re: question re: designing classes for dependency injection

2009-05-06 Thread Alex Henderson
I would profile it to start with, to see if it's really a performance cost or not - I doubt it is, or if it is then you could probably look at alleviating this by switching lifestyles or altering the classes so there is not such a big hit on construction - i.e. initialise the class if it's not alre

question re: designing classes for dependency injection

2009-05-06 Thread scott_m
Lets pretend that I have a class that has up to 5 external dependencies to be resolved by the DI container. Some of the public class methods require 1 injected dependency, some require 5 injected dependencies.Is there a good methodology for avoiding injecting extra dependencies based on how t

Re: nhibernate facility and automatic transaction management

2009-05-06 Thread Germán Schuager
I think that if you use an interface for your service then you don't have to declare your methods as virtual. On Wed, May 6, 2009 at 6:31 PM, Jonathan Vukovich wrote: > > Hmm. I just talked to Tyler and we found [in our app] some > transactional services with methods that were decorated with > [T

Re: WCF Facility - Client proxy async calls

2009-05-06 Thread John Simons
I'm not very keen on all those casts. And it doesn't seem natural to call proxy.GetSize(line); and not assign the result to anything! Have a look at http://paste2.org/p/199716 Cheers John From: Krzysztof Koźmic To: castle-project-users@googlegroups.com; ca

Re: nhibernate facility and automatic transaction management

2009-05-06 Thread Jonathan Vukovich
Hmm. I just talked to Tyler and we found [in our app] some transactional services with methods that were decorated with [Transaction], but not declared virtual methods (which I am fixing right now). No exceptions were being thrown and the transaction was somehow getting committed anyway??? On We

Re: nhibernate facility and automatic transaction management

2009-05-06 Thread Jan Limpens
They must be - otherwise the app would not run... 2009/5/6 Jonathan Vukovich > > Tyler just reminded me about this the other day. > > Are you [Transaction] decorated methods declared as virtual? Could that be > it? > > Thx! > Jon > > > On Wed, May 6, 2009 at 2:19 PM, Jan Limpens wrote: > > 2009

Re: nhibernate facility and automatic transaction management

2009-05-06 Thread Jonathan Vukovich
Tyler just reminded me about this the other day. Are you [Transaction] decorated methods declared as virtual? Could that be it? Thx! Jon On Wed, May 6, 2009 at 2:19 PM, Jan Limpens wrote: > 2009/5/6 Tyler Burd >> >> Are you by any chance using the HttpResponse.Redirect method?  That throws >

Re: nhibernate facility and automatic transaction management

2009-05-06 Thread Jan Limpens
2009/5/6 Tyler Burd > Are you by any chance using the HttpResponse.Redirect method? That > throws a ThreadAbortException to end the request immediately, which will > cause any transaction to fail. > No, and anything that happens in the controller, that could possibly go wrong is within try cat

WCF Facility - Client proxy async calls

2009-05-06 Thread Krzysztof Koźmic
I'm working on adding to WCF Facility support for async calls from client side (similar to what can be done with SvcUtil-generated proxies), when using channelfactory and intereface contract only. Something like What Ayende wrote about here: http://ayende.com/Blog/archive/2008/03/29/WCF-Async-w

Re: Using Ioc with a Webservice

2009-05-06 Thread Ken Egozi
> > public void MyWebMethod(Request request) { > IMyWebServiceLogic logic = container.Resolve< IMyWebServiceLogic>(); > logic.MyWebMethod(request); > } > you'd be better off adding container.Release(logic) to the mix On Wed, May 6, 2009 at 1:32 PM, Callum Hibbert wrote: > Perso

Re: Windsor 2.0 Released!

2009-05-06 Thread Tiendq
Congratulation!!! On May 5, 10:58 am, Tuna Toksoz wrote: > Congrats, Ayende! > > Tuna Toksöz > Eternal sunshine of the open source mind. > > http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike > > On Tue, May 5, 2009 at 1:52 AM, Ayende Rahien wrote: > > Hi everyo

Re: Using Ioc with a Webservice

2009-05-06 Thread Callum Hibbert
Personally, I don't even consider ASMX any more. As far as I'm concerned its a legacy technology. Callum On Wed, May 6, 2009 at 11:15 AM, Andyk wrote: > > yes, thats sort of what Im doing now. > Maybe I should look at converting this Web Service App into a Wcf > Service App. > > Off topic, but

Re: Using Ioc with a Webservice

2009-05-06 Thread Andyk
yes, thats sort of what Im doing now. Maybe I should look at converting this Web Service App into a Wcf Service App. Off topic, but do people still use web service apps now, or is everyone going straight for Wcf service Application project? On May 6, 11:06 am, Callum Hibbert wrote: > No, sorry.

Re: Using Ioc with a Webservice

2009-05-06 Thread Callum Hibbert
No, sorry. I saw "web service" and assumed WCF underneath. Castle works with WCF because WCF have lots of extension points (like the Service Factory). There are no equivalent hooks in the ASMX infrastructure. If I were you and stuck with ASMX, I'd have the web service class as a simple wrapper to a

Re: Using Ioc with a Webservice

2009-05-06 Thread Andyk
Actually, this is for a WCF service. Will the same principle work when using a ASP.Net Web Service Application? On May 6, 10:54 am, Andyk wrote: > Ah great, thanks Callum, I'll take a look. > > On May 6, 10:50 am, Callum Hibbert wrote: > > > I forgot, I posted a complete example myself a while

Re: Using Ioc with a Webservice

2009-05-06 Thread Andyk
Ah great, thanks Callum, I'll take a look. On May 6, 10:50 am, Callum Hibbert wrote: > I forgot, I posted a complete example myself a while > back:http://callumhibbert.blogspot.com/2008/02/wcf-services-and-dependency... > > Callum > > On Wed, May 6, 2009 at 10:41 AM, Andyk wrote: > > > Ok I t

Re: Using Ioc with a Webservice

2009-05-06 Thread Callum Hibbert
I forgot, I posted a complete example myself a while back: http://callumhibbert.blogspot.com/2008/02/wcf-services-and-dependency-injection.html Callum On Wed, May 6, 2009 at 10:41 AM, Andyk wrote: > > Ok I think Im getting somewhere. I think I need to use the > IContainerAccessor in my global.

Re: AR: Saving parent but not all children

2009-05-06 Thread Markus Zywitza
Hi Flo answers inline 2009/5/6 Flominator : > 1. Is there any way to stop NHibernate from opening too many > sessions? AR by default opens a NH session per operation. NH opens a db connection per session, but disconnects and reconnects it per operation. If you use a SessionScope, only one NH ses

Re: Using Ioc with a Webservice

2009-05-06 Thread Andyk
Ok I think Im getting somewhere. I think I need to use the IContainerAccessor in my global.cs file, and instantiate the container in the app_start. Then when there's an incoming request, windsor will instantiate the webservice class. Am I getting warmer? On May 6, 9:54 am, AndyKnight wrote: > Hi

Re: Using Ioc with a Webservice

2009-05-06 Thread Callum Hibbert
Take a look here: http://www.castleproject.org/container/facilities/trunk/wcf/index.html http://ayende.com/Blog/archive/2007/06/12/WCF-Windsor-Integration.aspx Note that the Castle documentation is lightly out of date and your .svc file should look like this: <%@ ServiceHost Language="C#" Debug="

Re: Castle DynamicProxy 2.1 RTM is now available

2009-05-06 Thread Maxus
Congrats! Awesome news. -M On May 4, 9:27 pm, Jonathon Rossi wrote: > It is out. See this blog post for > details:http://jonorossi.com/blog/archive/2009/05/04/castle-dynamicproxy-2.1-... > > I am currently updating the Castle web site with the download details. > > -- > Jono --~--~-~--~

Using Ioc with a Webservice

2009-05-06 Thread AndyKnight
Hi all, Im trying to find a way of using windsor with my webservice and wondered if anyone can help me or point me in the right direction? My problem is, how exactly does a webservice class get instantiated when there's an incoming request, and how do I override that to use the class from the wind