Srikanth Nutigattu

Ranch Hand
+ Follow
since Oct 30, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Srikanth Nutigattu

Are you talking about Session timout?

If yes, you can configure using


or you can specify by calling public void setMaxInactiveInterval(int interval) of HttpSession classhttp://java.sun.com/products/servlet/2.2/javadoc/

The difference between the two is using the xml approach you can specify in minutes where as using the API you can set session timeout in seconds.
14 years ago
I think the JCA/JCE (Java Cryptographic Extension) deals with the issue.

http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html

Thanks.
14 years ago
Okey, let me try to make it little more clear:

"Memory allocated for the object 'gc' on heap reclaimed ?"



If "finalize" got executed then you can be sure that the memory is deallocated.

in the other case, if "gc" not made null the finalize is not executed. "May i assume it as 'The memory allocated to gc not reclaimed even after the completion of the

main method' ".



You HAVE called System.gc() IN the main method itself so you assumption of "Completion" of main method is wrong. When the System.gc() was called the main method has not completed. And because you haven't made the reference as null, which results in an active reference to the object and hence it is ineligible for garbage collection.


"Will the finalize() surely executed before the object's deallocation ?"



YES, the finalize() will surely be called before an object is deallocated but there is NO SURETY that an object will be deallocated on calling of System.gc() as stated by Fred.

HTH.

14 years ago
Instead of finding all lines that "Contain" the special characters and removing them, why don't you find the lines which DONOT contain those special characters? In that way those lines which have only special characters will not be picked at all.

Thanks.
14 years ago
If I understood correctly, You want to encrypt emails using a public key in Java, isn't it?
14 years ago
5 Lakh records at once? Hmm look out for OutOfMemory issues if the MaxHeap (Xmx) is not high enough!!
I would concur on Jesper Young suggestion of doing intermediate commits only if there is No requirements of "Either All or None", that is if there is any error while inserting any of the record what should be done with the previously processed records. If there is no such dependency then you should commit periodically. and maybe maintain a status of what is the last record comitted or processed so that you can recover for a failure.

HTH
14 years ago
I think, storing the time in the session and passing it (displaying) on webpage and decrementing it using javascript, and when "next" is clicked resending (new value) back also has one advantage, the time it takes during trasit (next page load) is not lost. I think it is ideal way than using an IFRAME where it keeps on ticking even when the page is not yet loaded!
14 years ago
JSP
According to Servlet API,

http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html#encodeRedirectURL(java.lang.String)

The main difference is:
If session id is to maintained using URL (if you dont want/cant use cookies), or want to encode normal url's where you don't bother about Sessions.


14 years ago
I dont know if it is similar, But we faced similar issue when a SessionFactory object is created. I guess you can reduce the delay if you instantiate the SessionFactory or EntityManager in ServletContext listener, because it will be called during application startup, the required SessionFactory/EntityManager will be ready by the time first request arrives.

I am a novice in Hibernate hence excuse if some thing sounds stupid!
Recently we too have encountered similar problem, I think when an element is added to the Set, it performs some hash on the object to find the bucket.
Even though equals and hashcode is same for object that is present in the set and the one which we are passing to it, it is not able to locate. both contains(), remove() is failing.

I guess it is not able to locate the object in a set once any of its id attributes are changed.

Someone please shed some light on this.

Thanks.
Srikanth.N
14 years ago
In java Object is the TOP/ROOT/PARENT class for ALL java classes
14 years ago
AJAX Push looks interesting... I guess even browser embedded messengers like GTalk pane in Gmail etc uses this technique.
In that case I think it should be able to update.
14 years ago
JSP
Hi,

There are several options:
If you are looking for speed. GPRS sucks, You can use the faster CDMA based USB dongle. In India Tata Indicom and Reliance provides the same. which I would recommend.

But if you hardly browse but want to use your existing SIM card, get in touch with your provider:
Aritel http://www.airtel.in/wps/wcm/connect/airtelinaes/AES/Voice+Solutions/Enterprise+VAS/Mobile+Data/USB+Modems/ But I am not sure if you can replace the SIM inside them.
Similar USB modems are provided by Idea, DOCOMO, Vodafone and others..

Cheers.
Srikanth.N
14 years ago
Best tutorial is on Hibernate.org it is part of documentation.
We have a DB, and we are following Test Driven Development. We need to write Database "Read" test cases, But the issue is how can I create random data and populate into database, I need a way (something other than SQL scripts) to set up initial data in the DB automatically. Thanks in advance.