OSGI, Servlets and JPA hello world / tutorial / example

Posted by Kamil on Stack Overflow See other posts from Stack Overflow or by Kamil
Published on 2012-04-07T09:42:27Z Indexed on 2012/04/08 5:28 UTC
Read the original article Hit count: 219

Filed under:
|
|
|
|

I want to build a web application which basically is a restful web-service serving json messages. I would like it to be as simple as possible. I was thinking about using servlets (with annotations). JPA as a database layer is a must - Toplink or Hibernate. Preferably working on Tomcat. I want to have app divided into modules serving different functionality (auth service, customer service, etc..). And I would like to be able to update those modules without reinstalling whole application on the server - like eclipse plugins, user is notified (when he enters webapp's home url) that update is available, clicks it, and app is downloading and installing updated module.

I think this functionality can be made with OSGI, but I can't find any example code, or tutorial with simple hello world updatable servlet providing some data from database through jpa.

I'm looking for an advice: - Is OSGI the right tool for this or it can be done with something simpler? - Where can I find some examples covering topic (or topics) which I need for this project. - Which OSGI implementation would be best-simplest for this task.

*My knowledge of OSGI is basic. I know how bundles are described, I understand concept of OSGI container and what it does. I have never created any OSGI app yet.

© Stack Overflow or respective owner

Related posts about java

Related posts about web-services