java - How to inject a ConnectionFactory in a JAX-RS resource? -
my team in process of repackaging neo4j webadmin console make usable glassfish standard javaee web application. build on top of neo4j-jca-connector.
we have found way repackage various web resources , serve them our war. fight against various rest endpoints.
indeed, endpoints have neo4j database injected @context elements (see example restfulgraphdatabase constructor). can access neo4j database through jndi naming , @resource injection. but, don't want change line of code of rest resources, how can inject database in jax-rs resource ?
can in web.xml ?
do have write jax-rs application class ?
in order add custom @context parameters, must create @provider class (implementing injectable) each type wish inject. see this question details.
Comments
Post a Comment