Hi is it possible to have only one instance of an bean component (like a
singleton)? I've created serveral beans but all seem to have two instances.
In example I've got a init()-Method like:
@PostConstruct
public void init() throws IOException, MessagingException {
if (null == this.context || null == this.channel) {
throw new IllegalStateException("ClusteringBean not
initialized!");
}
log.info("ClusteringBean initialized!");
}
When I deploy this component I get:
INFO - ClusteringBean - ClusteringBean initialized!
INFO - ClusteringBean - ClusteringBean initialized!
And even each logging output I create in bean will be printed twice. But I
only need one instance. The beans are MessageExchangeListeners. Maybe there
is a better way to create such beans? I've thought about servicemix-jsr181
component but not sure for that.
Regards
/steffen
-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE
Web: http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de /
http://www.brockhaus-group.com www.brockhaus-group.com
--
View this message in context:
http://www.nabble.com/servicemix-bean-singleton-tp19833428p19833428.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.