You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2010/07/07 20:27:32 UTC
svn commit: r961455 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
Author: hlship
Date: Wed Jul 7 18:27:31 2010
New Revision: 961455
URL: http://svn.apache.org/viewvc?rev=961455&view=rev
Log:
TAP5-1197: Adjust for shared page instances, requiring some synchronization on the lazy initialization of ParameterConduit inside the BoundParameterFieldValueConduit
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java?rev=961455&r1=961454&r2=961455&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java Wed Jul 7 18:27:31 2010
@@ -50,6 +50,7 @@ public class BindParameterWorker impleme
private final Class fieldType;
+ // Guarded by this
private ParameterConduit conduit;
private BoundParameterFieldValueConduit(String containerParameterName,
@@ -67,12 +68,11 @@ public class BindParameterWorker impleme
* methods invoked
* from the page loaded lifecycle method?
*/
- private ParameterConduit getParameterConduit()
+ private synchronized ParameterConduit getParameterConduit()
{
if (conduit == null)
{
conduit = containerResources.getParameterConduit(containerParameterName);
-
}
return conduit;
@@ -135,9 +135,10 @@ public class BindParameterWorker impleme
}
catch (Exception ex)
{
- throw new TapestryException(String.format("Failure binding parameter field '%s' of mixin %s (type %s): %s",
- fieldName, resources.getCompleteId(),
- resources.getComponentModel().getComponentClassName(), InternalUtils.toMessage(ex)), ex);
+ throw new TapestryException(String.format(
+ "Failure binding parameter field '%s' of mixin %s (type %s): %s", fieldName, resources
+ .getCompleteId(), resources.getComponentModel().getComponentClassName(),
+ InternalUtils.toMessage(ex)), ex);
}
}
Re: svn commit: r961455 - /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
Posted by Howard Lewis Ship <hl...@gmail.com>.
Damn it! I screwed up with Git and released some of the TAP5-1197
code early. Looks like we're a bit committed now ... though we should
be able to unravel this later if it turns out to be a bad idea.
On Wed, Jul 7, 2010 at 11:27 AM, <hl...@apache.org> wrote:
> Author: hlship
> Date: Wed Jul 7 18:27:31 2010
> New Revision: 961455
>
> URL: http://svn.apache.org/viewvc?rev=961455&view=rev
> Log:
> TAP5-1197: Adjust for shared page instances, requiring some synchronization on the lazy initialization of ParameterConduit inside the BoundParameterFieldValueConduit
>
> Modified:
> tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
>
> Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java
> URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java?rev=961455&r1=961454&r2=961455&view=diff
> ==============================================================================
> --- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java (original)
> +++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BindParameterWorker.java Wed Jul 7 18:27:31 2010
> @@ -50,6 +50,7 @@ public class BindParameterWorker impleme
>
> private final Class fieldType;
>
> + // Guarded by this
> private ParameterConduit conduit;
>
> private BoundParameterFieldValueConduit(String containerParameterName,
> @@ -67,12 +68,11 @@ public class BindParameterWorker impleme
> * methods invoked
> * from the page loaded lifecycle method?
> */
> - private ParameterConduit getParameterConduit()
> + private synchronized ParameterConduit getParameterConduit()
> {
> if (conduit == null)
> {
> conduit = containerResources.getParameterConduit(containerParameterName);
> -
> }
>
> return conduit;
> @@ -135,9 +135,10 @@ public class BindParameterWorker impleme
> }
> catch (Exception ex)
> {
> - throw new TapestryException(String.format("Failure binding parameter field '%s' of mixin %s (type %s): %s",
> - fieldName, resources.getCompleteId(),
> - resources.getComponentModel().getComponentClassName(), InternalUtils.toMessage(ex)), ex);
> + throw new TapestryException(String.format(
> + "Failure binding parameter field '%s' of mixin %s (type %s): %s", fieldName, resources
> + .getCompleteId(), resources.getComponentModel().getComponentClassName(),
> + InternalUtils.toMessage(ex)), ex);
> }
> }
>
>
>
>
--
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