0 Replies Latest reply on Sep 24, 2008 5:02 PM by Armin Vogt

    @Depends refers to the ear file name - is there another way?

    Armin Vogt Newbie


      JBoss forces me to annotate some of my session beans with a @Depends annotation. I deploy ejbs in several ears at the same time with @EJB injection dependencies in between them. Deployment at server startup only works when i tell ejb container to ignore some @EJB dep for the moment and come back later once the referenced ejb got deployed.

      It works fine (like most in JBoss).

      But, in the @Depends annotation there is the referenced ejb named not by its jndiname but by its mbean (?) name:


      @Depends( "jboss.j2ee:ear=my_ear-1.0-SNAPSHOT.ear,jar=my-ejb-1.0-SNAPSHOT.jar,name=MyServiceEjb,service=EJB3")

      as you can see, the ear and the jar file name is now in the Java code!

      Now comes Maven which does not allow to change artifact names when installed to repositories! Thats why the maven versions stay in the file names.

      Which prevents me from ever changing a maven version of the ear or ejb.jar projects.

      Maven has no solution that i was able to find.

      Does JBoss have an alternative for declaring some dependency to be resolved later?