JBoss Community

Re: EJB application properties loading - best practice

created by Pasquale Imbemba in EJB3 - View the full discussion

I did this (from the @PostConstruct event):

 


ResourceBundle rb = ResourceBundle.getBundle("it.bz.prov.mercurius.util.mercurius");

        Properties p = new Properties();

        for (Enumeration<String> e = rb.getKeys(); e.hasMoreElements();) {
            String key = (String) e.nextElement();
            String value = p.getProperty(key);
            System.setProperty(key, value);
        }

 

I shall try your suggestion, because the @Resource makes a lot more sense to me.

 

thx

Reply to this message by going to Community

Start a new discussion in EJB3 at Community