Dear David and Kane Lo, thanks for your feedback. Let me respond to your points separately.
1. David, your point about Interpreter.ParsedScript is what I was trying to get at when I asked about the "philosophy" of your BeanShell stuff. If it was you who implemented ParsedScript that makes a lot of sense, as I could not understand how someone (AKA Pat) who had already got this implememented in 1.0, would then go to the trouble of taking it out in a later version. As far as I can see, then, your design objectives for "Bsh in OFBiz", were: a. Allow caching of parsed scripts, against script name, for performance reasons b. Even when executing a parsed script, remember line and position information to assist with error-reporting when a script cannot be evaluated. If this is correct, then based on Pat's explanation here: http://beanshell.org/manual/parser.html#Parsing_and_Performance ...our only option for 2.0b4 would be to reimplement ParsedScript behaviour on top of the "SimpleNode" AST abstraction. It may be, David, that this is exactly how you implemented ParsedScript already, but I could not find the source for your altered version. Could you point me to it so I can have a look? 2. Kane Lo, I was not able to ascertain the version of JPublish used by OFBiz (from the MANIFEST.MF), but in any case after checking the JPublish project site, which appears to have been fairly inactive for the last 2 years, you are right, the latest available version of JPublish supports only up to bsh 1.3 (which appears to be the version upon which OFBiz' customized bsh is based). 3. In the long term, given that Bsh 2.0b4 was adopted as the basis for JSR-274 , and that OFBiz sooner or later will move to JDK1.5, I suggest politely that we'll have to deal with this issue at some point or other. Perhaps resubmitting David's ParsedScript contributions to the JSR-274 spec process? In the meantime, to solve my immediate problem a less turbulent approach might be to allow my OFBiz module (or even the webapp within it) to load its bsh from a different classloader. Is there a way to specify this via ofbiz-component.xml? cameron ----- Original Message ---- From: David E Jones <[EMAIL PROTECTED]> To: [email protected] Sent: Wednesday, 6 December, 2006 4:56:28 AM Subject: Re: Upgrading bsh.jar I'm fine with upgrading bsh, but there's a bit more to it than you describe here. One of the other major bsh using classes in OFBiz is OfbizBshBsfEngine. It uses the Interpreter.ParsedScript which I implemented in order to support caching parsed scripts in the OFBiz central cache. If something like that is implemented in BSH now it would be fine, but I don't think that's the case because when I sent this over to contribute it back I don't think Pat understood what we were trying to do using BSH in OFBiz so he just responded that the current facilities for doing this is all that we would need (ie using a single interpreter and wrapping all scripts in methods... that just won't work for us). -David On Dec 5, 2006, at 5:09 PM, Cameron Smith wrote: > Related to the current discussion about JDK1.5 compatibility and > JAR upgrades, I'd like to raise the possibility of upgrading bsh to > the current "stable" version, 2.0b4. This version is compatible > with JDK1.5, and I have used it without hitches on another project > for over a year, without problems. > > I would specifically like to upgrade to it, to support the ZK rich > client library (www.potix.com), which requires it. > > The main problem with the upgrade is that the API for parsing and > holding onto scripts has changed substantially, which will require > quite a few changes in BshUtil and associated classes. I'd be > happy to do/help with the rewrite but I would first like to know: > a. What are other opinions about this upgrade? > b. Is there any documentation about the philosophy of BshUtil? > c. Are there any regression tests for BshUtil, given that bsh is > used pretty extensively throughout OFBiz? > > cameron > > > > > > Send instant messages to your online friends http:// > uk.messenger.yahoo.com ___________________________________________________________ Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
