I think i need to use transaction isolation level. I will come back if that doesn't work.
kind regards,
ghd...
User Profile
Collapse
-
But how do i detect that a race condition has occured and be able to correct the situation. Worst still, how do i notify the user(s) who have got the wrong value(s) due to such a race condition?
kind regards
ghd...Leave a comment:
-
How can we remedy the situation then? Does the sql server provide any solution?
kind regards,
ghdLeave a comment:
-
Stored Procedure Thread Safe?
Below i am producing a series of steps that creates a stored procedure. The stored procedure behaves like a sequence in oracle.
The code below creates the table by name 'sequences'. This table will be used to hold the next value that can be used for a particular sequence
Code:CREATE TABLE sequences ( seq varchar(100) primary key, sequence_id int
-
I find one good reason for having private members in a class irrespective of whether it can be subclassed or not. The reason is that the author of the class may not want other classes (including the subclasses) to get or set the member by mere assignment operator. In other words, the author may want to run some code whenever the member is got or set.
Another reason could be, as JosAH has pointed out - encapsulation - confirming to...Leave a comment:
-
So can we restate the principle: Private members are inherited but cannot be accessed in the subclass using the "." notation.
kind regards,
ghd...Leave a comment:
-
Hey! wait a minute. I did look up the reference you mentioned. I think private members are inherited after all! I am quoting from The Java Tutorials:
A subclass does not inherit the private members of its parent class. However, if the superclass has public or protected methods for accessing its private fields, these can also be used by the subclass.
If the derived class can access the private member of its parent through an...Leave a comment:
-
Private Members Not Inherited!
Beginners beware!
Usually in lessons on inheritance, we learn that when a class extends another, the former inherits all the members of the latter. This statement is only partly true (in fact it is misleading!). The complete truth is that private members are not inherited.
I wish to restate the principle: "The access modifier 'private' is not just an access modifier. It also means that the member who has this modifier... -
True, BigDaddyLH these are the issues specific to the operating system and the JVM implementation. I was just concerned about huge chunks of unclaimed memory being left around by applications which finish their show. Then new applications wouldn't be able to get their quota of memory allocated for their use, not until the system would be reset. But I don't think any operating system or an implementation would be that dumb to allow chunks of memory...Leave a comment:
-
Of course any thread can be made a daemon thread. But daemon threads usually execute a tight loop. This is what i read from 'The Java Tutorial' by Mary Campione et al. http://tns-www.lcs.mit.edu/manuals/java-tutorial/:
Daemon Threads
Any Java thread can be a daemon thread. Daemon threads are service providers for other threads running in the same process as the daemon thread. For example, the HotJava browser uses up to four...Leave a comment:
-
I'm sorry BigDaddyLH, but this thread got posted prematurely. I still wanted to edit it. My actual question was on when does the GC finish recycling all the garbage memory. I did read the sections you suggested in JLS and the JVMS but I didn't get complete answer for my question there.
The JLS states the following regarding the halt of JVM:
12.8 Program Exit
A program terminates all its activity and exits when one of...Leave a comment:
-
I'm sorry but that thread, I didn't want to post but due to some Internet connectivity problem, I couldn't acess it and it got posted without my knowledge. I will take care of that in future....Leave a comment:
-
When does JVM Start and Stop
In Windows XP when does the JVM start (JRE version 1.4 and higher)?
And when does it halt?
Does the JVM start when we launch a java application (or by executing on the command prompt - java classfile)?
And does the JVM halt when the all the java applications on the system end?
According to the documentation, the JVM halts in two situations: 1. when you terminate the java application by Ctrl+C and 2. when the 'exit'... -
When does JVM Finalize
In Windows XP when does the JVM start (JRE version 1.4 and higher)?
And when does it halt?
Does the JVM start when we launch a java application (or by executing java classfile)?
And does the JVM halt when the all the java applications on the system end? According to the documentation, the JVM halts in two situations: 1. when you terminate the java application by Ctrl+C and 2. when the 'exit' method of the System class is called.... -
IllegalStateException in getOutputStream method of ServletResponse object
Take a look at the official documentation on the getOutputStream method:
public ServletOutputSt ream getOutputStream () throws IOExceptionReturns a ServletOutputSt ream suitable for writing binary data in the...
response. The servlet container does not encode the binary data.
Calling flush() on the ServletOutputSt ream commits the response. Either this
method or getWriter() may be called to write the body, not both. -
Thank you very much, Nanku, Plater and Naive. If C# would have supported defining the implementation of methods in interfaces then that would have been a very elegant solution to the whole problem. Or if C# would have supported inheriting from multiple classes that would also have resulted in an elegant solution. I wonder why C# doesn't allow inheriting from two or more classes.It can allow inheriting only those methods and members that aren't common...Leave a comment:
-
But the problem is that the 'Feline' and 'Canine' class are already defined by the class provider. As a client , i have the ability to only inherit from these classes. I have no liberty to add another class or another method to the existing classes in the heirarchy of either 'Feline' or 'Canine'.
Actually, in my situation, the 'Feline' class is the 'UserControl' class (which is defined by the CLR) and the 'Canine' class is the 'ComboBox'...Leave a comment:
-
I am sorry. The 'eat' method must be modified by the keyword 'public' as:
Code:public void eat(food f) { //procedure for eating food }
Leave a comment:
-
The question is still open: How can i define a single implementation for a method in C# that can be used by two different classes in two different class heirarchies? (Please see the beginning of the thread for a full definition of the problem)Leave a comment:
-
No activity results to display
Show More
Leave a comment: