Oracle GlassFish Server 3.0.1 Application Development Guide

Setting Login Retries

You can set a JVM option using the appclient script that determines the number of login retries allowed. This option is -Dorg.glassfish.appclient.acc.maxLoginRetries=n where n is a positive integer. The default number of retries is 3.

This retry loop happens when the ACC attempts to perform injection if you annotated the client's main class (for example, using @Resource). If instead of annotations your client uses the InitialContext explicitly to look up remote resources, the retry loop does not apply. In this case, you could write logic to catch an exception around the lookup and retry explicitly.

For details about the appclient script syntax, see the Oracle GlassFish Server 3.0.1 Reference Manual.