Custom security filter calling a scout service [message #1223485] |
Mon, 23 December 2013 14:31 |
Patrick Mackinlay Messages: 10 Registered: December 2013 |
Junior Member |
|
|
I'm using a data store which is not a traditional relational database, namely Neo4j, and I want to implement a security filter that will handle authenticating users against their username/password details stored in the Neo4j database.
At present, I have a Scout server only "persistence service" providing various data access methods around my Neo4j instance, and I'd like to keep it that way. It seems, however, that when I attempt to call my persistence service from the security filter, it fails to initialise?
Basically, when my client starts up, they're presented with the login box, the inputs from which are passed through to my security filter. In my filter, I have some code like this (which should essentially retrieve the user details from the persistence store):
IPersistenceService ps = SERVICES.getService(IPersistenceService.class);
Map<String, Object> user = ps.loadSimple("User", "Username", username);
Unfortunately, it's crashing with a null pointer exception on the reference to "ps" - clearly the request to get the service at this point in time is failing.
The delivered DataSourceSecurityFilter avoids the subject entirely by making its own connection to the data store, which isn't going to be so simple or desirable for me.
How can I ensure my persistence service is started up and running in time to be able to service the filter?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03246 seconds