Re: remoting object access information from local xml file frequen
- From: "sahridhayan" <sahridhayan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 14 May 2005 04:33:05 -0700
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
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
.
- Follow-Ups:
- Re: remoting object access information from local xml file frequen
- From: Beth Massi [Architect MVP]
- Re: remoting object access information from local xml file frequen
- References:
- remoting object access information from local xml file frequenctly
- From: sahridhayan
- Re: remoting object access information from local xml file frequenctly
- From: Beth Massi [Architect MVP]
- remoting object access information from local xml file frequenctly
- Prev by Date: Re: Multiple client-side channels
- Next by Date: Re: remoting object access information from local xml file frequen
- Previous by thread: Re: remoting object access information from local xml file frequenctly
- Next by thread: Re: remoting object access information from local xml file frequen
- Index(es):
Relevant Pages
|
Loading