If we store reference to someobject in threadlocal, ITs still possible for multiple threads to breach thread safety, right? Because Threadlocal does not create deep copy of the object.
is this understanding correct that every thread has its own ThreadLocalMap object which stores the mapping from ThreadLocal to values. Every thread shares the same threadlocal object.
for (Iterator<?> i = c.iterator(); i.hasNext(); ) modified = remove(i.next()) vs for (Iterator<?> i = iterator(); i.hasNext(); ) modified = c.contains(i.next())?i.remove():false;
What does fairness parameter means then. If Its the OS that has to take the final call, why Java lets programmer to specify fairness parameter to schedule a thread that has been waiting the most.
@Zoe Do you mean JVM scheduling at process level and OS scheduling at System level. Is this understanding correct. I mean to say while JVM decides which java threads gets executed next, while OS decide while next thread (that could be java one) among all threads running on the system gets executed next.
Is it possible to have one table having one-to-many relationship with multiple table in hibernate. e.g. Table1 have one-to-many relationship with Table2, Table3, Table4. I will be storing Table1's primary as foreign key in Table2, Table3, Table4.
A very general question, Is it a good idea to allow user to upload configuration in Json format. I am asking this question because I don't think there are very well maintained Json schema libraries compared to XML.