Thank you. From what I see in this mail new implementation still allows for cleanup code after continuation has been created but does not allow for automatic resource fetching ( catch( continue ) ).Leszek Gawron wrote:
Reinhard Poetz wrote:
Thank you guys.
I'm going to replace the old implementation by the new one in trunk. In branch I will wait for the new release and rename the old language "javascript-2.1.6" which indicates that this is the former implementation. The new implementation will be called "javascript". This way most of our users will switch to the new implementation without noticing it. If they have problems they can either rewrite their catch() statements or change the language to "javascript-2.1.6".
Is there any replacement for catch() functionality in new implementation?
Igor explains the differences here: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=109528520325331&w=2
<quote> var pool = ...;
function someFunction() { var conn = pool.getConnection();
... catch (break) {
conn.close();
conn = null;
} catch (continue) {
conn = pool.getConnection();
}
}with the patch would like:
var pool = ...;
function someFunction() { var conn = null;
try {
if (conn == null) {
conn = pool.getConnection();
}
...
} finally {
conn.close();
conn = null;
}
}
</quote>so now you have to fetch the connection yourself each time the continuation is resumed right? Is there any chance for porting that feature into new implementation?
-- Leszek Gawron [EMAIL PROTECTED] Project Manager MobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
