Could you post the GetMembro() code (or the whole class...the imports and implementation/inheritance lines of code are the important ones to see in case you can only paste parts of it)?

Thanks!

Roberto

On 7/19/05, agcunha <[EMAIL PROTECTED]> wrote:

Hello,

        It's very important... Please, help!

        I sent two questions before and now I'll be more clear:
I need to configure IBatis to support Two Databases in my application in
this way:

1º - I have to persist objets in TWO different databases (Informix and SQL
Server)
2º - I have to use TWO IBatis Mappers (Informix and SqlServer)
3º - I have to use DaoManager to manage my DAO objects.
        ex: DaoManager.GetInstance("InformixMapDAO") and
DaoManager.GetInstance("SqlServerMapDAO")

In Dao NUnit tests, most of time I could find TWO Contexts with TWO
SessionHandles, one for NHibernate and one for Ibatis Mapper.
I have to use just the IBatis Mapper, so, I wrote the dao.config in this
way:

        http://www.agcsolucoes.com/dao.config.txt

If I test this file using either Informix context or SqlServer Context it's
ALL RIGHT, but, when I try to test using two contexts at the same time,
the follow error occurs:

IBatisNet.DataAccess.Exceptions.DataAccessException : Unable to intercept
method name GetMembro
  ----> System.ArgumentException : Invalid argument

This is the code:

        MembroBO member = new MembroBO();
        MembroDao = _daoManager[typeof(IMembroDao)] as IMembroDao;
        // MembroDao ==
[ProxyInterfaceMembroSqlMapDao_IMembroDao_IDao_ISerializable]
{ProxyInterfaceMembroSqlMapDao_IMembroDao_IDao_ISerializable}   ProxyInterfaceMembroSqlMapDao_IMembroDao_IDao_ISerializable
        member = MembroDao.GetMembro(2); // Error : Unable to intercept method name
GetMembro

The interfaces and implementation of my classes are Okay and If I had any
problem the Unit test would show.
Is it a bug in Castle Proxy? Is it an IBatis limitation?
Have anybody ever used this case?

Thanks,
Anderson






Reply via email to