PDA

View Full Version : System.ExecutionEngineException when using [Transaction()] with methods using "out"



Rubens
05-03-2007, 07:53 AM
Hi,

I'm not 100% sure that this is the forum for this question but:

I have been trying to create and use Spring + Spring.NHibernate with my own custom Membership and Role provider classes. After a lot of digging, I think I finally managed to get things to work, as explained in this thread (http://forum.springframework.net/showthread.php?t=2623).

However, aparently for all methods that have [Transaction()] and have "out" parameters such as:


public virtual MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)

I get a System.ExecutionEngineException, which basically has no stack trace, no inner exception, and no extra information plus it kills the web server instantly :D.

Any ideas how I can go about trying to fix this? (I understand that maybe I would not need [Transaction()] for query-only methods, but I would like to understand whether there is a limitation in the Spring support classes, if I am doing anything wrong, or even if there is a bug in the .NET VM.

If I remove the [Transaction()] from the method, everything works. All other methods marked with the Transaction attribute work (the ones that do not have out parameters).

Thanks!
Rubens

Bruno Baia
05-03-2007, 11:26 AM
Hi,

This is a Spring.AOP limitation, proxying methods with ref/out parameteres are not supported atm.
We hope to get it working for 1.1 release.


- Bruno

Rubens
05-04-2007, 12:07 AM
So it does not matter whether I use DeclarativeServicesAttributeDriven.xml or DeclarativeServicesTxProxyFactory.xml, it is not going to work correct?

Bruno Baia
05-04-2007, 05:29 AM
So it does not matter whether I use DeclarativeServicesAttributeDriven.xml or DeclarativeServicesTxProxyFactory.xml, it is not going to work correct?
Until today, yes.

But I've just fixed it and ref/out parameters are now supported in Spring.Aop.
Donwload the latest nightly build (http://www.springframework.net/downloads/nightly/) and give it a try.

-Bruno

Rubens
05-04-2007, 12:06 PM
Thanks a lot Bruno, that was quick :)