[jboss-user] [EJB3] - Re: EJB application properties loading - best practice

Pasquale Imbemba do-not-reply at jboss.com
Fri Nov 4 10:24:06 EDT 2011

Pasquale Imbemba [http://community.jboss.org/people/pi4630] created the discussion

"Re: EJB application properties loading - best practice"

To view the discussion, visit: http://community.jboss.org/message/635082#635082

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.


Reply to this message by going to Community

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111104/2fe9d885/attachment-0001.html 

More information about the jboss-user mailing list