Search code examples
javajspjsfmongodbmorphia

How to add nosql ( mongodb ) support for jsf 2.0 project?


i am writing a web application with jsf 2.0 and using primefaces framework. i want to use mongodb as my database and "getting started" guide for mongodb is just explaining the basic java usage. I did make it work with "public static void main(String[] args)" but unfortunately not for my web application.

it would help a lot if u could help with one of these;

  • "the mongodb connection for jsf 2.0" in a pseudo code or
  • where should the connection be defined in the project? (xml,java)
  • will i need any other framework to make it work ? (looked little bit to morphia)

thanks in advance :)


Solution

  • I would suggest you to go with JSF 2.0 and Spring integration, and along with this use Spring Data MongoDB

    using the above two integrations, you would be seamlessly integrate mongodb in your web app.