title: How to pass parameter to injected class from another class in CDI?
body: <p>I am new to CDI, tried to find solution for this question, but, couln't found any. Question is Suppose I have one class which is being injected(A) from, where some value(toPass) is getting injected, now I want to pass this same value(toPass) to class B, which is getting injected from class A.</p>
  
  <pre><code>public class A 
  {
      String toPass = "abcd"; // This value is not hardcoded
  
      @Inject
      private B b;
  }
  
  public class B 
  {
      private String toPass; 
      public B(String toPass)
      {
          toPass = toPass;
      }
  }
  </code></pre>
  
  <p>Can anybody please help me in this? 
  Note: we cannot initialize the toPass variable of B in the same way as we have initialized in A, there is some restriction to it. Basically in Spring we could have done it easily, but, I wanted to do it in CDI.</p>