• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question about EOs and their lifespan/uniqueness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about EOs and their lifespan/uniqueness


  • Subject: Re: Question about EOs and their lifespan/uniqueness
  • From: Mike Schrag <email@hidden>
  • Date: Mon, 5 Nov 2007 15:26:49 -0500

If you're not refetching it and literally holding onto the same EO instance in your component, you're doing something wrong, because that works. If you're setting a var on an EO and then refetching it, that will not work -- you get a new EO. I would add a print out in your boolean's set method to see if someone is inadvertently setting it to false and i woudl print out System.identityHashCode(yourEO). If it's the same instance, that will be the same. If it's a different instance (which is probably what is happening) it will not match.

ms

On Nov 5, 2007, at 3:14 PM, Kevin Windham wrote:

I am running into a problem that I think may be related to the way EOs are created/managed in memory. I have an object that I pass in to a component. That object has some boolean variables that are not backed by the DB. They are simply declared in the class file, public boolean boolvar;

If I set this variable and then display the page with a checkbox bound to this variable it shows the correct state. If I leave the page and go back to it then the state of the checkbox always reverts to false.

It seems like I am getting a newly created object instead of the one that was already created. Other variables that are DB backed seem fine. Is this normal? Do EOs get created and destroyed regularly, and can I not rely on getting the same object instance if one was already fetched and created in memory? Or, am I barking up the wrong tree and something else is going on?

Thanks,
Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Question about EOs and their lifespan/uniqueness
      • From: Kevin Windham <email@hidden>
References: 
 >Question about EOs and their lifespan/uniqueness (From: Kevin Windham <email@hidden>)

  • Prev by Date: Re: Question about EOs and their lifespan/uniqueness
  • Next by Date: Re: java.lang.AbstractMethodError at org.apache.axis.AxisEngine.refreshGlobalOptions(AxisEngine.java:502)
  • Previous by thread: Re: Question about EOs and their lifespan/uniqueness
  • Next by thread: Re: Question about EOs and their lifespan/uniqueness
  • Index(es):
    • Date
    • Thread