ok here is my hivemind configuration:
This is to access the Service from Pages an Components:
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="SessionFactory" scope="application" >
<invoke-factory object="service:HibernateGlobal" />
</state-object>
</contribution>
My SessionFactory Creator
<service-point id="HibernateGlobal" interface="taptest.data.HibernateGlobal">
<invoke-factory>
<construct class="taptest.data.HibernateGlobal" >
</construct>
</invoke-factory>
</service-point>
This is to declare the service for my external classes:
<service-point id="SessionFactory" interface="org.hibernate.SessionFactory">
<invoke-factory service-id="HibernateGlobal" />
</service-point>
It works, but Hivemind creates about 3 Objects everytime when i call it from a
external class.
the Pages always get the same object.
-----Ursprüngliche Nachricht-----
Von: Simon Buettner
Gesendet: Mi 21.09.2005 18:59
An: Tapestry users
Betreff: AW: Re: AW: Re: external use of hivemind services
sorry Kent but i have to explain my situation.
i have a Service hibernateutil class implementing the
org.apache.hivemind.ServiceImplementationFactory.
This is an invoked Factory for my SessionFactory Service.
And now all Classes and Pages should be able to get a SessionFactory by
accessing the Registry.
Why do I have to declare all my classes as hivemind services?
-----Ursprüngliche Nachricht-----
Von: news im Auftrag von Kent Tong
Gesendet: Mi 21.09.2005 17:52
An: [email protected]
Betreff: Re: AW: Re: external use of hivemind services
Simon Buettner <simon.buettner <at> froebus.de> writes:
>
> hi,
> i need them in extern classes not pages. the injection into pages and
> components works well but i need to access them from other classes.
My explanation must have been unclear. I'm saying that you should
make your external classes Hivemind services. If there are some
other classes that need to access those classes, make them Hivemind
services too.
--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
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]