Announcement Announcement Module
Collapse
No announcement yet.
instance injection Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • instance injection

    hi
    can we inject multiple instances of a particiular java class into another class
    these multiple instances should get injected one by one as user clicks a particular button on gui
    that is one instance gets injected when user clicks first time on start button
    second instance gets injected when user clicks start button for second time
    and thereby n instances have to be injected when user cllicks the start button n times

    amrit

  • #2
    what are you going to do with all those instances after the user has finished clicking? shall those instances be persisted for each client or shared among all?

    Comment


    • #3
      instance injection

      hi
      Actually i have to supply a instance to a thread and kill the thread after the thread has excecuted .then when the user clicks the start button next time i have to spawn a new thread give it a new injected instance and run it and when it finishes excecuting, kill it.
      same process would follow for n instances which would be dicided by user discretion

      amrit

      Comment


      • #4
        take a look at PrototypeTargetSource in the ref. doc.

        Comment

        Working...
        X