• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can i use static DB connection and DAO methods?  RSS feed

 
Miri Yusifli
Ranch Hand
Posts: 42
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If my app is local app , can i use static DB connection and DAO methods . My app is mobie app and dont use internet , just one user will use it on every devices. Is to use static DAO methods true?
 
Knute Snortum
Sheriff
Posts: 3974
98
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's fine to have your DB connection be a singleton, not just static.  I've always written my DAOs as non-status classes. 
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!