OnCreate does not work for generic components

2011-06-27 Thread Germán Schuager
Hi, am I missing something or Windsor's OnCreate registration is not working for generic components? class Program { static void Main(string[] args) { var container = new WindsorContainer(); container.Register(Component.For(typeof (NonGenericComponent)) .OnCreate((k, r) =

Re: OnCreate does not work for generic components

2011-06-27 Thread Germán Schuager
1:13 AM, Germán Schuager wrote: Hi, am I missing something or Windsor's OnCreate registration is not working for generic components? class Program { static void Main(string[] args) { var container = new WindsorContainer(); container.Register(Component.For(typeof

Re: OnCreate does not work for generic components

2011-06-27 Thread Germán Schuager
On 28/06/2011 10:17 AM, Germán Schuager wrote: Done: http://issues.castleproject.org/issue/IOC-300 I have a working fix for this issue, but currently I'm strugling with git to create a pull request. Regards. 2011/6/27 Krzysztof Koźmic krzysztof.koz...@gmail.com sounds like a bug. please

Re: AutoTx 2.0 and incorrect interception

2011-04-09 Thread Germán Schuager
Hi, take a look at this: http://groups.google.com/group/castle-project-users/browse_thread/thread/32280b88ce5df0b4/d01ae3944f67a934?lnk=gstq=atm+issue#d01 El 09/04/2011 14:21, desunit sergey.bogda...@gmail.com escribió: Hi, I've just found strange behaviour with AutoTx 2.0. If you are trying

Re: How to configure Castle Windsor to use the same grand-child objects on a single build-up.

2010-11-19 Thread Germán Schuager
infrastructure should implement icurrentsessioncontext , that way our daos depends upon nhibernate. OTOH i use the same dao and query objects for web apps, desktop and so on. 2010/11/18, Germán Schuager gschua...@gmail.com: I haven't been involved in a project based on a fat client for quite

Re: How to configure Castle Windsor to use the same grand-child objects on a single build-up.

2010-11-18 Thread Germán Schuager
ISessionFactory.GetCurrentSession(). I'd probably take a look at what's in uNhAddins. 2010/11/17 Krzysztof Koźmic krzysztof.koz...@gmail.com Germán what's your current approach out of curiosity? Krzysztof On 18/11/2010 12:43 PM, Germán Schuager wrote: Although I don't use this approach anymore

Re: How to configure Castle Windsor to use the same grand-child objects on a single build-up.

2010-11-17 Thread Germán Schuager
Although I don't use this approach anymore for managing NH sessions, maybe you can take some ideas from these posts: http://blog.schuager.com/2008/11/custom-windsor-lifestyle.html http://blog.schuager.com/2008/11/custom-windsor-lifestyle.html

Re: Configuring Windsor for shared instance

2010-05-08 Thread Germán Schuager
Hi, I've done something similar here: http://blog.schuager.com/2008/11/custom-windsor-lifestyle.html And although I think that that implementation is a little brittle you can take some ideas from there. Besides this, I've been experimenting with some way of explicitly defining resolution

Re: Multiple constructors issue

2010-04-03 Thread Germán Schuager
on fix, hopefully I'll have some free time after easter to finish it, and commit the changes. On Apr 3, 5:55 am, Germán Schuager gschua...@gmail.com wrote: Done: http://support.castleproject.org/projects/IOC/issues/view/IOC-ISSUE-198 On Sat, Apr 3, 2010 at 12:37 AM, Mauricio Scheffer

Multiple constructors issue

2010-04-02 Thread Germán Schuager
Hi, I have the following class: public class Service { public ComponentX X { get; private set; } public ComponentY Y { get; private set; } public ComponentA A { get; private set; } public Service(ComponentA a) {

Git issue

2010-03-24 Thread Germán Schuager
Hi, I'm trying to do some experiments with Windsor (specifically trying to figure out how hard would it be to make it run under Compact Framework) but I'm having some issues with git when cloning the Castle.Core repo from github. As soon as it finished cloning, git detects differences in several

Re: Git issue

2010-03-24 Thread Germán Schuager
sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Wed, Mar 24, 2010 at 7:53 PM, Germán Schuager gschua...@gmail.comwrote: Hi, I'm trying to do some experiments with Windsor (specifically trying to figure out how

Re: Facilities, Lifestyles, and context-specific containers

2010-03-03 Thread Germán Schuager
Hi, I got a bit lost in your post :) but I will point you some things that may be useful (or not at all). I've wrote a custom contextual lifestyle.. the info is here: http://blog.schuager.com/2008/11/custom-windsor-lifestyle.html (I'm not happy with this implementation)

Re: Testing Repositories with ISessionManager

2009-09-22 Thread Germán Schuager
Depending on the content of your repositories I think that you will be better testing them against your actual data storage. On Tue, Sep 22, 2009 at 3:16 AM, Martin Nilsson mffmar...@gmail.com wrote: As you already say you can implement your own ISessionManager On Tue, Sep 22, 2009 at 6:03

Re: long startup time

2009-09-17 Thread Germán Schuager
I think that it would be great if Kernel.Register() takes care of this automatically. On Thu, Sep 17, 2009 at 8:43 PM, Ayende Rahien aye...@ayende.com wrote: No, it doesn't. It is easier with code. Test code is interesting, it shows a pathological case of adding only invalid components.

Re: long startup time

2009-09-17 Thread Germán Schuager
Great. Thanks. On Thu, Sep 17, 2009 at 9:13 PM, Ayende Rahien aye...@ayende.com wrote: Good idea, done. On Fri, Sep 18, 2009 at 2:52 AM, Germán Schuager gschua...@gmail.comwrote: I think that it would be great if Kernel.Register() takes care of this automatically. On Thu, Sep 17

Re: NHibernate Facility Namespace Changes

2009-06-25 Thread Germán Schuager
I like this very much. On Thu, Jun 25, 2009 at 5:46 PM, Tuna Toksoz tehl...@gmail.com wrote: I am going to commit some changes in the namespace structure of the project, which is at the end a breaking change. This was necessary as there was no real namespace structure, they were mixed

Re: Troubles with Automatic Transaction Facility (or something completely different)

2009-06-10 Thread Germán Schuager
On Wed, Jun 10, 2009 at 6:43 PM, Jan Limpens jan.limp...@gmail.com wrote: Catching all exceptions will make the transaction try to commit. So the only way to stop a transaction from committing would be to actively throw an exception and present it to the user as a rescue? I thought, the

Re: Issue with ResolveT(String key, IDictionary arguments)

2009-06-04 Thread Germán Schuager
http://groups.google.com/group/castle-project-users/browse_thread/thread/69648838fa72d69a?hl=en On Thu, Jun 4, 2009 at 12:11 PM, Andyk andym.kni...@googlemail.com wrote: Oh dear. That'll cause abit of a rewrite in my code! So is the only recommendation to pass the session down through

Re: Lazy Loading Problem

2009-05-19 Thread Germán Schuager
You should adapt your session management strategy to the funcionality of your service. On Tue, May 19, 2009 at 1:08 PM, Cesar Sanz the.email.tr...@gmail.comwrote: Hello, I am having troubles with a winservice program. I have an ActiveRecord project (a separate dll) that is used for two

Re: How to register all classes to first non-generic interface

2009-05-16 Thread Germán Schuager
I do something like this (gmail code) to register all the views in an assembly with the correct service type: Container.Register( AllTypes.Pick() .FromAssembly(assembly) .If(c = c.FullName.EndsWith(View) selectViewService(c) !=

Re: windsor container question re: injection by context

2009-05-08 Thread Germán Schuager
Take a look at the Service Override section here: http://castleproject.org/container/documentation/trunk/usersguide/compparams.html On Fri, May 8, 2009 at 2:41 PM, scott_m skmcfad...@msn.com wrote: I have a scenario where there are multiple classes using the same interface in their

Re: How to select with HQL a constant decimal value?

2009-04-28 Thread Germán Schuager
Try 0m instead of 0.0 On Tue, Apr 28, 2009 at 11:47 AM, Darius Damalakas darius.damala...@gmail.com wrote: Hi everybody, I've checked HQL docs, but can't find a solution (http://nhforge.org/

Mixing external configuration with programatic registration

2009-04-13 Thread Germán Schuager
Hi, I'm using the fluent registration feature to scan several assemblies and register all the components that my application needs into the container. Now I'd like to specify in the configuration file some parameters values that needs to be injected into some components, is this possible?

Re: Mixing external configuration with programatic registration

2009-04-13 Thread Germán Schuager
How? On Mon, Apr 13, 2009 at 12:28 PM, Ayende Rahien aye...@ayende.com wrote: yes On Mon, Apr 13, 2009 at 6:15 PM, Germán Schuager gschua...@gmail.comwrote: Hi, I'm using the fluent registration feature to scan several assemblies and register all the components that my application needs

Re: Mixing external configuration with programatic registration

2009-04-13 Thread Germán Schuager
Thank you very much. On Mon, Apr 13, 2009 at 12:33 PM, Ayende Rahien aye...@ayende.com wrote: http://ayende.com/Blog/archive/2008/12/31/didja-know-merging-windsor-configuration-with-automatic-registration.aspx On Mon, Apr 13, 2009 at 6:30 PM, Germán Schuager gschua...@gmail.comwrote: How

Re: Where/how to register per-request objects

2009-04-07 Thread Germán Schuager
I don't if this is what you are looking for, but maybe it helps: http://blog.schuager.com/2008/11/custom-windsor-lifestyle.html On Tue, Apr 7, 2009 at 12:18 PM, Paul Hatcher pa...@grassoc.co.uk wrote: I have an hand-rolled ASP.NET MVP framework and I would like to use Windsor to create the

Re: using nhibernate without ISessionManager

2009-04-07 Thread Germán Schuager
http://castleproject.org/container/facilities/trunk/nhibernate/index.html You can just inject ISessionFactory in your data access classes. And I think that configuring Windsor correctly you can specify which ISessionFactory is injected in which DAO. On Tue, Apr 7, 2009 at 6:27 PM, rg

Re: WCF Facility with Silverlight client

2009-04-06 Thread Germán Schuager
Hi Jose, You only need to reference WCF facility from where you are hosting your services (web application or windows service?) and not from your SL client. If you are getting started with WCF and SL then read this article:

Re: WCF Facility with Silverlight client

2009-04-06 Thread Germán Schuager
very much Germán Schuager escribió: Hi Jose, You only need to reference WCF facility from where you are hosting your services (web application or windows service?) and not from your SL client. If you are getting started with WCF and SL then read this article: http

Re: NHibernateFacility: PersistentConfigurationBuilder suggestions

2009-03-22 Thread Germán Schuager
to enhance the readers attention! On Mon, Mar 16, 2009 at 2:28 AM, Germán Schuager gschua...@gmail.comwrote: Derive dependant files from the assemblies/assemblies node entries (common usage) when not explicitly --~--~-~--~~~---~--~~ You received this message

Re: integrating nhibernate facility

2009-03-12 Thread Germán Schuager
On Thu, Mar 12, 2009 at 3:55 PM, Jan Limpens jan.limp...@gmail.com wrote: I would like to append these listeners using the IConfigurationContributor, but I don´t know how to tell my factory or facility about them. Do you have an example...? Just register your IConfigurationContributor in

ATM issue

2009-03-09 Thread Germán Schuager
Hi, I've a class like this: [Transactional] public class Comp : IComp { public void MethodA() { MethodB(); } [Transaction(TransactionMode.Requires)] public void MethodB() {

Re: ATM issue

2009-03-09 Thread Germán Schuager
I understand. Thank you. On Mon, Mar 9, 2009 at 11:45 PM, hammett hamm...@gmail.com wrote: The proxy will be attached to the interface, not to the concrete class.. so there will be no interception for the this pointer. On Mon, Mar 9, 2009 at 6:55 PM, Germán Schuager gschua...@gmail.com

Re: Castle Windsor with XAML and .NET 3.5

2009-03-05 Thread Germán Schuager
What do you need to do? On Thu, Mar 5, 2009 at 10:19 AM, Aurewoks aurelien.bov...@gmail.com wrote: Hi everyone, I have a simple question. Can I implement Castle Windsor in a .NET 3.5 application with XAML? I have already done an application with Castle in .NET 2.0, so I pick up parts of

Re: integrating nhibernate facility

2009-03-05 Thread Germán Schuager
Hi, in this case if you want just one session you can do this: public void Action() { using (ISession session = sessionManager.OpenSession()) { dao1.DoThis(); dao2.DoThat(); } } or if you plan to use ATM: [Transaction(TransactionMode.Requires)) public void Action() {

Re: Any ideas on how to create a per aggregate instance lifestyle

2009-02-23 Thread Germán Schuager
http://blog.schuager.com/2008/11/custom-windsor-lifestyle.html On Mon, Feb 23, 2009 at 5:58 PM, jsimons johnsimons...@yahoo.com.au wrote: Hi Christian, Why do you need a lifestyle? Why not register MyController as transient and Dependencies as singleton. Cheers John On Feb 24, 7:12

Re: NH facility: transaction stack behavior, possible?

2009-02-17 Thread Germán Schuager
Use Automatic Transaction Management facility: http://castleproject.org/container/facilities/trunk/nhibernate/transactions.html On Tue, Feb 17, 2009 at 7:32 AM, Andrew Melnichuk andrew.melnic...@gmail.com wrote: Hi All. I have several components, which use ISessionManager. Typical component

Re: [Windsor] Passing a custom argument to a sub-dependency

2009-02-11 Thread Germán Schuager
Acording to this post: http://groups.google.com/group/castle-project-devel/browse_thread/thread/296dd82d5decd226/e5106c9ef7671710?hl=enlnk=gstq=MicroKernel+additionalArgs+behavior+definition#e5106c9ef7671710 This should work: var sender = container.ResolveCalculator(new {parameterNameOfIWriter =

Re: Session close when using automatic transaction management

2009-02-01 Thread Germán Schuager
Are you doing this http://castleproject.org/container/facilities/trunk/nhibernate/webapp.html ? On Sun, Feb 1, 2009 at 4:33 PM, Symon Rottem s.rot...@gmail.com wrote: I'm using the AutomaticTransactionManagement TrasactionManagement with the NHibernateFacility in Monorail and have marked an

Re: Is there a way to call Windsor to return the System.Type of the resolved object instead of an object instance?

2009-02-01 Thread Germán Schuager
I guess that you don't want to do this: container.ResolveIService().GetType() :) Try this: container.Kernel.GetHandler(typeof(IService)).ComponentModel.Implementation On Sun, Feb 1, 2009 at 10:08 PM, KnaveT knave...@gmail.com wrote: As per the subject. I have a scenario whereby I need a

Re: need some help building castle from source

2009-01-19 Thread Germán Schuager
Use nant quick rebuild if you just want to skip the tests. On Sun, Jan 18, 2009 at 6:55 AM, asafdav2 asafd...@gmail.com wrote: hello i've checked castle from svn and tried to build it using nant however, it fails in the following stage. any ideas how to solve this?

Re: Closed Generic Services Fails To Resolve

2009-01-16 Thread Germán Schuager
. Regards, Germán Schuager http://blog.schuager.com On Fri, Jan 16, 2009 at 5:04 PM, Mike Nichols nichols.mik...@gmail.comwrote: This test fails. It fails due to the ClosedTypeDataService closing IDataService and here is the error. As you can see, kernel is not seeing the service name to resolve

Re: Factory methods with Fluent configuration

2009-01-07 Thread Germán Schuager
Maybe you can use something from here: http://bugsquash.blogspot.com/2008/12/castle-windsor-factory-method-support.html On Tue, Jan 6, 2009 at 7:49 PM, Fabio Maulo fabioma...@gmail.com wrote: Hi. I would like to know which is the corresponding fluent-configuration sentence for the follow xml

Re: ViewComponent memory leak?

2008-12-22 Thread Germán Schuager
Don't know if this is the case, but I've noticed that after the component burden implementation the container doesn't release references to transient components: http://support.castleproject.org/projects/IOC/issues/view/IOC-ISSUE-132 On Dec 22, 4:01 pm, hammett hamm...@gmail.com wrote: I bet

Re: Unwanted constructor usage

2008-11-20 Thread Germán Schuager
Here I send you a patch with a test for this behaviour. Regards. On Fri, Nov 14, 2008 at 12:24 PM, Germán Schuager [EMAIL PROTECTED]wrote: Ok, no problem, it just seemed a little counter-intuitive (to me) that ResolveT uses GetHandler and ResolveAllT uses GetAssignableHandlers. Thanks again

Re: Unwanted constructor usage

2008-11-05 Thread Germán Schuager
Hi, I'm following up to this post because I've been told that it was tagged as spam. Anyone on this? Thanks. On Nov 3, 1:09 pm, Germán Schuager [EMAIL PROTECTED] wrote: Hi, I'm using the ArrayResolver that Hammet proposed herehttp://hammett.castleproject.org/?p=257. Also, I'm

Re: Unwanted constructor usage

2008-11-05 Thread Germán Schuager
? ** On Wed, Nov 5, 2008 at 9:50 AM, Ayende Rahien [EMAIL PROTECTED] wrote: Modify the array resolver to special case for this bit On Wed, Nov 5, 2008 at 1:02 PM, Germán Schuager [EMAIL PROTECTED]wrote: Hi, I'm following up to this post because I've been told that it was tagged as spam

Re: Unwanted constructor usage

2008-11-05 Thread Germán Schuager
Here I send you a patch that fix this behaviour. Regards. On Wed, Nov 5, 2008 at 10:17 AM, Ayende Rahien [EMAIL PROTECTED] wrote: No, it isn't okay, it should only return things that are implementing the service On Wed, Nov 5, 2008 at 3:15 PM, Germán Schuager [EMAIL PROTECTED]wrote

Unwanted constructor usage

2008-11-03 Thread Germán Schuager
Hi, I'm using the ArrayResolver that Hammet proposed here http://hammett.castleproject.org/?p=257. Also, I'm registering IValidatorRunner (from Castle.Components.Validator) in the container in this way: container.Register(

Re: Disposing of Transient items

2008-10-25 Thread Germán Schuager
It seems to depend on which build are you using. http://support.castleproject.org/projects/IOC/issues/view/IOC-ISSUE-132 On Oct 24, 7:56 am, codemonkey [EMAIL PROTECTED] wrote: Hello, I have seen this posthttp://stackoverflow.com/questions/132940/why-does-castle-windsor-hol..., it is quite

Re: NHibernate Facility Interceptors

2008-10-22 Thread Germán Schuager
http://gschuager.blogspot.com/2008/04/nhibernatesearch-with.html On Oct 21, 7:45 pm, Colin Ramsay [EMAIL PROTECTED] wrote: Hi all, What's the best way to set up an NHibernate Interceptor if I'm using the NHibernate facility? Thanks, Colin.

Re: How to inject a SearchInterceptor in ActiveRecord-Session?

2008-09-25 Thread Germán Schuager
Hi, I don't use ActiveRecord, but I've had similar issues using NH.Seach with Castle NHibernate integration facility. Here is a blog post: http://gschuager.blogspot.com/2008/04/nhibernatesearch-with.html Maybe it can help you. On Sep 24, 3:31 pm, burkhard_m [EMAIL PROTECTED] wrote: Hi, I'm