DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Threat Detection: Learn core practices for managing security risks and vulnerabilities in your organization — don't regret those threats!

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Avatar

Priya Aggarwal

Software Engineer at Expedia Inc.

Delhi, IN

Joined May 2012

Stats

Reputation: 101
Pageviews: 62.5K
Articles: 2
Comments: 2
  • Articles
  • Comments

Articles

article thumbnail
Using Multiple JDBC Drivers in an Application
Read this article in order to view a tutorial on how to use multiple JDBC drivers for running queries, stored procedures, etc.
June 5, 2018
· 16,797 Views · 10 Likes
article thumbnail
The Hidden Synchronized Keyword With a Static Block
This lesson in concurrent programming will explore static blocks, synchronization, and how to avoid deadlocks within your Java programs.
June 5, 2018
· 45,718 Views · 7 Likes

Comments

Using Multiple JDBC Drivers in an Application

Aug 05, 2018 · Priya Aggarwal

Using component changes order of bean initialization. The classes marked with @Component, @Service, @Repository are initialized before bean definitions declared using @bean.

In this case, the class having dependency on connections using multiple drivers was made a @component , because of this the issue surfaced.

Before this change (when it was a @Bean), the initialization was based on definition order of @Bean method in java file and by that time database driver classes were already initialized because of other beans.

Using Multiple JDBC Drivers in an Application

Jul 27, 2018 · Priya Aggarwal

Conclusion is that you should not try to create connections using multiple JDBC drivers concurrently until Java fixes DriverManager class to not use Service Locator in its static initializer

User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: