Re: [Smartfrog.org-JIRA] Created: (SFOS-23) LAZY vector evaluation is broken
"Goldsack, Patrick" <[email protected]> Tue, 17 Oct 2006 20:34:53 +0100
| Newsgroups | gmane.comp.java.smartfrog.devel |
|---|---|
| Message-ID | <[email protected]> |
Interesting issue. There are two possible interpretations of what the
correct behaviour is here, both of which have the current result as a
bug but with different results after the fix...
(1) all non-lazy attributes are resolved.
(2) no attribute is resolved if one is LAZY.
Functions used to do (1) and I have fixed it to do it this way again
(and will check into subversion as soon as it lets me).
Assertions do (2) as I had already handled the issue in this case and
chose this option for good reasons.
Now I don't really like functions and assertions doing different things,
but which is correct? There are advantages both ways. I presume that
your example will break if I do (2) for functions as you seem not to
have the static link references resolvable dynamically, so I will
probably do (1) in both cases.
The compromise might be to add an additional possible sfAssertionPhase
attribute value - dynamicUnresolved - that will cause none of the
attributes to be resolved in the dynamic version of the assertion. I
have been thinking of adding the same notion of phase in a function -
sfFunctionPhase - that has the same basic semantics as the
sfAssertionPhase.
I won't set this bug to resolved until I have decided and fixed how to
handle the assertion case.
Patrick
-----Original Message-----
From: smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
Steve Loughran (JIRA)
Sent: 17 October 2006 18:54
To: smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Smartfrog-developer] [Smartfrog.org-JIRA] Created: (SFOS-23)
LAZY vector evaluation is broken
LAZY vector evaluation is broken
--------------------------------
Key: SFOS-23
URL: http://jira.smartfrog.org/jira/browse/SFOS-23
Project: SmartFrog
Issue Type: Bug
Components: .sfCore
Affects Versions: 3.10.x
Environment: Linux, Java1.5
Reporter: Steve Loughran
Assigned To: Julio Guijarro
Priority: Critical
take a component with a lazy entry:
DeployApiEndpoint extends AlpineEndpoint {
pivotHandler TBD;
handlers [
StatsHandler:classname,
LogCurrentMessageHandler:classname,
AddressHandler:classname,
MustUnderstandChecker:classname,
LAZY pivotHandler:classname,
LogCurrentMessageHandler:classname
];
This used to work, but now it has stopped; I get an unresolved reference
LogCurrentMessageHandler:classname;
A dump of the component state during resolution shows this
LAZY APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.Vector";
unique4951
"org.smartfrog.services.deployapi.transport.endpoints.alpine.StatsHandle
r";
unique4952
"org.smartfrog.projects.alpine.handlers.LogCurrentMessageHandler";
unique4953 "org.smartfrog.projects.alpine.handlers.AddressHandler";
unique4954
"org.smartfrog.projects.alpine.handlers.MustUnderstandChecker";
unique4955 LAZY pivotHandler:classname;
unique4956 LogCurrentMessageHandler:classname;
}
If you take away the LAZY element in the list, all works. Somehow, the
moment one lazy ref is hit, all following references are deferred, even
when they should not be. If you add more references, all of them stay
unresolved.
LAZY APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.Vector";
unique4951
"org.smartfrog.services.deployapi.transport.endpoints.alpine.StatsHandle
r";
unique4952
"org.smartfrog.projects.alpine.handlers.LogCurrentMessageHandler";
unique4953 "org.smartfrog.projects.alpine.handlers.AddressHandler";
unique4954
"org.smartfrog.projects.alpine.handlers.MustUnderstandChecker";
unique4955 LAZY pivotHandler:classname;
unique4956 LogCurrentMessageHandler:classname;
unique4957 MustUnderstandChecker:classname; }
There is no workaround other than "dont have any non lazy elements in
the list after the first LAZY element"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.smartfrog.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
------------------------------------------------------------------------
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Smartfrog-developer mailing list
Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/smartfrog-developer
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642