0 Replies Latest reply on Apr 13, 2010 8:38 AM by Mirek Sz

    jboss 5 ignore dependency

    Mirek Sz Newbie

      Hello,

      I have problem beacause I have cycle services dependiency and I have to use ignore dependency.

       

      When I use anootations @EJB and @IgnoreDependiency it works fine.

      When I use Annotations @ EJB and <ignore-dependency> in jboss.xml it also works

      but in my case I using ejb-jar.xml and jboss.xml and this dosen't works:-(

       

      my ejb-jar.xml file

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
          <enterprise-beans>
              <session>
                  <ejb-name>Pracownik</ejb-name>
                  <business-local>pakiet.Pracownik</business-local>
                  <ejb-class>pakiet.PracownikImpl</ejb-class>
                  <session-type>Stateless</session-type>
                  <ejb-local-ref>
                      <ejb-ref-name>Stanowisko</ejb-ref-name>
                      <ejb-ref-type>Session</ejb-ref-type>
                      <local>pakiet.Stanowisko</local>
                      <injection-target>
                          <injection-target-class>pakiet.PracownikImpl</injection-target-class>
                          <injection-target-name>stanowisko</injection-target-name>
                      </injection-target>
                  </ejb-local-ref>
              </session>
              <session>
                  <ejb-name>Stanowisko</ejb-name>
                  <business-local>pakiet.Stanowisko</business-local>
                  <ejb-class>pakiet.StanowiskoImpl</ejb-class>
                  <session-type>Stateless</session-type>
                  <ejb-local-ref>
                      <ejb-ref-name>Pracownik</ejb-ref-name>
                      <ejb-ref-type>Session</ejb-ref-type>
                      <local>pakiet.Pracownik</local>
                      <injection-target>
                          <injection-target-class>pakiet.StanowiskoImpl</injection-target-class>
                          <injection-target-name>pracownik</injection-target-name>
                      </injection-target>
                  </ejb-local-ref>
              </session>
          </enterprise-beans>
      </ejb-jar>
      
      
      
      
      

       

      and my jboss.xml file

       

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss>
          <enterprise-beans>
              <session>
                  <ejb-name>Stanowisko</ejb-name>
                  <ignore-dependency>
                      <injection-target>
                          <injection-target-class>pakiet.StanowiskoImpl</injection-target-class>
                          <injection-target-name>pracownik</injection-target-name>
                      </injection-target>
                  </ignore-dependency>
              </session>
              <session>
                  <ejb-name>Pracownik</ejb-name>
                  <ignore-dependency>
                      <injection-target>
                          <injection-target-class>pakiet.PracownikImpl</injection-target-class>
                          <injection-target-name>stanowisko</injection-target-name>
                      </injection-target>
                  </ignore-dependency>
              </session>
          </enterprise-beans>
      </jboss>
      

       

      JBOSS log:

      13:47:56,269 WARN  [HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

       

      jboss.j2ee:jar=test.jar,name=Pracownik,service=EJB3
      -> <UNKNOWN jboss.j2ee:jar=test.jar,name=Pracownik,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:Stanowisko/local-pakiet.Stanowisko' **}

       

      jboss.j2ee:jar=test.jar,name=Stanowisko,service=EJB3
      -> <UNKNOWN jboss.j2ee:jar=test.jar,name=Stanowisko,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:Pracownik/local-pakiet.Pracownik' **}

       


      *** CONTEXTS IN ERROR: Name -> Error

       

      <UNKNOWN jboss.j2ee:jar=test.jar,name=Pracownik,service=EJB3> -> ** UNRESOLVED Demands 'jndi:Stanowisko/local-pakiet.Stanowisko' **

       

      <UNKNOWN jboss.j2ee:jar=test.jar,name=Stanowisko,service=EJB3> -> ** UNRESOLVED Demands 'jndi:Pracownik/local-pakiet.Pracownik' **

       


          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:863)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:665)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:293)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)