Deserializing cyclic reference with object resolution

I am attempting to deserialize complex objects containing cyclic references with an ObjectInputStream that implements the method resolveObject.
Of course, enableResolve(true) has been called in the constructor of the object input stream.
The problem I am seeing is that object resolution, when applied, is not propagated back to those objects that have been already deserialized and point to a "handle" object.
Is there a proper way to retroactively enforce object resolution?
Cheers,
Didier H. Besset

Hi Didier
I read your code, downloaded junit and ran your test. The test fails, so back to a few System.out.println statements!
I put a few into your code, see attached. Your deserialization is OK but your getComposite method returns the underlying referent and you are testing against the SoftReference!
Here's the output of the printlns - you can see the strings, objects and lists being resolved and the final "test" of printing out the objects you are comparing.
Resolving Beta
Returning Beta
Resolving Component@18f51f
Resolving name Beta
Returning ComponentReference@84ce7a
Resolving Gamma
Returning Gamma
Resolving Component@10fd7f6
Resolving name Gamma
Returning ComponentReference@12b6c89
Resolving [ComponentReference@84ce7a, ComponentReference@12b6c89]
Returning [ComponentReference@84ce7a, ComponentReference@12b6c89]
Resolving Alpha
Returning Alpha
Resolving Composite@1e2befa
Resolving name Alpha
Returning CompositeReference@1682598
CompositeReference@1682598 Composite@1e2befa
CompositeReference@1682598 Composite@1e2befaRegards
Tom

Similar Messages

  • What does Editioning View mean in references with Object "View"?

    Whats the purpose of Editioning View in Oracle Pl/SQL?
    Its placed right under Oracle sql developer Views.

    Read this for info on Oracle Editions:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25518/adfns_editions.htm

  • How to copy objects from Pages (5.5.1) and paste it into Photoshop as a vector smart object with high resolution?

    I recently have bought a new Macbook Pro (Version 10.10.1) with the OS X Yosemite. The computer comes with the new Pages (version 5.5.1).
    Here is the problem: I like to create artwork using the shapes on Pages. Previously, on my old mac, I used Pages 4.3 to create objects, which I would copy then paste to Photoshop and it would become a vector smart object. However, in the new Pages (version 5.5.1), when I copy objects, they would appear on Photoshop as instead, a layer and it would not be in full resolution.
    Also, I know there is nothing wrong with the Pages file itself because I have converted the document to PDF form and it is high resolution when inserted into Photoshop that way.
    Does anyone know how I can copy individual objects from Pages (5.5.1) and paste it into Photoshop as a vector smart object with high resolution as I have done before?
    Thanks!

    ghotiz wrote:
    copy the image and have it in a high-quality PNG format that does not include the background from the Pages document.
    Oh, well if you don't actually need vector objects then it looks like this is possible. As I said earlier, Pages is putting a PNG on the clipboard. I tested it and it does paste into Photoshop as a transparent layer, because I can see the transparent background of the pasted PNG graphic if I either turn off all layers behind it in Photoshop, or if I start a new Photoshop document to paste into but make sure I choose Transparent for the Background Contents in the New Document dialog.

  • Duplicating stream object to new stream with lower resolution

    Hi all generally I have a question, Is it possible for ams to split my original live stream to a new stream but with lower resolution, so i have two streams one with high resolution and one with low resolution?
    If not I how does it Adobe Flash Media Live Encoder do? I can steam up to 3 different resolutions from one camera object. Is it possible to do also from flash?
    I want to built a multi user conference application. But have some cpu usage  issues, so I need a additional lower resolution stream to use for the miniature views.
    Could You help me with this, any tips how could I do such a thing?
    I using rtmp protocol to communicat and adobe media server 5.
    Sorry if a similar thread was already published on this forum.

    Thx 4 the replay.
    So maybe I could do something like this:
    I am able to send two streams from one camera but they both have the same  resolution.
    Is there any way from flash app to send two streams from one camera with different resolution like FMLE does?

  • WS with cyclic reference on report

    Hi everybody,
    I need to use a web service that contain a cyclic reference. The type of ws is like this:
      rTypeUsed = Record;
      TArrayOfTypeUsed = Array of rTypeUsed;
      rTypeUsed = Record
        Field01 : String;
        Field02 : String;
        Field03 : String;
        Field04 : Double;
        Field05 : Double;
        Field06 : Double;
        Field_Child : TArrayOfTypeUsed;
      End;
    And when I tried input this web services on crystal, I gave an error like this:
    Logon Failure
    Datail: It's can't possible support cyclic reference on squema.
    Please check the cyclic path: getTypeUsedResponde->getTypeUsedResult->rTypeUsed->Field_Child->rTypeUsed...
    I can't change the web service, because it is used in many places.
    There are some solution, work around for solving this problem?
    Thanks

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly.
    Need more details like version and patches applied etc.

  • Error while adding XML Schemas with cyclic references

    I have to use the 3rd party bunch of XML Schema files, but two of them reference each other, i.e. there are cyclic references. ESB displays a conflict in this case.
    Is there any way to resolve the problem without changing source xsd-files?
    My configuration is WebLogic Platform 9.2.1 + AquaLogic Service Bus 2.6

    Our scenario is that the corporate data model (in UML) is transformed into XSD and delivered as several separate XSD files. Our modellers argue that cyclic references make sense in this context and are not forbidden by the standard.
    We restructured the transformation so that only a single XSD file is delivered (~550K) but this is unwieldy, inflexible and ALSB is sloooooooooow when manipulating a schema of this size inside the console.

  • [Repost] Kodo do not use cache when resolving references to objects?

    Abe,
    I noticed that if object A references object B and we read multiple A
    object which reference the same B object, this B object will be re-read
    from database for every fetched A object. If I read 100 A-object
    referencing the same B it will do 100 selects on the same B. I use
    optimistic transactions with retain values = true
    Could you please comment on it
    Thank you very much
    Alex

    Was there something else about this you'd like me to comment on?_
    No Abe that is it. I was not sure I am not doing something wrong. I
    seemed very strange to me that internal reference resolution completely
    ignore cache.
    I think it is quite important - you want believe how much it slows down
    object graph retrieval. It does not seem to be hard to implement. :-)_
    I guess when resolving a reference you would have to use the same
    validate _true/false settings as for retrieving  object?
    -----Original Message-----
    From: White, Abe [mailto:[email protected]]
    Sent: Monday, August 06, 2001 6:10 PM
    To: JDO-ListServ
    Subject: RE: [Repost] Kodo do not use cache when resolving references to
    objects?
    this B object will be re-read_
    from database for every fetched A object_Yes, this seems like inefficient behavior that we should optimize. The
    same B instance is returned from each relation, so it is not a bug, but
    obviously it is something we could be doing a little more intelligently.
    Thanks for pointing it out!
    Was there something else about this you'd like me to comment on?_

  • Cross Reference an Object??

    How do I cross reference an object using Indesign CS4?
    I've got a PDF that I've dropped into a frame, which I applied an Object Style.  Now I need to create a cross references in the document, that point to the PDF (a chart).  I've got to do this with several PDF's.
    When I go to create a cross reference, I can only apply it a Paragraph Style or a Text Anchor, I don't get an Object Style to choose from.
    I could put some text in behind the chart, and arrage the chart to the front, but i'd rather create a cross reference to the Object itself.
    What do i do?

    sammy003 wrote:
    How do I cross reference an object using Indesign CS4?
    I've got a PDF that I've dropped into a frame, which I applied an Object Style.  Now I need to create a cross references in the document, that point to the PDF (a chart).  I've got to do this with several PDF's.
    When I go to create a cross reference, I can only apply it a Paragraph Style or a Text Anchor, I don't get an Object Style to choose from.
    I could put some text in behind the chart, and arrage the chart to the front, but i'd rather create a cross reference to the Object itself.
    What do i do?
    Cross-references only point to text - either a text anchor or a paragraph - not to objects.
    If your placed PDF is in an anchored frame, you can point the cross-reference to the paragraph in which the frame is anchored.
    If your placed PDF is not in an anchored frame, you can do what you suggest above, or you have these other options:
    * place the PDF into a text frame
    * create a text frame and group it with the PDF; point the cross-reference to the paragraph in the text frame, or insert a text anchor in the text and point the cross-reference to it.
    * you can paste the grouped PDF and text frame object into a text frame to make it an anchored frame.
    The idea of a cross-reference is usually to point to a caption or heading. You can't point to the text in a placed PDF because it's really a graphic. You'll probably want a caption to identify the chart. The caption is the text you cross-reference to. The caption can be in the paragraph that holds the anchor, in a text frame grouped with the graphic, in a paragraph above or below the graphic, or in an anchored frame that's positioned near the graphic.
    If your layout will not reflow, you probably don't need an anchored frame, but if the layout will reflow, you'll want to use the ability of an anchored to move with the text.
    Read about cross-references and anchored frames in Help. If your caption will be numbered, such as "Figure 3," also read about numbered lists and numbering properties of paragraph styles.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How to insert reference of object in nested table

    hi , i have a problem with nested table :
    CREATE OR REPLACE TYPE ITEM AS OBJECT
    ITEM_ID NUMBER,
    ITEM_DES VARCHAR2(4000),
    PRODUCT_NO VARCHAR2(15),
    PRODUCT_DES VARCHAR2(4000)
    CREATE TABLE ITEMS OF ITEM
    CONSTRAINT ITEM_PK PRIMARY KEY (ITEM_ID)
    CREATE OR REPLACE TYPE BOM AS OBJECT
    BOM_ID NUMBER,
    ITEM_ID NUMBER,
    BOM_PARENT_ID number
    create or replace type boms as table of ref bom;
    create table bom_table
    bom_ids bom,bom_member boms
    ) nested table bom_member store as bom_childs;
    insert into bom_table (bom(1,1,null),null);
    insert into bom_table (bom(2,1,1),boms(select ref(t) from bom_table t where t.bom_id=1))
    show error.
    how i can insert in nested table reference of object
    thanks

    your table "bom_table" is not an object table or view, and thus you can't create object references to it's rows. you'll need to create an object table or view of "bom" objects, with a corresponding object identifier, and then reference that table/view in your subquery instead.
    Gerard

  • After December 2014 update, Compile Error - calling Excel Objects Sub "Object library invalid or contains references to object definitions that could not be found"

    When try to call Sub in Excel Objects > SheetXX after the original xlsm is modified and saved by another user in diff machine, getting an error below and seems Excel cannot identify any subs exists in Sheet.
    Compile error:
    Object library invalid or contains references to object definitions that could not be found
    Note: it seems that this problem has been occurring After December 2014 update and still exists even after applying the fix:
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2014/12/11/forms-controls-stop-working-after-december-2014-updates-.aspx)

    Hi Kwlee324,
    Thanks for sharing the workaround with us. It would be very helpful for others who have the same issue.
    Also I found a two useful links about the error message "Object library invalid or contains references to object definitions that could not be found":
    https://support.microsoft.com/kb/2703186
    http://blogs.msdn.com/b/vsod/archive/2009/06/05/visual-basic-6-controls-stop-working-after-security-advisory-960715.aspx
    Hope it is helpful.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Generate error list with object detail

    Dear All,
    I have two way (multimaster ) Replication but due to some reason it generated many errors during replicate data so to resolve errors, I want to generate error list (Report) with object details instead viewing them one by one. please guide
    Thanks

    What do you mean with generate error list (Report) with object details ?
    You can get all the errors from DEFERROR view.
    There are columns DEFERRED_TRAN_ID and CALLNO.
    You can join this columns with DEFCALL (DEFERRED_TRAN_ID and CALLNO).
    Joining this two views will provide information about the objects and transaction type involved in the call.
    DEFCALL.PACKAGENAME contains the reference to the table_name.
    DEFCALL.PROCNAME contains information about the transaction type.
    Example:
    select e.deferred_tran_id,
           e.callno,
           e.origin_tran_db,
           c.packagename,
           c.procname
    from deferror e, defcall c
    where e.deferred_tran_id=c.deferred_tran_id
    and e.callno=c.callno(below are the links to the 10gR2 docs containing information about DEFERROR and DEFCALL views. If your database is different version, than search http://tahiti.oracle.com for version specific documentation)
    DEFERROR
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14227/rardeftranviews.htm#sthref2599
    DEFCALL
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14227/rardeftranviews.htm#sthref2595
    Cheers!
    Message was edited by:
    tekicora

  • Is it possible in java to pass reference of object in Java?

    Hello,
    I'm relativily new to Java but I have "solid" knowledge in C+ and C# .NET+.
    Is it possible in java to pass reference of object in Java? I read some articles about weakreferences, softreferences, etc. but it seems that it's not what I'm looking for.
    Here is a little piece of code I wrote:
    package Software;
    import java.util.Random;
    * @author Rodrigue
    public class RandomText
        private Random rand = new Random();
        private Thread t;
        private String rText = "Rodrigue";
        public RandomText()
            t = new Thread()
                @Override
                public void run()
                    try
                        while(true)
                            UpdateText();
                            sleep(100);
                    catch(InterruptedException ex)
            t.start();
        private void UpdateText()
            int i = rand.nextInt();
            synchronized (rText)
                rText = String.valueOf(i);
        public String GetText()
            return rText;
    }It's just a class which start a thread. This class updates a text with a random integer 10 times per second.
    I would like to get a reference on the String rText (like in C++ ;) yes I know, I must think in Java :D). So, like that, I could get one time the reference, thanks to the GetText function, and update the text when my application will repaint. Otherwise, I always have to call the GetText method ... which is slow, no?
    Are objects passed by reference in java? Or, my string is duplicated each time?
    Thank you very much in advance!
    Rodrigue

    disturbedRod wrote:
    Ok, "Everything in Java is passed by value. Objects, however, are never passed at all.". Reference of object is passed by value too.
    But, how to solve my problem in Java_? I have an object which is continually modified in a thread. From an another side, this object is continually repainted in a form.I'm not sure I totally understand your problem. If you pass a reference to an object, then both the caller and the method point to the same object. Changing the internal state of the object (e.g. by calling a setter method) through one reference will be observed through both references, since they both point to the same object.
    No, calling a method is not particularly slow. Especially if it's just a simple getter method that returns the value of a member variable.
    If this is happening in a multithreaded context, you'll have to use proper synchronization to ensure that each thread sees the others' changes.

  • CDG-03516:references an object outside of the workarea

    i've exported some App System by RON after that delete all applications systems and migrate the repository again (6 to 6i) then i deleted the application previously backed and restore the import and now i am trying to geneate my form modules. When I try to generate a module in the Design Editor I get the following message: 'CDG-03516 ERROR: Module : This module contains or references an object outside of the current workarea'. The firts time i included the external objects (System folder/Oracle forms-language) and i try to generate again i got the same message, i tried to include external references again, when i choose this I get a message saying 'There are no external references for this Workarea'. i lost some relationship when i did the export/import process? what is the way to make a backup by application system and assurance the integrity of that?
    thks in advance

    Hi Alex,
    It sounds like you have a problem with the access rights defined for your users and perhaps some information lost
    in the migration.
    The Design Editor treats everything in the context of a
    workarea, so if a user does not have access to an object
    in a workarea then the action fails with this error.
    Secondly, have you read the 6i Migration Guide here on
    OTN (see our Documentation page, under 6i Release 4.6)?
    There may be some useful information in there regarding
    the possible loss of information or related issues.
    Hope this helps.
    Regards,
    Dominic
    Designer Product Management
    Oracle Corp

  • Compile error: Object library invalid or contains references to object definitions that could not be found

    Office Online 365 installed today January 20 on brand new HP Envy. Get the above message when loading Excel applications with code and when running code. Will greatly appreciate help. Applications run well on other computers.

    Hi Jaime,
    >> Get the above message when loading Excel applications with code and when running code. Will greatly appreciate help. Applications run well on other computers.
    >> Compile error: Object library invalid or contains references to object definitions that could not be found
    According to the error message, it seems some ActiveX control is not registered successfully on the new machine.
    Would you mind telling us which ActiveX controls you used in the workbook?
    >> For my applications Excel from Office 365 is now useless. Should I just let my subscription run out and purchase another version?
    According to my experience, this issue is not related to the subscription.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Filling Worflow container with objects (OOAD)

    Hi Gurus,
               I have created a workflow,which has abap objects as container element. Can anyone let me know how can I fill the container element with object..I have tried with marcos as mentioned in the library..but not container is not filled ..plz advice....
    Create a variable for the object reference. Use the following command to do this:
    DATA <Object> TYPE SWC_OBJECT.
    Create the object reference. Use the following command to do this:
    SWC_CREATE_OBJECT <Object> <ObjectType> <ObjectKey>.
    Write the object reference into the container using the following macro instruction:
    SWC_SET_ELEMENT <Container> <ContainerElement> <Object>.
    Thank you
    - Senthil Bala

    BalusC -- The line that gives me my NullPointerException is when I call the "DisplayProduct()" method. Its a dumb question, but with NetBeans how do I find out which reference could be null? I'm not very familiar with how NetBeans works with finding out how to debug. Any help you can give me would be greatly appreciated.The IDE is com-plete-ly irrelevant. It's all about the source code.
    Do you understand anyway when and why a NullPointerException is been thrown? It is a subclass of RuntimeException and those kind of exceptions are very trival and generally indicate an design/logic/thinking fault in your code.
    SomeObject someObject = null; // The someObject reference is null.
    someObject.doSomething(); // Invoking a reference which is null would throw NPE.

Maybe you are looking for

  • External drive will not mount

    I have a 500Gb external USB / firewire HD, and it has stopped mounting. Disk utility can see the disk, and can see nothing wrong with it if I try to repair. However, if I try to mount the disk from disk utility, it fails to mount the disk - although

  • Where to upload images on-line for storyboarding?

    Where to upload images on-line for storyboarding? Or what does it take to produce a storyboard from a Adobe Story Plus Script? Any suggestions are welcome ; )

  • Iphone 3G not shows wi-fi networks

    Hi, A few days ago, my iPhone 3G stopped to detect any wi-fi networks. I did factory reset, updated the system and other things but without success. The big problem is that I bought the iPhone during a trip to Italy. Do you have any suggestions?

  • Intercompany billing IDOc issue

    Hi, I am intercomapny purchase billing documents and intercomapny sales billing documents thropugh IDOC posting to generate automatic invocies. All IDOCs for intercomapny purchase billing documents are going into error. Error is : Enter a tax code in

  • Acer Iconia Tab - touch screen glitch?!

    A couple years ago, my husband bought me a tablet for valentines. It worked great for a couple of months, then the touch screen started glitching. I could press an icon on one side of the screen and the tablet registers it on the complete opposite si