SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
But you never do. You use the null literal in your return statements. You're never actually using that null value you assign to "conn", so it shouldn't be there at all.Originally posted by kundan varma:
Frankly speaking i couldnt understand your suggestions about this code. If i dont put null to Connection then how can i return it in case if it doesnt get connection.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
No. It is clearly slower than, say, an instance variable, but completely insignificant compared to the time it takes to access a JDBC database. No need to worry whatsoever. You might be interested to learn that ThreadLocal objects are widely used by application servers to keep track of the caller principal, transaction contexts and so on.Originally posted by kundan varma:
One more thing i want to ask about ThreadLocal object. Does it have bad impact on performance.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
Something must be done about this. Let's start by reading this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|