mardi 5 mai 2015

How to specify per application properties in JBoss configuration?

I have web application in which I want to inject property values (like external server hostname and password - environment dependent). I want to specify values in wildfly configuration.

I thought I will specify simple jndi binding in urn:jboss:domain:naming subsystem, and inject property using @Resource annotation, like:

@Resource(name = "java:app/rabbit.login")
private String login;

But in naming subsystem I cannot specify application-scoped jndi binding (it is necessary due to security reasons).

How can I specify properties (using jndi, properties, etc.) in wildfly configuration accessible only for specific application?

Aucun commentaire:

Enregistrer un commentaire