Results 1 to 3 of 3

Thread: Avoiding Dialog Box with BasicDataSource

  1. #1

    Default Avoiding Dialog Box with BasicDataSource

    I'm using BasicDataSource to open a connection. My problem is that if I give an invalid user or password, a dialog box appears giving me the chance to correct them.

    Since I'm running in batch, I don't want the dialog. How can I avoid this in an AIX or other Unix system?

  2. #2
    Join Date
    Nov 2009
    Location
    Montreal, Quebec
    Posts
    398

    Default

    Sounds like it's your API/JDBC driver that's prompting you with the dialog box. In any case, if you put the username/password in a properties file and they're correct, you should never be prompted. A little more details on your scenario would be good to get a better understanding.

  3. #3

    Default RE: Avoiding Dialog Box with BasicDataSource

    Thank you, pgrimard. Sometime after posting, I learned what you've said. The problem is failure to set the "prompt" property in the driver to "false."

    Ideally, I'd be able to set connectionProperties from the application context thus:
    HTML Code:
    <property name="connectionProperties" value="prompt=false" />
    Unfortunately, the version of Apache Commons I'm using doesn't have a setConnectionProperties method. Fortunately, I'm already subclassing BasicDataSource, so I just hard-coded a call to addConnectionProperty.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •