[ https://issues.apache.org/activemq/browse/SM-702?page=comments#action_37187 ] Guillaume Nodet commented on SM-702: ------------------------------------
The problem with components initialized twice has been fixed in xbean 2.7 (out soon) and should be fixed in 3.0.1. JBI components do not necesseraly activate endpoints. This is only needed when the component acts as a provider, which is not the case for consumer BC for example. When using lightweight components, you can easily activate an endpoint by setting the properties "service" and "endpoint" from your java code, on the spring configuration for the component or on the activationSpec. Last, the spec states that the attribute on the LifeCycleMBean should be STARTED and not RUNNING (as defined in sun jars). > Components instantiated multiple times > -------------------------------------- > > Key: SM-702 > URL: https://issues.apache.org/activemq/browse/SM-702 > Project: ServiceMix > Issue Type: Improvement > Affects Versions: 3.0 > Environment: Win32 - ServiceMix 3.0-incubating > Reporter: Andrew Chullikal > Attachments: src.zip > > > I've been trying to write some of my own components, taking the file poller > example as a starting basis. > Being a newbie, I just ran the test code through my IDE's debugger and > noticed that the components' constructors were being called twice. > Also, another time consuming exercise was figuring that the endpoint had to > be activated in my code, unlike the code present in the servicemix-component > package. According to Sun's doc, the component is normaly meant to inform the > engine that it has an active endpoint. What worries me here, is that there > could be non-portability across containers. Perhaps the code in the > PojoSupport init method could log a warning if the is no activated endpoint ? > Finaly, there seems to be a discrepency between LifeCycleMBean.STARTED in the > servicemix-jbi.jar and the javax.jbi.management.LifeCycleMbean.RUNNING token. > Otherwise, keep up the good work ... > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
