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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:32:51+00:00 2026-05-28T14:32:51+00:00

Can anybody provide the steps for creating DataSource in JBoss server(5.0) with Oracle Database..

  • 0

Can anybody provide the steps for creating DataSource in JBoss server(5.0) with Oracle Database..

Thanks in Advance

  • 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-05-28T14:32:52+00:00Added an answer on May 28, 2026 at 2:32 pm

    This example assumes you’re using Oracle 10i.

    In JBoss 5, create an XML file ending with -ds.xml (although not necessarily -ds, it has to be an XML file). with the following descriptor elements.

    This is an example to do Local-TX datasource.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE datasources
        PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
        "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
    <datasources>
    
        <local-tx-datasource>
          <jndi-name>MyDataSourceName</jndi-name>
          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
          <connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>
          <user-name>myUserName</user-name>
            <password>myPassword</password>
          <min-pool-size>20</min-pool-size>
          <metadata>
             <type-mapping>Oracle9i</type-mapping>
          </metadata>
        </local-tx-datasource>
    
    </datasources>
    

    You can have more than 1 <local-tx-datasource> element but <jndi-name> must be unique.

    For XA datasource, see an example here.

    The above example is saved in MyDataSourceName-ds.xml.

    The XML file must be placed under JBOSS_HOME/server/<default|all>/deploy folder.


    Now, in Java, you will retrieve MyDataSourceName as follows:

    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:MyDataSourceName");
    Connection connection = ds.getConnection();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can anybody provide a link for creating a viewmodel for the edmx designer class
Can anybody provide me some sample example on Client and server connection using sockets
Can anybody provide some instruction on how to setup a war file to show
Can anybody provide some details on <:< operator in scala. I think: if(apple <:<
Hallo. I have problems by setting the Eclipse envirorment, can anybody provide me a
Can anybody provide detailed advantages and disadvantages of each ORM? First of all I'm
Can anybody provide me the list of all the differences between truncate and delete
Can anybody provide samples/links/simple-illustrations/videos/demos on how to use the messenger class in MVVM Light?
How to select or highlight text in java script on mousemove. can anybody provide
Referring https://www.youtube.com/watch?v=xHXn3Kg2IQE . Can anybody provide source/links which implements such a design?

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.