Reloadable services are a development only feature that are aimed at
improving developer productivity by reducing down time.

As Thiago has said, casting to the concrete type is not good OO practice.
If you need to access methods on the concrete class it's probably a sign
that you need to add methods to the interface since the interface describes
your public API.

I don't recommend this at all, in fact I think it is a terrible idea....
but if you really want to stop tapestry from creating reloadable proxies,
you can declare your services by concrete class instead of by interface in
your AppModule.


On 15 October 2013 17:47, Thiago H de Paula Figueiredo
<thiag...@gmail.com>wrote:

> On Tue, 15 Oct 2013 13:01:51 -0300, Martin Kersten <
> martin.kersten...@gmail.com> wrote:
>
>  I struggle a bit with the class loader supporting service implemenation
>> reloading.
>>
>
> AFAIK, just set the tapestry.production-mode symbol to true and service
> reloading is turned off.
>
>
>  I dont need this and I would love to be able to cast my Service instances
>> to the impl class which is quite a good way.
>>
>
> That's quite against the idea of IoC and OOP in general, which is about
> *not* using specific implementations of a given service as far as possible.
> Of course, you can still inject services (including service
> implementations) by id, so you can get the implementations themselves when
> the needs arises.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to