|
Don't mention it. I'm glad to help, and this is the type of esoteric "how does it really work" question that I enjoy answering.
|
|
|
|
|
having the bomb dropped during entry to Finally block was something that I never seen in other articles (many of which full of half answers), do I am actually quite delighted that I can finally put this question to rest.
dev
|
|
|
|
|
Pete O'Hanlon wrote: I have never seen a system that really needs a Thread.Abort
Curious about that.
A windows service that is supposed to 'stop' will have difficultly actually doing that if normal threads continue to run. So something which doesn't have control over a child thread and which has already attempted to nicely stop the thread can use Abort to force the issue.
Is there an alternative?
|
|
|
|
|
It's down to the way you write your threading code. I tend to make a lot of use of Monitors to help with threading - the beauty of a Monitor is that you can pulse all of the monitor objects simultaneously, and let your thread code just check a simple volatile bool to determine whether or not the thread should stop at that point.
|
|
|
|
|
Pete O'Hanlon wrote: ...just check a simple volatile bool to determine whether or not the thread should
stop at that point.
Yes. That works well if you wrote the code. Or had a chance to review it at least.
If you didn't write the code, or made a mistake then the thread will continue to run.
And the service will also continue to run because until that thread stops the service will not stop. And the only recourse without Abort() is to use task manager to kill it.
|
|
|
|
|
I thought we were talking about if we'd written the code here. All of a sudden, this has taken a turn into someone else's code.
|
|
|
|
|
Pete O'Hanlon wrote: I thought we were talking about if we'd written the code here.
It was the solution I used at the time, so I was wondering if another solution existed.
I also spent quite a bit of time figuring out exactly what happens when a windows service 'exits' as well. Which is why I came to the conclusion that one must explicitly call Environment.Exit() in a service Stop() method (after attempting to nicely stop all the threads.)
|
|
|
|
|
hi.. i have dot NET framework software installed on my computer which includes microsoft SQL sever 2008. Do I have to install MS SQL server software again so as to be able to connect or retrieve data from the database? plz help.
|
|
|
|
|
No you don't need to install anything else, you can connect via code.
What is lacking is the management studio as you only get the express edition with no GUI. This makes setting up/ managing DBs hard-ishbut not impossible as you can always create SQL and execute via a console app or similar. You can download an express (free) version of management studio here[^] to provide a GUI, I don't know how good it is as we've got the full thing at work. I dare say it'll get the basics done.
|
|
|
|
|
THANKS AM GRATEFUL FOR ALL YOUR RESPONSES.
|
|
|
|
|
hello,,
i am not so sure but as i know 2010 and 2012 contain its inbuilt sql server,,,so you don't need to istall again external sql server...you can connect to the databse using code.
modified 18-Feb-13 10:16am.
|
|
|
|
|
They don't contain "inbuilt" SQL servers. They install either SQL Server 2008 Express or 2012 Express with LocalDb, depending on which version of Visual Studio and edition you install.
|
|
|
|
|
We are developing a daily planing system, the system will work like a calender planer with multi clients and servers...
The questions is which c# middleware should we use for this kind of 'distributed system'????
This is a picture of the systems architecture
Uploaded with ImageShack.us
modified 18-Feb-13 6:09am.
|
|
|
|
|
dude - I'd edit this and fix the link - it doesnt go where you think it should !
'g'
|
|
|
|
|
It works now
|
|
|
|
|
ok .. well, as devvvy says, whats wrong with ASP.NET ? (its one option, certainly less complex than using a message bus)
In this case, tier 1 - Client uses a browser, tier 2 is an ASP.NET app, tier 3 is the data-base
Does it need to be more complicated, or is there some other thought process you're having ?
'g'
|
|
|
|
|
by middleware i presumed you mean some sort of message bus but why you need a message bus for a calendaring app? it's asp.net is it not?
dev
|
|
|
|
|
Because my teacher requires using middleware, the course is about distributed systems and he wants us to use middleware in this system
|
|
|
|
|
but has your teacher given you a definition of 'middleware' ?
|
|
|
|
|
Middleware is a set of services that perform various functions in a distributed computing environment, across a wide set of server and client systems. In essence, middleware is computer software that connects software components.
|
|
|
|
|
great - I dont understand why your teacher thinks a web server, with some ASP.NET programming, and a database back-end, fails to meet that definition - true, the web-server and ASP.Net programming is 'bundling' some of the services, but it does meet the definiton (the protocols and components may be 'limited', but, its there)
Well, then, if you dont want to look at ASP.NET etc, you're going to have to do a fair bit of research, and, start updating your document with possible protocols for each of the different layers/comms
In the commercial world, for example, there's BizTalk, Tibco, which all offer multiple ways of doing things, in addition to 'messaging', like AMQPP, RabbitMQ, MQSeries
I'd start off by looking at what http://www.zeroc.com/[^] offer for example, and see if you can use that to hang a system together
'g'
|
|
|
|
|
there's no place for a simple asp.net calendaring app to use a message bus of any sort - message bus is for apps like real time trading applications where screen flicks (ie real time client server architecture). In this case, WPF/Winform client fetches updates from message bus, which is in turn fed by combination of market data provider (bloomberg, reuters...etc) and calculation servers in the back (for example doing risk, profit and loss, and other model calculation)
- and even in this case, you can simplify things by simply having clients (WPF/Winform) talking directly to database.
dev
|
|
|
|
|
I'm glad you have such rigid/clear-cut definitions of what can do what - I tend to stay away from such rigidity myself
|
|
|
|
|
i have simple clear cut definitions because i have a corresponding simple mind which prefer spend more thoughts on the beer end of the day - if i am wrnog, someone will offer to correct me i generally don't need to ask for it!
dev
|
|
|
|
|
it's not a webb application so no not asp.net
|
|
|
|