Nested UnitOfWork and reading newly created objects...

Hi, my understanding is that when using nested UnitOfWork the transactions are not committed to the database until the outer most UnitOfWork is committed.
If a new object is created in a nested UnitOfWork and then a attempt is made to read that object in an outer (or other nested) UnitOfWork (so that it can be used as the parent of another new object) that object is not found because the overall UnitOfWork has not been committed yet.
Is there a way to accomplish this? i.e. access objects that may already exist or have been newly created within a nested UnitOfWork.
Thanks for any help and ideas.
-Tim Watson

Hi Don, yes this works as you describe above ... except we have a little wrinkle in our application regarding instance level access control. If i disable access control checking then the objects are retrieved correctly. But when we have access control enabled the newly created objects are not found. Here's an example of the processing;
1. Create the new object ObjA, in this example ObjA will be a Folder object in the UOW.
2. Create a new Authorization Lookup object that gives permission to the current user to acccess ObjA in the same UOW.
3. Later in the process flow, another object is created in the same UOW, ObjB, that will be a child of ObjA, so we need to lookup ObjA. In our application to do access control we append to the query, via the Expression, additional criteria like this;
"select ... from ... where .... and (t1.ID = t2.ID) and (t2.user_id = 'user') and (bitand(t2.privilege, 2) = 2) and ..."
(t1 being the domain object table and t2 the authorization lookup table)
so when we have this access control added to the query then it can't find the new, and uncommitted objects, but if not using this then it works fine.
Any ideas about this? i know all these objects are registered in the same UOW.
Thanks,
-Tim Watson

Similar Messages

  • I am mac user and want to create Object in VBA macro. when i write "set objwrd=createObject("Word.Application")"- it returns "runtime error "492" can't create object". now what it alternative to create object for word in excel macro???

    I am mac user and want to create Object in VBA macro. when i write "set objwrd=createObject("Word.Application")"… it returns "runtime error "492" can't create object". now what it alternative to create object for word in excel macro???

    Any help here...
    http://support.microsoft.com/kb/288117
    http://www.macworld.com/article/1154785/welcomebackvisualbasic.html

  • Add JavaScript file to ALL existing Task List pages and to newly created list pages

    We have several OOTB task lists that are in use on several subsites.  We want to add JavaScript to the NewForm.aspx and EditForm.aspx for these task lists. These lists have not been customized, they are based on the standard Task Content Type.
    Since there are several lists already created and in use, it would be far too much work to manually add a Content Editor web part to each page.
    We put the JavaScript file in the top-level site style library.
    Is there a way to programmatically attach a script reference to each existing page in all the subsites AND have the script reference placed on any NEW list pages created from the OOTB Task content type? Or, add a CEWP to all existing list pages using a feature?
    I could not find any examples of this.

    Hi,
    A solution would be like this: Add your script into a Content Editor Web Part in a page, then add this Content Editor Web Part into the NewForm page of these Task lists using
    SharePoint Object Model.
    More information:
    Use
    SPList.Forms property to retrieve the URLs of the specific form of these Task lists:
    http://sharepointcore.blogspot.com/2011/08/sharepoint-listitem-new-edit-and.html
    With
    SPLimitedWebPartManager object, we can retrieve the web parts of a page, choose one and add into another
    page:
    SPLimitedWebPartManager.WebParts
    property
    SPLimitedWebPartManager.AddWebPart
    Another two links about this for your reference:
    http://www.stefangordon.com/add-web-part-to-page-programmatically/
    http://sharepoint.stackexchange.com/questions/9442/how-to-programmatically-add-a-webpart-to-a-page
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they
    help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]
    Patrick Liang
    TechNet Community Support

  • I upgraded from v2 and now newly created folders are not in recent list

    I used to be able to create a new folder in v2 and see it immediately in the 'recent' list, but now it does not do that in the latest and greatest version. This is something I use all the time for filing new clients.
    Thanks, Adrian

    Hi Actually I never have needed support, it works perfectly for me. It's always a shame when an upgrade removes a feature you use all the time; I was genuinely surprised by that.
    Anyway, I turned off my upgrade flag so I won't bother you again.
    Thanks, Adrian

  • Customize Default ACL in Create Object Wizards

    In preparation to add some highly sensitive content to a Plumtree 4.5WS Portal, I need to implement a two-tier admin. security model. In short, I want only one or two members in the "Administrators Group" (Tier One) who can access everything without exception and a second admin. group (Tier Two) including the entire admin team who can access most of the portal. This way, the whole team can perform admin/maintenance tasks on "normal" content while access to the most sensitive content can be restricted to authorized users and the one or two people in the "Administrators Group" only. I prepared a script to add the "Tier Two" admin group to all existing object security and now I want to add the same group to the default ACL for new objects/cards/folder. Has anyone had any experience doing this? Is there a single file where I can add the customization or will I have to modify each CreateObject Wizard individually? Any experience/advice would be greatly appreciated.

    Note that the usual and recommended way of implementing clone() also does not invoke any constructor.
    public class C implements Cloneable {
      public static void main(String... args) throws Exception {
        C c1 = new C();
        C c2 = C.class.newInstance();
        C c3 = c1.clone();
      public C() {
        System.out.println("C'tor!");
      public C clone() throws CloneNotSupportedException {
        return (C)super.clone();
    }All this is generally fine, because a c'tor is not supposed to perform any business logic. It's only supposed to get a newly created object into a valid state. Cloning and serialization are not about creating new objects. They're about preserving and restoring or duplicating the state of an object that's already fully functional.
    Note also, that if you do end up needing to perform some other logic as part of deserialization or cloning, you can do so. These cases should be the exception, not the rule.

  • ABAP OO:  Duplication of selected data in created objects?

    I am new to ABAP OO and I have a conceptual question/concern that I cannot resolve.  Can someone explain what I am missing?
    I would think that selecting and storing (in internal tables) a large amount of data from many related database tables and, at the same time, creating and storing objects from this same data would unnecessarily consume a huge amount of memory.  To avoid this problem, it seems that the selected data and created objects should not be stored in internal tables simultaneously.
    Does this concern make sense?  If so, how is this problem best handled?
    Does it make sense to delete the corresponding data once the objects are created (to free memory)?
    Or does it make sense to keep the data and only temporarily create objects as needed?
    Thanks.

    Hello Matt
    The approach you describe is to select data first and the feed the object instances with them. <b>Why not let the object instances do the data selection themselves?</b>
    I will give you an example what I mean.
    (1) Lets assume I want to write an application that allows to deal with cost center hierarchies. On the selection screen you can choose one or many cost center hierarchies.
    (2) Using the selection criteria I would select all cost center hierarchies but without any details (just the key values).
    (3) Next I would loop over the cost center hierarchies and create a cost center hierarchy instance (a class you have to define yourself) for each key value. The CONSTRUCTOR of this class will have an IMPORTING parameter like <i>id_kostl_hier</i>.
    (4) In the CONSTRUCTOR method I first check if the cost center hierarchy exists (if not raise an exception-class based exception) and then do the selection of the hierarchy details (e.g. the cost centers).
    (5) The instances are collected in an itab of the "frame" application.
    Using this approach you will have little duplication of data within your application. Furthermore, if you really have to deal with huge amounts of data then you could read them only on demand (like in tree controls where the sub-nodes usually are read when the parent node is expanded).
    Hope I could give you some fresh insights into this exciting topic.
    Regards
      Uwe

  • Create object by filter

    Hi Folks ,
    i got a litle problem with creation of objects.
    here's the story about .
    iv'e created an interface intf1 with filter and also several different classes that each one of them is implement the interface intf1 .
    let's say C1 ...Cn those are the classes .
    now i want to create one of them dynamically and therefore i use static function :
    CALL METHOD cl_exit_master=>create_obj_by_interface_filter
        EXPORTING
          inter_name   = 'INTF1'
          method_name  = 'LIKE_CONTRUCTOR'
          flt_val      = filter_value
        IMPORTING
          exit_obj_tab = lt_exit_obj.
    inside lt_exit_obj i got back from the function the name of interface and some data but the field "obj" which suppose to be the referance for newly created object is NULL .
    does someone have any tips hints or tricks how can this issue can be solved ?
    Thx ya all .

    HI
    GOOD
    GO THROUGH THIS LINKS
    http://help.sap.com/saphelp_nw04/helpdata/en/8c/ed4f3e065de946e10000000a114084/content.htm
    http://www.intellicorp.com/support/NetProcess/TechNotes/lcom-filter-documentation-006.pdf
    THANKS
    MRUTYUN

  • Import a dumpy file to newly created schema using the old schematablespace!

    I'd created an export dump file of user X with rows=n (for Replicating the schema data structures to another schema). When I import using this dump file to newly created user Y. The newly created objects(tables,indexes) are using the tablespaces that were used in X instead of the default tablespace of Y.
    How can I import X objects into Y with Y's default tablespace.?

    CJ and others,
    This just worked fine for me. here is what I did:
    sql> connect system/manager
    create tablespace tbs1 datafile tbs1.f size 10m;
    create tablespace tbs2 datafile tbs2.f size 10m;
    create user user1 indentified by user1 default tablespace tbs1;
    create user user2 indentified by user2 default tablespace tbs2;
    create table user1.tab1 (a number);
    insert into user1.tab1 values (100):
    commit;
    exit;
    $ exp user1/user1 file=user1.dmp
    sql> connect system/manager
    drop tablespace tbs1 including contents;
    exit
    imp system/manager file=user1.dmp fromuser=user1 touser=user2
    This imported user2.tab1 into tablespace tbs2. I think if tbs1 was still around, then it would have imported it into tbs1.
    Thanks
    Dean

  • Creating objects in a second instance

    I have created a second instance through the console of a directory server, which has been configured with the same rootdn as the original.
    When I open up the console why in the new instance does it show the rootdn on the config tab but the original doesnt ......
    also ....
    why when i go into the second instance i try creating data objects for root suffixes ive created to mirror the original instance, does it create them under cn=config ......
    Thanks
    G

    Hi
    I have read that creating objects in a loop degrades
    performance. Can someone explain why this should be
    so?Every object creation takes time, so if you create
    lot of unnecessary temporary items in loop it degrades
    performance (so it is nothing loop specific).

  • Creating objects in a loop

    Hi
    I have read that creating objects in a loop degrades performance. Can someone explain why this should be so?

    Hi
    I have read that creating objects in a loop degrades
    performance. Can someone explain why this should be
    so?Every object creation takes time, so if you create
    lot of unnecessary temporary items in loop it degrades
    performance (so it is nothing loop specific).

  • CREATE OBJECT inside INITIALIZATION event in ABAP

    Hi everyone,
    I have one question, can we create object inside INITIALIZATION event. Why, I am asking this question is, because most of the time I have seen people to create object inside start-of-selection. Please give your thought on this.
    The code I have just coded below is also right or wrong?
    CLASS lcl_build_data DEFINITION.
       PUBLIC SECTION.
         METHODS : constructor,
                            get_all_files,
                             validate_site.
    *-- Private Section declaration
       PRIVATE SECTION.
             METHODS : clear_and_refresh,
                                display_output.
    ENDCLASS.                 
    *** class declaration,  create instance for the class
    DATA: gv_data     TYPE REF TO lcl_build_data.
    INITIALIZATION.
    *** Create class object. Constructor method will be called to Refresh
    *** and Clear all internal tables and Work areas
       CREATE OBJECT gv_data.
    *                    AT SELECTION-SCREEN             *
    AT SELECTION-SCREEN ON s_vkbur.
    *** Sales Office validation
       CALL METHOD gv_data->validate_site.
    *                START-OF-SELECTION                    *
    START-OF-SELECTION.
    *** Get the list of all files from unix dir.
       CALL METHOD gv_data->get_all_files.

    Since you are using the same object for your Selection screen related events, AT SELECTION-SCREEN, you would have to instantiate the object in the INITIALIZATION event. If your object usage is just for the data - In case you use the MVC design pattern, you should push back the object creation in START-OF-SELECTION.
    Regards,
    Naimesh Patel

  • How to read status of a newly created notification

    Hello All,
    I have implemented a BTE for the event PM000010 - Update Notification.
    Now my problem is that I wish to read the existing statuses on the notification.
    This works fine if the notification already existed before.
    However, if the notification is newly created, then Function Modules STATUS_CHECK and STATUS_READ do not work.
    This is only if the notification is newly created.
    I am particularly interested to know if the status Notification In Process and Notification Completed are present on the order.
    How do I achieve this since STATUS_CHECK and STATUS_READ are not able to fetch the statuses when the notification is newly created?
    Thanks,
    Mithun

    hi
    check out the below details
    Where to get the table which is having user status with Notiifcation number.  (not the system status).
    By : Selva
    1. From table QMEL get OBJNR(object number) using the QMNUM( notification number).
    2. Using this OBJNR get STSMA( Status Profile) from table JSTO.
    3. Using the OBJNR get STAT(object status) from table JEST.
    You may/ may not get multiple object status for an Object number.
    System status number will start from E.
    User status number will start from I.
    4. To get the text of the status, use the status number (STAT) and STSMA to get the status text from table TJ30T.
    We have done this and working fine.

  • Varray, Nested Table and Object types in OWB r2

    Requirement:
    Flat file with repeating groups of nested content need to move into Object Relational ORACLE table (using varray or nested tables - no preference). The data will be loaded, then mapped/transformed into a richer O-R output to directly produce XML outputs.
    Problem:
    Generated PL/SQL "seems" to do the correct thing, but deployment errors show failures on mapping of collections (varrays, NTs or OTs) and in sqlplus recompiling the PKB still gives the errors. Is this a PL/SQL generator error, or is there a more meaningful example of using CONSTRUCT OBJECT operator than the embedded odcumentation - it is a simple type (single instance) and not a variable repeating group of nested data.
    Anyone had any success with these, or know of any collateral to assist in the process. Thanks.

    The process we are following is very simple. We are talking 10 columns from a source flat file table and wish to map this into a Varray/Nested table, with one column of Varchar2(10).
    When you create your map in OWB, select the construct object, you have to choose an object type - it does not allow you to select a VARAAY or NESTED table.
    I have then created an object defined in the same structure as the VARRAY/NESTED table - I have then made the VARRAY/NESTED table of this TYPE.
    Example:
    CREATE OR REPLACE TYPE "O_REL_PUB_INDEX" AS OBJECT (
    X_REL_PUB_INDEX_1 VARCHAR2(10))
    CREATE OR REPLACE TYPE "V_REL_PUB_INDEX" AS VARRAY(15) OF O_REL_PUB_INDEX
    In OWB you can then select O_REL_PUB_INDEX when creating the 'Contruct Object'.
    The problem I have is that when I map to my target column of type V_REL_PUB_INDEX and DEPLOY my map I get the following errors taken from OWB control centre
    Name
    Action
    Status
    Log
    TEST
    Create
    Warning
    ORA-06550: line 2931, column 9:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 3174, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    TEST
    Create
    Warning
    ORA-06550: line 401, column 7:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 643, column 13:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    TEST
    Create
    Warning
    ORA-06550: line 7221, column 9:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 7464, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    Any ideas? anyone succesfully mapped to either a VARRAY or an NESTED TABLE target column?

  • Object view  with nested table and member functions????????????????

    HI frds:)
    I need some help regarding writeing soem queries..
    I have to use view in retreving data and by useing member functions of object.
    1) i have to create a nested table by useing type object.
    2) i have to create a object wtih member functions inorder to create view of taht nested table,.
    3) by useing this objectt view and by useing methods i have to write soem queries ...
    If any one know or any information regarding this please reply me... as i have searched in net alot but i was unable to figure out..
    Thanks....

    // first createing object
    create type emp_det as object
    (empname varcahr2(20),start_date date,end_date date);
    // creating table of that object
    create table emp_detai_table as table of emp_det;
    // creating nested table
    create table empl (emp_no number,emp_detail emp_detail_table,dep_no number)nested table emp_detail store as s;
    //now i want to create view.. inorder to create view i need to create object. in that object i want to create methods.. these methods should work with date attributes..
    after creating object view i need to select or write some queries by useing member methods..
    This is the tast i have to perform.,. i have no materials ...if u have any link ..forward me..
    i have to do it as soon as possible..
    waiting for your reply...

  • I am trying to create a simple animated gif in Photoshop. I've set up my frames and want to use the tween to make the transitions less jerky. When I tween between frame 1 and frame 2 the object in frame two goes out of position, appearing in a different p

    I am trying to create a simple animated gif in Photoshop. I've set up my frames and want to use the tween to make the transitions less jerky. When I tween between frame 1 and frame 2 the object in frame two goes out of position, appearing in a different place than where it is on frame 2. Confused!

    Hi Melissa - thanks for your interest. Here's the first frame, the second frame and the tween frame. I don't understand why the tween is changing the position of the object in frame 2, was expecting it to just fade from one frame to the next.

Maybe you are looking for

  • Problem with XCode

    I am trying to make an app that makes music once pressed. There are several problems. This is the code: #import "ViewController.h" @implementation ViewController     <--- Incomplete implementation -(IBAction)idcays; {     CFBundleRef mainBundle = CFB

  • Mac Mini (mid 2010) Graphic Card

    Is NVIDIA GeForce 320M(256MB) better than NVIDIA GeForce 6600GT(128MB) and NVIDIA GeForce 8800GTX (512 MB)? And can i upgrade the graphic card of a mac mini?

  • Dynamically create objects at runtime - Collections?

    Dear Experts During runtime i need to create several objects. Can you help me by pointing out the best practice here? Is it possible to store Man and Dog object in the single collection? Thank you for the help The code is as follows abstract class Ma

  • Replacing the old value with new value on the website

    Hi , I have two input fields CLIN # and PR#.When i enter the text,for the first it is working fine,second time when i enter it is replacing the value which i enter with the first one.I should not replace the old value. ex: Example when i enter test5

  • Export to disk vs. Send to iTunes

    What is the difference between these two options? Basically, I want to edit my GarageBand project with Pro Tools, but I want the mixdown to be uncompressed so there's no audio quality loss. Thanks. MacBook (2 GHz Intel Core 2 Duo, 2 GB 677 MHz)   Mac