You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by nicolasduminil <ni...@simplex-software.fr> on 2017/06/16 09:02:05 UTC

Can't inject @ConfigProperty in a jar deployed in an EAR

Hello,

I'm using WebSphere AS 9.0 which is Java EE 7 compliant. I deploy an EAR
which, in its lib directory, contains a JAR having this statements:

@ApplicationScoped
public class MyClass
{
  @Inject
  @ConfigProperty(name = "quicksign.base.url")
  private String prop1;
  @Inject
  @ConfigProperty(name = "quicksign.consumer.key")
  private String prop2;
...................................

There is of course a beans.xml file in the META-INF directory. The
application server log file acknowledges the fact of having found the file
apache-deltaspike.properties. However, the values aren't injected ans the
properties are nulls. Having the same in an EJB deployed in a WAR of the
same EAR, the properties are correctly injected.

I think that this scenario should work. Did I do something wrong ? 

Many thanks in advance,
Nicolas



--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/Can-t-inject-ConfigProperty-in-a-jar-deployed-in-an-EAR-tp4663964.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.