473,804 Members | 2,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Threading issue with COM Wrapper object

I have run into an issue with a web service I am working on that uses
an object defined in a COM Wrapper. There can be only once instance
of this object initialized at a time on the system, which is naturally
causing problems in ASP.NET 2.0 Web Service.
How does one go about managing this type of resource? Is it possible
to create an instance of an object that is shared across all the
threads created by multiple users hitting a web service? How does one
handle the process of initializing/disposing of such an object?
I'm a bit new to Web Services, so I really would appreciate any help
available.
-Brian

Apr 4 '07 #1
3 1202
"Brian" <bl********@gma il.comwrote in message
news:11******** **************@ w1g2000hsg.goog legroups.com...
>I have run into an issue with a web service I am working on that uses
an object defined in a COM Wrapper. There can be only once instance
of this object initialized at a time on the system, which is naturally
causing problems in ASP.NET 2.0 Web Service.
How does one go about managing this type of resource? Is it possible
to create an instance of an object that is shared across all the
threads created by multiple users hitting a web service? How does one
handle the process of initializing/disposing of such an object?
I'm a bit new to Web Services, so I really would appreciate any help
available.
I wouldn't host the wrapper in ASP.NET, for reasons you've already seen.
Instead, host it inside of a Windows Service, and use .NET remoting between
the Web Service and the Windows Service.

John
Apr 5 '07 #2
Can't the wrapper be hosted in ASP.NET by using the Singleton pattern
for implementation and keeping the object in the Application or Cache
object depending on the requirements?

Apr 5 '07 #3
On Apr 5, 1:56 pm, "Latish Sehgal" <latish.seh...@ gmail.comwrote:
Can't the wrapper be hosted in ASP.NET by using the Singleton pattern
for implementation and keeping the object in the Application or Cache
object depending on the requirements?
That's an interesting idea, Latish. I had the singleton pattern set
up, but was unsure how to proceed. I hadn't heard of the Application
or Cache until now, so I will be doing some research on it. Does
anyone else know if this is an effective option?

Apr 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1870
by: James R. Saker Jr. | last post by:
I've got a: "start server thread > Queue object, start server thread <> Queue object, start parsing client < Queue object" application that's got me puzzled. Probably an easy threads issue, but after digging thru Programming Python and Python Recipes sections on Threading class and running thru the examples, I'm still missing something. My Server/Server/Client app is a syslog collector app (syslog input in, zope control web interface to...
77
5391
by: Jon Skeet [C# MVP] | last post by:
Please excuse the cross-post - I'm pretty sure I've had interest in the article on all the groups this is posted to. I've finally managed to finish my article on multi-threading - at least for the moment. I'd be *very* grateful if people with any interest in multi-threading would read it (even just bits of it - it's somewhat long to go through the whole thing!) to check for accuracy, effectiveness of examples, etc. Feel free to mail...
10
3596
by: Eric | last post by:
I'm looking at this page in the MSDN right here: ms-help://MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemcollectionsarraylist classsynchronizedtopic2.htm (or online here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemcollectionsicollectionclasssyncroottopic.asp) And I'm interested in locking an ArrayList during the entire enumeration, as shown in the example code. My problem is that I'm STILL...
0
1015
by: Claire | last post by:
This is the first threaded Windows Service application I've written. I'm using a System.Threading.Timer object to keep looping through a state engine. Each state requires the timer to call one or more functions in a 3rd party DLL making calls to a server across a network. It's known that the DLL can naughtily hang when it waits for responses from the network server rather than do a nice timeout. I MUST write the service so it can recover...
4
2006
by: JimD | last post by:
Is this safe? Any pitfalls? I have done threading in regular C# apps, but haven't had a needs to do threading in ASP.Net, until now. The issue I have ran into is this: Our corporate portal application displays the logged in users 10 most recent emails from Exchange via WebDav. The current code is in legacy VB6 and needs to be ported *really* bad. Exchange 2003 has an issue where it only allows a max of 256 WebDav connections from...
7
1092
by: darrel | last post by:
This is a long-overdue item on my punch list that I haven't had much time to address in the past. I'm trying to get it off my plate this week. ;o) We have a home-grown CMS that works pretty well. One issue we have is that whenever a page is saved in the CMS, we grab the info about the user that is saving the page and save it along with the page (so we can track who has changed what). This works most of the time.
3
5065
by: writser | last post by:
hey all, For my study I'm writing a simple threaded webcrawler and I am trying to do this in python. But somehow, using threads causes IDLE to crash on Windows XP (with the latest python distribution 2.5.1). Even a simple example such as this: import thread, time def doSomething():
0
3512
by: R K | last post by:
I am delevoping a Scheduler module whose functionality is to load the Scheduled Item Details every day (For this I have created a System.Threading.TimerCallBack with Timespan 1 day) in a stack. Once the stack is loaded I look for the qualified items every one minute (I create an another TimerCallBack thread). This Scheuler module needs to be started when the UI interface gets loaded. The issue lies in starting the shceduler since the...
126
6756
by: Dann Corbit | last post by:
Rather than create a new way of doing things: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html why not just pick up ACE into the existing standard: http://www.cse.wustl.edu/~schmidt/ACE.html the same way that the STL (and subsequently BOOST) have been subsumed? Since it already runs on zillions of platforms, they have obviously worked most of the kinks out of the generalized threading and processes idea (along with many...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10569
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10315
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,...
0
10075
tracyyun
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...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
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...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.