And also, if in a service-point you omit the interface attribute, its value is by default equal to the id of the service-point. Assuming that your module has a package="authsum.stitches", this explains why hivemind looks for (the non existant) authsum.stitches.StitchFolderHolder interface (which in Hivemind 1.1, as Ron said, can also be a class)
Any URLs for the "Stitches" project ? >From Ron Piterman <[EMAIL PROTECTED]>: > the problem is brobably with the factory you use. > although you *can* specify a class as an interface in the service-point > def, > 1. this is considered dirty. > 2. some hivemind factories (like the one you are using) will not work. > > The reason is: hivemind factories create a proxy implementation of the > given interface and implement the service model (threaded? singleton?) > in this proxy. > > Either use a bean factory, your own factory, or extract an interface, > which is recommended for services (but not necessarily for statefull POJOs). > > Cheers, > Ron > > > > Phillip Rhodes wrote: > > I have a singleton pojo that I am trying to manage with hivemind and want > > to inject this pojo into engine services, components, pages, etc... > > > > The POJO is not an interface, but I can create one if necessary. I added > > the service point/set object (found below) to my libraries hivemodule.xml > > and it errors out with the following: > > > > Unable to construct service authsum.stitches.MyContent: Error building > > service authsum.stitches.MyContent: Error at > > > jar:file:/usr/local/jakarta-tomcat/jakarta-tomcat-4.1.31/webapps/stitches/WEB-INF/lib/stitches-jar.jar!/META-INF/hivemodule.xml, > > line 53, column 87: Unable to find interface > > authsum.stitches.StitchFolderHolder (for service > > authsum.stitches.StitchFolderHolder). > > > > > > The error references an interface "authsum.stitches.StitchFolderHolder" > > which does not exist. There is a > > "org.authsum.stitches.services.StitchFolderHolder" that I want to inject > > into this service. There is a setter on my service to take the property. > > > > Thanks for any pointers on how to proceed with this. "Stitches" is an > > open source (apache license), a simple suite of cms components for > > tapestry applications (image galleries, serverside image picking, html > > editing, lucene search) no db.... > > > > > > > > <service-point id="StitchFolderHolder"> > > <create-instance > > > > class="org.authsum.stitches.services.StitchFolderHolder"/> > > </service-point> > > > > <service-point id="MyContent" > > interface="org.apache.tapestry.engine.IEngineService"> > > > > <invoke-factory> > > <construct > > class="org.authsum.stitches.services.ContentService"> > > <set-object property="exceptionReporter" > > > > value="infrastructure:requestExceptionReporter"/> > > <set-object property="response" > > value="infrastructure:response"/> > > <set-object property="linkFactory" > > value="infrastructure:linkFactory"/> > > <set-object property="stitchFolderHolder" > > value="service:StitchFolderHolder"/> > > </construct> > > </invoke-factory> > > > > </service-point> > > > > --------------------------------------------------------------------- > > 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] > > -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
