• 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: EOCopyable Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOCopyable Problems


  • Subject: Re: EOCopyable Problems
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 6 Jul 2007 12:17:03 -0700


On Jul 4, 2007, at 12:40 PM, David Avendasora wrote:


On Jul 4, 2007, at 11:40 AM, Chuck Hill wrote:


On Jul 4, 2007, at 7:03 AM, David Avendasora wrote:

Hi all,

I've implemented EOCopyable from Practical WebObjects so I can easily clone some of my complicated classes.

The problem is that when I call copy(new NSMutableDictionary()); I get nothing back. If I call EOEnityCopier(ec,this) it works just fine.

Does your class extend CopyableGenericRecord? If not, what exactly are you doing? Code examples will make this clearer.

Okay, don't all jump on me at once, but this is a Java Client project.

I'm implementing the EOCopyable interface on the Server Side only, and yes, the server side class extends my version of CopyableGenericRecord (BMGenericRecord).

Here's the Clinet-Side code (just for reference):
	public void copy() {
		invokeRemoteMethod("clientSideRequestCopy",null,null);
	}

Here's the Server-Side code:
public void clientSideRequestCopy() {
log.debug("clientSideRequestCopy() Called for " + routingDescription());
BillOfMaterial copy = (BillOfMaterial)copy(new NSMutableDictionary ());
copy.setRoutingDescription(copy.routingDescription() + " CLONE");
log.debug("New BillOfMaterial: " + copy.routingDescription());

}


I get no errors, other than what appears to be the Client timing out while waiting for the Server to respond. The last line I have in my log is:
[2007-07-04 14:36:47,570] <WorkerThread5> BillOfMaterial.clientSideRequestCopy - clientSideRequestCopy() Called for Preform Homestyle 240/1oz Sugar


Which matches up with my logging statement so I know the server- side method is bing called, but since I never see the logging statement that documents the new description of the new BillOfMaterial, I'm guessing the copy(new NSButableDictionary()) is never coming back.

If anyone has any ideas it would be most helpful. I'm going to start adding some logging to EOCopyable to see how far it is getting within the copy method.

OK, this I have seen. It is probably something in your model (vertical inheritance would be a good first guess) that my code does not handle. This would result in an infinite loop of following relationships. As you suggest, exploratory logging is the answer.


Chuck



--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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


References: 
 >EOCopyable Problems (From: David Avendasora <email@hidden>)
 >Re: EOCopyable Problems (From: Chuck Hill <email@hidden>)
 >Re: EOCopyable Problems (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: WOBuilder Replacement
  • Next by Date: Re: WOBuilder Replacement
  • Previous by thread: Re: EOCopyable Problems
  • Next by thread: EOEditingContext and WO Services (was Subclassing EOEditingContext)
  • Index(es):
    • Date
    • Thread