You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2023/01/19 03:19:17 UTC
[tapestry-5] 03/03: TAP5-2744: last commit before introducing a classloader tree
This is an automated email from the ASF dual-hosted git repository.
thiagohp pushed a commit to branch better-page-invalidation
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
commit a81f5fefcfee72f15505d94b28c06ba0579b6b95
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Thu Jan 19 00:19:02 2023 -0300
TAP5-2744: last commit before introducing a classloader tree
---
.../services/ComponentInstantiatorSourceImpl.java | 25 ++++++++++------------
.../internal/services/RequestErrorFilter.java | 10 +--------
2 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
index bf6845db4..8d112cb13 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
@@ -170,7 +170,7 @@ public final class ComponentInstantiatorSourceImpl implements ComponentInstantia
@PostInjection
public void listenForUpdates(UpdateListenerHub hub)
{
- invalidationHub.addInvalidationCallback(this);
+// invalidationHub.addInvalidationCallback(this);
hub.addUpdateListener(this);
}
@@ -203,14 +203,14 @@ public final class ComponentInstantiatorSourceImpl implements ComponentInstantia
}
}
- final Iterator<Entry<String, ComponentModel>> classToModelIterator = classToModel.entrySet().iterator();
- while (classToModelIterator.hasNext())
- {
- if (classNames.contains(classToModelIterator.next().getKey()))
- {
- classToModelIterator.remove();
- }
- }
+// final Iterator<Entry<String, ComponentModel>> classToModelIterator = classToModel.entrySet().iterator();
+// while (classToModelIterator.hasNext())
+// {
+// if (classNames.contains(classToModelIterator.next().getKey()))
+// {
+// classToModelIterator.remove();
+// }
+// }
}
public void forceComponentInvalidation()
@@ -224,16 +224,13 @@ public final class ComponentInstantiatorSourceImpl implements ComponentInstantia
changeTracker.clear();
classToInstantiator.clear();
proxyFactory.clearCache();
-
- // Release the existing class pool, loader and so forth.
- // Create a new one.
-
- initializeService();
+// classToModel.clear();
}
/**
* Invoked at object creation, or when there are updates to class files (i.e., invalidation), to create a new set of
* Javassist class pools and loaders.
+ * Since TAP5-2742, this method is only called once.
*/
private void initializeService()
{
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestErrorFilter.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestErrorFilter.java
index d5c344512..30831509a 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestErrorFilter.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RequestErrorFilter.java
@@ -106,15 +106,7 @@ public class RequestErrorFilter implements RequestFilter
Throwable exceptionToReport = attachNewCause(ex, internalRequestGlobals.getClassLoaderException());
- try
- {
- exceptionHandler.handleRequestException(exceptionToReport);
- }
- catch (Exception e)
- {
- classesInvalidationHub.fireInvalidationEvent(Collections.emptyList());
- exceptionHandler.handleRequestException(exceptionToReport);
- }
+ exceptionHandler.handleRequestException(exceptionToReport);
// We assume a reponse has been sent and there's no need to handle the request
// further.