code: public void start() throws Throwable
     {
        Context context = null;
        try
        {
           Properties properties = new Properties();
           properties.setProperty(Context.PROVIDER_URL, jndiProtocol + "://" + jndiHost + ":" + jndiPort);
           context = new InitialContext(properties);
           context.rebind(VALIDATOR_FACTORY, new SerializableValidatorFactory(validatorFactory));
        }
        finally
        {
           try
           {
              if (context != null)
                 context.close();
           }
           catch (NamingException ne)
           {
              // Ignore
           }
        }
     }
docs: Start
  @exception Throwable If an error occurs