Can you provide a bit more detail on the circumstances where you observed these not getting called? I'm pretty sure init() is called:
But maybe it's getting skipped outside of AS 7. Also, I couldn't find any calls to destroy(), so there may be a hole there. Any and all holes would be considered a bug, so it's really just a matter of creating a list so that when it gets fixed we plug them all. :-)
That would explain it - was only looking in the core and component modules
The init method does not appear to be called from the SwitchYard test cases - or not atleast for the tests in BPEL and BPM components.
https://issues.jboss.org/browse/SWITCHYARD-843 - for the init problem and
https://issues.jboss.org/browse/SWITCHYARD-844 - for the destroy problem.
I thought I could bang this out real quick this morning, but it's slightly more complicated than I thought.
Re: SWITCHYARD-843, it's not super difficult to add some hooks in the test initialization logic to call the Component init() and destroy() methods. The complication is that normally the Configuration reference that's passed in comes from the AS 7 configuration. We don't have a concept of a distinct configuration repository for components outside of AS 7. We have planned to add this, particularly to enable things like config/property substitution, but it's not there now.
Re: SWITCHYARD-844, the AS 7 service which calls init on each Component appears to be in an funky state when it's stopped, which creates an error when calling Component destroy(). Details can be found in the JIRA. Magesh will probably recognize the issue right away, so I'll leave it for him to comment.
Chances are good that 843 will not make it for 0.5, since I would prefer to handle it as part of a larger effort around configuration substitution. Will that be a problem for you? Trying to figure out what the impact will be for BPEL here.
Its not a major problem - the issue that is dependent upon these is just a clean up issue, to make the component responsible for initialising and closing down the ODE engine - but that can wait for 0.6.
I am looking at 844 now. Regarding 843, it doesn't make much sense to me right now. But yes, we should mock it up to see if the components shutdown completely and be re-used. Later, as you said Keith!