I18NHelper local = I18NHelper.getInstance("com.mysql.clusterj.core.Bundle");
This call uses the class loader that loaded the I18NHelper class to find the specified Bundle. The class provides two overloaded getInstance methods allowing to specify a different class loader: {@link #getInstance(Class cls)} looks for a bundlecalled "Bundle.properties" located in the package of the specified class object and {@link #getInstance(String bundleName,ClassLoader loader)} uses the specified class loader to find the bundle.
Subsequently, instance methods can be used to format message strings using the text from the bundle, as in
throw new JDOFatalInternalException (local.message("ERR_NoMetadata", cls.getName()));
|
|
|
|