5 Replies Latest reply on Oct 2, 2009 12:49 PM by Jean-Pierre RIO

    @Resource and systemproperties-service.xml

    Jean-Pierre RIO Newbie

      Hi all,
      I have a SLSB with a @Resource annotation :

      import org.jboss.ejb3.annotation.Depends;

      @Stateless(name = "SimpleSLSBResource", mappedName = "SimpleEJB30SLSBResource")
      public class SimpleSLSBResource implements ISimpleSLSB {

      @Resource(name = "serverName")
      String = "testserver";

      and i also have a ejb-jar.xml to define the resource :


      and finally a systemProperties-service.xml to set the value of the resource :


      When i start my JBoss AND THEN deploy my EJB, "serverName" is resolved to "production" => OK
      When i start my JBoss with my EJB in the deploy directory, "serverName" is not resolved (= ${serverName}) => KO

      I'm working on JBoss 5.1.0GA, jdk6.

      Have I made a mistake with the @Depends tag ?