Win a copy of Terraform in Action this week in the Cloud forum!

suraj august

Greenhorn
+ Follow
since Nov 19, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by suraj august

Local variables are thread safe in java .Then how come we get Session object using Session s=SessionFactory.opensession() inside a method is not thread safe ?
It seems a loop problem.You are adding map from outside the loop.
6 years ago
where is taggedSentenceList initialising.I can see it is not inside in any loop.so it will have only the one object .Please also post the caller code.
6 years ago
"An optionally-bounded blocking queue based on linked nodes" as written in the docs.

what is the meaning of optiona and bounded.quite confused.!!
Hi,

Can anyone tell the exact difference between syncrornous queue and LinkedBlockingQueue?
I could not see any performance gain.But just needed to ask whether we can configure it any way which can have a performance benefit.
does logging through AOP in production environment increase any performance .If yes how?.Interceptors intercept the thread and "pause" it for sometime .so how does it can affect performance .?
write a private static method inside the servlet and call it or use an existing utility class.
so something like....
7 years ago
If the time for a single thread to do this is t1 and by mutile threads is t1+t2+t3...then it is not necessary that t1+t2+t3... would be less.infact it will be more because it will also add overhead of creating threads and
managing those.create multiple threads are required only when the individual units of work are independent of one another and you want those to run them parallel.
7 years ago
You can get this working by not using spring specific annotations and just servlet annotations.
Probably you have done the same using the old web.xml way.
so try this..

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;

@WebServlet("/appinfo")
public class ApplicationInformation extends HttpServlet { ....
7 years ago
You should go for Static class if you want to have some utilty class whereas Singelton comes when a class can have state and the states can changes (but still object is one ).
The singleton class would be useful if it contained a set of variables that we wanted only one set of and the methods used those variables but in our helper class we don't use any variables apart from the ones passed in (which we make final).
static classes implementation cannot be mocked but you can mock the implementation of singelton using Factory class.
A static class is one that has only static methods, for which a better word would be "functions". The design style embodied in a static class is purely procedural.
7 years ago
9 years ago
make the chnage in the following statement


ArrayList<Rental> games = new ArrayList<Rental>();
9 years ago
If two objects are equals then its hash-code are equals?
is the reverse...that is if two objects hash-code are equals then they are equal

[ If two objects hash-code are equal its equals may or may not be equal. ]


And when exactly are two objects equals?

[The objects are equals when the equals method return true in the comparison for the objects ]
9 years ago
why are you using ../VProcess etc in your jsp .It is not picking the proper url thats why your request is not reaching .
10 years ago