You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2010/10/01 03:36:33 UTC

[jira] Created: (TAP5-1287) Services do not reload even though they should

Services do not reload even though they should
----------------------------------------------

                 Key: TAP5-1287
                 URL: https://issues.apache.org/jira/browse/TAP5-1287
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-ioc
    Affects Versions: 5.2.2
            Reporter: Howard M. Lewis Ship


Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.


DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
Message received on thread ActiveMQ Session Task:
{
  "foo" : "bar"
}


I then changed the code (it affects the logging message that starts "Processing message ....":



DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
Message received on thread ActiveMQ Session Task:
{
  "foo" : "bar"
}

Note that the message indicates the implementation class changed, but the old behavior is stuck.

Later changes to the code and new messages sent:


DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
Message received on thread ActiveMQ Session Task:
{
  "foo" : "baz"
}


... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (TAP5-1287) Services do not reload even though they should

Posted by Robert Zeigler <ro...@scazdl.org>.
True, but if you ever find that a "ReloadAware" service needs to be aware of "startupOnReload" or some such, then you either have to craft a new interface (confusing, since this interface is "ReloadAware"...) or add the method to this interface (yuck: not backwards compatible, and services that need one or the other are forced to implement both).  I think the name of this interface could be better crafted.  Perhaps "UnloadAware" or some such? Then if we found the situation of a service needing to know what it was re-loaded, we could add a "LoadAware" or some such.

Just a thought.

Robert

On Oct 1, 2010, at 10/12:00 PM , Howard Lewis Ship wrote:

> I thought about that, but this is a situation rare enough that an
> annotation doesn't provide enough bang for the buck.
> 
> On Fri, Oct 1, 2010 at 11:39 AM, Thiago H. de Paula Figueiredo
> <th...@gmail.com> wrote:
>> On Fri, 01 Oct 2010 15:28:35 -0300, Howard M. Lewis Ship (JIRA)
>> <ji...@apache.org> wrote:
>> 
>>> I see this as an optional interface that could be implemented by a service
>>> implementation (or, for that matter, an non-service proxy object):
>>> 
>>> public interface ReloadAware
>>> {
>>>  void shutdownInstanceBeforeReload();
>>> }
>> 
>> What about an annotation in a no-args method instead?
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
>> instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>> 
>> 
> 
> 
> 
> -- 
> 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: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org


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


Re: [jira] Commented: (TAP5-1287) Services do not reload even though they should

Posted by Howard Lewis Ship <hl...@gmail.com>.
I thought about that, but this is a situation rare enough that an
annotation doesn't provide enough bang for the buck.

On Fri, Oct 1, 2010 at 11:39 AM, Thiago H. de Paula Figueiredo
<th...@gmail.com> wrote:
> On Fri, 01 Oct 2010 15:28:35 -0300, Howard M. Lewis Ship (JIRA)
> <ji...@apache.org> wrote:
>
>> I see this as an optional interface that could be implemented by a service
>> implementation (or, for that matter, an non-service proxy object):
>>
>> public interface ReloadAware
>> {
>>  void shutdownInstanceBeforeReload();
>> }
>
> What about an annotation in a no-args method instead?
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [jira] Commented: (TAP5-1287) Services do not reload even though they should

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 01 Oct 2010 15:28:35 -0300, Howard M. Lewis Ship (JIRA)  
<ji...@apache.org> wrote:

> I see this as an optional interface that could be implemented by a  
> service implementation (or, for that matter, an non-service proxy  
> object):
>
> public interface ReloadAware
> {
>   void shutdownInstanceBeforeReload();
> }

What about an annotation in a no-args method instead?

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


[jira] Commented: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916993#action_12916993 ] 

Howard M. Lewis Ship commented on TAP5-1287:
--------------------------------------------

Ah, the JMS is the critical issue.

What's happened is that the code change is observed by Tapestry and it discards the current service instance.

However, because of what this service does (it obtains a JMS QueueSession, then a Queue, then a MessageConsumer and then sets the consumer's message listener to an inner class instance.

That's the trick: the service has exposed its implementation to the outside world (the JMS code).  The JMS code directly invokes methods on the service implementation (or inner classes provided by the service implementation). Since nothing is going through the proxy, the new version of the code is not reloaded.

Tapestry is missing a callback that would allow the existing service implementation to cleanly shut down before being replaced.

I see this as an optional interface that could be implemented by a service implementation (or, for that matter, an non-service proxy object):

public interface ReloadAware
{
  void shutdownInstanceBeforeReload();
}

It might make sense to have a second method to alert the new instance that it as been reloaded, but I'm not sure when that would be used, so I'll leave it out for now.  Further, I've given
some thought to services that have some internal state (such as a list of event listener objects) that needs to persist between the old and new instances (i picture a Map being passed to the old instance and then the new instance); again, I'd rather play conservative and introduce a more complicated interface that supports those features only as necessary.


> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1287) Some services require a notification that they have been reloaded, so they can clean up external dependencies

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917062#action_12917062 ] 

Hudson commented on TAP5-1287:
------------------------------

Integrated in tapestry-5.2-freestyle #201 (See [https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/201/])
    TAP5-1287: Some services require a notification that they have been reloaded, so they can clean up external dependencies
TAP5-1287: Services do not reload even though they should


> Some services require a notification that they have been reloaded, so they can clean up external dependencies
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.2
>
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-1287:
------------------------------------------

    Assignee: Howard M. Lewis Ship

> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1287:
---------------------------------------


This could represent the difference between service reloading and proxy reloading; the objects in question were created via ObjectLocator.proxy().

> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1287) Some services require a notification that they have been reloaded, so they can clean up external dependencies

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1287:
---------------------------------------

    Summary: Some services require a notification that they have been reloaded, so they can clean up external dependencies  (was: Services do not reload even though they should)

> Some services require a notification that they have been reloaded, so they can clean up external dependencies
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1287) Some services require a notification that they have been reloaded, so they can clean up external dependencies

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917062#action_12917062 ] 

Hudson commented on TAP5-1287:
------------------------------

Integrated in tapestry-5.2-freestyle #201 (See [https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/201/])
    TAP5-1287: Some services require a notification that they have been reloaded, so they can clean up external dependencies
TAP5-1287: Services do not reload even though they should


> Some services require a notification that they have been reloaded, so they can clean up external dependencies
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.2
>
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-1287) Some services require a notification that they have been reloaded, so they can clean up external dependencies

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1287.
--------------------------------------

    Fix Version/s: 5.2.2
       Resolution: Fixed

> Some services require a notification that they have been reloaded, so they can clean up external dependencies
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.2
>
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-1287) Some services require a notification that they have been reloaded, so they can clean up external dependencies

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1287.
--------------------------------------

    Fix Version/s: 5.2.2
       Resolution: Fixed

> Some services require a notification that they have been reloaded, so they can clean up external dependencies
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.2
>
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1287:
---------------------------------------


Hm. We do have an existing test for this:

    @Test
    public void reload_a_proxy_object() throws Exception
    {
        createImplementationClass("initial proxy");

        Registry registry = createRegistry();

        Class<ReloadableService> clazz = (Class<ReloadableService>) classLoader.loadClass(CLASS);

        ReloadableService reloadable = registry.proxy(ReloadableService.class, clazz);

        assertEquals(reloadable.getStatus(), "initial proxy");

        touch(classFile);

        createImplementationClass("updated proxy");

        fireUpdateCheck(registry);

        assertEquals(reloadable.getStatus(), "updated proxy");
        
        touch(classFile);

        createImplementationClass("re-updated proxy");

        fireUpdateCheck(registry);

        assertEquals(reloadable.getStatus(), "re-updated proxy");
        
        registry.shutdown();
    }



> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1287:
---------------------------------------


Actually, reviewing where I was making code changes, it was a service (and not a proxy) that was not being reloaded. I think that is worse.

> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1287:
---------------------------------------


Hm. We do have an existing test for this:

    @Test
    public void reload_a_proxy_object() throws Exception
    {
        createImplementationClass("initial proxy");

        Registry registry = createRegistry();

        Class<ReloadableService> clazz = (Class<ReloadableService>) classLoader.loadClass(CLASS);

        ReloadableService reloadable = registry.proxy(ReloadableService.class, clazz);

        assertEquals(reloadable.getStatus(), "initial proxy");

        touch(classFile);

        createImplementationClass("updated proxy");

        fireUpdateCheck(registry);

        assertEquals(reloadable.getStatus(), "updated proxy");
        
        touch(classFile);

        createImplementationClass("re-updated proxy");

        fireUpdateCheck(registry);

        assertEquals(reloadable.getStatus(), "re-updated proxy");
        
        registry.shutdown();
    }



> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916993#action_12916993 ] 

Howard M. Lewis Ship commented on TAP5-1287:
--------------------------------------------

Ah, the JMS is the critical issue.

What's happened is that the code change is observed by Tapestry and it discards the current service instance.

However, because of what this service does (it obtains a JMS QueueSession, then a Queue, then a MessageConsumer and then sets the consumer's message listener to an inner class instance.

That's the trick: the service has exposed its implementation to the outside world (the JMS code).  The JMS code directly invokes methods on the service implementation (or inner classes provided by the service implementation). Since nothing is going through the proxy, the new version of the code is not reloaded.

Tapestry is missing a callback that would allow the existing service implementation to cleanly shut down before being replaced.

I see this as an optional interface that could be implemented by a service implementation (or, for that matter, an non-service proxy object):

public interface ReloadAware
{
  void shutdownInstanceBeforeReload();
}

It might make sense to have a second method to alert the new instance that it as been reloaded, but I'm not sure when that would be used, so I'll leave it out for now.  Further, I've given
some thought to services that have some internal state (such as a list of event listener objects) that needs to persist between the old and new instances (i picture a Map being passed to the old instance and then the new instance); again, I'd rather play conservative and introduce a more complicated interface that supports those features only as necessary.


> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-1287:
------------------------------------------

    Assignee: Howard M. Lewis Ship

> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1287:
---------------------------------------


Actually, reviewing where I was making code changes, it was a service (and not a proxy) that was not being reloaded. I think that is worse.

> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1287) Some services require a notification that they have been reloaded, so they can clean up external dependencies

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1287:
---------------------------------------

    Summary: Some services require a notification that they have been reloaded, so they can clean up external dependencies  (was: Services do not reload even though they should)

> Some services require a notification that they have been reloaded, so they can clean up external dependencies
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1287) Services do not reload even though they should

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-1287:
---------------------------------------


This could represent the difference between service reloading and proxy reloading; the objects in question were created via ObjectLocator.proxy().

> Services do not reload even though they should
> ----------------------------------------------
>
>                 Key: TAP5-1287
>                 URL: https://issues.apache.org/jira/browse/TAP5-1287
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.2.2
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Been working on an application that uses a lot of JMS.  I noticed that reloads did not appear to happen as expected.
> DEBUG MessageSinkSource - Invoking constructor public com.fivoosh.services.activemq.MessageSinkSourceImpl(org.slf4j.Logger,com.fivoosh.services.activemq.ActiveMQConnectionSource,org.apache.tapestry5.ioc.services.PerthreadManager,com.fivoosh.services.TimeService,java.util.Map).
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$1
> DEBUG MessageSinkSource - BEGIN Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MessageSinkSource -   END Analyzing com.fivoosh.services.activemq.MessageSinkSourceImpl$TextQueueSender
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:9:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> I then changed the code (it affects the logging message that starts "Processing message ....":
> DEBUG MasterMessageHandler - Implementation class com.fivoosh.services.activemq.MasterMessageHandlerImpl has changed and will be reloaded on next use.
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:10:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "bar"
> }
> Note that the message indicates the implementation class changed, but the old behavior is stuck.
> Later changes to the code and new messages sent:
> DEBUG MasterMessageHandler - Processing message 'ID:Howards-Mighty-Tool.local-56885-1285896586008-3:0:12:1:1' from queue 'echo'
> Message received on thread ActiveMQ Session Task:
> {
>   "foo" : "baz"
> }
> ... do not even register that a change occured.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.