This issues has been addressed:

 http://www.mail-archive.com/user-cs%40ibatis.apache.org/msg00257.html

This method automatically calls configure (although it doesn't put a
file system watch on the config file):

 IBatisNet.DataMapper.Mapper.Instance()

--- 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
> 
> 

Reply via email to