I'm ok with injecting the service-id from the constructor, but how
does hivemind help in this? Are you saying I need to copy-paste it,
as below? That's not very cool :)
<service-point id="MyService" interface="com.example.MyServiceI">
<invoke-factory>
<construct class="com.example.MyService">
<string>com.example.MyService</string>
</construct>
</invoke-factory>
</service-point>
I would like to avoid manually resolving & duplicating service ids in
my hive-config files...
The reason for passing around the proxy instead of the actual instance
is that these objects get serialized and need to reconnect to the
appropriate service. This is what the the proxy does automatically,
but I'm ok with resolving it myself if there's no other way (but
that's also not quite as cool :)
regards,
viktor
On 5/9/05, Pablo Lalloni <[EMAIL PROTECTED]> wrote:
> El Lun 09 May 2005 17:01, Viktor Szathmary escribi�:
> > hi,
> >
> > how can a hivemind-managed object refer to it's "real self"? for
> > example, if I need to know the service ID, or want to be able to pass
> > the proxied instance from the service itself to another object...
>
> For knowing the service-id just use a constructor parameter or make your
> service implementation class implement a setServiceId(String id), then
> hivemind can inject it.
>
> For passing around the proxy... your really shouln't be needing to do such a
> thing... how come? :-)
>
> >
> > btw, i have briefly tried beta-1 (instead of alpha-3), and it seems
> > service serialization broke - it keeps complaining about "instance not
> > created in this VM".. since i didnt have time to focus on this, i just
> > rolled back to alpha-3...
>
> Maybe you aren't calling registry.setupThread() before using deserialization
> on a given thread?
>
> --
> Pablo I. Lalloni <[EMAIL PROTECTED]>
> Tel�fono +54 (11) 4347-3177
> Proyecto Pampa
> Direcci�n Inform�tica Tributaria
> AFIP
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Nudists are people who wear one-button suits.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]