David, actually you are doing 2 things here: 1. Register a plugin to the kernel that handles events 2. register a JAXRS extension for the neo4j server that will become a custom HTTP endpoint.
So, you should add the JAXRS resource annotations in order to get things going, see http://docs.neo4j.org/chunked/stable/server-unmanaged-extensions.html, and then check if even the kernel extension is registered. /peter G: neubauer.peter S: peter.neubauer P: +46 704 106975 L: http://www.linkedin.com/in/neubauer T: @peterneubauer Neo4j 2.0.0 - (graphs)-[:FOR]->(everyone) Kids LAN creative party in Malmö - Kidscraft ICE On Mon, Jan 20, 2014 at 11:25 PM, <[email protected]> wrote: > Hi, > > I'm trying to create an unmanaged extension which puts a message on a queue > when a node becomes interesting (e.g. a relationship of a new type is > created) > > I believe I can do this with a TransactionEventHandler so I have created a > class which extends KernelExtensionFactory which has a method > (newKernelExtension) which returns a LifeCycle. My LIfeCycleAdapter then > registers the TransactionEventHandler in the start method. In my class that > implements TransactionEventHandler i have afterCommit, which basically just > writes to a text file for the sake of testing. > > In conf/neo4j-server.properties I have put the following - > > org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.extensions.events=/db/events > > However the server doesnt start. in console.log I get this - > > 21:10:57.446 [main] WARN /db/events - unavailable > com.sun.jersey.api.container.ContainerException: The ResourceConfig instance > does not contain any root resource classes. > at > com.sun.jersey.server.impl.application.RootResourceUriRules.<init>(RootResourceUriRules.java:99) > ~[jersey-server-1.9.j > > Now, in my code I haven't declared any paths as I don't need a REST > interface to this, I just want it to start when the server starts and then > listen for transaction events and then do something with the transaction > data (e.g. write to a file or a messaging queue) > > So my question is - > > Do I need to declare a path? Does an unmanaged extension have to be a jaxrs? > > Cheers > > David > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
