On 24/01/15 11:01, Claude Warren wrote:
Background:
1. TDBGraph implements org.apache.jena.atlas.lib.Closable which defines
a close() method
2. Graph does not.
3. DatasetGraphMaker.close() calls close() on the defaultGraph.
The security system creates dynamic proxies.
When a TDBGraph is closed the method that is being attempted is
Closable.close() not Graph.close() (probably has to do with the order they
are defined in the TDBGraph class definition.
The security system sees that it is proxying a method with the same
signature (name and args). but when it attempts to execute the
Closable.close() method and fails since the proxy doesn't really proxy that
method it proxies Graph.close().
I can fix this in the proxy code by calling the Graph.close() rather than
the Closable.close() but I began to wonder if Graph (and other classes with
close() methods) shouldn't extend Closable?
Thoughts?
What actually happens?
GraphTDB.close() calls super.close()
super is GraphView
GraphView extends GraphBase
so that is Graph.close.
What are you encountering?
GraphTDB.close is both. It's a method name that satisfies
GraphBase.close and Closable.close
Andy
>>
>> The security system sees that it is proxying a method with the same
>> signature (name and args). but when it attempts to execute the
>> Closable.close() method and fails since the proxy doesn't really
proxy that
>> method it proxies Graph.close().
>>
>> I can fix this in the proxy code by calling the Graph.close() rather
than
>> the Closable.close() but I began to wonder if Graph (and other
classes with
>> close() methods) shouldn't extend Closable?
>>
>> Thoughts?
Have you tried removing Closable?
Graph already had close before datasets came along.
Andy