I am attempting to inject my DAO object into my page class using the
following code. This is what I've added to my hivemodule.xml file
from refering to the hiveutils docs:
<service-point id="PortaluserHome"
interface="crd.IPortaluserHome">
<invoke-factory service-id="hiveutils.AdapterBuilderFactory"
model="singleton">
<exception-mapping
from="org.hibernate.HibernateException"
to="example.dao.PersistenceException" />
<construct
class="crd.PortaluserHome">
<log />
<service>Session</service>
</construct>
</invoke-factory>
<interceptor
service-id="hivetranse.core.TransactionInterceptor">
<method pattern="*" demarcation="Required" />
</interceptor>
</service-point>
<implementation service-id="PortaluserHome">
<interceptor service-id="hivemind.LoggingInterceptor" />
</implementation>
Am I missing something here? I wasn't sure about the correct way to
get access to the hivemind registry so doing the following may be
totally off?
@InjectObject("service:tapestry.globals.HttpServletRequest")
public abstract HttpServletRequest getServReq();
public void pageBeginRender(PageEvent arg0) {
Registry reg = HiveMindFilter.getRegistry(getServReq());
IPortaluserHome puh = (IPortaluserHome) reg.getService(
"crd.IPortaluserHome",
crd.IPortaluserHome.class);
Portaluser pu = puh.findById(67);
setDbTest(pu.getUsername());
}
Any help would be greatly appreciated.
--
~chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]