Sure, you can use my code to help others. If would be great if you could have some documentation and sample code for VB.Net users.
Regarding my issue if I crearly understand, what you suggested is to change my method: Protected Shared Sub InitMapper() Dim handler As New ConfigureHandler(AddressOf Configure) mapper = SqlMapper.ConfigureAndWatch(handler) End Sub 'InitMapper To use: Protected Shared Sub InitMapper() mapper = IBatisNet.DataMapper.Mapper.Instance() End Sub 'InitMapper I made the change but still taking to much time in been executed. The other thing I have tried was put the code in the Application_Start event but the effect was even worse. I'm not completely sure what the SVN (mentioned in the email) is, if you can clarify to me what I have to do with this I will appreciate. Thanks in advance. -----Original Message----- From: Ron Grabowski [mailto:[EMAIL PROTECTED] Sent: Thursday, October 13, 2005 11:06 PM To: [email protected] Subject: Re: ConfigureAndWatch Performance Issue Is it ok if I include your VB.Net code in the IBatisNet DataMapper documentation so other people can use it? --- Cynthia Torres <[EMAIL PROTECTED]> wrote: > Hi, > > > > I'm newer to iBatis. I'm experiencing some performance issues with > the > ConfigureAndWatch method, it takes about 6 seconds in been executed > the > first time is called. The language I'm using is vb.net. I have > translated the code from c# to vb because I didn't find and example > in > vb. Please tell me if I have something wrong in my code or if is a > performance issue of iBatis. > > > > I will appreciate any help you guys can give me. > > > > Imports IBatisNet.DataMapper > > Imports IBatisNet.Common.Utilities > > Namespace Mapper > > Public MustInherit Class BaseServiceConfig > > Private Shared mapper As SqlMapper = Nothing > > > > Protected Shared Sub Configure(ByVal obj As Object) > > mapper = CType(obj, SqlMapper) > > End Sub 'Configure > > > > Protected Shared Sub InitMapper() > > Dim handler As New ConfigureHandler(AddressOf Configure) > > mapper = SqlMapper.ConfigureAndWatch(handler) > > End Sub 'InitMapper > > > > Public Shared Function GetMapper() As SqlMapper > > If mapper Is Nothing Then > > SyncLock GetType(SqlMapper) > > If mapper Is Nothing Then ' double-check > > InitMapper() > > End If > > End SyncLock > > End If > > Return mapper > > End Function 'Get > > End Class 'Mapper > > End Namespace > >

