Multiple persistent units

Hi,
I have one EJB project with two beans refering to two different data bases using two persistence units.
Bean A - persistence unit DB_A_unit  - entity class CL_A - table DB_A
Bean B - persistence unit DB_B_unit  - entity class CL_B - table DB_B
In persistence.xml I defined both units with different data source aliases.
Now I try to execute a method of bean A and get the exception:
The persistence unit is inconsistent with the database schema
The table DB_B does not exist.
If I try to execute a method of bean B I and get the exception:
The persistence unit is inconsistent with the database schema
The table DB_A does not exist.
Why does a method call in bean A affect the entity of bean B? How can I avoid this?
Thanks,
Kevin

I found a solution:
<persistence-unit name="DB_A_unit">
   <jta-data-source>a_alias</jta-data-source>
   <class>CL_A</class>
   <exclude-unlisted-classes>true</exclude-unlisted-classes>          
</persistence-unit>
<persistence-unit name="DB_B_unit">
   <jta-data-source>b_alias</jta-data-source>
   <class>CL_B</class>
   <exclude-unlisted-classes>true</exclude-unlisted-classes>          
</persistence-unit>

Similar Messages

  • Single concurrent program for multiple operating units

    HI
    I am working on XML/BI publisher to generate AR invoice reports.
    We have single rdf report using which rtf templates are generated.
    There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID
    Eg: ORG_ID's = 11, 12, 13, 14..........etc
    Eg: Responsibility = xx, yy, zz...........etc
    I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
    How can i register one concurrent program for multiple operating units.
    Thanks!
    Edited by: 994628 on Mar 18, 2013 4:39 PM
    Edited by: 994628 on Mar 18, 2013 4:42 PM

    >
    There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID
    Eg: ORG_ID's = 11, 12, 13, 14..........etc
    Eg: Responsibility = xx, yy, zz...........etc
    I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
    >
    interesting case for 10 OE set 10 template
    what is purpose? for each OE different requirements for layout?
    BTW
    if each Responsibility associated with one org_id then
    - you can get current org_id when you run concurrent program
    - create main template (will be #11) with condition like
    <?choose:?>
    <?when: ORG_ID=11?>
    <?import:xdo://FND.XX11_SUB.en.00/?>
    <?call:TEMPLATE11?>
    <?end when?>
    <?when: ORG_ID=12?>
    <?import:xdo://FND.XX12_SUB.en.00/?>
    <?call:TEMPLATE12?>
    <?end when?>
    <?otherwise:?>
    <?import:xdo://FND.XX21_SUB.en.00/?>
    <?call:TEMPLATE21?>
    <?end otherwise?>
    <?end choose?>so based on org_id will be import of needed subtemplate
    - re-register your "10 rtf templates" as subtemplates
    another way is substitution of template for concurrent then it running
    in before_report trigger set needed template
    l_conc_request_id := fnd_global.conc_request_id;
        if ORG_ID = 11 then
          UPDATE fnd_conc_pp_actions t
             SET t.argument2 = 'XX11'
           where t.concurrent_request_id = l_conc_request_id
             and t.action_type = 6;
      if ORG_ID = 21 then
          UPDATE fnd_conc_pp_actions t
             SET t.argument2 = 'XX21'
           where t.concurrent_request_id = l_conc_request_id
             and t.action_type = 6;

  • Single Transfer Order for Multiple Handling Units

    I have been researchig the ability to create a single transfer order for multiple handling units.  My assumptions are if it can be done that:
    1) A transfer order can have a single source, so if the source document for the handling unit (delivery) is different, that means different transfer order
    2) A TO can have multiple materials (line items) with different destination bins and quantities per bin
    I looked at the configuration for TO Split, but it's not clear that this will handle my requirement.
    I also saw this http://aq33.com/material-management/Articles-005798.html and it also says that my requirement can't be meant.  I'm just checking before I tell my customer this cannot be done.

    Yes you are right, if Source document is different, you need to go with different TO.
    But you can choose the Handling unit split, while creating a TO itself. i.e., You can quantify the goods for each handling unit.
    Edited by: Ganesh M on Feb 29, 2012 6:20 AM

  • 1099 Reporting for Multiple Operating Units using same Tax Id Number

    Everyone!!!!
    We have multiple operating units using the same tax id number. We need to use the 1099 standard reports. I see that in the 1099 standard programs, one of the necessary parameters is Tax Entity Id which is again at operating unit level.
    As 1099 reports need to be sent at the Tax Id Number not at operating unit level, is there any way to use the starndard program and do this, or will we have to customize it?
    We are on 11.5.10.2 if it matters. Let me know if you need more information.

    Ok, I Found it. We have to customize it. Taxes are reported at Operating Unit level only.

  • Use ar_receipt_api_pub create_cash API across multiple oper units

    Hi,
    I have a requirement to create AR receipts across multiple operating units and I am using the AR_RECEIPT_API_PUB's create_cash() to do that. The APIs work fine and I can create receipt in oper unit A. But when I changed to a different operating unit B and call the API, it terminated with NO_DATA_FOUND error.
    If I run my same code with operating unit B and then oper unit A, it created receipts in oper unit B but returned NO_DATA_FOUND in oper unit A. That way I confirmed there is no set-up issues with both oper units.
    I tried following 4 different ways to switch to different operating unit but all resulted in NO_DATA_FOUND:
    1) mo_global.init('AR');
    2) mo_global.init('AR'); fnd_client_info.set_org_context(&org_id>);
    3) mo_global.init('AR'); mo_global.set_policy_context('M', &org_id) ;
    4) mo_global.init('AR'); mo_global.set_policy_context('S', &org_id) ; (My EBS set-up has multi oper units, but I tried 'S' flag because of lack of ideas)
    Please help. Thanks!
    Mike.

    @MikeLi,
    Did you find any solution for this problem? We are facing this problem on R12 while creating AR receipts across multiple operating units. We will be glad if you share the solution. We have tried all possible ways; but did not help. When we look at the mo_glob_org_access_tmp ; we have access to all organizations; but the api returns 'no data found'
    Thanks.

  • Check Payment Processing Across Multiple Operating Units

    Hi There
    We are currently implementing Oracle R12 at the company I work for. Our solution implementer has informed us that you cannot process one check (cheque) payment across multiple operating units and that this is an outstanding enhancement with Oracle. Therefore (if we accept) this we will have to process a seperate check per operating unit which will increase our payment processing significantly.
    Can anyone out there:
    A. Confirm this is indeed an issue
    B. Are you aware if Oracle are doing anything about it and
    C. Is there any workaround that we could consider to lessen the impact.
    Thanks

    Hi,
    Scenario 1
    If you are going to make Single check payment to the same supplier having different sites under various operating units, oracle has provided a workaround, i.e. to make a manual payment in payables module, however it would not generate any payment instruction.
    Scenario 2
    If you are going to make single check payment to various suppliers in different/same operating units, it is not allowed by Oracle, as there is no logic behind it. You cannot have 1 check generated for different suppliers ...
    I am assuming you are referring to Scenario 1, in which case, i would say there is an WORKAROUND suggested by Oracle to make use of MANUAL PAYMENT method, which you could discuss with your Solution Implementer.
    Regards,
    Ivruksha

  • Wrong persistent unit

    Dear sdn members,
    I am using NetBeans 5.5 , database PostgreSQL 8.1, Sun Application Server 9, and hibernate.I copied following jars from Hibernate to lib directory of my application server
    # From hibernate entitymanager 3.2.0 cr2
    * hibernate-entitymanager.jar
    * lib/hibernate-annotations.jar
    * lib/jboss-archive-browsing.jar
    * lib/javassist.jar
    # From Hibernate Core 3.2.0 cr4
    * hibernate3.jar
    * lib/antlr-2.7.6.jar
    * lib/asm-attrs.jar
    * lib/asm.jar
    * lib/c3p0-0.9.0.jar
    * lib/cglib-2.1.3.jar
    * lib/commons-collections-2.1.1.j
    * lib/commons-logging-1.0.4.jar
    * lib/concurrent-1.3.2.jar
    * lib/dom4j-1.6.1.jar
    * lib/ehcache-1.1.j
    * lib/log4j-1.2.11.jar
    Than I tryied to generate entity classes from my database.All passed ok, but when I try to generate JSF from entity classes and run project , two exceptions appear in my browser
    javax.servlet.ServletException: Unable to retrieve EntityManagerFactory for unitName HibernateApp
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
         com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for unitName HibernateApp     com.sun.enterprise.util.EntityManagerFactoryWrapper.getDelegate(EntityManagerFactoryWrapper.java:80)     com.sun.enterprise.util.EntityManagerFactoryWrapper.createEntityManager(EntityManagerFactoryWrapper.java:91)     hibernatesample.controller.CustomerController.getEntityManager(CustomerController.java:47)
         hibernatesample.controller.CustomerController.getItemCount(CustomerController.java:187)
         hibernatesample.controller.CustomerController.getLastItem(CustomerController.java:197)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    and here is my persistence.xml file
    <persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="HibernateApp" transaction-type="JTA">
    <jta-data-source>konekcija</jta-data-source>
    <properties>
    <property name="hibernate.show_sql" value="value"/>
    </properties>
    </persistence-unit>
    </persistence>I would be very grateful if some could point me on the cause of my exceptions.
    with best regards,
    Nikola

    Hi Joaquin,
    Thank you for the reply, but i do not want this to enable. This is an additional popup & is already suppressed which not the issue in my case.
    When a user is assigned to multiple Org units, they get a popup asking the user to select the Org they want to login. But no matter what the user selects, the system will assign it to the first Org unit sorted based Org Id.
    Please refer the screenshot
    [http://img213.imageshack.us/img213/989/cic0q.jpg]
    Even if i select the 2nd Org unit, system still selects with the first one

  • ECC-HR has multiple busniess units but in SRM only few replicated

    Hello experts,
    am having few questions on HR replciation from ECC to SRM.
    We replicated org structure from ECC- HR in SRM system now scenario is :
    In  ECC-HR Org has multiple business units but we implemented SRM only for specific business units,when we ran change pointers, IDOCs are created for all changes of all business units and these IDOCs are failing in SRM.
    Now please guide me if i run RHALEINI only in Update mode and entered specific org units. In selection screen.Will it work.....i read somewhere,it may replace the values of the attributes or something can be broken out in org structure,If i run RHALEINI in update mode than what are the testings i need to perform before doing this actually in production system ?
    When i run RHALEINI in update mode,actually replciate those changes in SRM system do i need to run RBDMIDOC or any other report ?
    Smriti

    Hi Smriti,
    Try this. 
    Identify the HR PERNRs for the changes to be replicatied from HR to SRM (assuming you do transfer object "P")
    T-code "PFAL" or SE38  "RHALEINI"  Plan version=01, object type "P" and the object values as the PERNRs you want to replicate.
    Evaluation Path P-s-O (SAP should have provided this standard for the object "P")
    Press enter
    Check the message type default and enter the logical system of SRM.
    Execute this in the update mode.
    If there are any new org units, please check and manually maintain attributes on SRM. If there are any old org units, attributes are not wiped out as long as the old org units are connected to the same root company.
    Hope this helps.
    DV

  • Why not jdeveloper creates the persistance unit and the session client and

    why you do not create the persistance unit (outside) and the session client and ...the interface and other required opjects automatically when I create the application or the project?
    why you are using symbols like AFD, JSF, JSP, JPA,.JEE...and tens more, why you do not use a meaningfull names of these process symbols.
    Thanks
    Ali

    Asalman,
    I'm quite happy the JDeveloper behaves the way it does. Why? Because in most of my scenarios I don't want to be driven in a particular direction of development. This my choice of development and I don't like tools that dictate this to me.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Org unit reporting to multiple Org units

    Hi,
         We have set the A002 relationship as time constraint 002 and the B002 is set up as time constriant 3 but we are still able assign the org unit to report to multiple org units. Can you please let me know how to fix this issue.
    Thanks
    Vick

    Hi,
    Change the reporting relationshipp time constraint as 1
    Regards,
    Nitin

  • How to specify multiple org-unit in "dsadm request-cert"?

    Hi,
    We are trying to use dsadm to create a certificate request for one of our SunDS instances, and our CA requires that, in our case, the certificate subject string has multiple "org-unit"s, i.e, the cert subject string in the request needs to have something like "CN=myhost.whatever.com,OU=xx,OU=yy,etc.".
    However, when we try to run dsadm with more than one "--org-unit" parameter, it doesn't seem to allow this.
    Does anyone know what the command line for dsadm would be in this case?
    Thanks,
    Jim

    Use option --subject : it let you compose the subject DN freely.                                                                                                                                                                                               

  • Create multiple single unit wip jobs for total sales order line qty

    Hi all,
    I want to know if there's a standard way to create multiple single unit wip jobs from a sales order line which has 2 or more units, i mean...
    I have a sales order line with item A with 3 units. If I progress the sales order, a single job is automatically created in WIP with 3 units to be created. What i want is to create 3 jobs with one unit each, all of them linked to the sales line order...
    Thanks in advance!
    Regards!
    Answered.........
    Edited by: user604737 on Nov 10, 2010 3:51 PM

    Hi Sandeep
    We have similar requirement (SO qty = 3 then 3 WIP jobs should be created). However when planning releases WIP jobs it does not tie back(reserve) the jobs to sales order.
    Are you aware of any standard way to do the same??
    Regards
    Mudit Gupta

  • How to set multiple operating units in before report trigger

    hi all
    can any one help me out in getting clear in how to set multiple operating units in before report trigger in oracle report.
    as we set single operating unit (mo_global.set_policy.context('S',81); as 81 is my operating unit).then who to set for multiple operating unit at run time.

    Sounds like eBusiness Suite, right? Better ask this in the appropriate forum.

  • New Persistent Unit Jdeveloper 11.1.2.3.0

    Hello friends,
    I am trying to add another persistent unit to my EJB project I have already mapped the tables from DB1 I would like to map tables to entities from another DB to the same EJB project
    I've seen in the persistent.xml the icon to add another persistent, I add it (it asks me to set an offline DB connection, well I do it) then I go to the create entities from tables wizard I choose an online DB connection to another DB and try to map the tables to entities
    but no sucess, the persisent.xml the <class>siedocejb.entidades.ACAulaXCurso</class> are duplicated in all of the entities
    It creates the new persistent but not the new entities
    [code]
    <persistence-unit name="evaaa2">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <properties>
          <property name="eclipselink.target-server" value="WebLogic_10"/>
        </properties>
      </persistence-unit>
    [code]
    How can I add the new entities?

    Hi,
    sounds like an IDE bug to me if this doesn't work for entities of different names (note that in the end its the entity manager that determines the connection, which means that the IDE probably doesn't distinguish the entity names if they are the same). If you have a support contract I suggest you follow up with Oracle support to have a service request filed. Alternatively, you manually create the entities for the information to read from the second database.
    Frank

  • Maintain Multiple Sale Unit of Measure

    Dear all,
    How can we maintain multiple sale unit of measure for a particular material in single sales area.  Meaning different sales orders can have different unit of measure for the same material in the same sales area.
    Regards and Thanks,

    Check (MM02) Material Master - Additional Data button in menu bar - Unit of Measurement Tab
    OR
    Scenario: - BP buys ItemA in Kg and sells in Gr. (Refer SAP Note 883504 - Different UoM for the same Item)
    1. Define ItemA with kg as the unit of measure in the Purchasing Data tab - and Gr as the sales unit of measure in Sales Data tab. Enter items per purchase unit as 1000 and the items per sales unit as 1.
    2. Generate an AP invoice with a quantity of 1, the items per purchase unit is 1000 so 1000 items enter the stock.
    3. Generate an AR invoice with a quantity of 1, the items per purchase unit is 1 so the stock of the item is reduced by a quantity of 1 gram.
    There is no way to indicate that the stock has been reduced by 1000kg which is equal to 1 gram.
    Workaround:
    1. Duplicate ItemA as Purchase Item (UoM=Kg) and Sales Item (UoM=Gr) - This means that you will have 2 items, ItemA1 and ItemA2
    OR
    2. Generate ItemA (both Sales and Purchase Item) by configuring UoM and Price according to the smallest UoM and perform every transaction by keeping this UoM
    NB: Do not forget to define UoM in Administration - System Initialization - General Settings - Display tab - Default Weight Unit
    Also check following links for understanding:
    Price by multiple unit of measure
    Re: Multiple UOM's
    Thanks & Regards
    JP

Maybe you are looking for

  • ICal Invites to Outlook Users 5 Hours Off

    Hi, Have found a few posts on this, with even fewer answers. When I send iCal event invites to attendees who are on Win XP Outlook v 2003 sp2, the event is off by 5 hours. My 9 am appointments show up as 4 in the morning. Have tried resetting all tim

  • Bapi For creation and change for Vendor Master and Customer Master

    I am looking for BAPI to create and change  Vendor Master and Customer Master which will not take me to standard SAP transaction but will work in the background Explanation: BAPI to delete material (BAPI_MATERIAL_DELETE) take you to standard SAP scre

  • CallManager Express TCL Script issue

    Hi, I'm having issues trying to get an AA script working on a CME 4.0 system. What I want to do is quite simple, i just want to play a message to callers and that's it. When I dial the pilot, the call just drops and I get the following error when deb

  • Oo4o (Oracle 8i) and COM+

    Hi, We have an application which access Oracle 8i database using oo4o objects hosted in Windows 2000 COM+. Communicated with MS support and they told that MS is recommending 8.1.7.1.3 Oracle or above. Currently we have 8.1.7.0.0. The 0.0 version leak

  • Witholding information...

    Witholding information not showing liability of TCS. But, actual liability is there. t code: J1INMIS so, how to resolve it in system??? I want information/ suggestions for standard and Z development both.... waiting..... Regards, Sachin