You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2010/03/13 19:30:29 UTC

Live service reloading in 5.2

As you may have seen from my blog posting, I just added live service
reloading to Tapestry 5.2.  I'd encourage users to give 5.2 a whirl
and make sure that the changes I've made work across different
platforms and servlet containers, and that there is no performance
impact.

As with pages and components, live service reloading is only for
service implementations whose class files are on the file system.

This means that services from third party JARs will operate exactly
the same as in 5.1.

Further, in a production environment, the classes will be packaged up
into a WAR (or even a JAR inside the WAR) and should, again, operate
exactly as with 5.1.  Live service reloading exists to accelerate
development, and boy does it!

-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Live service reloading in 5.2

Posted by Christophe Cordenier <ch...@gmail.com>.
Hi

Wooki <http://wookicentral.com> will move to Tapestry 5.2 for next release,
we will provide our feedback after upgrade.

Thanks for this great feature.

Best Regards,
Christophe Cordenier.

2010/3/13 Howard Lewis Ship <hl...@gmail.com>

> As you may have seen from my blog posting, I just added live service
> reloading to Tapestry 5.2.  I'd encourage users to give 5.2 a whirl
> and make sure that the changes I've made work across different
> platforms and servlet containers, and that there is no performance
> impact.
>
> As with pages and components, live service reloading is only for
> service implementations whose class files are on the file system.
>
> This means that services from third party JARs will operate exactly
> the same as in 5.1.
>
> Further, in a production environment, the classes will be packaged up
> into a WAR (or even a JAR inside the WAR) and should, again, operate
> exactly as with 5.1.  Live service reloading exists to accelerate
> development, and boy does it!
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Regards,
Christophe Cordenier.

Developer of wooki @wookicentral.com

Re: Live service reloading in 5.2

Posted by "Vangel V. Ajanovski" <aj...@ii.edu.mk>.
On 15.03.2010 01:14, Howard Lewis Ship wrote:
> That's very odd, I can't think of a reason why any of the changes I
> made would change that behavior.
So, to be more precise:

Our application was build mainly using the approach proposed in
http://wiki.apache.org/tapestry/Tapstry5First_project_with_Tapestry5%2C_Spring_and_Hibernate

So according to that we have spring managed beans or services, for example
  PersonManager interface and PersonManagerImpl class
  PersonDao interface and PersonDaoImpl class
All database related logic is in Dao classes, Manager classes only
control business and transaction logic or simply get the results from
the Dao.

And recently we started to circumvent Spring and build services only
with Tapestry related tools so one such service is for example
EnrollmentService which is bound in AppModule like this:
    binder.bind(EnrollmentService.class, EnrollmentServiceImpl.class);

And it is used in the older spring service PersonDaoImple like this:
    @Inject
    @Autowired
    private EnrollmentService enrollmentService;

So what I described was the case in 5.1.0.5.

So when I switched from 5.1.0.5 to 5.2.0-SNAPSHOT in the pom.xml, I got
the message that it was not able to find the enrollmentService bean.
This was really strange and it was solved with deleteing @Autowired. Now
I don't really understand how does this function at all because the
enrollmentService is not configured in the spring xml.


Re: Live service reloading in 5.2

Posted by Howard Lewis Ship <hl...@gmail.com>.
On Sun, Mar 14, 2010 at 2:14 PM, Vangel V. Ajanovski <aj...@ii.edu.mk> wrote:
> On 14.03.2010 19:18, Raul Raja Martinez wrote:
>> Congratulations!, is this true also for Spring injected services or only for
>> those managed with Tapestry IOC?
>>
> It did not work for spring services here.
> Regular injected service implementations get reloaded.
>
> Also something was a bit different - compatibility is broken, sort of.
>
> Previously with 5.1.0.5, when I had a tapestry service injected inside a
> spring service, I had to use @Autowired otherwise it didn't work.
> No I had to remove the @Autowired annotation to make it work.
>
>

That's very odd, I can't think of a reason why any of the changes I
made would change that behavior.



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Live service reloading in 5.2

Posted by "Vangel V. Ajanovski" <aj...@ii.edu.mk>.
On 14.03.2010 19:18, Raul Raja Martinez wrote:
> Congratulations!, is this true also for Spring injected services or only for
> those managed with Tapestry IOC?
>   
It did not work for spring services here.
Regular injected service implementations get reloaded.

Also something was a bit different - compatibility is broken, sort of.

Previously with 5.1.0.5, when I had a tapestry service injected inside a
spring service, I had to use @Autowired otherwise it didn't work.
No I had to remove the @Autowired annotation to make it work.


Re: Live service reloading in 5.2

Posted by Raul Raja Martinez <ra...@gmail.com>.
Congratulations!, is this true also for Spring injected services or only for
those managed with Tapestry IOC?

2010/3/13 Howard Lewis Ship <hl...@gmail.com>

> As you may have seen from my blog posting, I just added live service
> reloading to Tapestry 5.2.  I'd encourage users to give 5.2 a whirl
> and make sure that the changes I've made work across different
> platforms and servlet containers, and that there is no performance
> impact.
>
> As with pages and components, live service reloading is only for
> service implementations whose class files are on the file system.
>
> This means that services from third party JARs will operate exactly
> the same as in 5.1.
>
> Further, in a production environment, the classes will be packaged up
> into a WAR (or even a JAR inside the WAR) and should, again, operate
> exactly as with 5.1.  Live service reloading exists to accelerate
> development, and boy does it!
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Raul Raja

Re: Live service reloading in 5.2

Posted by Howard Lewis Ship <hl...@gmail.com>.
Thanks for the heads up; I think I know why this is behaving as you
suggest, and its fixable. Add an issue.

Basically, when using reloadable, the object at the end of the
delegate/advice stack, which is normally the service implementation,
is itself a proxy that performs live class reloading. Currently, it
does not attempt to load the service implementation until needed, but
that can and should be changed, giving reloaded services that same
semantics as non-reloadable services (just with one extra level of
proxy).

On Wed, Mar 24, 2010 at 2:27 PM, Christophe Cordenier
<ch...@gmail.com> wrote:
> Hi
>
> .eagerload() does not work when we do not call preventReload() on the
> service.
> If it's by design, maybe the first call to one of the two methods should
> take the priority, or maybe an exception should be thrown if the two are
> called on the service.
>
> Best Regards,
> Christophe Cordenier.
>
> 2010/3/13 Howard Lewis Ship <hl...@gmail.com>
>
>> As you may have seen from my blog posting, I just added live service
>> reloading to Tapestry 5.2.  I'd encourage users to give 5.2 a whirl
>> and make sure that the changes I've made work across different
>> platforms and servlet containers, and that there is no performance
>> impact.
>>
>> As with pages and components, live service reloading is only for
>> service implementations whose class files are on the file system.
>>
>> This means that services from third party JARs will operate exactly
>> the same as in 5.1.
>>
>> Further, in a production environment, the classes will be packaged up
>> into a WAR (or even a JAR inside the WAR) and should, again, operate
>> exactly as with 5.1.  Live service reloading exists to accelerate
>> development, and boy does it!
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Developer of wooki @wookicentral.com
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Live service reloading in 5.2

Posted by Christophe Cordenier <ch...@gmail.com>.
Hi

.eagerload() does not work when we do not call preventReload() on the
service.
If it's by design, maybe the first call to one of the two methods should
take the priority, or maybe an exception should be thrown if the two are
called on the service.

Best Regards,
Christophe Cordenier.

2010/3/13 Howard Lewis Ship <hl...@gmail.com>

> As you may have seen from my blog posting, I just added live service
> reloading to Tapestry 5.2.  I'd encourage users to give 5.2 a whirl
> and make sure that the changes I've made work across different
> platforms and servlet containers, and that there is no performance
> impact.
>
> As with pages and components, live service reloading is only for
> service implementations whose class files are on the file system.
>
> This means that services from third party JARs will operate exactly
> the same as in 5.1.
>
> Further, in a production environment, the classes will be packaged up
> into a WAR (or even a JAR inside the WAR) and should, again, operate
> exactly as with 5.1.  Live service reloading exists to accelerate
> development, and boy does it!
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Regards,
Christophe Cordenier.

Developer of wooki @wookicentral.com