Hi,

I'm having an issue with Karaf GShell and Blueprint.

I'm trying to create a Command with an Action that is created by a factory
bean, but seems that this is impossible. ( see
https://issues.apache.org/jira/browse/GERONIMO-4711 )

I have to resort to doing it manually:

<bean id="helloCreator" class="com.openubiquity.caterpillar.HelloCreator">
<property name="bundleContext" ref="blueprintBundleContext"/>
</bean>
<bean id="hello2Action" factory-ref="helloCreator"
factory-method="createHello" />
<bean id="hello2Command"
class="org.apache.geronimo.gshell.wisdom.command.StatelessCommand">
<property name="beanContainer">
<bean class="org.apache.felix.karaf.gshell.core.BeanContainerWrapper">
<argument ref="blueprintContainer" />
</bean>
</property>
<property name="action" ref="hello2Action" />
<property name="location">
<bean
class="org.apache.geronimo.gshell.wisdom.registry.CommandLocationImpl">
<argument value="ou/hello2" />
</bean>
</property>
</bean>
<service id="hello2CommandSvc" ref="hello2Command">
<interfaces>
<value>org.apache.geronimo.gshell.command.Command</value>
</interfaces>
</service>

I'm proposing a request to add "action factory-ref= factory-method=" to
GShell namespace, or:

<action><bean ... /></action>
<action ref="someBean" />

If it's OK with you, should I put this on Karaf's JIRA or GShell's JIRA? I
would be able to contribute a patch for this, as I've already been messing
around with Karaf-Gshell's source while looking for a solution to my issue (
https://issues.apache.org/jira/browse/GERONIMO-4711 ). Thank you.

Another question, is it still possible to use Karaf-GShell namespace in
Spring XML (instead of Blueprint) ?

And, is the GShell-namespace usable with GShell "standalone" bundle (ie.
without Karaf), as opposed to bundled with Karaf?

Thank you.

-- 
Best regards,
Hendy Irawan
http://www.hendyirawan.com/ :: [email protected]

Reply via email to