Click here to Skip to main content
15,895,812 members
Home / Discussions / C#
   

C#

 
AnswerRe: Events related to the selection of text on a multiline textbox Pin
Not Active7-Apr-10 2:04
mentorNot Active7-Apr-10 2:04 
GeneralRe: Events related to the selection of text on a multiline textbox Pin
_ASPAle_7-Apr-10 7:21
_ASPAle_7-Apr-10 7:21 
AnswerRe: Events related to the selection of text on a multiline textbox Pin
Arun Jacob7-Apr-10 2:15
Arun Jacob7-Apr-10 2:15 
GeneralRe: Events related to the selection of text on a multiline textbox Pin
_ASPAle_7-Apr-10 7:18
_ASPAle_7-Apr-10 7:18 
QuestionCrystal Report with Dynamic Picture Pin
sachees1237-Apr-10 0:13
sachees1237-Apr-10 0:13 
QuestionReplacing objects, handling clones, dealing with write logs [modified] Pin
blackblizzard6-Apr-10 23:45
blackblizzard6-Apr-10 23:45 
AnswerRe: Replacing objects, handling clones, dealing with write logs Pin
Stanciu Vlad8-Apr-10 11:45
Stanciu Vlad8-Apr-10 11:45 
GeneralRe: Replacing objects, handling clones, dealing with write logs Pin
blackblizzard9-Apr-10 0:07
blackblizzard9-Apr-10 0:07 
Stanciu Vlad wrote:
A very long post, a very long problem and a very long solution.

Indeed. Dead | X|

Stanciu Vlad wrote:
From what I understand you want to have shared objects (atomic objects) that can be modified using a transactional mechanism. And your main problem is that when a transaction is running what data you show to other requests.

That's right.

Stanciu Vlad wrote:
If this is the case why don't you do as in a sql transactional server? When a transaction is started the atomic object is blocked until the transaction finishes successfully or not. As for the data you provide to client requests, you don't give them access to the main object, but to a clone of the object.

Yeah, this is what I want to do. The problem is how. I have almost everything figured out except for the issues with the clones.

Stanciu Vlad wrote:
And all changes must be made using an global object that supplies procedures following some rules (meaning that in order to change the list of the object, you don't change the list, but call a procedure of that global object that does the job).

This is what I had in mind. However, my main problem (problem #2, making sure they don't leave any references to the clone) still remains. Updating the right object isn't really problematic, I just didn't like the way I'm doing it now (replacing the fields one by one, as explained in problem #1). But when I give the programmer a clone instead of the global copy, what if he then goes and puts it in a dictionary or something? Then when the transaction commits there will be some references to the global object and some to the clone.

Stanciu Vlad wrote:
There are a couple of ways you could handle the transactional mechanism. One of them is to use a transaction object on which you use a mutex or something.

I've been investigating this and I'm not having much luck, maybe you can help with this. The thing is, the whole point of my project is writing this transactional system (it's a software transactional memory[^] system). It's important that I have control over conflict resolution between transactions (deciding which one wins when they compete for the same lock) and what happens at commit, rollback, etc. From what I can see, Transaction[^] doesn't give me that control, since I cannot override TransactionManager[^]. Please correct me if I'm wrong (I hope I am).

Thanks for your help, I know this is pretty heavy stuff. Smile | :)
GeneralRe: Replacing objects, handling clones, dealing with write logs Pin
Stanciu Vlad9-Apr-10 4:44
Stanciu Vlad9-Apr-10 4:44 
GeneralRe: Replacing objects, handling clones, dealing with write logs Pin
blackblizzard10-Apr-10 23:29
blackblizzard10-Apr-10 23:29 
GeneralRe: Replacing objects, handling clones, dealing with write logs Pin
Stanciu Vlad11-Apr-10 21:30
Stanciu Vlad11-Apr-10 21:30 
GeneralRe: Replacing objects, handling clones, dealing with write logs Pin
blackblizzard11-Apr-10 21:43
blackblizzard11-Apr-10 21:43 
Questionlocal file or public variables - what do oyu think? Pin
Jassim Rahma6-Apr-10 23:20
Jassim Rahma6-Apr-10 23:20 
AnswerRe: local file or public variables - what do oyu think? Pin
Mustafa Ismail Mustafa6-Apr-10 23:34
Mustafa Ismail Mustafa6-Apr-10 23:34 
GeneralRe: local file or public variables - what do oyu think? Pin
Jassim Rahma6-Apr-10 23:42
Jassim Rahma6-Apr-10 23:42 
GeneralRe: local file or public variables - what do oyu think? Pin
Mustafa Ismail Mustafa7-Apr-10 0:40
Mustafa Ismail Mustafa7-Apr-10 0:40 
GeneralRe: local file or public variables - what do oyu think? Pin
harold aptroot7-Apr-10 0:41
harold aptroot7-Apr-10 0:41 
AnswerRe: local file or public variables - what do oyu think? Pin
PIEBALDconsult7-Apr-10 3:49
mvePIEBALDconsult7-Apr-10 3:49 
QuestionProblem with printDocument1.PrinterSettings.Copies Pin
Reza Shojaee6-Apr-10 21:43
Reza Shojaee6-Apr-10 21:43 
QuestionScaleTransform Pin
Hema Bairavan6-Apr-10 21:24
Hema Bairavan6-Apr-10 21:24 
AnswerRe: ScaleTransform Pin
Luc Pattyn6-Apr-10 23:16
sitebuilderLuc Pattyn6-Apr-10 23:16 
QuestionNotify users Pin
Morgs Morgan6-Apr-10 20:30
Morgs Morgan6-Apr-10 20:30 
AnswerRe: Notify users Pin
Greg Chelstowski6-Apr-10 21:32
Greg Chelstowski6-Apr-10 21:32 
GeneralRe: Notify users Pin
Morgs Morgan6-Apr-10 21:37
Morgs Morgan6-Apr-10 21:37 
GeneralRe: Notify users Pin
Greg Chelstowski6-Apr-10 21:42
Greg Chelstowski6-Apr-10 21:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.