Discussions

General J2EE: Jboss + Data Sources + Oracle

  1. HI!
    I have an application, built using Orion. I need to port it to Jboss, but I´m having a real hard time to configure the data sources. The application needs three data sources. All of them are Oracle, but in diferent machines/instances. How can I do it? I managed to configure only one data-source. Don´t know how to configure more. And worst, it is configure to do autocommit (blargh), and I don´t know how to change it. Any help?

    Threaded Messages (5)

  2. Depending on your version of jboss (2 or 3) this is done differently.
    There are lots of threads about this on the jboss forums.
    In a nutshell, for version 3.0 create a databasename-service.xml file for each datasource and drop it in the deploy directory.
    There are many examples of these for various different databases in the src download.
    For 2.x you need to add a connection manager entry for each datasource in jboss.jcml if i remember rightly.
    Again, there are lots of examples, and other threads about this on the jboss forums.
  3. Thanks! I´m using Jboss 3, and it´s working now. However, i´m having another problem. I have an application that does not use ejb, but jdbc directly. In orion, it´s working perfectly, but in Jboss it gives an exception, saying that it cannot commit when autocommit is true. The Jboss Pooled DataSource uses autocommit = true? Is there a way to declaratively change it? For now, I´m using connection.setcommit(false) to solve it. Is there any property I can set in oracle-services.xml to change that?
    Thanks in advance
  4. Same problem[ Go to top ]

    Hi Andre!

    I got the same problem that you had.
    Did you find any solution?

    Thank you!
  5. Problem[ Go to top ]

    Which one?

    I keep using setAutoCommit(false). And I used the template that came with jboss to configure the oracle data source.

    Hope that helps.

    Andre
  6. same problem[ Go to top ]

    I got the same problem
    when I use setAutoCommit(false)
    in a batch Insert operation
    the problem is not occur in weblogic

    please tell me how to solve the problem
    thanks regard