Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to give in the context .xml for a MongoDb?..

 
Sandy Marar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using MongoDB as a backend for a web project in java.I am planning to use an ORM called Morphia.So where I am stuck is the connection class.I am really blank on how to give the datasource inside the context.xml.Any help would be appreciated!.....
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sandy I have moved your thread, to our ORM boards, where the object relation mapping experts hang out.
 
Sandy Marar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Buddy!...Didnt really knew that there was an ORM section in the forum!..
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What place (with code) you are stuck at? And which data source you are talking about here?
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you referring to the applicationContext.xml? If you are using the BasicDAO from Morphia, you should extend it using your DAO implementation. Then you configure your extended DAO in your appContext.xml the normal way you would any normal Spring bean. If you are referring to the Connection object from Mongo, be sure that the Mongo connection you get is already connection pooled. Have a look here:

http://www.mongodb.org/display/DOCS/Java+Driver+Concurrency
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic