java - EJB override injection of abstract bean -


i have abstract bean injected isomeotherbean interface:

public abstract class abstractbean {     @ejb isomeotherbean myservice; } 

the isomeotherbean interface. have many implementations, example: somebeana, somebeanb...

@stateless public class somebeana implements isomeotherbean { }  @stateless public class somebeanb implements isomeotherbean { } 

how can inject concrete implementation of isomeotherbean inside implementation of abstractbean?

@stateless public class beanimpl extends abstractbean {     // how write want inject somebeanb implements isomeotherbean  } 

first tried inject concrete implementation inside beanimpl, passed additional method of superclass (abstractbean) writed field myservice. solution bad me. remember spring has ability pass beans constructor of given bean. inside xml configuration. want this, ejb , annotation configurations.

anyone knows how it?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -