Commit graph

2378 commits

Author SHA1 Message Date
hns
504e5dba18 * Fix string splitting regexp in splitLines(). 2007-03-15 16:08:59 +00:00
hns
814f1307db * Add check and debug message for invalid line index. 2007-03-09 11:32:41 +00:00
hns
6aba4c136f * Minor formatting fix. 2007-03-09 10:15:41 +00:00
hns
156e65909e * Implement switchProperties() to allow to switch db connections at runtime.
* Minor cleanup/simplification in getConnection().
2007-03-08 15:40:09 +00:00
hns
60c118cae9 * Pedal back from previous commit.
Fixes http://helma.org/bugs/show_bug.cgi?id=501
2007-02-25 15:44:33 +00:00
hns
6db9463c24 * Include tagsoup.jar in Helma classpath.
* Exclude apache-dom.jar and jimi.jar, the latter must be placed in
  lib/ext, the first is useless for using getHtmlDocument(), use xercesImpl.jar
  and xml-apis.jar from the Xerces2-java distribution instead.
2007-02-21 14:37:59 +00:00
hns
7fd724eca3 * Make sure RuntimeException can pass through in getHtmlDocument() so users
become aware of setup problems (missing xercesImpl.jar, xml-apis.jar).
2007-02-21 14:28:12 +00:00
hns
8a85d6d5cf * Drop hacked-together HtmlParser class, move to Tagsoup for HTML parsing.
* Move remaining HTML parsing code into XmlUtils.
* Clean up XmlUtils code.
2007-02-21 14:26:36 +00:00
hns
f4b281a639 * Add RhinoCore.isInitialized() to check whether we are up and running yet.
* Initialize prototypes on static constructor access also when prototype property
  is accessed, using RhinoCore.isInitialized() to check against premature compilation.
2007-02-21 13:00:07 +00:00
hns
cecd2af590 * Use sub-properties for getting DbSource settings and comparing DbSource instances.
Fixes http://helma.org/bugs/show_bug.cgi?id=500 and improves the code.
2007-02-21 10:45:24 +00:00
hns
43165e0bab * Backpedal on previous commit: Even fetch columns if the table is inherited, because the
column-property mapping may still be different. Fixes http://helma.org/bugs/show_bug.cgi?id=499
2007-02-21 09:34:22 +00:00
hns
350043980e * Update version from 1.6.x to 1.6.0. 2007-02-16 09:47:38 +00:00
hns
04a9ce2d3a * Support binary database column mapping, fix http://helma.org/bugs/show_bug.cgi?id=498
* Some code cleanup and minor rewrites.
2007-02-15 15:08:43 +00:00
hns
c0118398bb * Add cause exceptions to rethrown exceptions where they were missing.
* Remove stack dumps, this should be done by catching code.
2007-02-15 15:05:56 +00:00
hns
514ad900c5 * Optimize getDbColumns() for inheriting relational dbmappings.
* Avoid useless double assignment to column field
2007-02-15 14:13:53 +00:00
hns
3a263d9243 * Add getter for SessionManager, required by helmaswarm. 2007-02-14 14:55:26 +00:00
hns
2d25df3cbb * Always use shared scope for creating streams in serialize() and deserialize().
Fixes http://helma.org/bugs/show_bug.cgi?id=496
2007-02-12 13:15:09 +00:00
hns
fa5430a1d3 * Trim href after rendering it from skin in postProcessHref() to cut of space/newline chars. 2007-02-10 10:09:08 +00:00
hns
235d29fe26 * Use logger to log error instead of writing to System.out. 2007-02-09 13:45:29 +00:00
hns
7f6226ac17 * Implement Mail.get/setMultipartType() as proposed by Maksim Lin on helma-dev. 2007-02-09 13:42:53 +00:00
hns
d19b83008b * Implement equals() and hashCode() in order not to create new
database connections for each DbSource instance when a connection
  to the database is already registered.
2007-02-08 12:53:07 +00:00
hns
b80b83ffb3 * Rename "constructor" property in defineProperty() rathern than in put(),
since this is what Rhino uses to set the property at compile time.
2007-01-31 16:59:08 +00:00
hns
740091f4d8 * Compute isRelational() at runtime, since in some border cases
it must be available before we used to compute it  in update().
2007-01-31 14:43:15 +00:00
hns
a874998ffb * Increase default maxThreads value to 50 (evauators aren't that expensive anymore)
* Some minor code cleanup
2007-01-30 14:58:30 +00:00
hns
21838fe606 * Remove synchronization problems in request timeout handling
* Implement skin parameter handling via res.handlers.param
* Implement onResponse() callback
* Slim down renderSkin method implementation
* Implement res.buffer to access current page output
* Implement res.stop() to stop request execution
* Do not reuse per thread scope, create a new one for each request
2007-01-29 16:00:44 +00:00
hns
e6c287b35f * Use ThreadLocal.set(null) instead of ThreadLocal.remove(),
which wasn't available pre Java 5.
2006-12-20 23:00:28 +00:00
hns
20354228a2 * Do not use Context.setCompileFunctionsWithDynamicScope() as it is
seriously BROKEN for nested functions.
  The only workaround needed is a little fix in HopObject.put() to set the
  parent scope on functions because of the funky way we compile prototypes.
* Use one ContextFactory instance per RhinoCore to initialize, enter and exit
  contexts, and use various call() methods to actually use it in RhinoCore.evaluate()
  and RhinoEngine.invoke().
* Set parent scope in HopObject constructor.
* Use java.lang.ThreadLocal to implement engine/thread registration.
* Implement RhinoCore.getRhinoCore() and RhinoEngine.getRhinoEngine().
* Implement rhino.strictvars to throw errors on undeclared vars.
* Do not declare throws Exception in RhinoCore.processXmlRpc* methods.
* Clean up error logging.
2006-12-20 21:52:22 +00:00
hns
68756f4b3e * Clean up formatting. 2006-12-15 15:13:00 +00:00
hns
2ec32f146a * Null out scriptingEngine if initScriptingEngine() fails.
* Make sure we cause no uncaught exceptions in request evaluator loop,
  will cause helma to hang.
* Make initScriptingEngine() synchronized.
2006-12-15 15:10:34 +00:00
hns
6139814575 * Do not create new collections in recycle() - seems to have negative performance impact. 2006-12-12 15:31:30 +00:00
hns
414b22836b * Extract cache insertion code into new private registerNewNode() method.
* Delay onInit() invocation until after the node has been registered with the cache.
  Two advantages: first, we won't call onInit() on nodes that are bound to be
  thrown away because a clone already exists in the cache, and second no need
  to cache nodes in the transactor clean node map, which was troublesome in
  exactly the same case.
* Remove some old code that has been commented out for ages.
2006-12-12 14:54:52 +00:00
hns
d843138386 * Extract collection clearing in commit() and abort() into new recycle() method,
and throw away collections in order to avoid retaining too much memory.
2006-12-12 13:15:59 +00:00
hns
7e00def51c * No more need for per-thread-scope workaround, works out of the box with Rhino 1.6. 2006-12-11 09:55:23 +00:00
hns
b210d5cd11 * Previous solution didn't work with Rhino running in interpreter mode. Provide a
hook in RhinoException to make JS stack traces work with any optimization mode.
  See https://bugzilla.mozilla.org/show_bug.cgi?id=363058
2006-12-07 12:12:14 +00:00
hns
00c9d56922 * Use helma.scripting.ScriptingException to produce script-only stack traces.
* Therefore, do not unwrap ScriptingExceptions because they're actually useful.
* Remove helma.util.StackUtils again.
2006-12-07 09:40:26 +00:00
hns
572194d2bc * Simplify exception handling in invoke(), bugs in Rhino have been fixed. 2006-12-07 09:27:39 +00:00
hns
54ab7ca121 * Backport StackUtils class from Helma 2.
* Implement jsStackTrace option to generate pure JS stack traces in error dumps.
2006-12-06 16:28:12 +00:00
hns
bfdd643a99 * Make Property.compareTo() immune against float/integer confusion, which is quite common in rhino. 2006-12-01 13:21:23 +00:00
hns
aaa15f5670 * Register node with current transactor before calling onInit(), otherwise we
really prepare the ground for infinite recursion problems.
2006-11-30 21:50:46 +00:00
hns
8e71110ad4 * Avoid setting parent in setNode() if the property name isn't persistable. 2006-11-30 21:04:44 +00:00
hns
a38f504db3 * Make RowSet a public static class to allow its methods to be called by Rhino. 2006-11-24 10:28:15 +00:00
hns
0ca4922081 * Only reuse Java wrapper if it actually wraps the same object.
* Rename local variable in getNodeWrapper().
2006-11-23 14:51:25 +00:00
hns
f249f893c5 Merge from helma_1_5 branch:
* Do parent lookup for transient nodes in Node.getParent(), but omit warning message if it fails.
2006-11-23 13:49:41 +00:00
hns
f1bb105b54 * Remove unused import statement. 2006-11-22 16:13:28 +00:00
hns
b2bf03b033 * Fix bug where waiting thread isn't notified when requestengine is shut down. 2006-11-22 16:11:41 +00:00
hns
84e6a5f2f8 * Add ".prototype" to name of nexted functions. 2006-11-22 15:08:34 +00:00
hns
32f5f25b9e * Always immediately convert to absolute paths in ApplicationManager. 2006-11-20 23:06:44 +00:00
hns
0eae6629ee * Allow native host methods in scripted JavaObjects to be overridden in JavaScript, but
make sure we don't use any of the HopObject host methods.
2006-11-20 12:51:26 +00:00
hns
21117936ad * Make overloaded methods (href, renderskin, ...) overridable in JavaScript. 2006-11-20 10:58:34 +00:00
hns
d818de0d0a * Rewrite DocFunction to work with current Rhino 1.6 snapshot.
- TokenStream is no longer public, implement Parser.parseTokens()
  - Parse public nested methods in JS constructors
  - adapt to slightly changed sequence of returned tokens.
* Do not implement IPathElement in Server, Application and HelmaDoc classes.
  Implement the necessary methods in the manage application instead.
* Add DocResourceElement.getStartLine() method to get element's position
  within the containing resource
* Rename ScriptingEngine.getIntrospector() to getDoc() and declare DocApplication
  as return value.
2006-11-20 10:54:02 +00:00