Multiple databases in one application with locations unknown

Hello everyone,
I am developing an application that uses several databases, one database for each user. The users, and the parameters for their database connections, are read from a configuration-file at runtime.
I would like to use JPA to access the databases. This is where the problem arises, because if I try to get an EntityManagerFactory, I have to specify a name; I just use <username>-pu. This causes a PersistenceException because "No Persistence provider for EntityManager named maarten-pu". Which is correct, because my persistence.xml contains no persistence units.
I cannot define all persistence units beforehand, because at that time the configuration-file is not yet read.
Does anyone know how to solve this problem?
Kind regards, and thanks in advance,
Maarten

Hello everyone,
I am developing an application that uses several databases, one database for each user. The users, and the parameters for their database connections, are read from a configuration-file at runtime.
I would like to use JPA to access the databases. This is where the problem arises, because if I try to get an EntityManagerFactory, I have to specify a name; I just use <username>-pu. This causes a PersistenceException because "No Persistence provider for EntityManager named maarten-pu". Which is correct, because my persistence.xml contains no persistence units.
I cannot define all persistence units beforehand, because at that time the configuration-file is not yet read.
Does anyone know how to solve this problem?
Kind regards, and thanks in advance,
Maarten

Similar Messages

  • One application with Multiple schemas- common application frame work

    Hi All,
    I am trying setup a common application frame work in apex. Please help me.
    How to achieve this.
    Creation of one application attached to different schemas at run time. So that my application maintaince is going to be easy instated of creating copies of same application.
    More details:
    1. I have one application with 100 pages pointing to a schema dev_common in one workspace APP_COMMON. I have 50 schemas with same structure of dev_common schema with different set of data ( because of large amount of data).
    So I want to create one application attached to different schemas.
    2. And another thing is I have 100 users, the user can work on 1 or multiple schemas ( I mean same application with different schemas attached)
    Any help much appreciated.
    Thanks,

    Thank you for the reply.
    >> b) I think you have to give access rights for the dev_common and app_common to all users.
    Dev_common schema is a kind of placeholder. I have 50 schemas same as dev_common because of different business requirements but the front end is same for all 50 schemas. How can we create one application used for 50 schemas instead of creating 50 applications and 50 workspaces.
    Please help me.

  • Multiple databases in one file: a small snafu

    Hello everyone,
    Opening multiple databases in a single file is an administrative convenience. It is well explained in the manual (see db/docs/ref/am/opensub.html). Normally, there is little difference between databases in their own physical files or grouped together in a single physical file. There is one small sentence in the manual that says the following:
    (begin fragment)
    However, since multiple databases in a file exist in a single physical file, opening two databases in the same file simultaneously requires locking be enabled unless all of the handles are read-only. As the locks for the two databases can only conflict during page allocation, this additional locking is unlikely to affect performance.
    (end fragment).
    I didn't pay attention to it, except the "unlikely to affect performance" part which told me that I wasn't to worry about it. The sun was shining. Life was good.
    And I was wrong. It was one of those "epic bug quests" I had to embark on, only to realise that it may not be a BDB bug, but my carelessnes. Nevertheless, I'm left with an uneasy feeling which I would like to explain here.
    Consider BDB configured as a concurrent data store.
    There are 2 threads. The first thread has the following pseudocode:
    cursor1 = db1->cursor(...)
    while(cursor1->c_get(... DB_NEXT...))
    // 1
    cursor2 = db2->cursor(...)
    while(cursor2->c_get(... DB_NEXT...))
    The second thread does only the following:
    db3->put(...)
    db1, db2 and db3 are all distinct databases. All cursors are read-only (the cursor implicitly used in db3->put is of course a write cursor).
    While the first thread is running, the second thread executes db3->put(...) at "//1".
    Question: what happens?
    Answer 1: if db1, db2 and db3 reside in different physical files, nothing special happens. Everything proceeds as it should.
    Answer 2: if db1, db2 and db3 reside in the same physical file, both threads block "sometimes".
    The "sometimes" used here means "when the put operation in thread 2 needs to allocate a new page".
    Reading the BDB source code is extraordinarily difficult (which says more about my limitations than about the clarity of the code) but here is what happens, as far as I could determine:
    (thread 1) cursor1 needs and acquires a read lock on db1
    (thread 2) db3->put needs a write lock on db2 to allocate a new page. Since db2 is in the same physical file as db1 and thread 1 already has a read lock, thread 2 waits until the read lock is released. Thread 2 blocks.
    (thread 1) cursor 2 needs a read lock on db3. For some reason, BDB detects that the another thread is waiting for a write lock on the physical file, and thread 1 blocks.
    Both threads block waiting on each other to complete.
    I suppose the system is the way it is to avoid starvation, but there you have it: be careful when you're lumping together multiple databases in one file!
    Anyone who can clarify or confirm this is welcome.
    Vincent

    I had experienced a similar problem. I run multiple process. Each one of them starts a transaction that does db->put and db->pget to its own database (which also has a secondary index). When each database is in a separate physical file there is no problem but when I put all databases in a single file the processes start to dead-lock.
    The following combination of options solved the deadlocking problem:
    - use serializable isolation level instead of snapshot, i.e. do not pass DB_TXN_SNAPSHOT to txn_begin
    - do not pass the DB_NO_WAIT option to txn_begin
    - use Btree instead of a Hash
    Hope that helps.

  • Multiple databases in one single RAC cluster

    Hi, I would like to know if one can have multiple databases running on a single RAC cluster, we have several databases in our shop and would like to consolidate all of them into a single 3-4 node RAC cluster running databases with 10.2 and 11.1 versions.
    I am newbie to RAC and would like to get some clarification if anyone has done this, google search comes up with few hits on this topic, so obviously this is not doable.
    In our case we have one database supporting critical applications and few other not so critical but are used very extensively between 9-5, so what is the use of RAC if I cannot consolidate all my databases into one cluster, or if I need a separate cluster for each of these critical databases?
    I have been all the Oracle docs that keep repeating one database multiple instances and one instance-one machine-one node, they don't even advise running multiple instances on a single node?.
    I appreciate any insight.
    Thanks.

    ora-sql-dba wrote:
    Can you give more details on how you would setup multiple databases running different versions on a single RAC cluster, I am yet to find any documentation that supports or even elaborates on this topic.You can configure a cluster with 12 nodes. Then, using dbca, configure a dev instance for nodes 1 and 2, a prod1 instance for nodes 3 to 6 and a prod2 instance for nodes 7 to 12.
    You also can configure each of these instances for all 12 nodes. And use it on all 12 nodes.
    Or, after configuring it for all 12 nodes, you can start the dev instance on nodes 1 and 2, prod1 on 3 - 6 and prod2 on the remaining nodes. If dev needs more power, you can for example shutdown prod2 on node 12 and start another dev instance there.
    My issue is with the 2nd option - running more than one instance on the same node or server. Why? Each instance has a basic resource footprint ito shared memory needed, system processes required (like db writer, log writer, sys monitor) etc. It does not make sense to pay for that same footprint more than once on a server. Each time you do, you need to reduce the amount of resources that can be used by each instance.
    So instead of using (for example) 60% of that server's memory as the SGA for a single instance, if you use 2 instances on that server you now have to reduce the SGA of each to 30% of system memory. Effectively crippling those instances by 50% - they will now have smaller buffer caches, require more physical I/O and be more limited in what they can do.
    So unless you have very sound technical reasons for running more than one instance on a server (RAC or non-RAC), do not.

  • 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;

  • Multiple databases in one Environment

    I am tryiing to figure out the best way to implement my JE environment. My use case requires that I be able to use UNIX tools like 'cp' to move JE databases from place of generation (development) to place of consumption (production). Moreover, each JE database stores very different data and has different refresh cycles (ex., one of them may be refreshed every week, another may be refreshed once a month, etc.)
    My dilemma is:
    1)- Should I use one env w/multiple databases, or,
    2)- A separate env for each database?
    With (1), I can't see a way of selectively updating one of the databases and copying over the changed JE log files to production servers (for read-only access at runtime). Every time I want to update one database, I'm thinking I'll have to pull down all JE log files, update the DB and push out all JE log files to production servers.
    (2) seems to go against the guidelines I've seen in this forum, viz., one env per process is more efficient.
    Thoughts/experiences/comments are welcome.
    Thanks

    Hi,
    What Charles suggested is the best approach if you need to avoid the performance issues with having multiple environments in a single process (you mention that you've read about them elsewhere on the forum). Please also be aware that we're working to solve those problems in an upcoming release. So if you prefer, you can implement your application using multiple environments now, and expect that the performance issues will be resolved later. This might make sense if your deployment will be small at first, and performance will not be a big issue right away.
    Mark

  • How can I scan multiple pages to one file with MG 7120

    My printer does not have ADF. How can I scan multiple pages to one file on my MG 7120?

    Hi albabynyr,
    There is a program that comes with the printer called the IJ Scan Utility that can assist you with scanning multiple pages into a single file.  To scan using the IJ Scan Utility, please follow these steps:
    1. Start IJ Scan Utility by going to your Start menu, then selecting All Programs, then Canon Utilities, then  IJ Scan Utility (folder), then IJ Scan Utility (program).
    2. In the Canon IJ Scan Utility window that opens, click SETTINGS.... in the bottom right of the window. The Settings dialog box appears.
    3. Click the DOCUMENT SCAN option on the left pane of the window.
    4. In the right pane of the window, locate the SELECT SOURCE field and select the DOCUMENT option.
    5. Set the color mode, document size, and scanning resolution as required in the rest of the fields shown in the window. Click DOCUMENT SCAN ORIENTATION SETTINGS... to specify the orientation of the documents to be scanned.
    6. In the SAVE SETTINGS section of the window, you will select the save format and location of the document you are about to scan.
    a.) In the FILE NAME field, specify the name you would like to give the file. By default the filename will begin with IMG; you can remove IMG and change it to whatever you would like to name the file.
    b.) In the DATA FORMAT field, use the drop-down arrow to select the PDF (Multiple Pages) option.
    c.) In the SAVE IN field, please navigate to the area where you would like the file to be saved once it is scanned in. By default, the file will be saved in the DOCUMENTS folder.
    7. Once all settings have been selected, click the OK button at the bottom of the SETTINGS (DOCUMENT SCAN) window. The IJ Scan Utility main screen appears.
    8. Click the DOCUMENT button. Scanning starts. After a page has scanned, the screen to continue or end scanning appears. If you have more pages to scan, place the next page on the platen and click Scan.  Do this each time a page has completed scanning.  After the last page has been scanned, click Exit. Scanned images are saved in previously selected folder location specified in the SETTINGS... window. Click the CANCEL button to cancel scanning if needed during scanning.
    Hope this helps!
    This didn't answer your question or issue? Please call or email us at one of the methods on the Contact Us page for further assistance.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • How to communicating one application with another?

    I wanted to make a web site that have the ability to view,update,insert and delete record in a database. How to do that? How can one application communicate with another? example, I wanted to have XHTML communicate with Java and Java to communicate with my database that is pointbase database.

    Multi-tier application communication is a somewhat complex matter. It may be made using differents techniques and designs. But like Sum-shusSue said, a typical Java-based solution would use these Java technologies: JSP (Java Server Page) for the presentation side (the client), Servlet or EJB (Enterprise Java Bean) for the server-side logic. The communication with the Database is made through JDBC.
    I suggest that you take a look at the J2EE edition of Java. That stands for Java 2 Enterprise Edition and it is specifically made for enterprise system development, such as Servlet, JSP, EJB, etc...
    This is a whole lot of new subjects and, from my humble experience, it is not that easy. i.e. I would not recommend it for strict newbies. However, if you have some months of Java coding on your side, maybe you should take a look. You can check first the left menu of this site, you'll find, under Technologies the sub-menu J2EE. There's also, somewhere on the site, tutorials on differents J2EE topics. Finally, I would recommend you this book:
    Professional Java Server Programming, J2EE 1.3 Edition, edited by Wrox. Of course, there a lot of other books on hte market. J2EE is a hot topic!
    Hope this help...
    Simon

  • Scanning multiple pages into one document with an automatic document feeder

    when using automatic document feeder to scan in multiple pages - using the Image Capture app, this process does not work for more than 2 pages. However works perfectly in PC environment.
    Using a MacBook Pro with 10.8.4 and a Lexmark Interpret 405S All In One Scanner.
    Is there any other all in one device that can perform this function in a Mac environment?
    Please advise.

    Hi @FentyFly ,
    I see by your post that you would like to know how to scan multiple pages into one file. I would like to help you out today.
    From the HP Scan Software, click on the link for Advanced Settings, then uncheck Create a separate file for each scanned page.
    Here is a URL for how to scan and change the settings. Just select your operating system.
    Scan.
    What operating system are you using? How to Find the Windows Edition and Version on Your Computer.
    If you need further assistance, just let me know.
    Have a great day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Multiple Databases in one Business Area?

    Can I put multiple databases into the same Business Area?
    The crux of the problem is as follows: I am migrating data from one database to another. There will be a period of dual running, whilst the products are migrated.
    I want to be able to write reports that compare the data between the two databases, and show me the discrepancies.
    Oh one of the databases is not Oracle, so using a db link is not an option.
    null

    Can I put multiple databases into the same Business Area?
    The crux of the problem is as follows: I am migrating data from one database to another. There will be a period of dual running, whilst the products are migrated.
    I want to be able to write reports that compare the data between the two databases, and show me the discrepancies.
    Oh one of the databases is not Oracle, so using a db link is not an option.
    null

  • One application with different laguages

    Hi,
    I want to develop one application which can be used in more than one language.
    can any one help me how to do that. I have tried to do that with the *.xlf file. Is there any other approch.
    Regards,
    H.V.Swathi

    Hi Swathi,
    Internationalization (I18N) thru *.xlf files is the approach.
    The concept is you have language specific xlf files (texts in that particular language) created.
    During build & create archive, corresponding .properties files are created from these xlf files (1-1 mapping) and are packed into the archive (ear file).
    When you deploy, this archive having the .properties files is deployed on the SAP WAS.
    Now depending on locale, the required .properties file is read at Web Dynpro runtime & texts in that language are shown to user.
    Summarizing: *.xlf files - Design Time SAP concept & .properties files - WD Runtime usage
    I hope you have already refered the following links:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c6cfad90-0201-0010-a5b8-8f9486346059
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4f5b88e5-0601-0010-cd99-8b88a4d92816
    Hope I am clear.
    Kind Regards,
    Nitin
    Edited by: Nitin Jain on May 5, 2009 3:05 PM

  • Multiple iPad on one account with iCloud

    I would like to update some business iPad (all over the US) from our office (in CA). Is there a way to sync multiple iPads to one iCloud account? However, I would only like to update certain apps (Keynote, movies and some documents). Is there a way to push data to their devices without them pushing anything back to me.
    Thanks!

    iPods are sync'd to iTunes libraries (what you see on your computer), not iTunes accounts (which are used to purchase items).
    tracyfromohio wrote:
    He is now old enough to have his own iTunes account on his own computer.  Is there a way to create an AppleID for him and transfer his info from my iTunes account into his new one?
    No. Anything purchased is always purchased by that same account and cannot be changed.
    He can copy these items to his computer and use them in his iTunes library.
    If you authorize his cmputer for your iTunes acoount (iTunes menu Store > Authorize computer)  when he plugs in his iPod, select it in iTunes and select File > Transfer purchases.

  • Can I download more than one application, with the free trial?

    I'm interested in Illustrator and Photoshop, more immediately. However, will possibly be looking at a full individual subscription, at a later time. Is it possible to download more than one application, for a free trial, at a time?

    Jacob Bugge wrote:
    It is quite possible, but you may wish to start by downloading the trial the of the first application and start using it before you download the next one, because that will give you more total tryout time than if you download both simultaneously.
    I thought the trial period of 30 days starts from the day you use, not from the day you download/install.

  • One application with two projects, nothing works....

    1st of all hope here is the right place to post this question. And sorry for a bad title, but I couldn't think of nothing better.
    2nd, hello everyone!
    And now:
    I have created a new application in JDeveloper 11.1.1.1.0 and started a project (lets say EXAMPLE_P). I had problems integrating the project with an already existing library (which I did as well). Therefore I opened the project of this library (LIBRARY_P) in the same application as EXAMPLE_P project. Now I wanted to debug, like I used to do in JDeveloper 11TP4, in the classes in the LIBRARY_P while running my EXAMPLE_P web-app.
    The problem is that LIBRARY_P has a web-application as example/test, but when I pack the jar I use just certain packages.
    Now when I come to JDev 11.1.1.1.0 (Studio Edition Version 11.1.1.1.0, Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407) none of the projects works, with or without dependency. For the LIBRARY_P web-application I use a DataSource that I no longer have, so everything falls apart and absolutely nothing works, not even EXAMPLE_P, which does not even have a dependency defined to LIBRARY_P. As soon as I remove LIBRARY_P from the application, EXAMPLE_P works.
    Can anyone shed some light on a workaround or explanation why?? (I know already that JDev tries to deploy both of them... question is for the love of god WHY!??!) TP4 was so much better.....
    Thank you

    Quoting Shay Shmeltzer: "In general if you have a library that you need to use in another project all you need to do is add the JAR to the project properties->libraries and class path."
    I agree, but I don't want to just use the library, I want to debug that library using my application.
    For this case my EXAMPLE_P is a wep-application, a portal. The LIBRARY_P is a CMS framework. They use struts, tiles, spring, etc....
    The library for the cms framework has just classes like actions, filters, listeners, etc, no jsps, no web.xml, just classes. Problem is that the JDev project (v. 11g TP4) for this cms framework has an example application (web-application with struts and so on), so that we can understand on a test (practical test) basis how it works, for a little experimenting, etc.
    Now my new portal uses the actions, filters, listeners, etc present in this library and I need to debug how my project behaves with these actions, etc. and where it fails.
    These projects were done for OC4J and therefore don't have a weblogic.xml, nor anything for deployment on weblogic, and I have in fact no interest in deploying it, I just want to debug the classes. On JDev 11gTP4 with OC4J I just defined project dependency and as long as it compiled it was possible to debug everything.
    Hope now I'm a bit more clear on what is my problem. Me and my metaphors... :)
    Thanks for the feedback
    Edited by: user11199488 on Sep 16, 2009 10:37 AM

  • Scan and collate multiple pages to one document with hp8630

    How do I scan, collate and save a multiple page document into one pdf document utilizing an HP8630? Thank you.

    Hi , I understand that you would like to know how to scan and collate multiple documents into one file. I would be happy to help you.
    If you are using Windows, please try the following steps: From the HP Scan software, select Advanced Settings, click on the File tab and uncheck Create a separate file for each scanned image, this will allow multiple page scans to save to one file.    If you are using a Mac, try the following: From the Preview Software, once you have the scanned image, select PDF and check combine into single document below. From the Print and Scan window, select PDF and check combine into single document below. What operating system are you using?How to Find the Windows Edition and Version on Your Computer.Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer? If you appreciate my efforts, please click the 'Thumbs up' button below. Thank You.

Maybe you are looking for