• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connection Pooling Morphia Datasource  RSS feed

Joe Harry
Ranch Hand
Posts: 10128
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I understand from the mongoDB documentation on the Java Driver is that, the Mongo object is a connection pool in itself. But what about the Datasource object to which I pass the Mongo and Morphia instances as constructor parameters? The Datasource object here is analogous to the JPA EntityManager and in my previous experience working with JPA, I've never connection pooled an EntityManager. So my question is can I instantiate the Datasource as and when I like and leave it t be garbage collected when the Datasource object goes out of scope? or do I have to connection pool it?

Unfortunately, I haven't seen any relevant documentation on this from the Morphia website.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!