PDA

View Full Version : System.ExecutionEngineException



allanfagner
12-21-2006, 06:41 PM
Hi there people!

I have this two pointcuts defined on my Web.Config file

<object id="PointCutVerifyValidateBid" type="Spring.Aop.Support.RegularExpressionMethodPointcut Advisor">
<property name="pattern" value="ValidateBid"/>
<property name="advice">
<object type="HON.BID.Business.VerifyValidateBid"/>
</property>
</object>

<object id="PointCutVerifyCheckoutEdit" type="Spring.Aop.Support.RegularExpressionMethodPointcut Advisor">
<property name="pattern" value="CheckoutEdit"/>
<property name="advice">
<object type="HON.BID.Business.VerifyCheckoutEdit"/>
</property>
</object>

<object id="ProxyBid" type="Spring.Aop.Framework.ProxyFactoryObject">
<property name="target">
<object id="ServiceVerifyBid" type="HON.BID.Business.UC003_BidsBR"/>
</property>
<property name="interceptorNames">
<list>
<value>PointCutVerifyValidateBid</value>
<value>PointCutVerifyCheckoutEdit</value>
</list>
</property>
</object>

Here are the classes...

public class VerifyValidateBid : IMethodBeforeAdvice
{
public void Before(MethodInfo method, object[] args, object target)
{
Bids bid = (Bids)args[0];

...
}
}

public class VerifyCheckoutEdit : IMethodBeforeAdvice
{
public void Before(MethodInfo method, object[] args, object target)
{
Bids bid = (Bids)args[1];

...
}
}

public interface IUC003_Bids
{
bool ValidateBid(Bids parBid, ref string parErrorMessage);
bool CheckoutEdit(Object objForm, DTO.Bids objBid, string;
}

public class UC003_BidsBR : IUC003_Bids
{
bool ValidateBid(Bids parBid, ref string parErrorMessage)
{
...
}

bool CheckoutEdit(Object objForm, DTO.Bids objBid, string
{
...
}
}

I can't see any difference between them. But, the first one (VerifyValidateBid) throws an exception (Exception of type 'System.ExecutionEngineException' was thrown.) after executing VerifyValidateBid. I just can't understand what is happening. :( I have the same issue on others pointcuts.

Any idea of what is happening???

Thanks!

Erich Eichinger
12-22-2006, 03:19 PM
Hi,

I can only tell from my own experience that the NET CLR is not bug-free. If you get a ExecutionEngineException, you hit such a bug and need to find another way to do what you want to do. Sometimes simply changing the order of 2 lines in the code already does the job.

cheers,
Erich

Bruno Baia
01-02-2007, 12:27 AM
Hi,

Spring.Aop does not support ref/out parameters atm.


Bruno

Bruno Baia
05-04-2007, 05:31 AM
Hi,

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