Rishi
Rishi

Reputation: 6189

How to specify enum in osgi blueprint xml?

I m trying to use Dependency injection with OSGI blueprint.
I want to construct enum object/s by specifying it in XML DSL.

In Spring context XML this would look like -

 <bean id="MyTestEnum" class="com.foo.TestEnum"
        factory-method="valueOf">
        <constructor-arg>
            <value>TYPEA</value>
        </constructor-arg>
    </bean>

How to achieve this in OSGI Blueprint XML file? I see the schema validation error at tag..

Appreciate any pointers!

Thanks.

Upvotes: 2

Views: 1386

Answers (1)

Holly Cummins
Holly Cummins

Reputation: 11492

Try replacing the constructor-arg block with

 <argument value="TYPEA"/>

Upvotes: 5

Related Questions