Brad Cox wrote:
Totally confused now; that seems to be saying the LogTransform factory
(service) produces instances of itself. Or was that a typo.
I thought I understood before but maybe not. The pattern I'm following
is that each component X needs for classes:
XService (factory interface)
XServiceImpl (factory implementation)
X (instance interface)
XImpl (instance implementation)
And that manifest declares what kind of instance the factory creates.
By that understanding it would look what I have
<ipojo>
<component classname="com.gestalt.soakit.core.XService">
<provides/>
</component>
<instance component="com.gestalt.soakit.core.X"/>
</ipojo>
Might giving an interface where an impl is expected might cause that
class loader problem. Will try that.
I don't think so.
Clearly, I don't really know what you are doing, so I may be off base.
I believe I do know how the iPOJO descriptor works, but even then I
could be wrong about that since I don't use it regularly, so Clement can
correct me if I am wrong.
From my recollection, in the iPOJO descriptor you define a component
which has a concrete class (i.e., the Impl class). iPOJO automatically
creates a factory service for that component from which it creates
instances. The name of the factory, by default, is the name of the
component impl class (you can specify a different name if you want). So,
when you declare the <instance ...> tag you have to specify the name of
the factory, which is the name of the component impl class in this case.
If your component implements a service, you generally don't need to
specify the service interface itself in the component descriptor, since
iPOJO determines that automatically. You just need to specify the Impl
class.
-> richard
Richard S. Hall wrote:
Brad Cox wrote:
I am a little confused, it seems there are lots of types involved here.
In your activator you seem to be creating a LogTransformServiceImpl,
but you are registering it as a ComponentService. In your iPOJO
descriptor it appears you have the service interface as the component
implementation class (i.e., LogTransformService instead of
LogTransformServiceImpl) and then you are trying to create an
instance of "LogTransform", which is something else altogether.
I would guess your iPOJO descriptor should look something like this:
<ipojo>
<component
classname="com.gestalt.soakit.transform.log.LogTransformServiceImpl">
<provides/>
</component>
<instance
component="com.gestalt.soakit.transform.log.LogTransformServiceImpl"/>
</ipojo>
I don't think this will fix the class format exception, though.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]