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 119733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:41:59+00:00 2026-05-11T03:41:59+00:00

I am using Oracle 9 JDBC Thin Driver – the connection string I have

  • 0

I am using Oracle 9 JDBC Thin Driver – the connection string I have used for standard JDBC was:

jdbcConn.connect('jdbc:oracle:thin:myDevDb/myDevDb@fooServer:1521:MYSIDNAME'); 

…just trying to get my head around using this kind of connection in Spring 2.5.

How do you wire up Spring to an Oracle connection – think it has something to do with an XML conifg file but not sure, there seems to be a couple of ways to do it.

Any help much appreciated…

LATEST EDIT

Thanks to those who have responded so far – but I need a bit of a ‘leg up’ – on the part where you configure in the database connection string setup in your config, where do you put this info, and how? I have an existing Java web application – and I am trying to get to grips with how I ‘shoehorn’ Spring into my existing app.

  • 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. 2026-05-11T03:41:59+00:00Added an answer on May 11, 2026 at 3:41 am

    There are a few ways of doing this and it depends on what your environment is. If you’re using Spring there’s a fair chance you’re deploying a Web application or you’re otherwise in a J2EE environment. If this is the case (and arguably even if it isn’t) you probably want to configure a DataSource.

    This is a fairly minimal solution:

      <bean id='dataSource' class='org.apache.commons.dbcp.BasicDataSource' destroy-method='close'>     <property name='driverClassName' value='${jdbc.driverClassName}'/>     <property name='url' value='${jdbc.url}'/>     <property name='username' value='${jdbc.username}'/>     <property name='password' value='${jdbc.password}'/>   </bean> 

    The above is using the Apache (Jakarta Commons) database connection pooling but your appserver probably has an alternative you may want to use instead. Also, different database vendors have their own data source implementations too (eg OracleDataSource and OracleXADataSource for Oracle).

    Note the use of properties like jdbc.username. This is a typical configuration because database configurations typically vary between environment. You can activate a property configurator with something like:

    <bean id='jdbcConfiguration' class='org.springframework.beans.factory.config.PropertiesPlaceholderConfigurer'>   <property name='location' value='classpath:jdbc.properties'/> </bean> 

    Now you probably want transactions too I would imagine. The easiest way is to use a platform transaction manager but, like with most things Spring, there are multiple ways of doing it.

    <bean id='txManager' class='org.springframework.jdbc.datasource.DataSourceTransactionManager'>   <property name='dataSource' ref='dataSource'/> </bean> 

    After this you can use this bean directly or (arguably more common) you can use declarative transactions with AOP (annotations).

    More on these subjects in the (superb) Spring reference documentation.

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

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer A framework is almost certainly the way to go. One… May 11, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer Check out [[UIDevice currentDevice] systemVersion]. This will contain the version… May 11, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer Avoid any ambiguity by using the fully qualified name of… May 11, 2026 at 11:47 pm

Related Questions

I am using Oracle 9 JDBC Thin Driver - the connection string I have
I am using Oracle 9 and JDBC and would like to encyrpt a clob
If I have multiple Oracle clients installed on a given workstation (i.e. Oracle 9
I have a table (in Oracle 9 and up) where I need to find
I am implementing a small queue to handle which process gets to run first.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.