You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've written my own custom PluginLifecycle (which implements that interface) where I want to get some default and custom properties from Neo4j server configuration.
One of them is:
org.neo4j.server.transaction.timeout
The Configuration Interface implementation in method
public Collection<Injectable<?>> start(GraphDatabaseService graphDatabaseService, Configuration config)
is returned as ConfigWrappingConfiguration.
When I try to do:
getProperty("org.neo4j.server.transaction.timeout")
or
getProperty(ServerSettings.transaction_timeout.name())
The result is: null. Moreover, config.getKeys() returns empty iterator...
By debugging/looking through the code it is obvious that it is then propagated to Config config (that is injected through the constructor, but I was not able to find out from where, since I was not able to track down where the ConfigWrappingConfiguration came from...).
So the issue starts in that method:
Map<String, Setting<?>> getRegisteredSettings()
It tries to get **Iterable<Class> settingsClasses** from **Config config**, which for me it returns **ArrayList**, which contains **2 EmptyList**s.
It should have came from Config config's method:
`
public Config registerSettingsClasses( Iterable> settingsClasses )
`
which is invoked as part of Config constructor, but Config constructor's settingsClasses variable is always EmptyList. So that's the problem...
More on that though:
If I use reflection (or just look into that Config config object in debugger), I can see (and access with reflection...) that there are params and settingsFunction variables, that both contain all of my predefined Properties, i.e.:
Note that the org.neo4j.server.transaction.timeout is not defaulting to 60s, but is changed to my own value, that I've set.
So the properties are there... But the settingsClasses bit is not working properly.
Lastly, I know that there is SPIPluginLifecycle, which exposes NeoServer, and I can easily get Config from it (I already had that implementation done). However, that would be the only thing that drags in whole neo4j-server dependency. Instead, I want to stick with the server-api.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
I've written my own custom PluginLifecycle (which implements that interface) where I want to get some default and custom properties from Neo4j server configuration.
One of them is:
The Configuration Interface implementation in method
is returned as ConfigWrappingConfiguration.
When I try to do:
The result is: null. Moreover, config.getKeys() returns empty iterator...
By debugging/looking through the code it is obvious that it is then propagated to Config config (that is injected through the constructor, but I was not able to find out from where, since I was not able to track down where the ConfigWrappingConfiguration came from...).
So the issue starts in that method:
It tries to get **Iterable<Class> settingsClasses** from **Config config**, which for me it returns **ArrayList**, which contains **2 EmptyList**s. It should have came from Config config's method: ` public Config registerSettingsClasses( Iterable> settingsClasses )
`
which is invoked as part of Config constructor, but Config constructor's settingsClasses variable is always EmptyList.
So that's the problem...
More on that though:
If I use reflection (or just look into that Config config object in debugger), I can see (and access with reflection...) that there are params and settingsFunction variables, that both contain all of my predefined Properties, i.e.:
Note that the org.neo4j.server.transaction.timeout is not defaulting to 60s, but is changed to my own value, that I've set.
So the properties are there... But the settingsClasses bit is not working properly.
Lastly, I know that there is SPIPluginLifecycle, which exposes NeoServer, and I can easily get Config from it (I already had that implementation done). However, that would be the only thing that drags in whole neo4j-server dependency. Instead, I want to stick with the server-api.
Thanks.
The text was updated successfully, but these errors were encountered: