Skip to content

Instantly share code, notes, and snippets.

<size-rotating-file-handler name="FILE">
<rotate-size>5MB</rotate-size>
<formatter>
<pattern-formatter
pattern="%d{yyyy/MM/dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n" />
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log" />
<append value="true" />
</periodic-rotating-file-handler>
@ApplicationScoped
public class CountryService {
private @Inject Cache<String, Country> cache;
private @Inject Self<CountryService> self;
public Country getByIsoA3(String isoA3) {
Country ctry = cache.get(isoA3);
if (ctry == null) {