Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7965183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:04:39+00:00 2026-06-04T06:04:39+00:00

Why DataSource interface does not define the Standard Data Source Properties specified by the

  • 0

Why DataSource interface does not define the Standard Data Source Properties specified by the JDBC – DataSource?

With a reference dsof the DataSource type I cannot set the following properties like this:

public DbUtil(DataSource ds, String dbName, String port){
  ds.setServerName(dbName);
  ds.setPortNumber(port); 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:04:41+00:00Added an answer on June 4, 2026 at 6:04 am

    Because you’re not supposed to pass in those values unlike plain old DriverManager. A DataSource is normally configured on the container and only looked-up using JNDI.

    If you again start passing in these values, it defeats the whole point of having configurable DataSources.

    Here is a quote from the API.

    The DataSource interface is implemented by a driver vendor.

    A DataSource object has properties that can be modified when
    necessary. For example, if the data source is moved to a different
    server, the property for the server can be changed. The benefit is
    that because the data source’s properties can be changed, any code
    accessing that data source does not need to be changed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how to differentiate datasource properties in project structure for DIT UAT SIT and prod
I'm building an application with several Connector classes that interface with varied data silos.
Suppose an example. I have following interface: public interface DataSource<T> { Future<T> fetch(); }
We've got a large system that's loosely bound to its data source (Navision) via
All Types implement IEnumerable interface could be used for a DataSource of a DataList.
I wanted to bind a dictionary to a datagridview. Unfortunately Dictionary does not implement
I have my own object class which I use as the data source for
I have a datagridview and am populating its datasource property through the following interface:
My datasource has an Rating dataItem contains an integer from 0 to 5. I'd
I'm implementing a datasource object for an UIScrollView. Is that part of the Controller,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.