如何处理MethodInvokingFactoryObject Spring.NET中的异常?

时间:2011-12-13 16:54:59

标签: spring.net

我有Spring.Configuration这样的话:

<objects xmlns="http://www.springframework.net">
    <!-- Create SQLite connection -->
    <object id="SqlConnection" type="System.Data.SQLite.SQLiteConnection, System.Data.SQLite">
        <constructor-arg index="0" value="Data Source=MyDatabase.db"/>
    </object>
    <!-- Open connection -->
    <object type="Spring.Objects.Factory.Config.MethodInvokingFactoryObject, Spring.Core">
        <property name="TargetObject">
            <ref local="SqlConnection" />
        </property>
        <property name="TargetMethod" value="Open"/>
    </object>
</objects>

那么如果在创建和调用Open()之后抛出此方法,我如何处理方法MethodInvokingFactoryObject中的异常?

0 个答案:

没有答案