LocalDate and D2W redux

2012-06-12 Thread Paul Hoadley
Hello,

Back in December 2011, in this thread:

http://lists.apple.com/archives/webobjects-dev/2011/Dec/msg00440.html

Ramsey described a method for binding an ERXJodaLocalTimeFormatter to (I 
assume) an ERD2WEditString component with this rule:

 10 : ((smartAttribute.valueFactoryMethod != null and 
 smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className = 
 'org.joda.time.LocalTime') = formatObject = {arguments = ({className = 
 java.lang.String; contextKey = formatter; }, {className = 
 java.util.Locale; contextKey = session.localizer.@locale; }, 
 {className = java.util.TimeZone; contextKey = session.timeZone; }); 
 className = er.extensions.formatters.ERXJodaLocalTimeFormatter; } 
 [ERDDelayedObjectCreationAssignment]

Firstly, is that still the state of the art, or is there a better way to do it 
now?  Secondly, Ramsey, should that work just as well substituting 
'org.joda.time.LocalDate' and 
'er.extensions.formatters.ERXJodaLocalDateFormatter' above?  Both questions 
arise because that's what I've tried, and I cannot get it to work for the life 
of me.  Specifically, I have these rules:

100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') = 
componentName = ERD2WEditString [com.webobjects.directtoweb.Assignment]

50 : ((smartAttribute.valueFactoryMethod != null and 
smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className = 
'org.joda.time.LocalDate') = formatObject = {arguments = ({className = 
java.lang.String; contextKey = formatter; }, {className = 
java.util.Locale; contextKey = session.localizer.@locale; }, {className 
= java.util.TimeZone; contextKey = session.timeZone; }); className = 
er.extensions.formatters.ERXJodaLocalDateFormatter; } 
[ERDDelayedObjectCreationAssigment]

100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') = formatter = 
d2wContext.formatObject [com.webobjects.directtoweb.Assignment]

Yet there's no 'formatter' binding when I hover over the invoiceDate field, and 
I continue to get an exception complaining about not having a formatter.


-- 
Paul Hoadley
http://logicsquad.net/




 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: LocalDate and D2W redux

2012-06-12 Thread Ramsey Gurley
The component I'm using isn't in wonder. Have a look at R2D2WEditDate.

https://github.com/nullterminated/ponder/tree/master/ERR2d2w

Ramsey

On Jun 12, 2012, at 4:18 AM, Paul Hoadley wrote:

 Hello,
 
 Back in December 2011, in this thread:
 
 http://lists.apple.com/archives/webobjects-dev/2011/Dec/msg00440.html
 
 Ramsey described a method for binding an ERXJodaLocalTimeFormatter to (I 
 assume) an ERD2WEditString component with this rule:
 
 10 : ((smartAttribute.valueFactoryMethod != null and 
 smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className = 
 'org.joda.time.LocalTime') = formatObject = {arguments = ({className = 
 java.lang.String; contextKey = formatter; }, {className = 
 java.util.Locale; contextKey = session.localizer.@locale; }, 
 {className = java.util.TimeZone; contextKey = session.timeZone; }); 
 className = er.extensions.formatters.ERXJodaLocalTimeFormatter; } 
 [ERDDelayedObjectCreationAssignment]
 
 Firstly, is that still the state of the art, or is there a better way to do 
 it now?  Secondly, Ramsey, should that work just as well substituting 
 'org.joda.time.LocalDate' and 
 'er.extensions.formatters.ERXJodaLocalDateFormatter' above?  Both questions 
 arise because that's what I've tried, and I cannot get it to work for the 
 life of me.  Specifically, I have these rules:
 
 100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') = 
 componentName = ERD2WEditString [com.webobjects.directtoweb.Assignment]
 
 50 : ((smartAttribute.valueFactoryMethod != null and 
 smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className = 
 'org.joda.time.LocalDate') = formatObject = {arguments = ({className = 
 java.lang.String; contextKey = formatter; }, {className = 
 java.util.Locale; contextKey = session.localizer.@locale; }, 
 {className = java.util.TimeZone; contextKey = session.timeZone; }); 
 className = er.extensions.formatters.ERXJodaLocalDateFormatter; } 
 [ERDDelayedObjectCreationAssigment]
 
 100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') = formatter 
 = d2wContext.formatObject [com.webobjects.directtoweb.Assignment]
 
 Yet there's no 'formatter' binding when I hover over the invoiceDate field, 
 and I continue to get an exception complaining about not having a formatter.
 
 
 -- 
 Paul Hoadley
 http://logicsquad.net/
 
 
 
 
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
 
 This email sent to ramseygur...@gmail.com


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: failed to find a snapshot for EO with Global ID

2012-06-12 Thread Ramsey Gurley
Ah, so it's the garbage collection that's triggering it. I should have known, 
given the looping worked for small values.  This is good. I can distill the 
failure down to a single pair of EOs using System.gc() now.  This should make 
it a lot easier to investigate.

public void testNestedECs() {
try {
EOEditingContext ec = ERXEC.newEditingContext();
Company c = (Company) EOUtilities.createAndInsertInstance(ec, 
Company.ENTITY_NAME);
c.setName(Name);
ec.saveChanges();
EOEditingContext nested = ERXEC.newEditingContext(ec);
Company nestC = c.localInstanceIn(nested);
Employee e = (Employee) 
EOUtilities.createAndInsertInstance(nested, Employee.ENTITY_NAME);
e.setFirstName(First);
e.setLastName(Last);
e.setManager(Boolean.FALSE);
e.addObjectToBothSidesOfRelationshipWithKey(nestC, 
Employee.COMPANY_KEY);
nested.saveChanges();
ec.saveChanges();
System.gc();
c.delete();
ec.saveChanges();
} catch (Exception e) {
e.printStackTrace();
Assert.fail(e.getMessage());
}
}

Thanks Alexis,

Ramsey

On Jun 11, 2012, at 8:05 PM, Alexis Tual wrote:

 Hi Ramsey,
 
 this bug sounds very familiar...
 In your code, ec.setRetainsRegisteredObjects(true) should do the job, but 
 that eats memory.
 
 For more details, see 
 http://lists.apple.com/archives/webobjects-dev/2010/Nov/msg9.html, Mike 
 said :
 I don't have a patch you can easily apply. The workaround on your
 side is to not let the EO in the parent EC garbage collect
 (basically, keep a reference to the parent EO around for any EO
 that you fault into child EC).
 
 Good luck on this,
 
 Alex
 
 
 2012/6/12 Ramsey Gurley rgur...@smarthealth.com
 Hi all,
 
 I have a suspicion that something is wrong with the way nested ECs are 
 currently working. The errors I see are the result of missing snapshots.  The 
 errors are very sporadic and hard to reproduce. I've managed to distill this 
 down to a simple test case.  If I drop this:
 
 public void testNestedECs() {
   try {
   EOEditingContext ec = ERXEC.newEditingContext();
   for(int i = 0; i  100; i++) {
   Company c = (Company) 
 EOUtilities.createAndInsertInstance(ec, Company.ENTITY_NAME);
   c.setName(UUID.randomUUID().toString());
   ec.saveChanges();
   EOEditingContext nested = ERXEC.newEditingContext(ec);
   Company nestC = c.localInstanceIn(nested);
   for(int j = 0; j  10; j++) {
   Employee e = (Employee) 
 EOUtilities.createAndInsertInstance(nested, Employee.ENTITY_NAME);
   e.setFirstName(UUID.randomUUID().toString());
   e.setLastName(UUID.randomUUID().toString());
   e.setManager(Boolean.FALSE);
   
 e.addObjectToBothSidesOfRelationshipWithKey(nestC, Employee.COMPANY_KEY);
   nested.saveChanges();
   ec.saveChanges();
   }
   c.delete();
   ec.saveChanges(); //Line 78
   }
   } catch (Exception e) {
   e.printStackTrace();
   Assert.fail(e.getMessage());
   }
 }
 
 into ERXECTest.java, I get fairly reliable failures due to missing snapshots.
 
 java.lang.IllegalStateException: recordDeleteForObject: 
 com.webobjects.eoaccess.EODatabaseContext 
 com.webobjects.eoaccess.EODatabaseContext@489bb457 failed to find a snapshot 
 for EO with Global ID:_EOIntegralKeyGlobalID[Employee (java.lang.Integer)491] 
 that has been deleted from 
 er.extensions.eof.ERXECer.extensions.eof.ERXEC@44581ea2. Cannot delete an 
 object that has not been fetched from the database
   at 
 com.webobjects.eoaccess.EODatabaseContext.recordDeleteForObject(EODatabaseContext.java:4732)
   at 
 com.webobjects.eoaccess.EODatabaseContext.recordChangesInEditingContext(EODatabaseContext.java:5890)
   at 
 com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:373)
   at 
 com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
   at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1177)
   at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1100)
   at er.extensions.eof.ERXECTest.testNestedECs(ERXECTest.java:78)
 
 If I drop the number of loops down to 10 instead of 100, I don't see the 
 exceptions.  Does anyone see an obvious problem with my test case or perhaps 
 have ideas about what's going wrong before I begin digging? :-)
 
 Ramsey
 
 
 
  

Re: LocalDate and D2W redux

2012-06-12 Thread Paul Yu
When we model a new EOModel is the recommendation to use jodaLocalDateTime??? 
or it depends?   

-- 
Paul Yu
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Tuesday, June 12, 2012 at 11:08 AM, Ramsey Gurley wrote:

 The component I'm using isn't in wonder. Have a look at R2D2WEditDate.
 
 https://github.com/nullterminated/ponder/tree/master/ERR2d2w
 
 Ramsey
 
 On Jun 12, 2012, at 4:18 AM, Paul Hoadley wrote:
 
  Hello,
  
  Back in December 2011, in this thread:
  
  http://lists.apple.com/archives/webobjects-dev/2011/Dec/msg00440.html
  
  Ramsey described a method for binding an ERXJodaLocalTimeFormatter to (I 
  assume) an ERD2WEditString component with this rule:
  
   10 : ((smartAttribute.valueFactoryMethod != null and 
   smartAttribute.factoryMethodArgumentType = 3) and 
   smartAttribute.className = 'org.joda.time.LocalTime') = formatObject = 
   {arguments = ({className = java.lang.String; contextKey = 
   formatter; }, {className = java.util.Locale; contextKey = 
   session.localizer.@locale; }, {className = java.util.TimeZone; 
   contextKey = session.timeZone; }); className = 
   er.extensions.formatters.ERXJodaLocalTimeFormatter; } 
   [ERDDelayedObjectCreationAssignment]
  
  Firstly, is that still the state of the art, or is there a better way to do 
  it now? Secondly, Ramsey, should that work just as well substituting 
  'org.joda.time.LocalDate' and 
  'er.extensions.formatters.ERXJodaLocalDateFormatter' above? Both questions 
  arise because that's what I've tried, and I cannot get it to work for the 
  life of me. Specifically, I have these rules:
  
  100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') = 
  componentName = ERD2WEditString [com.webobjects.directtoweb.Assignment 
  (http://web.Assignment)]
  
  50 : ((smartAttribute.valueFactoryMethod != null and 
  smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className 
  = 'org.joda.time.LocalDate') = formatObject = {arguments = ({className 
  = java.lang.String; contextKey = formatter; }, {className = 
  java.util.Locale; contextKey = session.localizer.@locale; }, 
  {className = java.util.TimeZone; contextKey = session.timeZone; }); 
  className = er.extensions.formatters.ERXJodaLocalDateFormatter; } 
  [ERDDelayedObjectCreationAssigment]
  
  100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') = 
  formatter = d2wContext.formatObject 
  [com.webobjects.directtoweb.Assignment (http://web.Assignment)]
  
  Yet there's no 'formatter' binding when I hover over the invoiceDate field, 
  and I continue to get an exception complaining about not having a formatter.
  
  
  -- 
  Paul Hoadley
  http://logicsquad.net/
  
  
  
  
  ___
  Do not post admin requests to the list. They will be ignored.
  Webobjects-dev mailing list (Webobjects-dev@lists.apple.com 
  (mailto:Webobjects-dev@lists.apple.com))
  Help/Unsubscribe/Update your Subscription:
  https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
  
  This email sent to ramseygur...@gmail.com (mailto:ramseygur...@gmail.com)
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list (Webobjects-dev@lists.apple.com 
 (mailto:Webobjects-dev@lists.apple.com))
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
 
 This email sent to p...@mac.com (mailto:p...@mac.com) 

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: LocalDate and D2W redux

2012-06-12 Thread Ramsey Gurley
Depends on whether you need the time zone or not.  

Let's say you want to say Walmart's black friday sale begins at 12 am on the 
Friday after Thanksgiving. You'd model that as a LocalDateTime because it's a 
date and time that is not specific to any time zone.  East coast stores start 
their sale 3 hours earlier than west coast stores because of the time zone 
difference.

Similar for birthdate, but that's typically represented as LocalDate instead.  
You'd use LocalTime to model something like tea time or happy hour at the pub :D

DateTime or NSTimestamp are the only ones that use timezones. If you need a 
global time stamp to indicate when an event occurs, then you'd go with one of 
these.  The NYSE opens at 9am Eastern time this morning. If you're in 
California, it doesn't wait three hours for you to wake up :-)

Ramsey


On Jun 12, 2012, at 8:28 AM, Paul Yu wrote:

 When we model a new EOModel is the recommendation to use jodaLocalDateTime??? 
 or it depends?  
 
 -- 
 Paul Yu
 Sent with Sparrow
 
 On Tuesday, June 12, 2012 at 11:08 AM, Ramsey Gurley wrote:
 
 The component I'm using isn't in wonder. Have a look at R2D2WEditDate.
 
 https://github.com/nullterminated/ponder/tree/master/ERR2d2w
 
 Ramsey
 
 On Jun 12, 2012, at 4:18 AM, Paul Hoadley wrote:
 
 Hello,
 
 Back in December 2011, in this thread:
 
 http://lists.apple.com/archives/webobjects-dev/2011/Dec/msg00440.html
 
 Ramsey described a method for binding an ERXJodaLocalTimeFormatter to (I 
 assume) an ERD2WEditString component with this rule:
 
 10 : ((smartAttribute.valueFactoryMethod != null and 
 smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className 
 = 'org.joda.time.LocalTime') = formatObject = {arguments = 
 ({className = java.lang.String; contextKey = formatter; }, 
 {className = java.util.Locale; contextKey = 
 session.localizer.@locale; }, {className = java.util.TimeZone; 
 contextKey = session.timeZone; }); className = 
 er.extensions.formatters.ERXJodaLocalTimeFormatter; } 
 [ERDDelayedObjectCreationAssignment]
 
 Firstly, is that still the state of the art, or is there a better way to do 
 it now? Secondly, Ramsey, should that work just as well substituting 
 'org.joda.time.LocalDate' and 
 'er.extensions.formatters.ERXJodaLocalDateFormatter' above? Both questions 
 arise because that's what I've tried, and I cannot get it to work for the 
 life of me. Specifically, I have these rules:
 
 100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') = 
 componentName = ERD2WEditString [com.webobjects.directtoweb.Assignment]
 
 50 : ((smartAttribute.valueFactoryMethod != null and 
 smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className 
 = 'org.joda.time.LocalDate') = formatObject = {arguments = ({className 
 = java.lang.String; contextKey = formatter; }, {className = 
 java.util.Locale; contextKey = session.localizer.@locale; }, 
 {className = java.util.TimeZone; contextKey = session.timeZone; }); 
 className = er.extensions.formatters.ERXJodaLocalDateFormatter; } 
 [ERDDelayedObjectCreationAssigment]
 
 100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') = 
 formatter = d2wContext.formatObject 
 [com.webobjects.directtoweb.Assignment]
 
 Yet there's no 'formatter' binding when I hover over the invoiceDate field, 
 and I continue to get an exception complaining about not having a formatter.
 
 
 --
 Paul Hoadley
 http://logicsquad.net/
 
 
 
 
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
 
 This email sent to ramseygur...@gmail.com
 
 
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
 
 This email sent to p...@mac.com
 

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: LocalDate and D2W redux

2012-06-12 Thread Theodore Petrosky

an invoice has a date that doesn't change because you are looking at it in CA 
instead of NY

 Message: 3
 Date: Tue, 12 Jun 2012 08:47:08 -0700
 From: Ramsey Gurley ramseygur...@gmail.com
 To: Paul Yu p...@mac.com
 Cc: WebObjects Development webobjects-dev@lists.apple.com
 Subject: Re: LocalDate and D2W redux
 Message-ID: 233aae12-a22a-49f4-a23c-bd020b83b...@gmail.com
 Content-Type: text/plain; charset=utf-8
 
 Depends on whether you need the time zone or not.  
 
 Let's say you want to say Walmart's black friday sale begins
 at 12 am on the Friday after Thanksgiving. You'd model that
 as a LocalDateTime because it's a date and time that is not
 specific to any time zone.  East coast stores start
 their sale 3 hours earlier than west coast stores because of
 the time zone difference.
 
 Similar for birthdate, but that's typically represented as
 LocalDate instead.  You'd use LocalTime to model
 something like tea time or happy hour at the pub :D
 
 DateTime or NSTimestamp are the only ones that use
 timezones. If you need a global time stamp to indicate when
 an event occurs, then you'd go with one of these.  The
 NYSE opens at 9am Eastern time this morning. If you're in
 California, it doesn't wait three hours for you to wake up
 :-)
 
 Ramsey
 
 

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: failed to find a snapshot for EO with Global ID

2012-06-12 Thread Calven Eggert
I'm very curious to see your findings.  One of our WO apps have had this 
problem for years but it happens so infrequently that the users don't seem to 
be bothered.  It bothers me though. argh.

  
On 2012-06-12, at 11:47 AM, webobjects-dev-requ...@lists.apple.com 
webobjects-dev-requ...@lists.apple.com wrote:

 Ah, so it's the garbage collection that's triggering it. I should have known, 
 given the looping worked for small values.  This is good. I can distill the 
 failure down to a single pair of EOs using System.gc() now.  This should make 
 it a lot easier to investigate.
 
 public void testNestedECs() {
   try {
   EOEditingContext ec = ERXEC.newEditingContext();
   Company c = (Company) EOUtilities.createAndInsertInstance(ec, 
 Company.ENTITY_NAME);
   c.setName(Name);
   ec.saveChanges();
   EOEditingContext nested = ERXEC.newEditingContext(ec);
   Company nestC = c.localInstanceIn(nested);
   Employee e = (Employee) 
 EOUtilities.createAndInsertInstance(nested, Employee.ENTITY_NAME);
   e.setFirstName(First);
   e.setLastName(Last);
   e.setManager(Boolean.FALSE);
   e.addObjectToBothSidesOfRelationshipWithKey(nestC, 
 Employee.COMPANY_KEY);
   nested.saveChanges();
   ec.saveChanges();
   System.gc();
   c.delete();
   ec.saveChanges();
   } catch (Exception e) {
   e.printStackTrace();
   Assert.fail(e.getMessage());
   }
 }
 
 Thanks Alexis,
 
 Ramsey
 

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


rackspace, centos and WO

2012-06-12 Thread Theodore Petrosky
Has anyone successfully set up WO on a rackspace cloud server? I finally got 
Apache up and running but I keep running into problems with WO and where it 
lives and I think I am just confusing myself.

Ted
 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: rackspace, centos and WO

2012-06-12 Thread Pascal Robert
Should not be different than another CentOS Linux installation (I do have a 
RackSpace VM that I only used to test). What is the exact problem?

 Has anyone successfully set up WO on a rackspace cloud server? I finally got 
 Apache up and running but I keep running into problems with WO and where it 
 lives and I think I am just confusing myself.
 
 Ted
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
 
 This email sent to prob...@macti.ca


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: failed to find a snapshot for EO with Global ID

2012-06-12 Thread Alexis Tual
I'm also very curious about Ramsey's investigations because when this bug
happens, you have to basically toss your EC stack...

Alex

2012/6/13 Calven Eggert cegg...@uhnresearch.ca

 I'm very curious to see your findings.  One of our WO apps have had this
 problem for years but it happens so infrequently that the users don't seem
 to be bothered.  It bothers me though. argh.


 On 2012-06-12, at 11:47 AM, webobjects-dev-requ...@lists.apple.com 
 webobjects-dev-requ...@lists.apple.com wrote:

 Ah, so it's the garbage collection that's triggering it. I should have
 known, given the looping worked for small values.  This is good. I can
 distill the failure down to a single pair of EOs using System.gc() now.
  This should make it a lot easier to investigate.

 public void testNestedECs() {
  try {
  EOEditingContext ec = ERXEC.newEditingContext();
  Company c = (Company) EOUtilities.createAndInsertInstance(ec,
 Company.ENTITY_NAME);
  c.setName(Name);
  ec.saveChanges();
  EOEditingContext nested = ERXEC.newEditingContext(ec);
  Company nestC = c.localInstanceIn(nested);
  Employee e = (Employee) EOUtilities.createAndInsertInstance(nested,
 Employee.ENTITY_NAME);
  e.setFirstName(First);
  e.setLastName(Last);
  e.setManager(Boolean.FALSE);
  e.addObjectToBothSidesOfRelationshipWithKey(nestC, Employee.
 COMPANY_KEY);
  nested.saveChanges();
  ec.saveChanges();
  System.gc();
  c.delete();
  ec.saveChanges();
  } catch (Exception e) {
  e.printStackTrace();
  Assert.fail(e.getMessage());
  }
 }

 Thanks Alexis,

 Ramsey



  ___
 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:

 https://lists.apple.com/mailman/options/webobjects-dev/alexis.tual%40gmail.com

 This email sent to alexis.t...@gmail.com


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: LocalDate and D2W redux

2012-06-12 Thread Paul Hoadley
On 13/06/2012, at 12:38 AM, Ramsey Gurley wrote:

 The component I'm using isn't in wonder. Have a look at R2D2WEditDate.
 
 https://github.com/nullterminated/ponder/tree/master/ERR2d2w

Thanks Ramsey, I will take a look.


-- 
Paul.

http://logicsquad.net/


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Wonder apps under AWS ELB with sticky sessions, autoscaling EC2 instances.

2012-06-12 Thread Matthew Ness
Hello list!

I've been working on a number of wonder applications the last year at my
9-5, all of which we have deployed to AWS in various development and
staging/QA states. For the production environment of the main application,
we are looking at a deployment setup quite similar to this reference
diagram:

http://d36cz9buwru1tt.cloudfront.net/architecturecenter/AWS_ac_ra_web_01.pdf

(from http://aws.amazon.com/architecture/)

It's important to the company to ensure we can run smoothly across
multiple Availability Zones of a Region, so the diagram represents the 3
(+1) tier application setup we are looking for.

We're really happy with the approach we've taken so far, and the
ELB-session-stickiness and autoscaling of the application tiers in each AZ
is something we are currently evaluating.

Ignoring CloudFront and Route 53 for a moment, we're interested in setting
up the ELB with sticky sessions/session affinity, apache on each AZ, and a
number of application VMs on each AZ, each one of course running a number
of WO instances. The persistence tier is absolutely fine and accounted for
in both AZs.



So two quick questions:

1. Has anyone had any experience with ELB and sticky sessions with regards
to WO, WOMonitor, and wotaskd? If so, are there any gotchas or hurdles you
foresee me coming across? Any tips for smooth sailing?

Tied (or apposed really) to this is the concept of distributed session
storage, which we are also considering, so I'm looking forward to your
WOWODC session, Ramsey!

2. Currently we're looking at manual horizontal scaling of the application
tiers in each AZ, but it would be great to design/have a solution for
triggered horizontal EC2 VM scaling with respect to WO. This would
presumably require updating the WOMonitor and wotaskd. Again, any one with
previous experience wanting to warn me off/enthusiastically give me hope?




Any knowledge in this area would be greatly appreciated!

Cheers,

and see you all at WOWODC.

-- 
Matt
http://logicsquad.net/

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Wonder apps under AWS ELB with sticky sessions, autoscaling EC2 instances.

2012-06-12 Thread Simon
we had problems with elb, wo and sticky sessions. we now run zeus load
balancers on ec2.

we never got to the bottom of it, just randomly the session would seem
to loose it's stickyness, head off to another ec2 instance, new
session and login page.

i suspected it was due to switching between http and https and we
intend to re-trial elb in a few months time because we are moving all
of our apps to full-time https and secure cookies.

sorry, not much help i know, but just a heads up that we did have
problems. i'd be interested in knowing how you get on...

simon


On 12 June 2012 23:24, Matthew Ness m...@logicsquad.net wrote:
 Hello list!

 I've been working on a number of wonder applications the last year at my
 9-5, all of which we have deployed to AWS in various development and
 staging/QA states. For the production environment of the main application,
 we are looking at a deployment setup quite similar to this reference
 diagram:

 http://d36cz9buwru1tt.cloudfront.net/architecturecenter/AWS_ac_ra_web_01.pdf

 (from http://aws.amazon.com/architecture/)

 It's important to the company to ensure we can run smoothly across
 multiple Availability Zones of a Region, so the diagram represents the 3
 (+1) tier application setup we are looking for.

 We're really happy with the approach we've taken so far, and the
 ELB-session-stickiness and autoscaling of the application tiers in each AZ
 is something we are currently evaluating.

 Ignoring CloudFront and Route 53 for a moment, we're interested in setting
 up the ELB with sticky sessions/session affinity, apache on each AZ, and a
 number of application VMs on each AZ, each one of course running a number
 of WO instances. The persistence tier is absolutely fine and accounted for
 in both AZs.



 So two quick questions:

 1. Has anyone had any experience with ELB and sticky sessions with regards
 to WO, WOMonitor, and wotaskd? If so, are there any gotchas or hurdles you
 foresee me coming across? Any tips for smooth sailing?

 Tied (or apposed really) to this is the concept of distributed session
 storage, which we are also considering, so I'm looking forward to your
 WOWODC session, Ramsey!

 2. Currently we're looking at manual horizontal scaling of the application
 tiers in each AZ, but it would be great to design/have a solution for
 triggered horizontal EC2 VM scaling with respect to WO. This would
 presumably require updating the WOMonitor and wotaskd. Again, any one with
 previous experience wanting to warn me off/enthusiastically give me hope?




 Any knowledge in this area would be greatly appreciated!

 Cheers,

 and see you all at WOWODC.

 --
 Matt
 http://logicsquad.net/

  ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk

 This email sent to si...@potwells.co.uk

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Wonder apps under AWS ELB with sticky sessions, autoscaling EC2 instances.

2012-06-12 Thread Matthew Ness
Thanks Simon,

We'll be running https full-time, so we'll have an evaluation period and
I'll let you know how we go.

Will you be at WOWODC?


-- 
Matt
http://logicsquad.net/



 we had problems with elb, wo and sticky sessions. we now run zeus load
 balancers on ec2.

 we never got to the bottom of it, just randomly the session would seem
 to loose it's stickyness, head off to another ec2 instance, new
 session and login page.

 i suspected it was due to switching between http and https and we
 intend to re-trial elb in a few months time because we are moving all
 of our apps to full-time https and secure cookies.

 sorry, not much help i know, but just a heads up that we did have
 problems. i'd be interested in knowing how you get on...

 simon


 On 12 June 2012 23:24, Matthew Ness m...@logicsquad.net wrote:
 Hello list!

 I've been working on a number of wonder applications the last year at my
 9-5, all of which we have deployed to AWS in various development and
 staging/QA states. For the production environment of the main
 application,
 we are looking at a deployment setup quite similar to this reference
 diagram:

 http://d36cz9buwru1tt.cloudfront.net/architecturecenter/AWS_ac_ra_web_01.pdf

 (from http://aws.amazon.com/architecture/)

 It's important to the company to ensure we can run smoothly across
 multiple Availability Zones of a Region, so the diagram represents the 3
 (+1) tier application setup we are looking for.

 We're really happy with the approach we've taken so far, and the
 ELB-session-stickiness and autoscaling of the application tiers in each
 AZ
 is something we are currently evaluating.

 Ignoring CloudFront and Route 53 for a moment, we're interested in
 setting
 up the ELB with sticky sessions/session affinity, apache on each AZ, and
 a
 number of application VMs on each AZ, each one of course running a
 number
 of WO instances. The persistence tier is absolutely fine and accounted
 for
 in both AZs.



 So two quick questions:

 1. Has anyone had any experience with ELB and sticky sessions with
 regards
 to WO, WOMonitor, and wotaskd? If so, are there any gotchas or hurdles
 you
 foresee me coming across? Any tips for smooth sailing?

 Tied (or apposed really) to this is the concept of distributed session
 storage, which we are also considering, so I'm looking forward to your
 WOWODC session, Ramsey!

 2. Currently we're looking at manual horizontal scaling of the
 application
 tiers in each AZ, but it would be great to design/have a solution for
 triggered horizontal EC2 VM scaling with respect to WO. This would
 presumably require updating the WOMonitor and wotaskd. Again, any one
 with
 previous experience wanting to warn me off/enthusiastically give me
 hope?




 Any knowledge in this area would be greatly appreciated!

 Cheers,

 and see you all at WOWODC.

 --
 Matt
 http://logicsquad.net/


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com