Multiple Database Connections in ADF?

Hi,
For school we have a project. The goal of this project is to create an application that can generate business rules in PL/SQL. The application must be build using JDeveloper 11g 11.1.1.3.0 with ADF and must be a swing application. We didn't have very much experience with ADF swing.
Within this swing application you must enter the data which is needed to connect to the specific database. When you connect, it will get all the metadata of the connecting database/schema, because we can create a user friendly UI which shows the tables and when saving this it must be stored into another database (repository). So we only need the first connection to get all the data, then the connection could be broken. The second connection is more important, because we nee to save the data to the repository.
Both databases are Oracle databases.
I have been looking how we can achieve this, but with no result (I saw a solution like this: How do I use dynamic credentials in a J-Client App? but don't now how to implement it.)
Thanks in advance

The ADF model layer usually takes care of handling instances of you Application Modules, and here, you are doing it manually. This brings some risk, and be careful to release the Application Module after use.
More Information:
Link: http://jdeveloperandadf.blogspot.com/2011/02/adf-application-with-multiple-data.html
Edited by: user12968134 on Feb 27, 2011 7:32 AM

Similar Messages

  • Multiple DataBase Connection in a Single Form

    hi all
    Is it Possible to have Multiple Database Connection With a Single Form
    Block a : Retriving data from a database Service a/Schema A.
    Block b : Retriving data from a Remote Database Service b / Schema B.
    If yes how to do this.
    regards
    jai
    email:[email protected]

    Sure you can access a database this way,
    but can you base a block on this database connect? No you can't.
    Frank

  • How TO use configurable Database connection with ADF BC

    I have developed a simple JSF/ ADF BC web application that connects to a database and read/display data from the db tables. I have successfully deployed the application to Tomcat 5.5.17. However, now i need to change the database the application is connecting to. My question is How can I change the Database connection without having to change the application modules or rebuild the war file ??? In other words, is there a specific file (xml) where the database connection can be changed?

    If you set up the application with a data source (I am not sure if this is possible using another app server, I use OC4J), then you would just change it there. However if you created a database connection in the JDEV and pointed your data model to that, then you will have to change and rebuild.
    You might be able to edit the xml file that contains the setttings, I am not sure my CM guys dont allow this, all of our changes have to go through our code repository.

  • Multiple Database Connectivity

    How do we establish connectivity to multiple databases from within one Java Application. And how do we so without any File DSN? We are developing an application which requires dynamic changing of databases located at remote locations. Please help.

    you can use a properties file to load the DB details on runtime based on the criteria.
    Just put your DB details in a TEXT file and store it as .properties file. You can read it using any input methods from java and pass the parameters to your connection.
    Hope this helps.Cheers,
    Sekar

  • Multiple Database Connections

    Trying to develop a functionality wherein we can view data of a remote database (not the database instance where APEX is installed) using the Report.
    As APEX doesnot support multiple database instance access from a single workspace/applciation.. any workarounds .. I'v used dblinks previously.. but was on a lookout for a more roboust solution..Dont find db links a reliable opiton.

    Hi,
    how about delving into the wonderful world of Web Services and XML?
    APEX is quite powerful in that realm.
    Of course WS adds a little overhead to communication and is a bit slower than a database link, but there are lots of benefits on the other hand. In my opinion it's the perfect option if you plan on loosely coupling your applications (not only APEX - ask the Java folks :-)
    It always depends on what your expectations are concerning "Quality of Service". A typical APEX page wouldn't load like a million of rows and therefore Web Services might be the right way.

  • Using Java within a stored proc to access multiple database connections

    Hi List;
    We have an environment where we have needs to provide cross database visibility between Oracle, Sql Server and PostgreSQL. So we need the capability for Oracle to query PostgreSQL and Sql Server tables, PostgreSQL must be able to query Oracle and Sql Server tables and Sql Server must be able to query Oracle and PostgreSQL tables.
    I'm thinking that we can implement stored procs which are either written in java or call a java process . The java code in turn should be able to connect to any DBMS desired via JDBC query the tables in question and return the result set to the calling database.
    Any thoughts on how feasable this is would be appreciated. Does this seem like a solid solution? Any initial concerns or red flags? what about performance via JDBC?
    Thanks in advance for your help.

    John,
    from your description I understand that you essentially program the VO yourself. So I suggest that you read chapter 35.9 of the 'Fusion Developer’s Guide for Oracle Application Development Framework' (I guess you know where to find it). Since you still call the actual SQL not all of the chapter apply, but you get the idea how it works.
    And yes you analyzed the behavior correct. executeQueryForCollection() is allways called bevore getQueryHitCount().
    Timo

  • How to manage Database connections in ADF better

    Hi,
    We have got our DB connection configured as a JNDI service in weblogic server and in used in many functionalities where we rely upon EO / VO concept totally.
    Now we have requirement from customer that every connection borrowed from the pool must call a DB procedure first as below before executing the app related SQL or anything:
    DBMS_SESSION.setIndentifier('<app_user_id>');
    When firing custom SQL, I guess it is fairly simple to do this but when it comes to EO/VO where ADF takes care of DB calls, We do not know how to achieve it effectively ...
    Can anyone help how to achieve this ?
    -Thanks a lot
    - Ram

    Code like this belongs in the AM - you can override the prepareSession() method of your AM implementation class to do this. Have a look at [url http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcservices.htm#sthref929]the docs
    John

  • Multiple database in the same ADF application

    In my application I have to access a legacy database, in addition to the main database. How do I handle multiple database connections. Do I need to manage the JDBC connection to the legacy database myself.
    Pranab

    Use an AM for each dataconnection and then share the AMs so then can see each others datamodels.
    Or you can use jdbc in your code to access the databases.
    If would be nice if the adf had a way to connect to any data source set up in the configuration and app server on the fly.

  • Problem about financial reporting studio(assign multiple db connection)

    Hi,
    I need to assign multiple database connections to a grid in Oracle Hyperion Financial Reporting Studio
    To do this, I performed the following steps:
    - Open a report.
    - In a grid, select one column for which I want to change the database connection.
    - In the Column Properties sheet, click the Select Database Connection button, .
    - In the Select a Database Connection dialog box, select a database connection from the Database Connection drop-down list, then Click OK.
    - In the Map Dimensions Between... dialog box, map dimensions between the default database connection and the selected database connection. I do this by selecting a dimension from the pull-down list in the right column for each dimension in the left column.
    - Optional: Select an alias table for the new database connection.
    - Click OK.
    But after last step I have received next error:
    *; nested exception is:*
    java.lang.NullPointerException
    Can someone explain the source of this error?
    And help me please solve this problem because I didn’t receive figures in that column where I changed database connection.
    Thank you in advance!

    I'm sure that both DB connections has the same dimension hierarchy. I can open the repot, but in it I don't see figures in that column where I've changed database connection...

  • Multiple db connections for one report

    Hi all,
    I am using Oracle Reports 10g R2. Could someone tell me if Oracle Reports supports multiple database connections for one rdf file, like this (using servlet)
    http://your_web_server:port_num/reports/rwservlet?server=server_name&report=myreport.rdf& userid1=username/password@my_db1&userid2=username/password@my_db2 &desformat=pdf&destype=cache
    I am asking this question because my report needs data from two separate Oracle databases.
    Edited by: user12239004 on Apr 27, 2010 2:14 AM

    No, you can only have one login.
    However, this is simple to resolve by creating a database link in one database to the other database.

  • ODI database connection - session question

    Hi,
    I have a package, where I have used a procedure.
    In my procedure, I open a database connection.
    My question is - In my next procedure - will I be able to use my same database connection which I created in previous step?
    Re-phrasing the question - for any number of database transaction happening in a package, will ODI opens multiple database connection per step or will there be only one single database connection?
    Thank you,
    Paras

    I believe its one per session so one connection inside the package. I think you should be , although i have not tried it practically.

  • ADF Database Connection at Runtime

    Hi,
    I have developed a ADF based Web Application, deploy the code into different appServers [connecting to Different Databases] but unable to connect to the Required Database at Runtime.
    I have the following in my dataSources.xml & web.xml which looks like this.
    dataSources.xml
    <managed-data-source connection-pool-name="AIAQueryConnectionPool" jndi-name="jdbc/AIAQueryDataSource" name="AIAQueryDataSource"/>
    <connection-pool name="AIAQueryConnectionPool">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="aia" password="aia" url="jdbc:oracle:thin:@//occf09.techmahindra.com:1521/ftsit"/>
    </connection-pool>
    web.xml
    <resource-ref>
    <description>AIA data source connection for FastTelco</description>
    <res-ref-name>jdbc/AIAQueryDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    deployed the web Application "TestTransaction" and created ConnectionPool & DataSources for this Application "TestTransaction"
    when i run the Application i am unable to connect to the required Database/(s)
    Is that correct what i was doing ?
    BUT If i have the entry of that specific Database in ./model/common/bc4j.xcfg file i am able to Connect to the Database
    and if i remove the entry from ./model/common/bc4j.xcfg file, I am unable to Connect to the Database.
    Why is it so ??
    Can anybody give me the process / code to Connect to the Database in web based ADF Application at Runtime.
    or
    Pick up the Database Configuration Values from a Properties file and establish a Database Connection ??
    thanks in Advance...
    regards,
    anvv sharma

    Hi,
    I got it working today and not yes'day to the modifications suggested by arun...the only difference being i have stop / start the Application then it started with the working what i have done yes'day
    also thanks for shay....... it was useful link
    regards,
    anvv sharma

  • Bc4j.xcfg, database connections and deploying ADF apps to oc4j

    I'm trying to understand how to enable custom database connections on a JDeveloper ADF application deployed to a stand-alone instance of OC4J.
    All entity objects were created as ADF Business Components.
    I looks like the db connection information used by the application is stored in a file named "bc4j.xcfg".
    How would I change the database connection information between different environments, changing the server, port and password information from an OC4J instance?
    I'd like to use an OC4J defined data-sources.xml file, but am looking for the simplest approach for now.

    Tomato tomaato, call it what you will, we now have to spend time (money) figuring out how to change from using the recommended use of a "connection" from Oracle tutorials and in Oracle Press books.
    Plus, neither I nor our client can get JDeveloper ADF 10.1.3 to work on OAS 10.1.2.
    Oracle has been of little help, other than stating to follow documentation. We followed the documentation at least a dozen times and on three different install of OAS 10.1.2.
    Why doesn't JDeveloper have a check-box or button that reconfigures the application to run on 10.1.2 (J2EE 1.3), there is a check-box to change JDK versions (1.4)? This is suspect to me.
    We are going to be speaking with the client this week, and have to state the ADF application works, but NOT on OAS 10.1.2.
    Does ADF work on OAS 10.1.3, absolutely, but the client is in 10.1.2 and can not upgrade at this time.
    I've read in blogs where lots of developers have the same issues without resolution and Oracle should just come out and state that 10.1.3 does not work on 10.1.2.
    So my experience has been a mixed bag with ADF, both in terms of the software and customer support from Oracle.

  • Connection to multiple databases using a single EJB

    How can I connect to multiple Databases (using @PersistenceContext) using an EJB?
    Did I need to connect various Entity Managers corresponding to the each database and simply send my Queries?
    I am using Glassfish Application Server
    Netbeans IDE
    Java Derby Database
    Oracle Database
    Java Persistence API
    Thanks in Advance

    Yes, you need a persistence context and thus entity manager per database. Depending on what you want to achieve you may also need to go to the next level in your skill set and learn all about distributed transactions.

  • Programm change in Oracle ADF database connection

    Hello!
    Our company uses an application implemented in Oracle Forms. We have about 2500 users. Each user works with a database using Oracle c your login / password.
    We want to migrate to Oracle ADF. But the concept of Oracle ADF - under a single user connection.
    But the position of the database administrators - do not use OracleInternetDirectory (LDAP), does not create users in WebLogic. :(
    In our company, users are created in the database Oracle. Users are database role.
    Our idea is to send in an application ADF user name and password. Safety is solved at the database level.
    Can I do this:
    1. When the application starts to change the ADF database connection to a user username / password?
    2. Can there be problems in the future?
    3. Are there any examples?
    Please help
    Vasily (sorry for bad english)/
    Edited by: user10711272 on 16-Jan-2012 08:43

    Hi,
    You can create a custom authentication provider in WLS that uses a JAAS Login Module that attempts to connect to the database for authentication pupose. The application itself would run with a JDBC Data Source, so that you only use the database account to authenticate the user and get his/her database roles as authorization groups. I have a sample for this on my to-do list but so far hadn't the time to get to it. So yes, you don't need OID or LDAp to manage users but could keep going using the database
    Frank

Maybe you are looking for

  • EXTREMELY HIGH URGENT!!!

    Hi! SAP GURUS! We've got the following trouble: Event Type: Error Event Source: SAPDB:T11 Event Category: Fast Event ID: 18606 Date:  24.03.2008 Time:  17:18:47 User:  NT AUTHORITY\SYSTEM Computer: SAP-1 Description: The description for Event ID ( 18

  • Calling Function In a Select

    I have a function which returns the name of a client when given the id of the customer as an input parameter. I want to call the function inside a select with the customer id as the input parameter not the actual id and get the name something like se

  • PR price should flow in Contract/sa/po

    hi, i have one requirement that user enter the Price in valuation price in Valuation tab of Purchase requistion . this price should flow into PO and can't be cahnged.Is there any setting is there thanks in advance Rami Reddy

  • Files has duplicate copies

    I do not know how I did it but I somehow got the main screen (containing the artboard) stuck behind the main Mac OSX menu bar. I then could not move it so I could re-size it or be able to see and use the buttons on the top left that allow you to quit

  • Static class member is beying destroyed inside a Controller - Why?

    Hello, I need to manage a certain BigDecimal class member in a Dynpro application which will not be destroyed. This class member represents a key in a database which from few reasons I would like to manage on my own. In order to implement that, I hav