I am successfully using the iBatis Data Mapper, and am not trying to
build that up and use the iBatis Data Access with it as well. However, I
seem to have hit a problem and I was just trying to find out if I am
missing something or if this really is the case...

 

My problem is that I don't seem to be able to open multiple connections
to a single database.

 

The following code throws an exception on the second call to
OpenConnection.

 

            DomDaoManagerBuilder builder = new DomDaoManagerBuilder();

            builder.Configure();

 

            IDaoManager daoManager1 =
DaoManager.GetInstance("SqlMapDao");

            IDaoManager daoManager2 =
DaoManager.GetInstance("SqlMapDao");

 

            IDalSession session1 = daoManager1.GetDaoSession();

            session1.OpenConnection();

 

            IDalSession session2 = daoManager2.GetDaoSession();

            session2.OpenConnection();

 

 

Whilst I appreciate this test is not a real life situation, this
situation will easily occur in a multi-threaded application server which
I am trying to implement.

 

Any thoughts, ideas, suggestions would be greatly appreciated.

 

Many thanks,

Greg Jackman

 

 

Reply via email to