>From your hivemind.xml, I presume you want to 
inject 
service-id=hivemind.lib.DefaultSpringBeanFactoryHolder
into ImageSevice.

You might like to give the following a try :

Add 
<set-object property="springFactoryHolder"
value="service:hivemind.lib.DefaultSpringBeanFactoryHolder"/>

to service-point id="ImageService".

Also, in the java class of 
com.mydomain.services.ImageService,
add  :

private DefaultSpringBeanFactoryHolder
springFactoryHolder;

public   DefaultSpringBeanFactoryHolder 
getSpringFactoryHolder(){
  return springFactoryHolder;
}

public  void  setSpringFactoryHolder(
DefaultSpringBeanFactoryHolder holder ){
   springFactoryHolder = holder
}

===============
Shing

--- Michael Lake <[EMAIL PROTECTED]> wrote:

> Hello folks, I've tried bouncing around the usual
> spots for getting 
> information on what i'm trying to do. no luck.
> 
> For those of you familiar with Tong's book, I've
> implemented his chapter 
> which demonstrates a custom service for displaying
> an image. now to get 
> the bytes from a REAL database..
> 
> I have DAOs set up as spring beans to for utilizing
> hibernate. Normally 
> in page objects I can use Howard's tapestry-spring
> contribution to 
> access them via @InjectObject("spring:userDao")
> 
> ..but it seems that's not allowed in custom
> services... I'm pretty sure 
> I need to make a setter and use the <set-object
> property="..."> element 
> in hivemodule.xml. beyond that, I'm lost at how to
> get my 
> spring/hibernate DAO in there.
> 
> any help would be greatly appreciated. thanks
> 
> -mike
> 
> Here's my current hivemodule.xml
> 
> <module id="com.mydomain.tapestryspring"
> version="1.0.0">
>     <implementation
>        
>
service-id="hivemind.lib.DefaultSpringBeanFactoryHolder">
>         <invoke-factory>
>             <construct autowire-services="false"
>                 
>
class="com.mydomain.tapestryspring.XSpringBeanFactoryHolderImpl">
>                 <event-listener
>                    
> service-id="hivemind.ShutdownCoordinator" />
>                 <set-object property="context"
>                    
> value="service:tapestry.globals.WebContext" />
>             </construct>
>         </invoke-factory>
>     </implementation>
>     <service-point id="CaptchaService"
>        
>
interface="org.apache.tapestry.engine.IEngineService">
>         <invoke-factory>
>             <construct
> class="com.mydomain.services.CaptchaService">
>                 <set-object property="linkFactory"
>                    
> value="service:tapestry.url.LinkFactory" />
>             </construct>
>         </invoke-factory>
>     </service-point>
>     <service-point id="ImageService"
>        
>
interface="org.apache.tapestry.engine.IEngineService">
>         <invoke-factory>
>             <construct
> class="com.mydomain.services.ImageService">
>                 <set-object property="linkFactory" 
> value="service:tapestry.url.LinkFactory"/>
>             </construct>
>         </invoke-factory>
>     </service-point>
>    
>     <contribution
>        
>
configuration-id="tapestry.services.ApplicationServices">
>         <service name="image"
> object="service:ImageService" />
>     </contribution>
>     <contribution
>        
>
configuration-id="tapestry.services.ApplicationServices">
>         <service name="captcha"
> object="service:CaptchaService" />
>     </contribution>
>     <contribution
>        
>
configuration-id="tapestry.state.ApplicationObjects">
>         <state-object name="user" scope="session">
>             <create-instance
> class="com.mydomain.shared.models.User" />
>         </state-object>
>     </contribution>
> 
> 
> </module>
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


        
        
                
___________________________________________________________ 
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease 
of use." - PC Magazine 
http://uk.docs.yahoo.com/nowyoucan.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to