Hi,
I don't know what Spring-prototypes are, but I have built my own
Service-Model to support storing service state across client-requests.
Actually it's surprisingly easy:
Firstly, you have to define the new service-model in hivemodule.xml like
this:
<contribution configuration-id="hivemind.ServiceModels">
<service-model class="StatefulServiceModelFactory"
name="stateful"/>
</contribution>
Then, you have to implement the Factory-class which is mentioned above. It
has to implement the interface ServiceModelFactory. The service-model itself
is produced by this factory. It has to implement ServiceModel. Here you
should have a look at the Sources of the existing Service-Models. They all
inherit from AbstractServiceModelImpl which has some nice Utilities to take
care of adding Interceptors and constructing Proxies. Basically, your
Service-Model's only task is to create one instance of a Proxy which
represents the service (always one instance per registry, lives until
registry shuts down). The Proxy takes care of forwarding calls to the right
implementation.
hth,
Marcus
> -----Original Message-----
> From: Emir Rodriguez [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 16, 2005 12:10 AM
> To: [email protected]
> Subject: Problems trying to implement a new Service Model
>
>
> Hi,
> I want to implement a new Service Model, but i am
> having problems trying to understand the configuration
> point concept. I want to make something like the
> prototype (not singleton) used in spring, because
> hivemind doesn't have some stuff like that (correct
> me if i'm wrong).
>
> Somebody could show me an example about how to do that
> or
> maybe how to build a new Service Model.
>
> Thank you.
>
> PS
> My english is not good.
>
>
>
>
>
> ___________________________________________________________
> Do You Yahoo!?
> La mejor conexión a Internet y <b >2GB</b> extra a tu correo
> por $100 al mes. http://net.yahoo.com.mx
>
>
> ---------------------------------------------------------------------
> 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]