Assuming you've got Spring & Hivemind all hooked up already (using the
instructions in the wiki), and have a Spring bean in the context called
mySpringBean that implements MySpringService, you can do this by setting
a property in the <service-point> for your engine service. In
hivemodule.xml:
<service-point id="MyService"
interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory>
<construct class="MyEngineService">
<set-object property="springBean" value="spring:mySpringBean"/>
</construct>
</invoke-factory>
</service-point>
MyEngineService.java
public class MyEngineService implements IEngineService
{
/*
* Engine Service Stuff
*/
private MySpringService _springBean;
public void setSpringBean( MySpringService bean )
{
_springBean = bean;
}
jeff
-----Original Message-----
From: Dan Adams [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 29, 2005 9:40 AM
To: Tapestry users
Subject: injecting spring beans into engine services
Anyone know of a way to inject spring beans into engine services?
Also, as a side question, has anyone played with both tapestry and
hivemind? What did you think? Is it good design to use both or should
you stick with hivemind because of how much tapestry depends on it? As
much as I long spring i'm considering that it might be better to change
to using only hivemind. What do you think?
--
Dan Adams
Software Engineer
Interactive Factory
---------------------------------------------------------------------
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]