Re: remoting object access information from local xml file frequen



Thanks Beth.. It was very useful.. it is efficient in using memory ..


One more approach i am thinking.. since all the calls in IIS (remoting
object hosted )
why dont we use the "HttpContext.Current.Application["Schema Owner"]" (sample)
to fetch the data..

will it hold data in IIS memory automatically after retreiving from the
web.config...?
may be after first call... for accesing this value

what do you all think about this?

Regs
Sahridhayan


"Beth Massi [Architect MVP]" wrote:

> You can definately use an object on your server to load the xml file
> settings into memory instead of accessing the file on disk everytime a
> setting is needed. If your publicly exposed objects are all single-call what
> I would do is create a class that loads the xml file settings into the
> server's memory (like a dictionary) and then create a shared (static)
> reference to it. If you create the reference in a static constructor of your
> remoted objects' base class then this would get created the first time the
> client requested *any* remote object. This design also takes care of
> re-creating the settings object when the lease expires or the server
> application is restarted and the object is garbage collected. Something
> like:
>
> Public MustInherit Class MyBusinessBase '-- Remoted single-call object
> Inherits MarshalByRefObject
>
> Private Shared m_settings As MyConfigSettings
>
> Protected ReadOnly Property Settings() As MyConfigSettings
> Get
> Return m_settings
> End Get
> End Property
>
> Shared Sub New()
> m_settings = New MyConfigSettings()
> End Sub
> ..
> ..
> ..
> .. '-- rest of class def
> End Class
>
> HTH,
> -Beth
>
> "sahridhayan" <sahridhayan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:7C33EB7A-3D26-458D-8EDD-62168DB6F261@xxxxxxxxxxxxxxxx
> > hi all
> >
> > i have a requirement..
> >
> > 1. i have lot of BL objects hosted in IIS single call mode,
> > 2. depends on the parameter given to the methods, or some time if there is
> > no parameter also.. we will go and read an xml file which is present in
> > RemotingServer directory (IIS dir) for some information let us say.. it is
> > a
> > connection string..
> > based on this connectionstring and parameters further dll calls will be
> > made..
> >
> > 3. sometimes SQL,Oracle, OLEDB, ODBC ..etc.. depends on the type we would
> > instanciate particular DAL dll thru. activator.createinstance..
> >
> > 4. Can i avoid reading xml file at the server.. and access from the
> > another
> > remoting object... (singleton)...
> >
> > 5. to be more specific..
> > i have BL CustomerBL.rem...with lot of methods.. Check(1) method...
> > in check(1) if it is "1" create, instantiate .. that DLL1
> > if it is "2" create, instantitate that DLL2
> >
> > 6. I am maintaining this in XML file.
> >
> > 7. shall i call another GetConnBL.rem from CusotmerBL.rem to get the
> > subsequent connection string..? instead doing an I/O operation READING AN
> > XML
> > FILE..
> >
> > if you need more details please reply me
> >
> > regs
> > sahridhayan
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
.



Relevant Pages

  • Re: remoting object access information from local xml file frequen
    ... some of my findings..(command window access i/p vs o/p) ... > without IIS and the Settings object can be anything you want it to be so it ... > configurations and can't rely being in IIS. ... >>> I would do is create a class that loads the xml file settings into the ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: remoting object access information from local xml file frequenctly
    ... You can definately use an object on your server to load the xml file ... I would do is create a class that loads the xml file settings into the ... server's memory and then create a shared ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: remoting object access information from local xml file frequen
    ... without IIS and the Settings object can be anything you want it to be so it ... configurations and can't rely being in IIS. ... > will it hold data in IIS memory automatically after retreiving from the ... >> I would do is create a class that loads the xml file settings into the ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: IIS Memory Recycling
    ... With IIS 6 - the settings in the IIS metabase will override the ... configuration change using the IIS MMC, ... >memory according to task manager. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET application hits 2GB virtual bytes
    ... We found the problem last night, we essentially had a resource/memory leak. ... the Reflection call failed but the watcher thread ... The 3GB switch limits the *virtual address space*, not the working memory set. ... your basic problem is that you're running in IIS 5.0 compatibility mode. ...
    (microsoft.public.dotnet.framework.aspnet)

Loading