Re: Java tools: Design by Contract, 12 tools little time...

2007-12-10 Thread Chuck Hill


On Dec 10, 2007, at 6:27 PM, Mr. G Brown wrote:


The wikipedia lists 12 DBC tools for Java:


"Java, using

1- iContract2,

I used the original iContract before it was abandoned.  I'd pick  
something more commonly used than iContact2.  It also suffers from  
being a code translator so you end up with two copies of Foo.java in  
different places which can be a nuisance to manage.



 2-Contract4J,

I've tried this, but found it was too slow for practical use.  The  
author is still working on it.  I like the AOP implementation as it  
avoids the duplicate Java file problem.





3-jContractor,

Not sure about that one, I've looked at it.  IIRC it was not quite  
solid enough for production use.



4-Jcontract,

I think that Parasoft has discontinued this.  I could not find any  
direct references to it on their site when I looked recently.







5-C4J,

6-CodePro Analytix,

7-STclass,

8-Jass preprocessor,


This is the one that I currently use.


9-OVal with AspectJ,

10-Java Modeling Language (JML),

I have tried that but found that some of the semantics they have  
added to the original DBC concepts made it impractical for use  
outside of narrowly constrained academic examples (e.g. not usable in  
the world).  That was a couple of years ago and they were aware of  
the issues.  It may have changed.




11-SpringContracts from the Spring framework, or

12- Modern Jass. "



I have high hopes for this, but it needs Java 1.6 which is not yet  
available for OS X / WO.


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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: WOCheckbox strangeness

2007-12-10 Thread Asa Hardcastle

Hi Valerio,

I've never used a checkbox inside of a hyperlink the way that you  
describe.  I did not even know this was legal HTML.   I have two  
suggestions that might work better than hoping for Safari 3.0.5 to  
bring back this behaviour:


1) Replace the checkbox with an image.   If the checkbox was used to  
display an underlying state you can add conditional statements and  
display a checked or unchecked image.


or

2) remove the hyperlink and instead bind the checkbox to a settable  
value/method.  Then use onclick to submit the containing form.


I hope this helps :)

later,

asa



On Dec 10, 2007, at 8:23 PM, Valerio Luccio wrote:

I have a repetition that has, as one of it's cells, a WOCheckbox  
wrapped inside a WOHyperlink. When you press the check box the  
hyperlink function is called and updates some internal counters.  
This used to work fine both with Firefox and with Safari. Now is  
still works with Firefox and Safari 3.0.3, but it doesn't work with  
Safari 3.0.4. On 3.0.4 it doesn't seem to call the hyperlink  
function, but if I include a character inside the hyperlink and  
click on the character it works. Just to explain myself better:


   clicking on the checkbox does not work
 A  works by clicking on 'A'

When I look at the page source, you can clearly see the hyperlink,  
but the checkbox object seems to trump it.


Any clues/suggestions ?

--
Valerio Luccio  (212) 998-8736
Center for Brain Imaging4 Washington Place, Room 156
New York University New York, NY 10003

 "In an open world, who needs windows or gates?"

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/a.talk 
%40zenn.net


This email sent to [EMAIL PROTECTED]


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Embedded Split Install Script

2007-12-10 Thread Kieran Kelleher
Hopefully this is of use to anyone wanting split installs of fully  
embedded self-contained (both app and webserver) bundles. The article  
provides a drop-in optional ant script that works with latest  
WebObjects and Wonder project templates. Simply add it to your  
project and run it.


http://wiki.objectstyle.org/confluence/display/WOL/Alternative+Ant 
+Build+Script+for+Fully+Embedded+and+Split+Install+Bundles.


It is a wiki, so corrections /enhancements can be easily made.

Regards, Kieran ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Java tools: Design by Contract, 12 tools little time...

2007-12-10 Thread Ian Joyner
I'd try this question on a Java group. (Or use the real thing, Eiffel,  
if you want contracts properly integrated with a real OO language!)


Ian

On 11/12/2007, at 1:27 PM, Mr. G Brown wrote:


The wikipedia lists 12 DBC tools for Java:


"Java, using
1- iContract2,
2-Contract4J,
3-jContractor,
4-Jcontract,
5-C4J,
6-CodePro Analytix,
7-STclass,
8-Jass preprocessor,
9-OVal with AspectJ,
10-Java Modeling Language (JML),
11-SpringContracts from the Spring framework, or
12- Modern Jass. "

Does anybody know which ones may be most useful? It would seem some  
of this would be better supported by the newer JVMs, i.e. 1.5 and 1.6.


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Java tools: Design by Contract, 12 tools little time...

2007-12-10 Thread Mr. G Brown

The wikipedia lists 12 DBC tools for Java:


"Java, using
1- iContract2,
2-Contract4J,
3-jContractor,
4-Jcontract,
5-C4J,
6-CodePro Analytix,
7-STclass,
8-Jass preprocessor,
9-OVal with AspectJ,
10-Java Modeling Language (JML),
11-SpringContracts from the Spring framework, or
12- Modern Jass. "

Does anybody know which ones may be most useful? It would seem some  
of this would be better supported by the newer JVMs, i.e. 1.5 and 1.6.


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

WOCheckbox strangeness

2007-12-10 Thread Valerio Luccio
I have a repetition that has, as one of it's cells, a WOCheckbox wrapped 
inside a WOHyperlink. When you press the check box the hyperlink 
function is called and updates some internal counters. This used to work 
fine both with Firefox and with Safari. Now is still works with Firefox 
and Safari 3.0.3, but it doesn't work with Safari 3.0.4. On 3.0.4 it 
doesn't seem to call the hyperlink function, but if I include a 
character inside the hyperlink and click on the character it works. Just 
to explain myself better:


 clicking on the checkbox does not work
   A  works by clicking on 'A'

When I look at the page source, you can clearly see the hyperlink, but 
the checkbox object seems to trump it.


Any clues/suggestions ?

--
Valerio Luccio  (212) 998-8736
Center for Brain Imaging4 Washington Place, Room 156
New York University New York, NY 10003

   "In an open world, who needs windows or gates?"

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: wolips / webobjects build question

2007-12-10 Thread Lachlan Deck

On 11/12/2007, at 8:47 AM, Ricardo Parada wrote:

I'm trying to figure out how to do the following.  Basically I have  
a webobjects framework that builds using ant.  The framework really  
has no code.


http://wiki.objectstyle.org/confluence/display/WOL/Tutorials

It just has two .jar files that are combined into one.  For  
example, the following ant snippet from the build.xml file does the  
work:





excludes="META-INF/SUN_MICR.*" />


This builds into a Foo.framework which contains foo.jar.  And  
foo.jar is basically foo1.jar and foo2.jar combined.
I then have other normal WebObjects frameworks that reference the  
Foo framework project.


Recommendation: don't combine jars. Just add them to the build path  
of your project and adjust your project's build path settings to make  
these available for projects that depend on that project.


I'm trying to convert this Foo framework project to build with  
Eclipse / WOLips standard build files and get away from using my  
custom build.xml file.


So using WOLips/Eclipse I created a WebObjects Framework project  
called Foo.  I then dragged and dropped the foo1.jar and foo2.jar  
into the Libraries folder under the Foo project in the Eclipse  
package explorer view.


The problem I have is that other frameworks that reference project  
Foo are still not able to import and use the classes in the Foo jars.


Go to Project > Properties > Build Path > Order and Export and tick  
the boxes next to the ones you want to make available to subprojects.


with regards,
--

Lachlan Deck



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: EO Caching

2007-12-10 Thread Chuck Hill


On Dec 10, 2007, at 3:58 PM, Paul Hertz wrote:


At 10:41 AM -0800 12/7/07, Chuck Hill wrote:

On Dec 7, 2007, at 7:01 AM, Jeffrey Simpson wrote:


I want to preload some EOs and so they are cached.  I have set
ERXEC.setDefaultFetchTimestampLag(8640);


That only applies to faulting, not fetching.  You might want to  
look at the much feared EOSharedEditingContext or at Wonder's EO  
caching classes (there are three or so, IIRC).  Also look at the  
"Cache in memory" setting in EOModeler.




I preload my EOs and do some
batch fetching. Later on I use a fetch spec to query from the  
database some
of the cached EOs. They are fully fetched which I understand is  
the case.

When I then batch fetch these EOs the system always runs fetches.


It is not clear to me what code you are using here.  I will note  
that all fetches (ec.objectsWithFetchSpecification) go to the  
database, even if the fetched data is then discarded.  Batch  
fetching is a fetch.




As I understand it (more foggy than I'd like), the record from the  
database will be discarded if the global ID that gets generated for  
the fetched row corresponds to an object in the editing context  
that is not a fault.


Yes.  Unless the fetch is marked as refreshing refetched objects, in  
which case the object store and all editing contexts are updated.



In that case, the object from the editing context is returned. That  
should save some computational time (yes?),


Yes, but can also lead to inconsistencies.  The objects returned  
match the criteria as determined by the database.  If another process  
has updated the database, you may have objects in memory that would  
have matched the criteria but which are not included in the results  
as the in-memory values differ from the database.



but clearly not as much as if one knows the object is already in  
memory and uses it without calling objectsWithFetchSpecification.  
Especially not the case if the WO server and the database server  
are separate machines, and time is taken up by network communications.


That needs to also account for the time to evaluate the query against  
the objects in memory vs letting the database do it and moving the  
data around.  It many situations, it ought to be faster.


I am, however, curious about what you are trying to fix.  I have  
never had to resort to this sort of thing.



Chuck




The time
between this fetch and the preloading is < 5 minutes.  If I run  
the same
query in a the same ec then the EOs are cached.  Any idea of why  
there is no

caching between the 2 ecs?


No, not without a clearer understanding of your code.

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




--
Paul Hertz <[EMAIL PROTECTED]> |(*,+,#,=)(#,=,*,+)(=,#, 
+,*)(+,*,=,#)|


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 
40global-village.net


This email sent to [EMAIL PROTECTED]



--

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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: EO Caching

2007-12-10 Thread Paul Hertz

At 10:41 AM -0800 12/7/07, Chuck Hill wrote:

On Dec 7, 2007, at 7:01 AM, Jeffrey Simpson wrote:


I want to preload some EOs and so they are cached.  I have set
ERXEC.setDefaultFetchTimestampLag(8640);


That only applies to faulting, not fetching.  You might want to look 
at the much feared EOSharedEditingContext or at Wonder's EO caching 
classes (there are three or so, IIRC).  Also look at the "Cache in 
memory" setting in EOModeler.




I preload my EOs and do some
batch fetching. Later on I use a fetch spec to query from the database some
of the cached EOs. They are fully fetched which I understand is the case.
When I then batch fetch these EOs the system always runs fetches.


It is not clear to me what code you are using here.  I will note 
that all fetches (ec.objectsWithFetchSpecification) go to the 
database, even if the fetched data is then discarded.  Batch 
fetching is a fetch.




As I understand it (more foggy than I'd like), the record from the 
database will be discarded if the global ID that gets generated for 
the fetched row corresponds to an object in the editing context that 
is not a fault. In that case, the object from the editing context is 
returned. That should save some computational time (yes?), but 
clearly not as much as if one knows the object is already in memory 
and uses it without calling objectsWithFetchSpecification. Especially 
not the case if the WO server and the database server are separate 
machines, and time is taken up by network communications.




The time
between this fetch and the preloading is < 5 minutes.  If I run the same
query in a the same ec then the EOs are cached.  Any idea of why there is no
caching between the 2 ecs?


No, not without a clearer understanding of your code.

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




--
Paul Hertz <[EMAIL PROTECTED]> 
|(*,+,#,=)(#,=,*,+)(=,#,+,*)(+,*,=,#)|


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


wolips / webobjects build question

2007-12-10 Thread Ricardo Parada


Hello WOLips experts,

I'm trying to figure out how to do the following.  Basically I have a  
webobjects framework that builds using ant.  The framework really has  
no code.  It just has two .jar files that are combined into one.  For  
example, the following ant snippet from the build.xml file does the  
work:





excludes="META-INF/SUN_MICR.*" />


This builds into a Foo.framework which contains foo.jar.  And foo.jar  
is basically foo1.jar and foo2.jar combined.
I then have other normal WebObjects frameworks that reference the Foo  
framework project.


I'm trying to convert this Foo framework project to build with  
Eclipse / WOLips standard build files and get away from using my  
custom build.xml file.


So using WOLips/Eclipse I created a WebObjects Framework project  
called Foo.  I then dragged and dropped the foo1.jar and foo2.jar into  
the Libraries folder under the Foo project in the Eclipse package  
explorer view.


The problem I have is that other frameworks that reference project Foo  
are still not able to import and use the classes in the Foo jars.


Any ideas or suggestions?

Thanks,
Ricardo J. Parada

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: EO Caching

2007-12-10 Thread James Cicenia
You know I used to think about raw rows, performance, etc., but, after  
I just trusted WebObjects and learned to code more for it, we have  
never had any performance problems. And in cases where we had some  
pretty extensive processing the long response page with decent  
progress indicator worked great for the users.


my two cents

-j-

On Dec 10, 2007, at 12:06 PM, Chuck Hill wrote:



On Dec 10, 2007, at 7:16 AM, Mike Schrag wrote:

I would recommend taking a step back here and profile what's  
actually going on ... What exactly is slow? Have you turned on SQL  
debug to see if you're firing hundreds of faults?  Is it just that  
you're getting a lot of objects back?  How many objects?


What Mike said.  Jumping to conclusions is very ineffective  
optimization technique.  Measure.  Log.  Investigate.  First  
determine why it is slow.  Look at the database.  Can you add  
indexes to make it faster?  Will a different schema address the  
performance problem. Then look at EOF and see if there are built in  
ways to handle this, batch faulting is one such example. Failing  
that, look at what can be done in code.


Chuck



On Dec 10, 2007, at 10:02 AM, Jeffrey Simpson wrote:


Thanks for the input.

I have decided that this whole course is wrong.  We have some  
performance
problems and my boss wanted to see if there was a magic bullet.   
Loading the

whole database into memory at startup was not the way to go.

I think we need to go to raw rows for display only screens and  
only make EO
objects when we are going to edit.  I think this is the  
recommended way to

go.


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to [EMAIL PROTECTED]



--

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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/james%40jimijon.com

This email sent to [EMAIL PROTECTED]


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Seattle - dBug Internet/WebObjects Development SIG Meeting Tonight

2007-12-10 Thread Baiss Eric Magnusson
Our next meeting will be held at 7pm on Monday, December 10th in  
North Seattle at the home of Baiss Magnusson. Please contact Baiss  
for directions and to RSVP so we know we'll have enough room.



The agenda will be as follows:

- Introductions
- WebObjects Resources

- Group Class: Installing Eclipse/WOLips on a new core duo Mac mini  
running Leopard hooked up to a 47 inch Vizio 1920x1080P monitor.
Our goal is to get all the pieces in place as well as build and run  
Hello World in WebObjects.


- Discuss Current Problems and Accomplishments

Chai and other tea will be available, as Baiss just finished reading  
Three Cups of Tea about Greg Mortenson, an inspiring book.


See the dBug WebObjects SIG web site for more information:
.

I have an iSight camera set up so that iChat will be available at 8PM  
- PST, for those wishing to know how it is going or to offer advice :).


We will start with Pascal Robert's tutorial page in the wiki:




Baiss Eric Magnusson




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: EO Caching

2007-12-10 Thread Chuck Hill


On Dec 10, 2007, at 7:16 AM, Mike Schrag wrote:

I would recommend taking a step back here and profile what's  
actually going on ... What exactly is slow? Have you turned on SQL  
debug to see if you're firing hundreds of faults?  Is it just that  
you're getting a lot of objects back?  How many objects?


What Mike said.  Jumping to conclusions is very ineffective  
optimization technique.  Measure.  Log.  Investigate.  First  
determine why it is slow.  Look at the database.  Can you add indexes  
to make it faster?  Will a different schema address the performance  
problem. Then look at EOF and see if there are built in ways to  
handle this, batch faulting is one such example. Failing that, look  
at what can be done in code.


Chuck



On Dec 10, 2007, at 10:02 AM, Jeffrey Simpson wrote:


Thanks for the input.

I have decided that this whole course is wrong.  We have some  
performance
problems and my boss wanted to see if there was a magic bullet.   
Loading the

whole database into memory at startup was not the way to go.

I think we need to go to raw rows for display only screens and  
only make EO
objects when we are going to edit.  I think this is the  
recommended way to

go.


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 
40global-village.net


This email sent to [EMAIL PROTECTED]



--

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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Classcastexception _EOCheapMutableArray Solved

2007-12-10 Thread Chuck Hill


On Dec 9, 2007, at 10:45 AM, Don Lindsay wrote:


Hello;

When I use the following settings I can save and the listbox shows  
the correct number of rows and the correct selected items.


ToManyRelationship: WOToManyRelationship {  
sourceEntityName = "Agents";
destinationDisplayKey = "orgs";
sourceObject = agent;
relationshipKey = "mgtOfc";
}

However it is a cominbation of all fields in the orgs entity that  
are being displayed separated by commas and surrounded by curly  
braces.   So I set destinationDisplayKey to orgs.description to get  
a more user friendly view.  I get an error that  
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException:  
valueForKey(): lookup of unknown key: 'orgs.description'. This  
class does not have an instance variable of the name  
orgs.description or _orgs.description, nor a method of the name  
orgs.description, _orgs.description, getOrgs.description, or  
_getOrgs.description.


That would be a keypath _on_ the destination "orgs".  So just
destinationDisplayKey = "description";


Chuck


Description is indeed a attribute of orgs and it is in the correct  
case of description.  So I thought I can just override the  
userPresentableDescription and that should solve the problem.  When  
I do this and compile the listing shows up with fault>.So I looked up the documentation on the  
EOGenericRecord.  I overrode the EODescription and now the  
information displays correctly in the listing.


Thanks,

Don



On Dec 9, 2007, at 11:51 AM, Don Lindsay wrote:


Hello;

Here is the Agents entity java code:

import com.webobjects.foundation.*;
import com.webobjects.eocontrol.*;
import java.math.BigDecimal;
import java.util.*;
import com.webobjects.examples.utilities.*;

public class Agents extends EOGenericRecord {

public Agents() {
super();
}

/*
// If you implement the following constructor EOF will use it to
// create your objects, otherwise it will use the default
// constructor. For maximum performance, you should only
// implement this constructor if you depend on the arguments.
public Agents(EOEditingContext context, EOClassDescription  
classDesc, EOGlobalID gid) {

super(context, classDesc, gid);
}

// If you add instance variables to store property values you
// should add empty implementions of the Serialization methods
// to avoid unnecessary overhead (the properties will be
// serialized for you in the superclass).
private void writeObject(java.io.ObjectOutputStream out)  
throws java.io.IOException {

}

private void readObject(java.io.ObjectInputStream in) throws  
java.io.IOException, java.lang.ClassNotFoundException {

}
*/

public String fullNameReverse() {
return ((Person)person()).fullNameReverse();
}

public String personOrganizationRO() {
return ((Person)person()).organization();
}

public String personOrganizationDivision() {
return ((Person)person()).division();
}

public String personOrganizationDirectorate() {
return ((Person)person()).directorate();
}

public Number trainer() {
return (Number)storedValueForKey("trainer");
}

public void setTrainer(Number value) {
takeStoredValueForKey(value, "trainer");
}

public Number custodian() {
return (Number)storedValueForKey("custodian");
}

public void setCustodian(Number value) {
takeStoredValueForKey(value, "custodian");
}

public Number personIdentifier() {
return (Number)storedValueForKey("personIdentifier");
}

public void setPersonIdentifier(Number value) {
takeStoredValueForKey(value, "personIdentifier");
}

public Person person() {
return (Person)storedValueForKey("person");
}

public void setPerson(Person value) {
takeStoredValueForKey(value, "person");
}

public NSArray mgtOfc() {
return (NSArray)storedValueForKey("mgtOfc");
}

public void setMgtOfc(NSArray value) {
takeStoredValueForKey(value, "mgtOfc");
}

public void addToMgtOfc(ManagedOrgAssoc object) {
includeObjectIntoPropertyWithKey(object, "mgtOfc");
}

public void removeFromMgtOfc(ManagedOrgAssoc object) {
excludeObjectFromPropertyWithKey(object, "mgtOfc");
}

public NSArray shipRecs() {
return (NSArray)storedValueForKey("shipRecs");
}

public void setShipRecs(NSArray value) {
takeStoredValueForKey(value, "shipRecs");
}

public void addToShipRecs(ShippingRecords object) {
includeObjectIntoPropertyWithKey(object, "shipRecs");
}

public void removeFromShipRecs(ShippingRecords object) {
excludeObjectFromPropertyWithKey(object, "shipRecs");
}

public NSArray trngRecs() {
return (NSArray)storedValueFor

Re: EO Caching

2007-12-10 Thread Mike Schrag
I would recommend taking a step back here and profile what's actually  
going on ... What exactly is slow? Have you turned on SQL debug to see  
if you're firing hundreds of faults?  Is it just that you're getting a  
lot of objects back?  How many objects?


ms

On Dec 10, 2007, at 10:02 AM, Jeffrey Simpson wrote:


Thanks for the input.

I have decided that this whole course is wrong.  We have some  
performance
problems and my boss wanted to see if there was a magic bullet.   
Loading the

whole database into memory at startup was not the way to go.

I think we need to go to raw rows for display only screens and only  
make EO
objects when we are going to edit.  I think this is the recommended  
way to

go.


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: EO Caching

2007-12-10 Thread Jeffrey Simpson
Thanks for the input.

I have decided that this whole course is wrong.  We have some performance
problems and my boss wanted to see if there was a magic bullet.  Loading the
whole database into memory at startup was not the way to go.

I think we need to go to raw rows for display only screens and only make EO
objects when we are going to edit.  I think this is the recommended way to
go.


On 12/8/07 7:13 AM, "Alexander Spohr" <[EMAIL PROTECTED]> wrote:

> 
> Am 07.12.2007 um 22:56 schrieb Jeffrey Simpson:
> 
>> Thanks for the prompt reply.  I forgot to mention we have our own
>> batch
>> fetching that does a objectByPrimary key with a delegate that does
>> not do a
>> database fetch to weed out the object in memory.
> 
> Why and what for? EOF does this already well.
> If you need a cache, give it an EC and some NSArrays to store the
> objects. Use EOUtilities.localInstance to migrate objects into your
> working-EC¹s if you need to make connections.
> 
> 
>> I discovered that by having the ecs use strong references it did
>> what I
>> wanted.  I also found out that is took to long to start an instance.
> 
> Same question as Chuck¹s: What amount are you loading in what kind of
> way?
> 
> 
>> In our system each session has a default editing context that we
>> only use
>> for querying.  Any thoughts on every session sharing the same
>> default ec?
>> This way the cache would slowly build.
> 
> No, don¹t do this! Sessions should not interfere with each others data
> - not even for reads.
> 
> 
>> I think the real answer is for us to slowly rewrite our application
>> to use
>> more raw rows.
> 
> Sorry for being rude, but either you did not understand EOF¹s
> mechanics, or EOF is the wrong choice for your app. Raw rows is only
> for mass-data, not for something to be cached and used by the object-
> graph.
> 
> I really think you have some speed problems at other places. I put my
> bets on loops that fire faults... Watch your EOAdaptorDebug output.
> 
> atze
> 
> 
> 
>> On 12/7/07 1:41 PM, "Chuck Hill" <[EMAIL PROTECTED]> wrote:
>> 
>>> 
>>> On Dec 7, 2007, at 7:01 AM, Jeffrey Simpson wrote:
>>> 
 I want to preload some EOs and so they are cached.  I have set
 ERXEC.setDefaultFetchTimestampLag(8640);
>>> 
>>> That only applies to faulting, not fetching.  You might want to look
>>> at the much feared EOSharedEditingContext or at Wonder's EO caching
>>> classes (there are three or so, IIRC).  Also look at the "Cache in
>>> memory" setting in EOModeler.
>>> 
>>> 
 I preload my EOs and do some
 batch fetching. Later on I use a fetch spec to query from the
 database some
 of the cached EOs. They are fully fetched which I understand is the
 case.
 When I then batch fetch these EOs the system always runs fetches.
>>> 
>>> It is not clear to me what code you are using here.  I will note that
>>> all fetches (ec.objectsWithFetchSpecification) go to the database,
>>> even if the fetched data is then discarded.  Batch fetching is a
>>> fetch.
>>> 
>>> 
 The time
 between this fetch and the preloading is < 5 minutes.  If I run the
 same
 query in a the same ec then the EOs are cached.  Any idea of why
 there is no
 caching between the 2 ecs?
>>> 
>>> No, not without a clearer understanding of your code.
>>> 
>>> Chuck
>> 
>> 
>> Jeffrey Simpson
>> Youth For Understanding USA
>> [EMAIL PROTECTED]
>> Telephone: (240) 235-2114
>> FAX: (202) 235-2104
>> 
>> Preparing young people for their responsibilities and opportunities
>> in a
>> changing, interdependent world.
>> 
>> 
>> 
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/atze%40freeport.de
>> 
>> This email sent to [EMAIL PROTECTED]
> 
> Freeport & Soliversum
> Alexander Spohr
> [EMAIL PROTECTED]
> www.freeport.de
> 
> 


Jeffrey Simpson
Youth For Understanding USA
[EMAIL PROTECTED]
Telephone: (240) 235-2114
FAX: (202) 235-2104

Preparing young people for their responsibilities and opportunities in a
changing, interdependent world.





 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


New NSPropertyListSerialization in 5.4

2007-12-10 Thread Alexander Spohr

Hi List,

can someone confirm that NSPropertyListSerialization changed its  
behavior in 5.4?


In 5.3 dictionaryForString(String value) returned every value as String:

123
2007-12-24 18:00:00.00 MET

Since 5.4 it changed behavior to interpret the values as I had  
expected it long ago:

 becomes Boolean
123 becomes BigInteger (why Big?)
2007-12-24 18:00:00.00 MET becomes NSTimestamp

So be aware that this might break your apps if you depend on parsing  
values yourself.
I used Boolean.valueOf((String)aPListObject) which breaks with 5.4  
(CCE).



atze

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


New version of the podcasts

2007-12-10 Thread Pascal Robert
Podcast Producer made low resolution versions of the podcasts, and  
the text was not easy to read because of that.  Since the text is  
essential (at least you can see the text if you don't understand my  
spoken English :-)), I made new versions of the podcasts:


http://www.wocommunity.org/podcasts/WOLips_install_in_8_minutes.mov

http://www.wocommunity.org/podcasts/WO54_Examples.mov

BTW, if you are doing WO podcasts, we can add a link to your podcast  
on the wocommunity.org Web site.  The podcasts can be in any languages.

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Converting your XCode projects to WOLips the podcast

2007-12-10 Thread Pascal Robert
Hey, it's me again.  I made a podcast on how to convert your Xcode  
projects to WOLips with the XcodeMigration tool:


http://www.wocommunity.org/podcasts/Converting_Xcode_projects.mov


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]