2 Replies Latest reply on May 12, 2010 7:56 AM by nickarls

    StackOverflow on circular dependencies

    cjalmeida

      The following code:


      public class Home {
      
           @Inject Menu menu;
           
      }
      
      public class Menu {
      
           @Inject
           public Menu(Home home) {
                // do something
           }
      }



      causes a StackOverflowException when deploying. Is this the best way to use circular dependencies?