Results 1 to 2 of 2

Thread: Inject dependent object via its one argument constructor using @Inject of JSR 330

  1. #1

    Post Inject dependent object via its one argument constructor using @Inject of JSR 330

    Hi,
    I want to use @Inject of JSR 330,my requirment is given below as an example.

    public class A{

    //Step 1
    @Inject
    B b;

    }

    public class B extends C{

    //B's one argument constructo
    public B(String configFileName){
    super(configFileName)
    }

    public class C{

    //C's one argument constructo
    public C(String configFileName){
    //some businees logic here
    .........
    }


    Now my problem is that how can i inject B's object(means using @Inject as in step 1) so that public B(String configFileName) is invoked.What i need to change in step 1.

    Thanks in Advance.

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    This is the wrong forum for your question. This is Spring Integration project forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •