Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MongoDB and Java

 
Sujoy Choudhury
Ranch Hand
Posts: 136
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kyle,

Being a Java developer, I would like to know that only by having mongoDB driver jar file, would I be able to use mongoDB.
Or is there anything else I have to do?

I presume that drivers are available for mongoDB.

Right?
 
Askar Akhmerov
Greenhorn
Posts: 20
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sujoy,

drivers are certanly out there
you can use following maven dependency:




I would also recomend investigating Spring-MongoDB integration. The thing actually offers some amazing features as annotated queries and auto generation of repositories code with simple CRUD operations implemented for collections.
 
Peter Smorada
Greenhorn
Posts: 12
Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'd like to ask what is that experince using MongoDB with Hibernate or if it is possile.
 
Askar Akhmerov
Greenhorn
Posts: 20
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,

as far as I know, hibernate as well as JPA notation are not adopted to support MongoDB and NoSQL databases.
Spring-Mongo is trying to wrap JPA around it's own datasources implementation, but I havent tryed it.

There is a lot of things why this would work badly even theoretically.
 
Peter Smorada
Greenhorn
Posts: 12
Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Askar,

Your answer has made to to look more into NoSQL databases... So I hope that with developement of UnQL some big frameworks will show up soon.
 
Andrew Moko
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Askar Akhmerov wrote:Hi Peter,

as far as I know, hibernate as well as JPA notation are not adopted to support MongoDB and NoSQL databases.
Spring-Mongo is trying to wrap JPA around it's own datasources implementation, but I havent tryed it.

There is a lot of things why this would work badly even theoretically.


Hibernate OGM???
 
Askar Akhmerov
Greenhorn
Posts: 20
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wops,

Hibernate OGM haven't heard about that. Thanks for the knowlege.

Have you tried it? Just wandering if they are trying to apply transactions management to NoSQL ;)

UPD. The guys clearly state that framework is mainly aimed to support Hibernate's Infinispan db[General Architecture section]. Which is probably most suitable data layer representation to use with the framework.
 
Sujoy Choudhury
Ranch Hand
Posts: 136
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone for your valuable inputs.
 
Andrew Moko
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Askar Akhmerov wrote:Wops,

Hibernate OGM haven't heard about that. Thanks for the knowlege.

Have you tried it? Just wandering if they are trying to apply transactions management to NoSQL ;)

UPD. The guys clearly state that framework is mainly aimed to support Hibernate's Infinispan db[General Architecture section]. Which is probably most suitable data layer representation to use with the framework.


My guess is that it comes with all hibernate features - Security, Transaction Management etc etc. And Yes, as per the documentation they are using Infinispan as the persistence store. Can't the store be totally decoupled from the api JUST SO it's possible to plug a SQL/ NoSQL to it without having to rely on infinispan? And the persistence store NEEDS to follow a well-defined specification?? My two cents
 
Kyle Banker
author
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sujoy,

For what it's worth, most Java developers I know use Morphia:
http://code.google.com/p/morphia/

Regards,
Kyle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic