I connect to myDataStore from different places but I really only need to
connect once when the application loads.
'Connect to database.
Dim myDataStore As IDataStore = New eBiz.SDK.Integr ation.DataStore
myDataStore .Connect(connSt r)
Can I also store the IDataStore object in my HttpApplication instance. If
so, how? Also, how would I call myDataSore from other pages. Or should I say,
how do I then have access to myDataSore from other pages or classes.
Sincerely,
Stan Alex 3 1609
I suppose you could add a "public static IDataStore myDataStore;" to the
Global class in Global.asax.cs (or the equivalent in VB). Then from any page
you could reference it by typing Global.myDataSt ore.
However, I believe that this may not a good idea (not knowing anything about
the class), in that it disregards any possible threading issues.
Is it horribly expensive to instantiate a eBiz.SDK.Integr ation.DataStore ?
How often do you need to use it? You might want to rethink your approach.
"Stanley Alex" wrote: I connect to myDataStore from different places but I really only need to connect once when the application loads.
'Connect to database. Dim myDataStore As IDataStore = New eBiz.SDK.Integr ation.DataStore myDataStore .Connect(connSt r)
Can I also store the IDataStore object in my HttpApplication instance. If so, how? Also, how would I call myDataSore from other pages. Or should I say, how do I then have access to myDataSore from other pages or classes.
Sincerely,
Stan Alex
Hi Brad,
Thank you very much for your reply. Actually, I am using an SDK and I do not
know how expensive it is to keep recreating the object. But since you brought
it up, what were the possible threading issues that are disregarded?
Also, by what you are suggesting, just because this may be an object that
anyone who logs in will use, do not just assume that the correct answer is to
instantiate the object in Global.asax. Is this correct?
"Brad Quinn" wrote: I suppose you could add a "public static IDataStore myDataStore;" to the Global class in Global.asax.cs (or the equivalent in VB). Then from any page you could reference it by typing Global.myDataSt ore.
However, I believe that this may not a good idea (not knowing anything about the class), in that it disregards any possible threading issues.
Is it horribly expensive to instantiate a eBiz.SDK.Integr ation.DataStore ? How often do you need to use it? You might want to rethink your approach.
"Stanley Alex" wrote:
I connect to myDataStore from different places but I really only need to connect once when the application loads.
'Connect to database. Dim myDataStore As IDataStore = New eBiz.SDK.Integr ation.DataStore myDataStore .Connect(connSt r)
Can I also store the IDataStore object in my HttpApplication instance. If so, how? Also, how would I call myDataSore from other pages. Or should I say, how do I then have access to myDataSore from other pages or classes.
Sincerely,
Stan Alex
"Stanley Alex" <St*********@di scussions.micro soft.com> wrote in message
news:E3******** *************** ***********@mic rosoft.com... Hi Brad,
Thank you very much for your reply. Actually, I am using an SDK and I do
not know how expensive it is to keep recreating the object. But since you
brought it up, what were the possible threading issues that are disregarded?
The threading issues are simple: this will be one single object being used
by multiple page requests, from multiple users, all at the same time. Does
the object support this? Does the object perform proper synchronization such
that two requests making different calls to the object at the same time
don't interfere with each other?
--
John Saunders
johnwsaundersii i at hotmail This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: AinO |
last post by:
Hi,
- I've created a webservice in VS2003/c# wich relies heavily on cache. It
has a cache manager wich loads
resources (triggered by requests) and wich has also a built in timer wich
triggers every 5 mins a check on
the unused lifetime of all cached resources and frees them if they exceed
their idle time limit. I made also a
log object wich logs HTTP application level (triggered from global.asax) and
web method level events (triggered
|
by: [Gauthier] |
last post by:
Hello,
I've a simple question:
On a server that run multiple asp.net HttpApplication, is there any way with
the asp.net framework to exchange data between different application?
I basically need to send message to a 'server wide' application from any
HttpApplication on the same server and obtain responses (wich may be simple
strings or streams for example), this 'server wide' application is also
|
by: sikander khan via .NET 247 |
last post by:
hello all !
i know that there exists one to one relationship between HttpApplication instance and a request. My doubt is that instance associated with that request until session times out. i mean lifetime here means session time or not.
--------------------------------
From: sikander khan
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>A6zxS0rn8UyDgQKvmrzToA==</Id>
|
by: Breeto |
last post by:
Can anyone please tell me why the following doesn't work...
using System;
using System.Web;
namespace AspTests
{
|
by: miha.valencic |
last post by:
Hi!
A while ago, I noticed that there are usually two instances of
HttpApplication created within IIS (observed on WinXPPro). Why is that?
Especially, since Application_Start handler is called on only one
instance (the one that was created first).
Anyone has an idea?
How to test:
| |
by: walter |
last post by:
Hi there, I know there is pool of HttpApplications, and for each request
coming in, HttpRuntime will dedicate one from pool to serve the request. My
questions are :
1. since HttpModule is plug into the process, does each instance of
HttpApplication keep its own set of HttpModule instance or HttpModules are
shared among all HttpApplication instances?
2. In case of HttpApplication keep its own set of HttpModule, does the
HttpModule...
|
by: Urs |
last post by:
Hi
The HttpApplication class instance goes unexpected away. In Global.asax, I
checked the Appliaction_Load event and discovered, that this eventhandler is
called even when another user is still using the page. This only happens
when a user is redirected to the default page. Redirecting to any other page
does not create this problem.
From my understanding, HttpApplication should remain instantiated until the
last user left the site and...
|
by: Urs |
last post by:
Two questions:
1) What possibly causes HttpApplication from being unloaded or recycled?
2) How can I prevent HttpApplication from being unloaded or recycled (to
prevent loss of session state...) ?
Thanks for any hints. Urs
|
by: rbg |
last post by:
Have a web application which uses Data Cache.
I need to understand what happens when a new instance of the same web
application is created for
for serving concurrent clients.
What happens when the data in the cache expires (either due to
expiration or due to dependency change)
do all instances of the Http Application replace the cached data at the
same time.
Thus what I am essentially asking is, in a single server scenario if
multiple...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |