Skip to content

Instantly share code, notes, and snippets.

@cschneider
Created January 11, 2012 11:51
Show Gist options
  • Save cschneider/1594334 to your computer and use it in GitHub Desktop.
Save cschneider/1594334 to your computer and use it in GitHub Desktop.
blueprint with two instances of DbSelect
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" default-activation="eager">
<command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
<command name="db/query">
<action class="net.lr.tutorial.karaf.db.command.QueryCommand">
<property name="dbAccess" ref="dbAccess" />
</action>
</command>
<command name="db/exec">
<action class="net.lr.tutorial.karaf.db.command.ExecuteCommand">
<property name="dbAccess" ref="dbAccess" />
</action>
</command>
<command name="db/select">
<action class="net.lr.tutorial.karaf.db.command.SelectCommand">
<property name="dbSelect" ref="dbSelect" />
</action>
<completers>
<ref component-id="dbNameCompleter" />
</completers>
</command>
</command-bundle>
<bean id="dbNameCompleter" class="net.lr.tutorial.karaf.db.command.DbNameCompleter">
<property name="dbSelect" ref="dbSelect" />
</bean>
<bean id="dbAccess" class="net.lr.tutorial.karaf.db.service.DbAccess">
</bean>
<bean id="dbSelect" class="net.lr.tutorial.karaf.db.service.DbSelect">
<property name="context" ref="blueprintBundleContext" />
<property name="dbAccess" ref="dbAccess" />
</bean>
</blueprint>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment