Commit graph

2442 commits

Author SHA1 Message Date
Robert Gaggl
390231e8dd updated to jetty 9.4.3.v20170317 2017-03-27 14:17:46 +02:00
Robert Gaggl
b0ff574e95 updated rhino to 1.7.7.1 and jdk8 2016-12-05 13:47:42 +01:00
Simon Oberhammer
dd8f8b6caa bump version 2014-03-12 09:56:29 +01:00
Robert Gaggl
61bafb72d6 partly reverted 5f18e3ae2d:
switched back to using DbSources as Map keys, as using strings breaks switching databases
using DbSource.switchProperties (which is used in jala.Test)
2013-04-09 16:05:07 +02:00
Robert Gaggl
5f18e3ae2d Modified Transactor to store sqlConnections internally using the name of the DbSource
as Map key, not the DbSource instance. Using the instance as key is both inefficient and
error prone (see fd0b77bc11).

Additional changes:
- modified getConnection() to check if the DB is oracle. "SELECT 1" is invalid
for Oracle DBs and lead to Helma dropping in-use connections every minute.
- set DbSource name final
2013-04-09 12:52:06 +02:00
Robert Gaggl
8d9bc3afb1 Next attempt to fix the deadlock issue that lead to fd0b77bc11:
The source of the deadlock problem seems that during DbSource.getConnection() ResourceProperties instances are compared using their equals() method, which is synchronized in Hashtable and can/does lead to deadlocks (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6582568).

This commit overwrites equals with an unsynchronized version. Note that this implementation might return a wrong result if one of the two instances is modified during this method call, but at least doesn't throw a ConcurrentModificationException.
2013-04-08 17:30:31 +02:00
Simon Oberhammer
826987d3a2 new interface method ObjectCache.getStatistics
the statistics of a cache instance for an application can be retrieved
by calling `app.__app__.getCacheStatistics()`. That's not very useful for the 
default `ObjectCache` but essential for looking into what more complex cache
impls like `SwarmCache` do

we could remove all the other cache statistics methods like `getCacheUsage` 
and output that info in the map returned by `getCacheStatistics()`

i had to bump java to 1.5 for the generics.. if that's a problem we can
remove the generics
2013-04-04 11:24:56 +02:00
Robert Gaggl
fd0b77bc11 synchronized various methods to avoid deadlock
one of our apps was stuck in a deadlock in ResourceProperties.size(),
see excerpt of the stack trace below. this fix synchronizes various overriding
methods since they are synchronized in Hashtable as well.

removed superfluous toString method too.

```
"app-230":
        at java.util.Hashtable.size(Hashtable.java:206)
        - waiting to lock <0xa13f8548> (a helma.util.ResourceProperties)
        at helma.util.ResourceProperties.size(ResourceProperties.java:529)
        at java.util.Hashtable.equals(Hashtable.java:742)
        - locked <0xa1065708> (a helma.util.ResourceProperties)
        at helma.objectmodel.db.DbSource.equals(DbSource.java:292)
        ...
"app-439":
        at java.util.Hashtable.size(Hashtable.java:206)
        - waiting to lock <0xa1065708> (a helma.util.ResourceProperties)
        at helma.util.ResourceProperties.size(ResourceProperties.java:529)
        at java.util.Hashtable.equals(Hashtable.java:742)
        - locked <0xa13f8548> (a helma.util.ResourceProperties)
        at helma.objectmodel.db.DbSource.equals(DbSource.java:292)
        ...
```
2013-03-06 10:09:50 +01:00
f808a7b7f7 Fixed bug in decodeHttpAuth() causing colons in a password (and everything afterwards) to be swallowed. Note: RFC 2617 explicitely allows colons in passwords, just not in usernames. 2012-11-29 09:39:24 +01:00
Simon Oberhammer
425350c39a case-sensitivity-switch implemented by kmfdm 2012-03-14 10:19:23 +01:00
hns
6bd0a80a02 Do not use child collection timestamp as cache guard for object references.
Proper fix for bug 697 <http://dev.helma.org/bugs/show_bug.cgi?id=697>
2010-01-26 16:18:58 +00:00
hns
ea87601291 More null pointer guards. 2010-01-26 15:52:48 +00:00
hns
842d4fd92b Avoid NullPointerException in getLastSubnodeChange().
Preliminary fix for bug 697 <http://dev.helma.org/bugs/show_bug.cgi?id=697>
2010-01-26 15:49:41 +00:00
hns
12a87c17ff Undo last two commits. The change had some side effects, leave db connection handling as is. 2009-12-17 10:55:26 +00:00
hns
dece309fce Add check for closed connections in DbConnection.isValid() 2009-11-30 14:47:56 +00:00
hns
0227e1bce6 Refactor db connection pooling: Use connection names instead of connection properties as has keys, introduce new DbConnection wrapper class and a serial-id flag in DbSource to validate connections. 2009-11-30 10:58:34 +00:00
hns
9ddc2a6f83 Don't try to generate error page if the response has already been committed. 2009-11-26 10:24:15 +00:00
hns
3cd206effc Make symbolic keys case sensitive, following the general change between from 1.6 to 1.7. 2009-11-25 13:25:11 +00:00
hns
291e00bc6c Code cleanup 2009-11-25 13:22:07 +00:00
hns
36c1557c99 Make sure event-log logging level is set according to debug property.
Fixes bug 696 http://dev.helma.org/bugs/show_bug.cgi?id=696
2009-11-25 10:55:51 +00:00
hns
16ead75851 Revert back to using TransientNode as HopObject cache node and as placeholder for invalidated/deleted nodes. Some cleanup and modifier tweaking in HopObject. 2009-11-25 09:33:28 +00:00
hns
62db24a43c Remove transient modifiers from Node.java 2009-11-24 15:06:07 +00:00
hns
e14f335253 Revert to old style, unsegmented collection loading as default and only do segmented loading when collection.loadmode = lazy is set. 2009-11-24 10:34:50 +00:00
hns
3250ba7c00 Undo commit 9990 - not calling loadNodes() in addNode() breaks two unit tests involving grouped collections. 2009-11-24 10:25:31 +00:00
hns
9323574f0f Do not load subnodes in addNode(). The subnode list is created a few lines later anyway, and using a faux list shouldn't affect relational collections. 2009-11-18 14:21:00 +00:00
lehni
17047f9cfc Fix IllegalStateException when saving as GIF, see bug 683. 2009-11-16 13:47:46 +00:00
hns
807cd5c80d Patch from Jürg Lehni to add timeout argument to global getURL() function.
Fixes bug #692 - http://dev.helma.org/bugs/show_bug.cgi?id=692
2009-11-10 08:47:01 +00:00
hns
784e374f78 Better fix for bug #684: Retrieve ScriptingEngine if necessary in Application.getDataRoot(), and make sure root objects set via Application.setDataRoot() are actually used. 2009-11-05 10:15:53 +00:00
hns
989ce36da0 Another NPE fix for bug #689
http://dev.helma.org/bugs/show_bug.cgi?id=689
2009-11-05 08:11:53 +00:00
hns
9b7af555df Readd zero argument Application.getDataRoot() 2009-11-05 08:03:29 +00:00
hns
0a9d8ff99b Add skin introspection patch from Tobi Schäfer for bug #688
http://dev.helma.org/bugs/show_bug.cgi?id=688
2009-11-04 11:31:10 +00:00
hns
8c219d75a3 Don't try to prefetch childnodes on transient nodes. Fixes bug #689
http://dev.helma.org/bugs/show_bug.cgi?id=689
2009-11-04 11:01:58 +00:00
hns
daf3b0b292 Create subnode list if it doesn't exist in Node.getLastSubnodeChange(). Fixes bug #679
http://dev.helma.org/bugs/show_bug.cgi?id=679
2009-11-04 10:56:15 +00:00
hns
f2904d1f29 Replace &apos; with &#39; in encodeXml(), and remove some empty lines. 2009-10-05 16:38:51 +00:00
hns
5d130c9ecb Minor profiler and logging tweaks 2009-09-29 13:51:26 +00:00
hns
bd1e9dcc25 Add rhino.profile.session property to limit profiling to certain user sessions. If set, the indexOf method of the current session id is called with the property as argument, and the profiler is disabled unless the result is 0.
To only profile sessions from localhost (but beware of local proxies!):

    rhino.profile = true
    rhino.profile.session = 127.0.0.1

To only profile a particular user session:

    rhino.profile = true
    rhino.profile.session = 127.0.0.1n5guagu2sdl2jslf

Note that for the profiler to work you need to start helma with rhino.profile = true since Helma 1 doesn't support mixed compiled/interpreted mode like Helma NG.
2009-09-28 13:54:14 +00:00
hns
6af9357ba1 Improve formatting of compiler output 2009-09-28 13:07:59 +00:00
hns
3cef3759a8 Some obvious profiler fixes 2009-09-28 12:55:24 +00:00
hns
7483b7a8ad Fix some markdown bugs. 2009-09-28 12:21:16 +00:00
hns
0dc5aed374 Backport JS profiler from Helma NG. Use rhino.profile = true to activate. 2009-09-27 18:59:38 +00:00
lehni
410226aa36 Cleaned up imports and removed unused variables. 2009-09-25 10:57:50 +00:00
hns
dc902a967e Replace GPLed Diff with BSD licensed java-diff from incava.org. The class is patched to provide the same interface as the old class, both for backwards compatibility and because it is slightly easier to work with. 2009-09-22 17:23:16 +00:00
hns
0f82126115 Patch for bug 677 – Dynamic relations broken after update to trunk 2009-09-21 21:03:27 +00:00
hns
dc4cc8f3e1 Minus debugging output 2009-09-21 12:49:14 +00:00
hns
219a5df9ff Sanitize emphasis 2009-09-21 12:47:51 +00:00
hns
fc689d9a12 Make sure Jetty contexts are properly mapped each time an application is bound or unbound. Remove code for dead responseEncoding property. 2009-09-20 19:43:05 +00:00
hns
b65a8d5c6d Add second optional queryParams argument to HopObject.href(). If this is a JavaScript object, its properties will be encoded to a query string and added to the generated URL. 2009-09-20 07:33:46 +00:00
hns
ec3f04cab3 Rename __fullname__ internal HopObject property to __path__, fill in/trim some comments. 2009-09-18 20:40:36 +00:00
hns
85586a0d0f Some cleanup in getGroupbySubnode() methods, mostly renaming local vars and some added comments 2009-09-18 19:58:10 +00:00
hns
19f8084873 Collateral code cleanup: add some comments, remove superfluous parentheses 2009-09-18 19:36:42 +00:00