0

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?

ccot
  • 181
  • 2
  • 11
  • What OS are you running on, and how is Glassfish being started? – Shane Madden Jun 05 '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 06 '12 at 04:08

1 Answers1

1

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
Khai
  • 556
  • 2
  • 6
  • 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 08 '12 at 17:59