Basically I have to query an external database to my Java application, I am just given the queries to run, of which there are only a handful of basic selects e.g. Select x,y,z from Table. No Updates/Deletes etc and I cannot create a connection pool to the database, I have to instantiate a new connection with each query as its multi-threaded. My question is can I do this with a DAO pattern, if so can you advise how to implement it with regards to connection and service layers. If DAO pattern is not advisable, what is a good approach?
Aucun commentaire:
Enregistrer un commentaire