Excuse my basic question, but i am a software engineer and not very experienced with server admin.

I am using reCAPTCHA in my j2ee application, and on google's site they say that the reCAPTCHA plugin for java requires modifying DNS caching (put it 30 seconds).
This is mentioned in the following Link (at the bottom of the page "-Dsun.net.inetaddr.ttl=30")

How can i set it up in glassfish v3?

  • What OS are you running on, and how is Glassfish being started? – Shane Madden Jun 5 '12 at 16:45
  • @ShaneMadden its a windows machin : right now am testing on localhost windows 7, and glassfish is being started from netbeans ide. But i will be moving to a production server soon (windows also) and i will need to set it there again. Thanks for the help! – ccot Jun 6 '12 at 4:08

You can setup the JVM settings for your domain doing the following:

  1. open glassfish admin console (by default it would be on port 4848)
  2. go to Configuration -> JVM Settings
  3. choose JVM Options tab
  4. add your JVM option
  5. stop and start glassfish domain

You could also use asadmin on the commandline, something like:

asadmin create-jvm-options -Dsun.net.inetaddr.ttl=30
| improve this answer | |
  • thx a lot for your help, much appreciated! I got a notice that i cannot award the bounty before 5 hours, so will do it at that time.Have a good one:) – ccot Jun 8 '12 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.