Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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! –  shadesco Jun 6 '12 at 4:08

1 Answer 1

up vote 1 down vote accepted
+50

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
share|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:) –  shadesco Jun 8 '12 at 17:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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