Search code examples
cxfkaraf

Per-thread items in a Karaf/CXF container


I need to set up so that an object is created once-per-thread in a Karaf CXF container, since I assume that the container will itself set up multiple service threads. I can just use a ThreadLocal, but is there some support in the blueprint.xml for scoping to a thread?


Solution

  • no scope for that, only prototype (default) and singleton.

    http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.osgi.doc/ae/ca_blueprint_scopes.html

    Viktor