I would like to use the following technologies to develop restful webservice.
Apache wink+Guice3+openjpa. I dont know how to use guice with wink and openjpa. could you please explain.
I would like to use the following technologies to develop restful webservice.
Apache wink+Guice3+openjpa. I dont know how to use guice with wink and openjpa. could you please explain.
I can't help you with OpenJPA, but I just now figured out how to use
Guice
withWink
. First of all, you do not need to use Guice'sguice-servlet
JAR as you would with a plain webapp. Just set up your webapp to use Wink as you normally would, then follow these steps.wink-server
JAR with thewink-guice-server
JAR (available from the same source).Change the
servlet-class
in yourweb.xml
file fromto
Also in
web.xml
, add this snippet to Wink's<servlet-class>
element:Finally, create a new Wink
DeploymentConfiguration
class, which I call herecom.yourco.yourproj.DeploymentConfiguration
.YourModule
is just a normal Guice module.