473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 1187
"Brian" <bl********@gmail.comwrote in message
news:11**********************@w1g2000hsg.googlegro ups.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
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...
77
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...
10
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:...
0
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...
4
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...
7
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....
3
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...
0
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...
126
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:...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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,...
0
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...

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.