Using 2 relational datasources in one application

Hi
I was wondering if it is possible to use two PersistenceManagerFactories in
one application server pointing to two different RDBMSs, such as one Oracle
and one DB2 database, but using the same JDO Classes. In this case I would
need to have two separate mappings, and I guess you would have to specify
somehow which mapping file to generate from the mappingtool and which one to
use in each PersistenceManager, but I have not found how to do it.
Could someone please point me in the right direction?
Cheers
Sven Erik

Sven-
This is certainly possible, but we do not provide any built-in way to
automatically use different metadata files on a per-database basis,
except when using the "db" MappingFactory (which stored the mappings in
the database; in your case, each database will store its own version of
the mappings).
Another option is to make your own implementation of the fairly simple
MappingFactory interface to perform some differentiation of the
metadata. E.g., you might have it look for "mymetadata-oracle.xml" and
"mymetadata-db2.xml" depending on the database, and then pass-through
the calls to the default MetadataMappingFactory.
In article <bugg5g$mnk$[email protected]>, Sven Erik Knop wrote:
Hi
I was wondering if it is possible to use two PersistenceManagerFactories in
one application server pointing to two different RDBMSs, such as one Oracle
and one DB2 database, but using the same JDO Classes. In this case I would
need to have two separate mappings, and I guess you would have to specify
somehow which mapping file to generate from the mappingtool and which one to
use in each PersistenceManager, but I have not found how to do it.
Could someone please point me in the right direction?
Cheers
Sven Erik--
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com

Similar Messages

  • Can a single datasource be used by more than one Application running on the

    Can a single datasource be used by more than one Application running on the system?

    What, in this context, do you mean by "datasource"?

  • Creating a connection pool using Oracle 10g, Sun ONE Application Serve 8.1

    Has any one succesfully configured Oracle 10g to work with Sun ONE Application Server 8.1 on Windows 2000 server service pack 4? I am embarking on a new J2EE project and I need to configure it as soon as possible.

    I haven't done it myself on that particular service pack, but I don't see why it should be any different than configuring a connection pool on other vanilla win2k/other OSes.
    Would you please try and let this forum know?
    thanks.

  • Using a cookie from one application web site to another application

    Hi,
    I have a big application written in ASP/CF. In this
    application, I added a link to my small application in CF. Both
    apps are on the same server but separate websites. I liked to use
    the user admin functionality that is available in the big
    application into my small apps. What I need is the cookie userid
    from the big application so that I can use it. How do I go about
    that? Can you please provide a sample code?
    Thanks in advance.

    meeyaw wrote:
    > Hi,
    >
    > I have a big application written in ASP/CF. In this
    application, I added a
    > link to my small application in CF. Both apps are on the
    same server but
    > separate websites. I liked to use the user admin
    functionality that is
    > available in the big application into my small apps.
    What I need is the cookie
    > userid from the big application so that I can use it.
    How do I go about that?
    > Can you please provide a sample code?
    >
    > Thanks in advance.
    >
    Cookies, by definition, are web site specific. You can set
    them to be
    shared across sub-domains, but you can not have one domain
    read another
    domains cookies. To do what you want one of the applications
    will have
    to pass the desired value to the other in some manner of your
    choosing.

  • Using Multiple Schemas in one Application

    Is it possible to have multiple schemas from the same database in one applicaiton. In APEX we have added multiple schemas to our workspace but when we create a form or report only one schema seems to be available.

    Miroslav wrote:
    Your application has a parsing schema. All other schemas have to give appropriate grants to it to be available to your application.Miroslay is right, if you use the INTERNAL workspace to add additional schemas to a workspace, APEX does not take care of any grants between the schemas. APEX can not know how or if you might want the schemas to interact with one another. All this does is gives the workspace the ability to utilise that schema, such as adding it as parsing schema to any applications in the workspace.
    You can switch to the secondary schema in SQL Workshop and add grants from there, e.g.
    grant select on SECONDARY_SCHEMA.MY_TABLE to PARSING_SCHEMA;

  • Use naming datasource in WebStart application

    Hello!
    I created a simple WebStart application with ADF Swing components.(JDeveloper version is 11.1.1.3)
    I deployed this application on Weblogic server (version is 10.3.3).
    But my application works fine, when I use JDBC connection in configuration of my application module.
    When I change type to JDBC DataSource, I get an error: (oracle.jbo.DMLException) JBO-27200: Failure JNDI. Can't execute search of datasource in context hrGlobal
    Where, "hrGlobal" is name of DataSource which is situated on WLS. (This DataSource I created using WLS Console).
    Maybe, there is any help or source code or documentation about this problem, but i could not find such information.
    So, if anyone had met with this problem and can share solution with me, it would be great.
    Thank you for time and answers.
    Regards, Stanislav.

    Hi. Thank you for link. But my problem that this naming DataSource works in ADF Faces application and gives an error in ADF Swing WebStart application. Names in this 2 applications(ADF Faces and ADF Swing) match and i don't use property jbo.server.internal_connection.

  • Can I use two webservices in one Java Bean?

    Hi,
    I have created two webservices (deployed on my local J2EE Engine). I want to use both services in one application and create a new webservice that combines the functionality of both services.
    Is this possible to combine the two services with a java bean? If yes, have I to do something special?
    Is this possible at all?
    Is there another way to do it?
    Thank you!
    Bye
    Julia

    Hi Julia,
    Yes, you can call to different web services from another service.
    For that, do one thing.
    Make deployable proxies for both Web services. Then use these both deployable proxies in your main web service from where you want to call these web services.
    Code for calling these both web services is same as you are calling web services from any other J2ee or Java project.
    Regards,
    Bhavik Devisha

  • How to use two different database Drivers in one application ????

    I want to select datas in a result set of a query on a ms access database table and insert these into a mysql table of a mysql database in one application.
    Now my problem is that only on database driver is acceptet in the same application even it`s instanciatet in a completely different class !!!
    Here's the structure of my program:
    class one:
    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    database += filename.trim() + ";DriverID=22;READONLY=false}";
    java.sql.Driver driver0=new sun.jdbc.odbc.JdbcOdbcDriver();
    DriverManager.registerDriver(driver0);
    DriverManager.getDriver(database);
    con2=DriverManager.getConnection(database,"","");
    DatabaseMetaData dmd2;
    dmd2=con2.getMetaData();
    stmt2=con2.createStatement();
    rs2=("SELECT (.........
    until here all values can be selected correctly from ms access
    class2.get_gas_id(fla_gas);
    Now I want to insert these values into mysql.
    By despair i created a second class with another jdbc-method:
    class2:
    public class gas_select{
    public static int fla_gas_id;
    public static void get_gas_id(String fla_gas)
    java.sql.Statement stmt3;
    java.sql.Connection con3;
    java.sql.ResultSet rs3;
    FileWriter fout1;
    try
    java.sql.Driver driver1=new org.gjt.mm.mysql.Driver();
    DriverManager.registerDriver(driver1);
    DriverManager.getDriver(config.db_rge_stoffe); ==>
    config.rge_stoffe="jdbc:mysql://192.168.10.101:3306/rge_stoffe?user=<user>";
    con3=DriverManager.getConnection(config.db_rge_stoffe);
    java.sql.DatabaseMetaData dmd3;
    dmd3=con3.getMetaData();
    stmt3=con3.createStatement();
    rs3=stmt3.executeQuery("SELECT (Nr) from tblgaseliste where Gasart like "+"\'"+fla_gas+"\'");
    while(rs3.next())
    fla_gas_id=rs3.getInt("Nr");
    fout1.write(fla_gas_id);
    stmt3.close();
    con3.close();
    fout1.close();
    There's no result and no error message. Idon't know what to do !
    Has anyone an idea ???
    Edited by: goberger on Mar 27, 2008 3:35 PM

    Hi!
    If I understand your problem correctly, you can create connections to as many databases as you want in one class. In one of my programs I have connection to 3 separate databases, but here is an example:
    Connection mysql_con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbmysql", "root", "12345");
    Connection pg_con    = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5433/dbpgsql", "postgres", "12345");Then from mysql_con and pg_con create PreparedStatement or Statement then load selections into ResultSet and then use getString() to get a basic String type result that you want and so update table from each database.
    HTH
    Victor.
    BTW Here I use port 5433 for PostgreSQL connection because I SSH tunnel it from 5432 to 5433
    Edited by: vic_sk on Mar 27, 2008 4:23 PM

  • HT2589 We have purchase 5 apple minis and would like them all on one account.  That way we can monitor the use of these units.  they will be used strickly for a business application.  can I use one account in itunes or must i have multiple.

    We have purchased 5 apple minis and would like them all on one account, that way we can monitor the use of these units.  They will be used strickly for a business application.  Can I use one account in itunes or must i have multiple.

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • Passing the values from one application to another application using mvc

    Hi sdn,
    Iam new to bsp.i created one application zappl1 in that i created one controller and one view.in that view i created 2 input fields.and also  created another application zappl2 in that also created one controller and one view. wai i want to enter in the inputfileds of first application view that values will be display in second application view.Please help out of this.

    Hi,
    I can see 2 ways of doing. Either you use parameters in the URL from the first application to the second, as any web application would do.
    Or, you can think of using the Web Application Server let :
    - the first application store the values
    - for the second application to retrieve
    Personnally, I would tend to suggest the first solution as it allows both applications to be replaced later on.
    Best regards,
    Guillaume

  • Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ?

    Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ? Please help me as its urgent.THanks for your help in advance.

    Hi Jay,
    SSIS can only recognize the absolute path of a XML Configuration file, the relative path is not supported. Furthermore, if the XML Configuration file is already generated, we can use the Environment variable package configuration type instead so that
    SSIS runtime automatically looks for the configuration file from the path defined in the environment variable. This is convenient when we need to deploy a package to different environment. We only need to define the environment variable for package configurations
    once on each server, and then the variable can be used by all the packages on this server.
    Regards,
    Mike Yin
    TechNet Community Support

  • How to use more than one application server during initial load?

    Hi,
    we plan to use more than one application server in CRM during initial download in order to increase the number of parallel requests and to decrease the time for the initial load. Is there a way to allocate requests to more than one server? Is is possible via multiple rfc connections for consumer CRM in CRMRFCPAR?
    Thanks.
    Alexander Schiffer

    Hi Naresh,
    thanks for your answer. It has solved my problem. SMLG is the transaction that I was looking for.
    Two more OSS notes that helped me to guide our basis into the right direction:
    OSS 593058 - New RFC load balancing procedure
    OSS 1413986 - SMLG: Possibility to select a favorite type for Ext.RFCs
    Thanks again.
    Alexander Schiffer

  • How to host one application using different database connection on OAS?

    Hi,
    Jdeveloper - 10.1.3.4
    Application - ADF/BC
    Oracle Application Server - 10.1.3
    Above our the specifications for our application,
    We have two database schemas different for development and production therfore we have different databse connections for the two,
    we have one application which is in production and enhacements on the same application are done by the development team.
    Since we have two different schemas for developement and prduction we use different database connections for the application on development and production.
    The problem is our Model and View Controller project are same, only the database connection file changes that's why we are able to host only on application at a time on our OAS. This is probably because the URL generated by OAS for developemnt and prodyction application is same.
    Is there a way we can host two instances of the same application with two different database connections on the a single OAS.
    Thanks & Regards,
    Raksha

    Use different deployment profiles each with a different context root for your application?
    See: http://one-size-doesnt-fit-all.blogspot.com/2009/02/configuring-separate-dev-test-prod-urls.html

  • Is it posssible to lunch one application from the client system using JSP

    Is it possible to Lunch one application from the client system using JSP or Servlet .If it is possible then how can we do that ?
    Thanks in advance
    Sil

    If its a java application - yes. You can use jnlp and web start.
    ram.

  • I have developed one application software using Labview 8.5 in which i am collecting data from 5 temprature controllers on serial line.

    I have developed one application software using Labview 8.5 in which i am collecting data from 5 temprature controllers on serial line.
    This software is done and successfully installed on customer side.
    Now the customer want this software to be run on server and some fixed number of clients should access this with some login security.
    Is this fascility available with National Instruments in which i can installed this standalone application in server and allow some clients to access this with
    proper login?
    Regards,
    Vaibhav

    Yes, that is possible. Multiple clients can access the VI using Web Publishing tool and control the VI operation. However, only one client has the control of the VI at one instance. The client needs to right click on the web page displaying the front panel of the running VI and ask for control and then release control after the execution to let other clients to ask for the control subsequently. The LabVIEW VI needs to be running upon the server computer since closing LabVIEW also closes the Web Publishing server and disconnects the currently connected clients. 
    Please check this link http://zone.ni.com/devzone/cda/epd/p/id/3797
    You might want to create a stand alone executable for the same and then publish it over the internet for access by your desired clients. In that case, check this link http://digital.ni.com/public.nsf/allkb/3A0087DBE9D31F9286256B19000A2DAE?OpenDocument

Maybe you are looking for

  • Adobe Muse (2014.3) "Add Web Font" Function Not Working As Expected - Newly Added Fonts Become Unavailable Though Shown

    Hello. This has also been posted in the Community: Adobe Muse Bugs forum. I've been having some odd/irregular issues though they have now become fairly predictable in nature. The issue is in regards to Adobe Muse (2014.3) and the availability of web

  • How can I see what is on my cloud?

    How can I see what is on my cloud? Also, I keep getting asked to manage storage when I am watching videos that I have bought through the store. I have bought lots of cloud space only half of which is used. Is my device too full of pictures or videos

  • Some BOne Doubts

    Hi All, We are planning to do some scenarios which are of the form SAP R/3 <-> SAP XI <-> SAP Business One The scenarios are, 1. Whenever a PO is getting created it should post some data    to R/3 via XI. 2. Goods issue (R/3 to BOne) 3. Invoice (R/3

  • Punchout catalog error coming back into SRM

    Hi Gurus, I have been searching the forums trying to figure out this issue.  We are getting a portal runtime error when a punchout catalog item is trying to get returned back into SRM shopping cart. From the portal this is the main part of the error

  • Wireless Internet - kicks me offline

    I have a MacBook Pro w/ an Airport card. Problem: if I stop working on my laptop for more than 5 minutes, I can't get back online without either: a) re-setting everything in Network Diagnostics; or b) Restarting. I'm pretty sure it isn't an wireless