Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Direct JDBC Connection Vs DataSource Connection  RSS feed

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference when
1.a web application uses a direct JDBC connection to interact with the RDBMS.
2.a web applciation uses a datasource functionality provided by the application server to interact with the RDBMS.

Please let me know the advantages and the disadvantages.

Regards,
Prabhu
 
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the first approach, you have to manually manage transactions, database connection pooling and stuff but with the latter, you get that from the container.
 
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jothi Shankar Kumar wrote:With the first approach, you have to manually manage transactions, database connection pooling and stuff but with the latter, you get that from the container.



either direct jdbc connection(type1) nor datasource support implicit transaction, thats is your own logic.

and read this why ConnectionPooling is prefer over JDBC connection
 
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is not about SCWCD. It should be moved to different place.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!