GC of object with loopback references

Can someone answer this please : when there is a loopback of object references that are created in a method scope, will the objects be GCed ? For example, suppose we have this situation of objects: A -> B -> C -> A and they are created in a method like this:
public void foo() {
A a = new A();
B b = new B();
C c = new C();
a.set(b); //a has ref to b
b.set(c); //b has ref to c
c.set(a); //c has ref back to a
When I come out of the foo() method, will the objects a, b and c be GCed ?

radiatejava wrote:
Can someone answer this please : when there is a loopback of object references that are created in a method scope, will the objects be GCed ? ...The short answer is yes. Cycles can be a problem for reference counting garbage collectors; however, I'm not aware of any mainstream JVM that uses a reference counting GC. Sun's JVMs (SE, ME, realtime) use tracing collectors, which are not affected by reference cycles.
Python, on the other hand, uses a reference counting GC, so python programmers should avoid creating cyclic references.

Similar Messages

  • Objects with invalid references

    hello everybody,
    since 1 month in our PI dev we have a strange situation.
    Inside every SC we see a tree named "objects with invalid references" that inside cointain the Namespace.
    I notify we have this situation after a massive transport from PI prod to PI dev .
    we decide to do this because no more develop are necessary and we decided to sincronizate the 2 systems.
    It's possible remove this ?
    thanks
    Alessandro

    Hi
    Please check if the Prod and Dev SLD is sync and has all the SWC with same configuration.
    Please also check the dependency maintain in Prod and Dev SWC.
    refer the below discussion
    SWCV deleted from SLD accidently
    regards,
    Harish

  • New Object() with no reference

    I'm creating an object and don't want it to waste space after being created. It's a thread spawner and just want it to create the threads and wait auntil they finish.
    my idea was to write
    new Object();but don't know if it's a nice idea. This way there will be no reference. Maybe it's better:
    Object object = new Objeect();
    object = null;I'd rather use the first one. Any opinion? Thanks!

    malcolmmc wrote:Under no circumstances will the garbage collector recycle an active thread or the stackframes associated with it. That would crash the thread. So it doesn't matter if you retain a reference to it or not, except that if you want to wait for all the threads to finish then the respectable approach is to call join on all of them, for which you obviously need your own reference to the thread.Think about the spawner as a subprogram that creates threads, not as a thread itself. It would be INSIDE the spawner where threads would be created and joins would be executed. Once we would get out of the spawner, threads would be finished, so there would be no reference to them at all.
    I realized it was a bad idea to make it this way, so I'll launch it as a private method.

  • Resolved reference placed in object with no cache

    Hi ,
    I have been seeing this error in my weblogic logs.The workflows are
    running fine and doing intended work. Have a look at the error message
    WARNING: Resolved reference placed in object with no cache.
    java.lang.Exception: printStackTrace
            at com.waveset.util.Util.printStackTrace(Util.java:6259)
            at com.waveset.object.PersistentObject.cacheWarning(PersistentObject.java:476)
            at com.waveset.object.PersistentObject.checkReference(PersistentObject.java:2683)
            at com.waveset.object.PersistentObject.checkReferences(PersistentObject.java:2718)
            at com.waveset.object.PersistentObject.addMemberObjectGroup(PersistentObject.java:1513)
            at com.waveset.workflow.WorkflowEngine.buildWorkItem(WorkflowEngine.java:4406)
            at com.waveset.workflow.WorkflowEngine.callManualAction(WorkflowEngine.java:4284)
            at com.waveset.workflow.WorkflowEngine.callAction(WorkflowEngine.java:3811)
            at com.waveset.workflow.WorkflowEngine.callAction(WorkflowEngine.java:3229)
            at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:3070)
            at com.waveset.workflow.WorkflowEngine.makeTransition(WorkflowEngine.java:2809)
            at com.waveset.workflow.WorkflowEngine.checkExplicitTransitions(WorkflowEngine.java:2700)
            at com.waveset.workflow.WorkflowEngine.checkTransitions(WorkflowEngine.java:2486)
            at com.waveset.workflow.WorkflowEngine.processSteps(WorkflowEngine.java:1891)
            at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1748)
            at com.waveset.workflow.WorkflowEngine.walkCases(WorkflowEngine.java:1656)
            at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:816)
            at com.waveset.workflow.WorkflowEngine.execute(WorkflowEngine.java:478)
            at com.waveset.workflow.WorkflowExecutor.execute(WorkflowExecutor.java:235)
            at com.waveset.task.Scheduler.execute(Scheduler.java:2393)
            at com.waveset.task.Scheduler.executeTask(Scheduler.java:2295)
            at com.waveset.task.TaskManager.executeTask(TaskManager.java:277)
            at com.waveset.workflow.Workflow.checkinWorkItem(Workflow.java:378)Any Ideas,
    Thanks

    Did anybody resolve this issue?
    I am getting com.waveset.util.WavesetException:Class com.omd.session.WorkflowServices not found.
    It seems the workflow status shows finished, but did not start the acctual workflow process of approvals and emails to the appropriate user accounts.
    Anybody has any clues about this exception?
    G

  • How to reference objects with same name?

    Probably another easy one, but again, couldn't find the answer in old discussions...
    I have some objects with the same name on my form. Designer has made them unique by making an array out of them...object[0], object[1], object[2] etc. How can I reference the individual objects in javascript?  I tried the obvious by referencing them as an array, but to no avail.  I suppose it'd be just as easy, if not better, to just have unique names, but in this case, the objects are related and having them in an array would be handy.

    You can try like below.
         var oObject = xfa.resolveNode("Object[1]");
         xfa.host.messageBox("" + oObject.rawValue);
    Thanks
    Srini

  • Enter a true account assignment object with revenues while reversing FB08

    Hi All
    When I am reversing the document through FB08 I am getting the warning messege "Enter a true account assignment object with revenues"
    Message no. KI166
    Diagnosis
    You made an account assignment for 31211100, a revenue element, in controlling area 1000 to a cost center or profit center.
    System Response
    Cost centers and profit centers can carry revenues in the SAP system as statistics only. To ensure reconciliation between FI and CO for revenue element 31211100, a CO account assignment object must record the revenues as a real value. This object type is used for updating to the reconciliation ledger.
    In principle, it is possible for the SAP system to automatically derive this CO account assignment object, the reconciliation object. However, all postings made in CO for costing-based Profitability Analysis are logged in the reconciliation ledger under "reconciliation object". In this manner, the reconciliation ledger identifies the exact values flowing into the operating profit. If you post reconciliation objects during revenue postings to cost centers or profit centers, you must do so while keeping the interpretation of the reconciliation ledger reports in mind. The sums of revenue postings to profitability segments, cost centers, and profit centers cannot be broken down further.
    Procedure
    To avoid posting to reconciliation objects, make account assignments to a real CO account assignment object.
    If you want to post to reconciliation objects, you can change this message to a warning or a note for future users, or deactivate the message entirely. Use the Implementation Guide under "Controlling: General" and choose Change message control. Enter area KI and message number 166. If you do not enter an individual user here, the change is valid for all users.
    It is not allowing me to reverse the document already posted.
    Please guide
    Thanks in Advance
    Sonal

    Hi,
    Do you have this cost element maintained in OKB9 with a reference to an internal order or profitability segment? If yes, please look at the note 373823.
    Regards,
    Eli

  • RE: multiple named objects with the same name andinterface

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

    David,
    First I will start by saying that this can be done by using named anchored
    objects and registering them yourself in the name service. There is
    documentation on how to do this. And by default you will get most of the
    behavior you desire. When you do a lookup in the name service (BindObject
    method) it will first look in the local partition and see if there is a
    local copy and give you that copy. By anchoring the object and manually
    registering it in the name service you are programmatically creating your
    own SO without defining it as such in the development environment. BTW in
    response to your item number 1. This should be the case there as well. If
    your "mobile" object is in the same partition where the service object he is
    calling resides, you should get a handle to the local instance of the
    service object.
    Here is the catch, if you make a bind object call and there is no local copy
    you will get a handle to a remote copy but you can not be sure which one!
    It end ups as more or less a random selection. Off the top of my head and
    without going to the doc, I am pretty sure that when you register an
    anchored object you can not limit it's visibility to "User".
    Sean
    -----Original Message-----
    From: [email protected]
    [<a href="mailto:[email protected]">mailto:[email protected]]On</a> Behalf Of David Foote
    Sent: Monday, June 22, 1998 4:51 PM
    To: [email protected]
    Subject: multiple named objects with the same name and interface
    All,
    More than once, I have wished that Forte allowed you to place named
    objects with the same name in more than one partition. There are two
    situations in which this seems desirable:
    1) Objects that are not distributed, but are mobile (passed by value to
    remote objects), cannot safely reference a Service Object unless it has
    environment visibility, but this forces the overhead of a remote method
    call when it might not otherwise be necessary. If it were possible to
    place a copy of the same Service Object (with user visibility) in each
    partition, the overhead of a remote method call could be avoided. This
    would only be useful for a service object whose state could be safely
    replicated.
    2) My second scenario also involves mobile objects referencing a Service
    Object, but this time I would like the behavior of the called Service
    Object to differ with the partition from which it is called.
    This could be accomplished by placing Service Objects with the same name
    and the same interface in each partition, but varying the implementation
    with the partition.
    Does anyone have any thoughts about why this would be a good thing or a
    bad thing?
    David N. Foote
    Consultant
    Get Your Private, Free Email at <a href=
    "http://www.hotmail.com">http://www.hotmail.com</a>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:<a href=
    "http://pinehurst.sageit.com/listarchive/">http://pinehurst.sageit.com/listarchive/</a>>

  • Does BOXI support crystal reports with parameter references in formulas?

    I am designing a report in Crystal Reports XI Developer that contains parameters, which are passed to a stored procedure and are also used within formulas ( in Crystal Syntax ie. {?FORMAT_ID} ) in the report itself.
    I can run the report successfully in CRXI Developer.  The formulas use the correct values from the parameters entered during execution and everything looks good.
    I then deploy the report to Business Objects Enterprise XI.  I do all of the things necessary to manage the report including setting up the proper database connection information and default parameter values.
    When I run the report using the Crystal Report Viewer, I get the following error message:
    Error in File Forecasting.rpt:
    Error in formula <Report Format>.
    'if (not isNull({?FORMAT_ID} ) ) then
    This field name is not known.
    Details: errorKind
    This happens when I press the "Preview" button in the Manage Object dialog from Crystal or when I run the report using InfoView.
    I have changed the formulas and it doesn't seem to matter what the specific content of the formula is; other than the existence of a parameter reference in the formula.  If I comment out the parameter and replace it with a hard-coded value, it gets through the formula fine.
    Does Business Objects Enterprise XI support crystal reports with parameter references in the formulas?
    Thanks,
    Tim H.

    Hi,
       In Crystal Reports under File -> Report Options >check convert Null Values to default > Verify on first refresh > Verify stored procedures on first refresh.
    This corrected the issue by allowing the query engine time to locate those columns and map them to the query being sent by the report.
    The convert null values was added because those field were being used in the record selection and grouping.
    Regards,
    Vinay

  • BI Platform: Parameter object with the name "URL_PARAM"... does not exist

    Hi,
    I'm facing this issue with only one dashboard in BI4 Platform. When trying to view it through the BI Launch Pad, I get the following error:
    "Parameter object with the name "URL_PARAM" and the index "0" still does not exist in the parameter 1[...]".
    I've seen this thread where a similar thing was reported with NetWeaver platform.
    My client as well as server versions are Release 1.4 SP0 Patch2 (14.0.5).
    Also, although some of the pictures referenced in the dashboard are not in the Public Folders on BI4. Could it be that it's not able to reference the images and hence not be displaying the whole dashboard?
    Please let me know if anyone has a solution to this.
    Thanks!
    - Sakshi Dhakad

    Hi,
    So here are the versions we currently have:
    SAP BO Design Studio (64 bit) - 14.1.0
    SAP BO Design Studio 1.4 for BI Platform - 14.1.0.349
    And on checking on Central Management Console, I get this:
    SAP BO BI Platform 4.1 Support Pack 5 Patch 2
    Version: 14.1.5.1568
    Also, I'm not sure if I installed an add-on or the patch. Based on these versions, could you tell me how to fix the issue ?
    Thanks!

  • Scaling factors for queries with cell references

    Hello Experts,
    We have this issue, we have queries which have 2 global structures with the cell references for few of the elements of rows and columns structure.
    we need the scaling factors and currencies of the query which are defined in the rows and columns structure are to be displayed as separate column but with in the cells.
    We have checked for the queries with the 2 structures without cell references are displayed as we need. But for the queries with the cell references on the 2 structures are not displaying the scaling factors as we need in separatly.
    how can we make the query to display the scaling factors along with currencies to be in separate column.
    we have entry selection as currency where we have only one currency can be entered so the we do not have the problem of multiple currencies.
    please find the screen shot how we need the scaling factors to be displayed for the queries with cell references.
    We have scaling factors enabled as 1000 for KFs and for % selections we have scaling factors as 1.
    Thanks,
    Santhosh

    Hi
    If 'Cell Editor' is been used then that query must have the structure in it. You have to select that 'structure' object in your 'VC Table'.
    If you select that then you will get the required result in the output. This structure will be the structure where 'cell reference' is used in BI query, You have to select that structures name.
    Regards
    Sandeep

  • Service Objects with Dialog duration

    m
    Hi Forte`ans,
    I am trying to listen to an event from a service object which has a
    dialog duation of Message.The service object is configured for
    failover.
    I get an exception ( not an error message ) saying :
    SYSTEM ERROR: Invalid attempt to register for an event on an object of
    class (CKBaseServiceMgrProxy) which has a dialog duration of
    message. The
    semantics of message duration do not guarantee that the same object
    instance will service each message, which is in conflict with the
    semantics of event registration (which requires that the same object
    instance to which the event is registered for generates the event;
    these are two separate actions). To disable this restriction,
    restart this process with cfg:do:4 specified.
    If I make the dialog duration of the SO Session, it works without
    screaming.
    Does this mean I cannot listen to events from such SO( Failover
    enabled with Message duration?) Is it because the event loop may still
    point to the failed SO and Forte wants to avoid such situations???
    Can somebody throw some light on this..?
    Thanks
    Ajith Kallambella M
    International Business Corporation.

    We ran into this same problem when converting an application from R1 to
    R2. In R1, you were allowed to do this. However, Forte won't
    guarantee, even in a non-replicated, non-failover partition, that it
    won't swap objects under certain situations unless the dialog duration
    is session. If this happened, you would lose your registration and not
    even know it. The recommended solution is for the client partition to
    pass a reference to an object anchored in its partition to the service
    object in the remote partition. The service object can then post events
    on the anchored object, which is guaranteed to be there during the life
    of that client partition. The logger flag was designed for backwards
    compatibility. It's not really recommended, but it's not supposed to
    have much overhead if you do use it. We already had a client
    notification architecture in place, so we re-worked our application to
    use it in the cases where we had been using direct registrations. Hope
    this helps -- Chris
    Chris Kelly, IS Architect
    Andersen Windows
    From:
    [email protected][SMTP:[email protected].
    net.in]
    Sent: Thursday, September 18, 1997 1:44 PM
    To: [email protected]
    Subject: Service Objects with Dialog duration
    m
    Hi Forte`ans,
    I am trying to listen to an event from a service object which
    has a
    dialog duation of Message.The service object is configured for
    failover.
    I get an exception ( not an error message ) saying :
    SYSTEM ERROR: Invalid attempt to register for an event on an
    object of
    class (CKBaseServiceMgrProxy) which has a dialog duration of
    message. The
    semantics of message duration do not guarantee that the same
    object
    instance will service each message, which is in conflict with
    the
    semantics of event registration (which requires that the same
    object
    instance to which the event is registered for generates the
    event;
    these are two separate actions). To disable this restriction,
    restart this process with cfg:do:4 specified.
    If I make the dialog duration of the SO Session, it works without
    screaming.
    Does this mean I cannot listen to events from such SO( Failover
    enabled with Message duration?) Is it because the event loop may
    still
    point to the failed SO and Forte wants to avoid such
    situations???
    Can somebody throw some light on this..?
    Thanks
    Ajith Kallambella M
    International Business Corporation.

  • BW OLAP universe object with Aggregate

    How to create an BW OLAP universe object with Aggregate to a higher level than the underlying query?
    The objective is to synchronize 2 queries by Contract Agreement quantity range and part of the calculation is to obtain the contract total quantity in one of the queries that is by Year and Month. For that query I need the total quantity for the contract.
    Example;
    Contract #    Year    Month     Qty
    1             2011    1         230     
    6             2011    2          50
    14            2011    3         124
    u2026
    25            2011   12          87
                     Total Qty --> ?
    The following syntax gives the total quantity by contract / Year / Month, not the overall contract quantity. I could not find any MDX reference to use to solve this.
    The dimension is [0SALESDEAL].[LEVEL01]
    <EXPRESSION> AGGREGATE({[0SALESDEAL].CurrentMember:[0SALESDEAL].CurrentMember},[Measures].[DBKTD232QCONV8CVZYB17B5P0]) </EXPRESSION>
    Thanks,
    Marco
    Edited by: Marco R on Dec 6, 2011 3:25 AM
    Edited by: Marco R on Dec 6, 2011 3:27 AM
    Edited by: Marco R on Dec 6, 2011 3:31 AM
    Edited by: Marco R on Dec 6, 2011 3:33 AM
    Edited by: Marco R on Dec 6, 2011 3:35 AM

    Hi Andrew,
    Looking at your statement I get the feeling you want this as a dimension/characteristic.
    Since an expression has to be numeric and a characteristic in BW cannot be numeric, this will not work.
    Only measures/keyfigures are possible.
    The direction from SAP is to push any modeling to the BW query or even BW itself.
    Hope this helps,
    Marianne

  • Query returns list of objects with all fields = NULL

    Hi there,
    I must be doing something wrong. I have tried to query for all activities and all contacts using the code pattern shown below (for activities):
    Activity_ServiceLocator serviceLocator = new Activity_ServiceLocator();
    serviceLocator.setActivityEndpointAddress(config.get(CONFIG_KEY_URL) + ";jsessionid=" + sessionId);
    ActivityQuery aq = new ActivityQuery();
    ListOfActivityQuery laq = new ListOfActivityQuery();
    laq.setActivity(aq);
    ActivityQueryPage_Input aqpi = new ActivityQueryPage_Input();
    aqpi.setListOfActivity(laq);
    laq.setPagesize(new BigInteger("100"));
    laq.setStartrownum(new BigInteger("0"));
    ActivityQueryPage_Output aqpo = serviceLocator.getActivity().activityQueryPage(aqpi);
    When I do getListOfActivity() from the ActivityQueryPage object, I get a non-empty list, however, when I loop over the list, it seems that all fields in all the objects are NULL. This, even though I have checked in the system that the activities (appointments) all contain fields with data.
    As mentioned, when I try to query for all contacts using the exact same code pattern, I also get a non-empty list of (contact) objects with non-empty fields .. So, I guess I'm doing a simple mistake (since I have hundreds of contacts in my CRM system), but which?
    Thx in advance

    Okay, I partly found the answer myself. It appears that one has to explicitly set a (empty) query type for the fields that one wants returned from the query .. At least this appears to return the field value of the returned objects .. But is this really the correct way of doing it?
    A few related questions;
    1) What is the purpose of the UseChildAnd? I cannot read this from the documentation!
    2) Is there any more documentation than the Oracle CRM On Demand Release 16? I would like to have some more documentation on
    a) how to make a cross table query, e.g. across activities and contacts (for instance, give me all contact who have an appointment tomorrow), and
    b) how to use the QueryType.
    Any references to something that can enlighten me? :-)

  • Help required with understanding References and finalizers

    Background
    I have an online Application which has been developed over 6 years now. It is a Website CMS and runs 300 simultaneous sites per webserver. For the first time I am experiencing capacity / performance issues. I switched from SUN Java to JROCKIT in 2006 which speeded evertything up by 200% but now I have periods of the day where The memory fills up and I get Swapping which leads to 100% cpu utilization - mainly in I/O. I have upped the RAM in the server as a solution and now I want to see if I can do anything to reduce my memory footprint.
    Specifically : The question
    I have captured stats which I can view in Mission Control and it shows that the number of Weak References increases continuously over a 4 hour period (also the number of Phantom references shows similar behaviour). Therefore I suspect a memory leak - Also I suspect that this is of my own making since I have not realy had to deal with this before. The thing is I cannot clearly see how to proceed and identify what my error is.
    I have spent a couple of weeks reading loads of docs about weak / stong etc.. references but I realy need a bit of help with zeroing in on a starting point. I know that I release objects by setting them to null but I now expect that this is not realy good enough.
    Anyway - before I ramble too long, If there is anyone with relevant experience and a few minutes I would be very gratefull to hear from them.
    Regards
    Jonathan Carter
    Glimworm IT
    Amsterdam

    Hi Jonathan,
    Reference objects and finalizers are a frequent cause of performance issues. The reason is that 1) objects tend to be kept alive longer, leading to an increase in live data and more frequent GC and 2) processing of these objects during GC is expensive, which leads to more time spent in GC, i.e. long pause times.
    There are various ways you can approach your issue. One is to use -Xverbose to see what you find. If you are using JRockit R27.2 or later, run with "-Xverbose:referents" to get a list of all reference objects at every GC. More info:
    http://edocs.bea.com/jrockit/jrdocs/refman/optionX.html#wp1029960
    Note that you can enable verbose logging during runtime through "jrcmd <pid> verbosity set=referents" and later disable it using "jrcmd <pid> verbosity set=referents=warn". No JVM restart required.
    If you send your JRA recordings to jrockit-improve AT bea DOT com, we'll try to take a look at them.
    -- Henrik

  • BC4J: problems creating view object with multiple entity objects

    Hi,
    I working with a view object which contains two entity objects with parent-child relationship like this:
    ViewObject - ParentEntityObject - PId
    PAttribute
    CId (FK)
    (- ParentChildAssociation)
    - ChildEntityObject - CId
    - CAttribute
    The 'Read Only' and 'References' options are checked for the association in the view object.
    I'm creating a new row using this view object. The parent object should be created new and the child object already exists in the database, so I'm setting only the attributes of the parent object (including foreign key).
    After creating the row I display it in a jbo:DataTable and only those attributes coming from the parent object are displayed. The attributes of the child object are not set. After a commit all attributes appear.
    The problem is, that I want to display the new row with all attributes to the users BEFORE they commit.
    I tried to set the child attributes, but they are read only by definition and even when I unchecked the 'Read Only' option and set the attributes to 'Always Updateable' in the view object it is giving me
    JBO-27008: Attribute set for CAttribute in view object ViewObject failed.
    Is there a way to make all attributes of the child object visible in the view object without committing changes?
    (JDev 9.0.2.822)
    Any help would be appreciated.
    Regards,
    Christian

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

Maybe you are looking for