On Thursday, July 12, 2012 07:55:40 AM XiLai Dai wrote:
> Hi,
> 
> We have a SomethingListener class like this:
> 
> public class SomethingListener implements xxx {
> private MyObj myObj;
> 
> public void setMyObj(MyObj myObj){
>     this.myObj = myObj;
> }
> }
> 
> And add this class into the META-INF/cxf/bus-extensions.txt of the bundle.
> my.SomethingListener::true
> 
> is there a way to pass a MyObj instance to the SomethingListener?

Likely not, no.  The bus-extension stuff is very simplistic.   Your only 
real options are a default constructor or a constructor that takes a Bus 
object.   

Now, you COULD do something like:

publi SomethingListener(Bus b) {
    myObj = bus.getExtension(MyObj.class);
}

or similar which could pull in myObj from another extension.


-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to