Re: data source for “static” objects?

2020-06-07 Thread Chuck Hill via Webobjects-dev
I’d guess that some still exist in Wonder in some way.

> On Jun 7, 2020, at 11:39 AM, o...@ocs.cz wrote:
> 
> Chuck,
> 
> thanks a lot, sounds hopeful :)
> 
> Will check. Should you happen to have a link to some sample code at hand, I'd 
> be grateful; otherwise of course I'll search for it myself :)
> 
> Thanks again,
> OC
> 
>> On 7. 6. 2020, at 8:06 PM, Chuck Hill > <mailto:hill.ch...@gmail.com>> wrote:
>> 
>> I think what you want is to subclass EOAadptor, EOAdaptorChannel, and 
>> EOAdaptorContext and have them talk to your Java classes.  The layer above 
>> (EODatabase etc) can stay are they are.
>> 
>> There have been flat file adataptors, screen scrapers etc.  I don’t see why 
>> what you want could not work.  The model the entities are in control the 
>> EOAdaptor used.
>> 
>> Chuck
>> 
>> 
>>> On Jun 7, 2020, at 10:02 AM, Aaron Rosenzweig via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>> 
>>> wrote:
>>> 
>>> Hi OC,
>>> 
>>> I suppose you could move your java POJOs into a .jar and then expose them 
>>> with a java app running on a particular port that masquerades as a DB 
>>> endpoint. I’m not sure it’s worth the trouble but it could be done. This 
>>> would be the “my DB in a box” solution where you essentially make trimmed 
>>> down DB server that doesn’t allow updates but allows SQL queries. It gets 
>>> weird though with EOF and honestly I’ve never tried jumping DBs for foreign 
>>> keys. I’ve only used multiple DBs to do queries on unrelated data. 
>>> 
>>> I assume you like how handy it is to have the java classes at your finger 
>>> tips and able to edit them when needed but you also like to be able to 
>>> query in SQL for various attributes that those POJOs have… so you go to the 
>>> trouble of making an EO doppelgänger that you have to sync. 
>>> 
>>> Perhaps you can make your POJOs enums? If that’s feasible then you could 
>>> use the enum prototype in your EO so that instead of having an FK it is an 
>>> attribute of an enum type. 
>>> 
>>> If enums are not feasible then maybe you should stop thinking of them as 
>>> POJOs and make them EOs which you have to change via SQL migrations instead 
>>> of twiddling java classes. That would be the path of least resistance. 
>>> Since they are pretty much read only, you could consider making them shared 
>>> Eos but it’s not mandatory to do so. 
>>> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
>>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319
>>> 
>>> 
>>>> On Jun 7, 2020, at 12:37 PM, ocs--- via Webobjects-dev 
>>>> mailto:webobjects-dev@lists.apple.com>> 
>>>> wrote:
>>>> 
>>>> Hi there,
>>>> 
>>>> let me please ask another weird question. For the context, thing is, one 
>>>> of our applications supports “predefined” EOs -- things like static lists 
>>>> and similar. In our case, they are completely defined in the Java code -- 
>>>> the number of them, all their attributes, whatever. Then, runtime, they 
>>>> are shared for all users/sessions/editing contexts.
>>>> 
>>>> Since they need to be real EOs (they mix with normal dynamically defined 
>>>> objects, they are part of relationships, etc), it brings non-trivial 
>>>> problem how to implement the stuff.
>>>> 
>>>> At this moment, we
>>>> - at launch, synchronise these objects into the database: if the Java code 
>>>> defines a new object which has not been there, it is inserted; if there 
>>>> are changes in attributes, they are updated. If an object of this kind is 
>>>> found in the database and there's no description for it in the Java code, 
>>>> it is deleted;
>>>> - then we load them into the shared EC for all users to share them.
>>>> 
>>>> It works, but the synchronisation approach is ugly; it feels sort of wrong 
>>>> to keep copies of those static objects in the database.
>>>> 
>>>> Now, I wonder: EOF does support multiple data sources. How difficult and 
>>>> error-prone would it be to implement my own data source, which would -- 
>>>> instead of from a DB -- “load” objects from the application predefined 
>>>> code? Would it be possible? Wouldn't it bring more

Re: data source for “static” objects?

2020-06-07 Thread Chuck Hill via Webobjects-dev
I think what you want is to subclass EOAadptor, EOAdaptorChannel, and 
EOAdaptorContext and have them talk to your Java classes.  The layer above 
(EODatabase etc) can stay are they are.

There have been flat file adataptors, screen scrapers etc.  I don’t see why 
what you want could not work.  The model the entities are in control the 
EOAdaptor used.

Chuck


> On Jun 7, 2020, at 10:02 AM, Aaron Rosenzweig via Webobjects-dev 
>  wrote:
> 
> Hi OC,
> 
> I suppose you could move your java POJOs into a .jar and then expose them 
> with a java app running on a particular port that masquerades as a DB 
> endpoint. I’m not sure it’s worth the trouble but it could be done. This 
> would be the “my DB in a box” solution where you essentially make trimmed 
> down DB server that doesn’t allow updates but allows SQL queries. It gets 
> weird though with EOF and honestly I’ve never tried jumping DBs for foreign 
> keys. I’ve only used multiple DBs to do queries on unrelated data. 
> 
> I assume you like how handy it is to have the java classes at your finger 
> tips and able to edit them when needed but you also like to be able to query 
> in SQL for various attributes that those POJOs have… so you go to the trouble 
> of making an EO doppelgänger that you have to sync. 
> 
> Perhaps you can make your POJOs enums? If that’s feasible then you could use 
> the enum prototype in your EO so that instead of having an FK it is an 
> attribute of an enum type. 
> 
> If enums are not feasible then maybe you should stop thinking of them as 
> POJOs and make them EOs which you have to change via SQL migrations instead 
> of twiddling java classes. That would be the path of least resistance. Since 
> they are pretty much read only, you could consider making them shared Eos but 
> it’s not mandatory to do so. 
> AARON ROSENZWEIG / Chat 'n Bike 
> e:  aa...@chatnbike.com   t:  (301) 956-2319
>   
> 
>> On Jun 7, 2020, at 12:37 PM, ocs--- via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> Hi there,
>> 
>> let me please ask another weird question. For the context, thing is, one of 
>> our applications supports “predefined” EOs -- things like static lists and 
>> similar. In our case, they are completely defined in the Java code -- the 
>> number of them, all their attributes, whatever. Then, runtime, they are 
>> shared for all users/sessions/editing contexts.
>> 
>> Since they need to be real EOs (they mix with normal dynamically defined 
>> objects, they are part of relationships, etc), it brings non-trivial problem 
>> how to implement the stuff.
>> 
>> At this moment, we
>> - at launch, synchronise these objects into the database: if the Java code 
>> defines a new object which has not been there, it is inserted; if there are 
>> changes in attributes, they are updated. If an object of this kind is found 
>> in the database and there's no description for it in the Java code, it is 
>> deleted;
>> - then we load them into the shared EC for all users to share them.
>> 
>> It works, but the synchronisation approach is ugly; it feels sort of wrong 
>> to keep copies of those static objects in the database.
>> 
>> Now, I wonder: EOF does support multiple data sources. How difficult and 
>> error-prone would it be to implement my own data source, which would -- 
>> instead of from a DB -- “load” objects from the application predefined code? 
>> Would it be possible? Wouldn't it bring more problems than the old code did? 
>> To illustrate the idea, here's the notorious Apple pic, tweaked 
>> appropriately:
>> 
>> 
>> Has anybody out there already tried something like that, and if so, with any 
>> luck?
>> 
>> Thanks,
>> OC
>> 
>> 
>> 
>> ___
>> 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/aaron%40chatnbike.com 
>> 
>> 
>> This email sent to aa...@chatnbike.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/hill.chuck%40gmail.com 
> 
> 
> This email sent to hill.ch...@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 

Re: REDIRECTED to non-refusing instance

2020-02-03 Thread Chuck Hill via Webobjects-dev
Check the web server logs.  IIRC there is a direct action /womp/something that 
puts the app into refusing mode.  Perhaps you are the victim of some malicious 
traffic?

Chuck

> On Feb 3, 2020, at 10:58 AM, OCsite via Webobjects-dev 
>  wrote:
> 
> Hi there again,
> 
> is there any known situation/bug, which would lead to the logs of kind
> 
> DEBUG !!! Request will be REDIRECTED to non-refusing instance
> 
> without having set either Refuse new session or graceful scheduling in the JM?
> 
> I have found a debate in which Chuck asserts that WO might have long ago (WO 
> 5.1/2, 2003) contained a bug which would lead to this log when a direct 
> action URL contains a session ID; but far as I understand properly, even thus 
> it still would happen with Refuse/Graceful only, neither of which we use.
> 
> Thing is, we are lately getting lots of those REDIRECTED logs now at our 
> production server (not surprisingly it never happens at the test site). It 
> seems to be coming with a new version of the application, but none of the 
> changes in the code, far as I can say, seems to be remotely relevant to such 
> a problem.
> 
> Thanks!
> OC
> 
> 
> 
> 
> ___
> 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/hill.chuck%40gmail.com
> 
> This email sent to hill.ch...@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: Maven Unit tests with EOF

2020-01-23 Thread Chuck Hill via Webobjects-dev
That error is definitely a static initializer or block throwing.  Nothing else 
is output?


> On Jan 23, 2020, at 8:41 AM, Aaron Rosenzweig via Webobjects-dev 
>  wrote:
> 
> I tried this call:
> 
> NSBundle MYBUNDLE = NSBundle.mainBundle();
> 
> It fails immediately with:
> java.lang.NoClassDefFoundError: Could not initialize class 
> com.webobjects.foundation.NSBundle
> 
> I’m suspecting it has to do with the static initializer of NSBundle.
> AARON ROSENZWEIG / Chat 'n Bike 
> e:  aa...@chatnbike.com   t:  (301) 956-2319  
> 
>   
> 
>> On Jan 23, 2020, at 11:23 AM, Aaron Rosenzweig > > wrote:
>> 
>> Riddle me this… how can you get a class not defined error from the class 
>> itself?
>> 
>> java.lang.NoClassDefFoundError: Could not initialize class 
>> com.webobjects.foundation.NSBundle
>>  at com.webobjects.foundation.NSBundle.mainBundle(NSBundle.java:526)
>> 
>> You are already in NSBundle.mainBundle() and then out pops a 
>> NoClassDefFoundError… that must be a red herring but I cannot figure it out. 
>> AARON ROSENZWEIG / Chat 'n Bike 
>> e:  aa...@chatnbike.com   t:  (301) 956-2319 
>> 
>>  
>> 
>>> On Jan 23, 2020, at 10:03 AM, Aaron Rosenzweig >> > wrote:
>>> 
>>> Hi Dennis - I hadn’t thought of that - we could have a fast failsafe and 
>>> then a slow one run at different times. Thanks! good idea. 
>>> AARON ROSENZWEIG / Chat 'n Bike 
>>> e:  aa...@chatnbike.com   t:  (301) 956-2319
>>> 
>>> 
>>> 
 On Jan 23, 2020, at 9:58 AM, Dennis Scheffer >>> > wrote:
 
 
> Cloning a “company” EO and testing unique constraints in SQL - is heavier 
> than testing an “isCamelCase()” function but lighter than selenium. Maybe 
> we have to do it in failsafe but it feels closer to regular unit tests 
> that should fire every time there is a checkin to the repo. In other 
> words if your tests take 5 minutes to run, why not let Agnes tell you 
> immediately that the build is broken rather than waiting till midnight 
> for selenium to do so?
 
 If there are multiple ways in which you would like to use the failsafe 
 plugin, you can always add multiple executions and put them in their own 
 build profiles 
 (https://maven.apache.org/guides/introduction/introduction-to-profiles.html
  
 ).
  Then you can fire failsafe every time you check in new code without 
 selenium and you can do something like this if your want selenium tests to 
 be run: 'mvn clean verify -P with-selenium'. There are a bunch of ways to 
 configure profiles to do something like that.
 
 -- 
 Dennis
 
> On 23. Jan 2020, at 15:39, Aaron Rosenzweig  > wrote:
> 
> Dennis that is a good point,
> 
> At the moment I have not cleaned and the product is there but it’s not 
> working but your point is still well taken. In Jenkins, in the cloud, it 
> will do a clean and I really should be doing a clean every time so the 
> product won’t be there to test with… there won’t be a bundle. 
> 
> Maven “Failsafe” makes sense for selenium… which is technically a JUnit 
> test too but it’s very heavy and flexes the UI of a bundled and launched 
> app. 
> 
> Cloning a “company” EO and testing unique constraints in SQL - is heavier 
> than testing an “isCamelCase()” function but lighter than selenium. Maybe 
> we have to do it in failsafe but it feels closer to regular unit tests 
> that should fire every time there is a checkin to the repo. In other 
> words if your tests take 5 minutes to run, why not let Agnes tell you 
> immediately that the build is broken rather than waiting till midnight 
> for selenium to do so?
> 
> http://www.globalnerdy.com/wp-content/uploads/2008/08/you_broke_the_build.jpg
>  
> 
> 
> When we run from within Eclipse we have a “bundless build” that uses the 
> Fluffy Bunny NSBundle variant and works great… without a product… and the 
> destructive EOF unit tests work there. I think what Markus did was patch 
> NSBundle to treat the maven target with the intermediate classes and 
> resources as a “maven bundless build” or a “maven black-ops bunny” 
> if-you-will. 
> 
> I’m still confused but clarity is setting in. Thank you everyone for this 
> hearty discussion. 
> AARON ROSENZWEIG / Chat 'n Bike 
> e:  aa...@chatnbike.com   t:  (301) 956-2319  
> 

Re: Definitely solved: More SharedEC woes: relationships into SEC not saved with more EOF stacks

2020-01-15 Thread Chuck Hill via Webobjects-dev
Hi OC,

> On Jan 14, 2020, at 9:34 AM, OCsite  wrote:
> 
> Chuck,
> 
>> On 14 Jan 2020, at 6:31, Chuck Hill > <mailto:hill.ch...@gmail.com>> wrote:
>> On Jan 13, 2020, at 5:42 AM, OCsite mailto:o...@ocs.cz>> wrote:
>>>> Do you have multiple EOF stacks (multiple EOObjectStoreCoordinator 
>>>> instances)?
>>> 
>>> Hmmm... yup, in most of my apps, I use for years and years
>>> 
>>> er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators=3
>>> 
>>> Let me see, I'll try without ... and just again, you are right! When this 
>>> is commented out from Properties, relationships to SEC get saved properly 
>>> (without the convoluted databaseContextWillOrderAdaptorOperations delegate 
>>> of course).
>>> 
>>> Can you please explain how this relates? I must be missing something of 
>>> importance, but I can't see any sense in that :( How on earth might the 
>>> sole existence of a couple of other (far as I know, pretty independent) EOF 
>>> stacks affect the way an EODBOp creates its newRows?!? :-O
>> 
>>  I’ve never been much of an SEC user.  The EOSharedEditingContext is an 
>> EOEditingContext and so it is associated with one EOObjectStoreCoordinator.  
>> What I will guess is that the OSC of the SEC instance is != the OSC of the 
>> EOEditingContext you are using and there is a bug because the relationship 
>> crosses OSCs.  I doubt that is fixable, but you might find some way to use 
>> that to come up with a better hack.  Assuming that I am correct.
> 
> As always, indeed, correct you are.
> 
> Since my app makes sure to use only one of all the coordinators for the 
> normal work and for sessions (keeping the rest of coordinators from the pool 
> solely for my background tasks), I was pretty sure this can't happen... until 
> I tried to log out the coordinators, and indeed, they did differ. Seems the 
> SEC coordinator gets assigned in some weird way.
> 
> With fixing, I am afraid I am outta luck; one possibility would be to get rid 
> of the SEC altogether, another probably the delegate hack which works around 
> the problem — for having revisited the app meantime, alas, I recalled I can't 
> do without those extra coordinators for the background tasks. Some of them 
> could write many objects into DB, and alas, I can't let the users in normal 
> sessions wait for that long :(
> 
>>> I do wonder of the speed difference in practice: one coordinator would 
>>> definitely make the app somewhat slower; on the other hand, SEC itself 
>>> should speed it up, removing a need of many DB roundtrips... hm, perhaps it 
>>> would be better just to forget maxCoordinators and stay at the safe side.
>> 
>> There is some EO cache in Wonder that I have used instead of the SEC to keep 
>> EOs easy to get.  I forget the name now.  It is not quite as convenient but 
>> less magic might yield better results.
> 
> For the moment, I am using both. The EO cache you mean would probably be 
> ERXEnterpriseObjectArrayCache?

Yes, that is the one.


> I am using the thing pretty widely to cache normal EOs to lower the number of 
> DB roundtrips needed (nevertheless it seems the turning the cached GIDs to 
> objects is rather at the slow side too, and I am considering to extend the 
> code to try to cache the objects themselves while there's a memory galore in 
> some sort of a weak map — incidentally, to all, has someone already tried 
> that? I haven't found this kind of cache in ERX; either it does not exist, or 
> I have searched improperly.)

It was a long time ago (10 years?) and I don’t have the code available to me 
now, but I recall doing something like that to make the GID->object conversion 
quick.  I recall it did not quite work the way I expected or wanted.


> SEC serves for my „static“ objects, which are never changed (more precisely, 
> they might be changed in a special task upon launch, before the first session 
> is created; and never ever again). A majority of these „static“ objects then 
> are shared by essentially all sessions — in my current application there's 
> lots of those, which is also the very reason I have started to use SEC at all 
> (for the first time in twenty-odd years of using WO ;))
> 
> For this very reason I would rather like to keep the SEC, far as it proves 
> manageable; but of course, we'll see...
> 
>> This might be of use too:
>> https://en.wikibooks.org/wiki/WebObjects/EOF/Using_EOF/Caching_and_Freshness#EOEntity's_Cache-In-Memory_Setting
>>  
>> <https://en.wikibooks.org/wiki/WebObjects/EOF/Using_EOF/Caching_and_Freshness#EOEntity's_Cache-In-Memory_Setting>
&

Re: Definitely solved: More SharedEC woes: relationships into SEC not saved with more EOF stacks

2020-01-13 Thread Chuck Hill via Webobjects-dev
On Jan 13, 2020, at 5:42 AM, OCsite  wrote:
> 
> Chuck,
> 
>> On 13 Jan 2020, at 4:17, Chuck Hill > <mailto:hill.ch...@gmail.com>> wrote:
>> There must be something going on here that you are not mentioning.
> 
> Definitely there is, but I had no idea what might be the culprit. Now I see 
> (but still don't quite understand).
> 
>> Do you have multiple EOF stacks (multiple EOObjectStoreCoordinator 
>> instances)?
> 
> Hmmm... yup, in most of my apps, I use for years and years
> 
> er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators=3
> 
> Let me see, I'll try without ... and just again, you are right! When this is 
> commented out from Properties, relationships to SEC get saved properly 
> (without the convoluted databaseContextWillOrderAdaptorOperations delegate of 
> course).
> 
> Can you please explain how this relates? I must be missing something of 
> importance, but I can't see any sense in that :( How on earth might the sole 
> existence of a couple of other (far as I know, pretty independent) EOF stacks 
> affect the way an EODBOp creates its newRows?!? :-O

 I’ve never been much of an SEC user.  The EOSharedEditingContext is an 
EOEditingContext and so it is associated with one EOObjectStoreCoordinator.  
What I will guess is that the OSC of the SEC instance is != the OSC of the 
EOEditingContext you are using and there is a bug because the relationship 
crosses OSCs.  I doubt that is fixable, but you might find some way to use that 
to come up with a better hack.  Assuming that I am correct.


> Pity I did not know sooner; perhaps I would just switch to use one stack and 
> save myself all the effort with the searching for the culprit, delegate fixes 
> attempt etc.
> 
> I do wonder of the speed difference in practice: one coordinator would 
> definitely make the app somewhat slower; on the other hand, SEC itself should 
> speed it up, removing a need of many DB roundtrips... hm, perhaps it would be 
> better just to forget maxCoordinators and stay at the safe side.

There is some EO cache in Wonder that I have used instead of the SEC to keep 
EOs easy to get.  I forget the name now.  It is not quite as convenient but 
less magic might yield better results.

This might be of use too:
https://en.wikibooks.org/wiki/WebObjects/EOF/Using_EOF/Caching_and_Freshness#EOEntity's_Cache-In-Memory_Setting
 
<https://en.wikibooks.org/wiki/WebObjects/EOF/Using_EOF/Caching_and_Freshness#EOEntity's_Cache-In-Memory_Setting>


Chuck

> 
> Thanks again a very big lot!
> OC
> 
>>> On Jan 12, 2020, at 4:13 PM, OCsite via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>> 
>>> wrote:
>>> 
>>> I think I have probably solved the original problem (quoted below) all 
>>> right, for the record, by doing essentially this in the 
>>> databaseContextWillOrderAdaptorOperations delegate method:
>>> 
>>> 1. go through all the database operations; for each of them
>>>   2. go through all the relationships of the DBOp object; find those which 
>>> lead into SEC
>>> 3. for each such relationship check whether 
>>> changesFromCommittedSnapshot contain a value for its name
>>> 4. if so, check whether DBOp's rowDiffs have the proper target PK[*] 
>>> for the rel source attribute name (it never seems to happen!)
>>> 5. if not, add it to a mutable copy of DBOp's newRow
>>>   6. having processed all the rels, if anything was added, change DBOp's 
>>> newRow and call the DBContext private (ick!) method 
>>> createAdaptorOperationsForDatabaseOperation
>>> 7. having processed all the DBOps, call the DBContext private (another ick) 
>>> method orderAdaptorOperations and return its value from the delegate method.
>>> 
>>> [*] my models happen to contain only simple FK->PK relships to SEC; 
>>> considerably more generic and complex code would be needed for all the 
>>> possible cases of course.
>>> 
>>> That seems to — with by far not exhaustive testing — save the changes into 
>>> the database properly.
>>> 
>>> Quite non-trivial code for simple 
>>> saving-of-relationship-as-set-in-object-graph-into-DB.
>>> 
>>> I wonder. Is it perhaps a big no-no to use and edit relationships from 
>>> normal ECs into the SEC? I thought those are fully supported (unlike the 
>>> other direction). Or do I just do something terribly wrong somewhere in my 
>>> application, for this should work all right?
>>> 
>>> Does anyone here use this setup (creating/updating EOs with one-way 
>>> relationships into SEC), and does it work p

Re: Hopefully solved: More SharedEC woes: relationships into SEC not saved?!?

2020-01-12 Thread Chuck Hill via Webobjects-dev
There must be something going on here that you are not mentioning.  Do you have 
multiple EOF stacks (multiple EOObjectStoreCoordinator instances)?

Chuck


> On Jan 12, 2020, at 4:13 PM, OCsite via Webobjects-dev 
>  wrote:
> 
> I think I have probably solved the original problem (quoted below) all right, 
> for the record, by doing essentially this in the 
> databaseContextWillOrderAdaptorOperations delegate method:
> 
> 1. go through all the database operations; for each of them
>   2. go through all the relationships of the DBOp object; find those which 
> lead into SEC
> 3. for each such relationship check whether changesFromCommittedSnapshot 
> contain a value for its name
> 4. if so, check whether DBOp's rowDiffs have the proper target PK[*] for 
> the rel source attribute name (it never seems to happen!)
> 5. if not, add it to a mutable copy of DBOp's newRow
>   6. having processed all the rels, if anything was added, change DBOp's 
> newRow and call the DBContext private (ick!) method 
> createAdaptorOperationsForDatabaseOperation
> 7. having processed all the DBOps, call the DBContext private (another ick) 
> method orderAdaptorOperations and return its value from the delegate method.
> 
> [*] my models happen to contain only simple FK->PK relships to SEC; 
> considerably more generic and complex code would be needed for all the 
> possible cases of course.
> 
> That seems to — with by far not exhaustive testing — save the changes into 
> the database properly.
> 
> Quite non-trivial code for simple 
> saving-of-relationship-as-set-in-object-graph-into-DB.
> 
> I wonder. Is it perhaps a big no-no to use and edit relationships from normal 
> ECs into the SEC? I thought those are fully supported (unlike the other 
> direction). Or do I just do something terribly wrong somewhere in my 
> application, for this should work all right?
> 
> Does anyone here use this setup (creating/updating EOs with one-way 
> relationships into SEC), and does it work properly for you without all this 
> hassle?
> 
> Thanks,
> OC
> 
> 
>> On 11 Jan 2020, at 3:28, OCsite via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> Hi there,
>> 
>> this is weird. My EOs have some relationships into the SharedEC — of course, 
>> one-way without an inverse; I understand that relationships to SEC are all 
>> right, only those from it outside are forbidden. (Am I wrong perhaps? If 
>> those relationships were set up in the database without SEC, it works 
>> perfectly.)
>> 
>> Nevertheless, when I run with SEC, whatever I try, it seems these 
>> relationships are — silently and without reporting any problem — not saved.
>> 
>> Say, I have an EO foo of entity Foo with two simple :1 relationships: a 
>> (based on FK a_id) into a normal-EC entity, and b (based on FK b_id) into a 
>> shared-EC entity. Both are modelled the same way (simple join from the FK in 
>> the source entity to the PK of the target entity). I set both of them, like 
>> this:
>> 
>> ===
>> ERXEC ec=
>> Foo foo=new Foo()
>> ec.insertObject(foo)
>> assert ec==someObject.editingContext()
>> foo.a=someObject
>> assert ec.sharedEditingContext()==someSharedObject.editingContext()
>> foo.b=someSharedObject
>> assert foo.b==someSharedObject
>> ec.saveChanges()
>> ===
>> 
>> Now, changes are saved, no error is reported, new object is properly 
>> inserted into the database
>> - its a_id is filled by someObject's PK
>> - whilst its b_id is filled by NSKeyValueCoding$Null!
>> 
>> Same happens when editing: the relationships to SEC when changed never seem 
>> to save the appropriate FK value. It seems completely ignored by the saving 
>> process:
>> 
>> ===
>> assert 
>> foo.editingContext().sharedEditingContext()==anotherSharedObject.editingContext()
>> foo.b=anotherSharedObject
>> assert foo.b==anotherSharedObject
>> assert foo.committedSnapshotValueForKey('b')==NSKeyValueCoding$Null
>> assert foo.changesFromCommittedSnapshot==[b: anotherSharedObject]
>> foo.editingContext().saveChanges()
>> assert foo.b==null
>> ===
>> 
>> other changes of foo (if any) are saved all right, but its b_id never 
>> changes. No error is reported.
>> 
>> Does this make any sense, is it perhaps an expected behaviour? As always, I 
>> might be overlooking something of importance, but this feels completely 
>> wrong to me. Could it be caused by some bug at my side? If so, any idea 
>> where and how to hunt for it?
>> 
>> Thanks a lot for any insight,
>> OC
>> 
>> ___
>> 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/ocs%40ocs.cz 
>> 
>> 
>> This email sent to o...@ocs.cz
> 
> 

Re: More SharedEC woes: relationships into SEC not saved?!?

2020-01-12 Thread Chuck Hill via Webobjects-dev
It only works for code that does  _NSUtilities.classForName().  It only works 
for code that defers knowing the class based on a string.



> On Jan 12, 2020, at 7:00 AM, OCsite via Webobjects-dev 
>  wrote:
> 
> P.S.
> 
>> On 12 Jan 2020, at 14:55, OCsite via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> As for the fixing... well, I guess I can generate the proper AOs myself, but 
>> the trick is, how do I order them? I would need to reuse the standard 
>> default ordering which EODatabaseContext does normally; but it does not seem 
>> to be accessible anyhow, or am I overlooking something of importance here?
> 
> It looks like
> 
> ERXPatcher.setClassForName(OCSDBOperation,'EODatabaseOperation')
> ...
> class OCSDBOperation extends EODatabaseOperation { ... }
> 
> does not work :( Do I do something wrong, or it simply can't be overridden?
> 
> To be frank, I do not quite understand how the ERXPatcher (or, rather, 
> _NSUtilities.setClassForName) magic actually works: should it work for any 
> WO/EO class, or is there simply a dictionary somewhere inside the opaque 
> Apple code, and it works only for classes which Apple explicitly addresses by 
> some “Class clazz=dict[name]”, with no way to patch the others?
> 
> Thanks!
> OC
> 
> ___
> 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/hill.chuck%40gmail.com
> 
> This email sent to hill.ch...@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: suspicious sessions and R/R loops created for a CSS font

2020-01-09 Thread Chuck Hill via Webobjects-dev
Hi OC,

I am pretty sure it is the relative URLs in font-awesome.min.css.  They get 
evaluated as relative to  the URL of your page not the URL of that CSS.

Chuck

> On Jan 9, 2020, at 5:48 PM, OCsite via Webobjects-dev 
>  wrote:
> 
> Gentlemen,
> 
> my application does some R/R loops and creates some sessions/main components 
> which I believe it should not.
> 
> Lately, from a webdesigner, I have got some improvements of the look of my 
> application, which essentially looks like
> 
>  href="/dms/css/font-awesome/css/font-awesome.min.css"/>
> 
> in the html header. The CSS starts with
> 
> ===
> /*!
> *  Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
> *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT 
> License)
> */@font-face {
>font-family: 'FontAwesome';
>src: url('../fonts/fontawesome-webfont.eot?v=4.6.3');
>src: url('../fonts/fontawesome-webfont.eot?#iefix=4.6.3') 
> format('embedded-opentype'), 
> url('../fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'), 
> url('../fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'), 
> url('../fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'), 
> url('../fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') 
> format('svg');
>font-weight: normal;
>font-style:normal
> }
> ===
> 
> Then, things like
> 
> 
> 
> are used throughout the component templates, with the appropriate classes 
> looking like
> 
> ===
> .fa {
>display: inline-block;
>font: normal normal normal 14px/1 FontAwesome;
>font-size: inherit;
>text-rendering: auto;
>-webkit-font-smoothing: antialiased;
>-moz-osx-font-smoothing:grayscale
> }
> .fa-plus:before {
>content: "\f067"
> }
> ===
> 
> It seems to render the characters all right, but the reason why I am writing 
> is that as soon as the  thing is used in the page, I am getting 
> VERY suspicious R/R loops and extra sessions. Namely, what I see is that
> 
> 1. normal R/R loop for the standard URI "...myapp/wo/SID/COMPONENT" happens, 
> uses the long-ago-created session for SID as it should, ends by 
> application.sleep(). Precisely same as if there's no , so far so 
> good.
> 
> But, if there _is_ an  thing in the page, I immediately and 
> automatically (without doing anything in the browser) get another four R/R 
> loops (far as I can say, served by the same thread as the first normal one); 
> each of them creates a new session and a Main page (which is never shown 
> anywhere), and if I log out its context().request() in the newly created 
> session's awake(), it seems self-evident these R/R loops are created for the 
> URIs from the CSS header, namely
> 
> 2. ../fonts/fontawesome-webfont.woff2?v=4.6.3
> 3. ../fonts/fontawesome-webfont.woff?v=4.6.3
> 4. ../fonts/fontawesome-webfont.ttf?v=4.6.3
> 5. ../fonts/fontawesome-webfont.svg?v=4.6.3
> 
> (For some reason, for those .eot URIs this does not happen.)
> 
> Now, I understand that the fonts need to be loaded; nevertheless, it does not 
> feel right that a full-fledged R/R loop, which creates a session and a Main 
> page, is created and run for this.
> 
> Is that right? As always, I might be overlooking something of importance, but 
> to me this feels wrong; there should be no need to create a full-fledged R/R 
> for this, far as I understand. There are many other 
> resources/CSSs/javascripts the application uses (incl. the very 
> "font-awesome.min.css"), and none of them causes this; they all are loaded 
> without R/R loops, without sessions, etc.
> 
> The designer knows sweet zilch of WebObjects and says if there's a problem at 
> all, it's caused by my application around his perfect and flawless CSS. Well 
> perhaps it is indeed; but I can't see the culprit.
> 
> Does anybody here understand the problem and can say how to fix it (or, at 
> worst, that it is unfixable in principle and I have to bear with it)?
> 
> Thanks a lot,
> OC
> 
> ___
> 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/hill.chuck%40gmail.com
> 
> This email sent to hill.ch...@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: Access to WOComponents of a page

2019-07-25 Thread Chuck Hill via Webobjects-dev


> On Jul 25, 2019, at 12:21 AM, André Rothe via Webobjects-dev 
>  wrote:
> 
> Hi Chuck,
> 
>> If you are trying to clear it after a failed validation attempt, perhaps
>> there is simply a bug
>> here: 
>> https://github.com/molequedeideias/wonder/blob/00e813f91664a1df1a84902e03175e4a34cf7d0f/Frameworks/Misc/ERCaptcha/Sources/er/captcha/ERCaptcha.java#L94
>> And after that should be:
>> _response = null;
> 
> That's right, I try to reset the TextField of ERCaptcha after wrong
> input.

I can see the appeal, but that is the wrong way to do this.


> The idea was, to fix this problem with a simple call of
> setResponse(), so I don't need to bother with creating/updating WO
> frameworks at the moment (I'm still an absolute beginner in WO).

That component has bug in it.  The best way is to get the bug fixed, either by 
asking the author or submitting a pull request and updating your frameworks (I 
assume this is in Wonder proper somewhere).  If that is not possible, then 
subclassing is the right approach. 

Chuck


 ___
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: Access to WOComponents of a page

2019-07-24 Thread Chuck Hill via Webobjects-dev


> On Jul 24, 2019, at 2:53 AM, André Rothe via Webobjects-dev 
>  wrote:
> 
> Hi,
> 
> How I can access the WOComponent objects of a page?

You should not.  Components know their parent, parents don’t know their 
children (child components).  Technically you can, but it is difficult and I 
won’t show you how because is it just the wrong way to use WO.

What you want reflects a misunderstanding of WO.  You are working against the 
tool, not with it.

If you will provide mode details on what you want to accomplish (now how you 
want to do it), I think we can show you the right way to use WO.

Start with:
- why do you want to call setResponse(“”)?  That is intended to hold what the 
user has input.  The parent component should never have access to that value
- when (what conditions) do you want to set this to “”?

If you are trying to clear it after a failed validation attempt, perhaps there 
is simply a bug here: 
https://github.com/molequedeideias/wonder/blob/00e813f91664a1df1a84902e03175e4a34cf7d0f/Frameworks/Misc/ERCaptcha/Sources/er/captcha/ERCaptcha.java#L94
And after that should be:
_response = null;

Perhaps resetCaptcha() should do that too.

Keep in mind, I have never seen this code before today and have no idea if that 
is the version you are using.  :-)  That was the first hit in Google.

Chuck


> I use different WOComponents in a "Main WO" and I try to access the classes 
> behind the components from Main.java to call some public methods on them. In 
> example I would like to call ERCaptcha.setResponse("") on the component which 
> is named as "captcha" within my page.
> 
> captcha : er.captcha.ERCaptcha {
>  validated = ...
>  resetText = ...
> }
> 
> I have tried to subclass the components and override some methods there, but 
> it won't work as expected.
> 
> capcha : PSDCaptcha {
>  validated = ...
>  resetText = ...
> }
> 
> public class PSDCaptcha extends ERCaptcha {
> 
> }
> 
> Is there a map of all defined components in "Main WO" which I can access from 
> i.e. context()?
> 
> Thank you
> André
> ___
> 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/hill.chuck%40gmail.com
> 
> This email sent to hill.ch...@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: Qualifier Evaluation with Object in Multiple Editing Contexts

2019-05-31 Thread Chuck Hill via Webobjects-dev
The other thing to consider is that comparing the EOGlobalID means they are the 
same object, but that does not meant the two objects are the same — if either 
EC has uncommitted changes.  Unless you are using READ UNCOMMITTED that is not 
a case you will encounter in the database.  It does not look significant in 
this case, but could be in others.

Chuck


> On May 31, 2019, at 6:09 PM, Aaron Rosenzweig via Webobjects-dev 
>  wrote:
> 
> At the base of it - if you do “.equals()” with one EO and another… even if 
> they generate the same GlobalID they will not be equal if they are in 
> different editingContexts. 
> 
> So that’s why an in memory evaluation doesn’t work. 
> 
> When you query the database, there is no EC in that realm, so you get a 
> different behavior. 
> 
> Some people call this a form of “impedance mismatch” when traversing the java 
> object world into the SQL relational world. 
> 
> Mixing EOs of disparate contexts is a bit like crossing the beams in 
> Ghostbusters - don’t want to do it. 
> 
> Your pull request would trick you thinking you haven’t crossed beams and 
> later run into an issue if you try to assign and then save. A type of “kick 
> the problem down the road” scenario. 
> 
> For me - it’s code smell when the objects aren’t in the same EOEditingContext 
> and I’d like to know sooner, rather than later. 
> AARON ROSENZWEIG / Chat 'n Bike 
> e:  aa...@chatnbike.com   t:  (301) 956-2319
>   
> 
>> On May 31, 2019, at 2:37 PM, Henrique Prange via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> Hi Paul,
>> 
>> Thanks for your feedback. It's good to know that I'm not alone. :) Even 
>> though it's an unusual situation, I wondered if someone else hasn't been 
>> bitten by it too.
>> 
>> I'll create a pull request for discussion. Fixing the problem for toOne 
>> relationships is not complicated. I'm looking at the  ERXComparisonSupport 
>> class for reference. Fixing the same problem for a collection of EOs (toMany 
>> relationships) is a little bit more tricky. I'll give more details in the 
>> pull request.
>> 
>> Cheers,
>> 
>> HP
>> 
>>> On May 28, 2019, at 11:41 PM, Paul Hoadley >> > wrote:
>>> 
>>> Hi Henrique,
>>> 
>>> On 21 May 2019, at 08:22, Henrique Prange >> > wrote:
>>> 
 I've been using the EOQualifier.evaluateWithObject method to filter some 
 EOs in memory. Everything works fine except for one particular case. It 
 always returns false if I try to evaluate a qualifier containing EOs with 
 an EO from another editing context.
 
 The code below demonstrates the problem:
 
 EOEditingContext ec1 = // create new ERXEC;
 Foo foo = ... // Fetch Foo using ec1
 EOQualifier q = Bar.FOO.is (foo);
 
 EOEditingContext ec2 = // create new ERXEC;
 Bar bar = ... // Fetch bar related to foo using ec2
 
 q.evaluateWithObject(bar); // returns false
 ERXEOControlUtilities.eoEquals(bar.foo(), foo); // returns true
 
 The qualifier evaluates to false because the editing contexts of bar.foo() 
 and foo are different, even though their EOGlobalIDs are the same.
>>> 
>>> That's certainly an interesting result.
>>> 
 This behavior is not consistent with the result of the same qualifier 
 being applied to a fetch specification (fetching from the database). In 
 this case, EOF will return the instance of Bar as expected.
>>> 
>>> This is all starting to ring a bell with me. I think I've run into this 
>>> indirectly. From time to time I'll do something like this:
>>> 
>>> folders = ERXQ.filtered(..., DocumentFolder.ORGANISATION.is 
>>> (document().organisation()));
>>> 
>>> which doesn't produce the results I'm expecting, and I remember I need to 
>>> do this:
>>> 
>>> folders = ERXQ.filtered(..., DocumentFolder.ORGANISATION.is 
>>> (document().organisation().localInstanceIn(someEditingContext)));
>>> 
>>> If you drill down on ERXQ.filtered(), you eventually get to 
>>> EOQualifier.evaluateWithObject().
>>> 
 After some research, I found that I can extend the 
 EOQualifier.ComparisonSupport class to evaluate all EOGenericRecord 
 objects according to the ERXEOControlUtilities.eoEquals contract. I had a 
 positive outcome after a preliminary experiment.
 
 I'd be interested to hear your views about this.
 
 - IMO, it is a bug. Do you agree?
>>> 
>>> I agree. It's such an old, deep bug though that I've just internalised it 
>>> and now it's just normal EOF behaviour to me.
>>> 
 - Can you imagine any side effects of this fix?
>>> 
>>> Not immediately. I assume the fix would have no effect on the kind of 
>>> localInstance() work-around that I presume we've all been using here. I'm 
>>> trying to contrive a scenario where you'd rely 

Re: EOF and MS SQLServer?

2019-02-27 Thread Chuck Hill
Hi Markus,

This was back in 2008 so things may have changed.  IIRC the plugin I used was 
called MicrosoftPlugIn and it was part of WO.  The ordering below was the main 
issue that I had.  The other was that timestamps were accurate to something 
like 3 ms in the database so while you could use then, you could not use them 
for optimistic locking as the snapshot value would often not match the value in 
the generated WHERE clause.

Chuck.

> On Feb 27, 2019, at 6:52 AM, Aaron Rosenzweig  wrote:
> 
> Hi Markus,
> 
> Here’s the coordinating callback hook I was referring to (made for MS SQL but 
> could work for any DB):
> 
> https://github.com/wocommunity/wonder/blob/master/Frameworks/Core/ERExtensions/Sources/com/webobjects/eoaccess/ERXEntityDependencyOrderingDelegate.java
>  
> <https://github.com/wocommunity/wonder/blob/master/Frameworks/Core/ERExtensions/Sources/com/webobjects/eoaccess/ERXEntityDependencyOrderingDelegate.java>
> 
> It helps with, but does not fully eliminate, problems due to lack of deferred 
> constraints.
> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319  
> 
>   
> 
>> On Feb 27, 2019, at 9:47 AM, Aaron Rosenzweig > <mailto:aa...@chatnbike.com>> wrote:
>> 
>> Hi Markus,
>> 
>> If memory serves, Chuck Hill deployed to MS SQLServer. I remember 
>> specifically he had a coordinating callback that was added to Wonder so that 
>> it did a better job of organizing the order of update/delete/insert as to 
>> help not avoid constraint errors. That’s because MS SQL didn’t have deferred 
>> constraints back then (maybe it does now). I thought there was a plug-in 
>> too… 
>> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>> 
>>  
>> 
>>> On Feb 27, 2019, at 4:40 AM, Markus Ruggiero >> <mailto:mailingli...@kataputt.com>> wrote:
>>> 
>>> We are about to get a new project but the customer requires the application 
>>> to run against an existing Microsoft SQL Server (version not yet known). 
>>> When I create a new EOModel there is no selection for an MS SQL Server 
>>> plug-in. No support in Wonder for Microsoft?
>>> 
>>> Does anyone have experience running a Wonder App against a Microssoft 
>>> database?
>>> 
>>> Please help and advise
>>> ---markus---
>>> 
>>> ___
>>> 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/aaron%40chatnbike.com
>>>  
>>> <https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com>
>>> 
>>> This email sent to aa...@chatnbike.com <mailto:aa...@chatnbike.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/hill.chuck%40gmail.com
> 
> This email sent to hill.ch...@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: New Framework inheritance problem?

2018-10-07 Thread Chuck Hill
Have you marked the folder containing the source code as a Source folder in 
Eclipse?  Right click on the project, the Java Build Path then Source tab.  
Probalby a quicker path but I am still pre-coffee this morning.

Now back to my mug of coffee.

Chuck

From: Webobjects-dev 
 on behalf of Jesse 
Tayler 
Date: Sunday, October 7, 2018 at 7:27 AM
To: Theodore Petrosky 
Cc: WebObjects-Dev 
Subject: Re: New Framework inheritance problem?

Hey, should it matter which wonder? I’m fairly sure it is recent but my JAVA 
version is a bit low on my app whereas I don’t think Ive touched the framework.

The framework is public and is a repository of Bootstrap and Shards UI stuff 
with D2W/ModernLook stuff

So, BMLEditLargeString is one of a small set of override components from modern 
look to support tags and a few rules to make a gorgeous, modern looking UI

I’m off with the kids to some water park or kids-town type place outside the 
city….

But yes! We should grab a beer or stop over to the place on 34 and we’ll throw 
some dead animal on the BBQ!


On Oct 7, 2018, at 8:23 AM, Theodore Petrosky 
mailto:tedp...@yahoo.com>> wrote:

what version of Wonder do you have installed? It is up to 7!!

I create frameworks regularly and have no problem. When you create a new 
framework, what frameworks are linked in. What is BMLEditLargeString?

do you want to talk?

Ted


On Oct 7, 2018, at 7:42 AM, Jesse Tayler 
mailto:jtay...@oeinc.com>> wrote:

Thanks, and yes, I mean, I get D2W rules and the component is clearly 
recognized.

It’s like the JAVA part is just not being included somehow.

At least that’s what I figure right now anyway —




On Oct 7, 2018, at 3:12 AM, Amedeo Mantica 
mailto:amedeomant...@me.com>> wrote:

Is your framework loaded into the app?
Sent from my iPhone

On 7 Oct 2018, at 02:14, Jesse Tayler 
mailto:jtay...@oeinc.com>> wrote:
I’m making a new framework for the first time in forever. I used 
Eclipse->New->ERXFramework as the template...

When I add components, their classes fallback to WOComponent

I note a class error at startup:

Oct 07 00:04:30 WOMan[5] DEBUG NSLog (EditUser) - 
 WARNING: Unable to 
find component class named "BMLEditLargeString".  If this is not intended to be 
a classless component, check your framework settings and the contents of your 
classpath file (in the .woa's Contents/ subdirectory).


This is due to my new framework not having its classes properly linked into the 
library or something?

Because after a bunch of fussing around in those endless eclipse settings 
panels? I can’t seem to figure why framework classes won’t load but components 
and even D2W rules load into my app just fine?

Suggestions?


___
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/amedeomantica%40me.com

This email sent to amedeomant...@me.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/tedpet5%40yahoo.com

This email sent to tedp...@yahoo.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: Shared EC woes (was: Flattened one-side M:N fails wildly with SharedEC)

2018-10-02 Thread Chuck Hill
Hi OC!

I am using Microsoft Outlook which does not believe that in-line quoting is 
useful.  So email salad:

Your second problem seems mostly like what I would expect.

The other case though is weird. You might recall that my code
- first does some special initialisations without a SEC (all the ECs I use has 
their SEC immediately upon creation set to nulls)
- when done, I change the connection dictionary, re-connect using 
EODatabaseContext.forceConnectionWithModel, and run on normally with SECs.

The problem is that during the special init code I happen to need a DBC; and it 
seems that the code

def 
ctxt=ERXEOAccessUtilities.databaseContextForEntityNamed(ec.rootObjectStore(),someEntity.name)

always initialises the default SEC and loads the shared EOs into it — 
regardless the fact that the ec does not have a SEC at all.

I think the author of this may have not quite understood what setting the ec 
SEC to null does.  It does not prevent SEC creation or loading, it just affects 
that particular EC and prevents it from getting/seeing objects in the SEC.  So 
you can fetch shared objects into it, edit them and save them.

Note that the call to  ERXEOAccessUtilities.databaseContextForEntityNamed does 
not actually take the EC, it takes the root object store (aka 
EOObjectStoreCoordinator in most cases).   So that ec.sharedEditingContext() == 
null is wholly irrelevant.

Subsequently, I change (in the EC without a SEC) some shared EOs. The 
documentation says that SEC would observe such changes and would refetch those 
shared EOs into a SEC; well, it does, but not when they happen, nor when the EC 
is saved, nor when it is unlocked — far as I was able to find, it happens only 
when the EO in the SEC is touched (i.e., its attribute is read).

Your apps change the shared Eos when they launch and save them?  Every time?  
That seems… counter intuitive.   Without looking, I’d interpret “that SEC would 
observe such change” as it will refault the shared objects when it gets the 
ObjectChangedInObjectStore notification.  So the update to new values would 
naturally happen when willRead() is called on a shared EO.


If this does not happen, i.e., if the previously changed shared EO is not 
touched in the SEC, a first fetch into a normal EC (with SEC) whose fetch spec 
happens to include a changed shared EO crashes. In other words, it goes like 
this:

(a) init-time, I am consistently using ECs with null SEC;
(b) with one of those, I call databaseContextForEntityNamed, which initializes 
and populates the default SEC;
(c) later, in the EC with null SEC, I fetch and change a couple of shared EOs 
(they do not get re-loaded in SEC!)
(d) later, normal-run-time, I fetch objects into an EC with SEC; the fetch spec 
happens to fit some shared EOs...

... and it results in a EOEditingContext: initializeObject: attempt to 
initialize object ... that exists in a shared context via a non-shared context. 
[1]

Do the editing contexts from a...c still exist at this time?

I have found that the culprit object is one of those changed in the step (c), 
and I have found that touching the shared EO in the SEC before the fetch helps: 
the shared EO gets re-loaded, and the fetch works as presumed (returning the 
shared EO in the SEC). Now, I do this:

- whenever the SharedEditingContextInitializedObjectsNotification comes, I 
record the SEC;
- after the shared EOs are changed (in an EC with null SEC) and saved, I go 
through all the SECs recorded; for each of them I get all its 
registeredObjects, and for each of them call eo.storedValueForKey(anyKey). If 
the object has been changed, this re-loads it in SEC, and subsequent fetching 
works properly.

This seems to me extremely weird. Can you understand what the heck happens 
there and why?

No, not with any certainty.  It feels like an EOF bug.  Your usage is probably 
different from most, so you may be the first to find this.

Chuck



From: "o...@ocs.cz" 
Date: Friday, September 28, 2018 at 6:56 PM
To: Chuck Hill 
Cc: WebObjects-Dev Mailing List 
Subject: Shared EC woes (was: Flattened one-side M:N fails wildly with SharedEC)

Chuck,

well, so far, I have found two problems with SEC. One of them is boringly 
self-evident, but a hell to find: very simply, my legacy code did contain 
something like

Foo something() {
  ...
  
EOUtilities.objectWithPrimaryKeyValue(this.editingContext(),'NonSharedFooEntity',pk)
}

Which, of course, if this was shared, loads the object into SEC, and hilarity 
ensues. I wonder how many similar traps there are in my legacy code...

The other case though is weird. You might recall that my code
- first does some special initialisations without a SEC (all the ECs I use has 
their SEC immediately upon creation set to nulls)
- when done, I change the connection dictionary, re-connect using 
EODatabaseContext.forceConnectionWithModel, and run on normally with SECs.

The problem is that during the special init code I happen to need a DBC; and

Re: Java compatibility

2018-09-30 Thread Chuck Hill
I don't recall what the source level backwards compatibility is.  But that 
message means you are trying to use .class files compiled for Java 8 on an 
earlier JVM (1.6 clearly).  You will need to either upgrade the server or 
re-compile from source targeting 1.6.

Chuck

P.S.  Java 1.6?!!?  


On 2018-09-30, 8:59 PM, "Webobjects-dev on behalf of ocs@ocs" 
 wrote:

Hi there,

is is possible that WOnder 7 is not compatible with Java 6? Whatever I try, 
I can't find any description on the Web; what I am getting though is an error

===
Exception in thread "main" java.lang.UnsupportedClassVersionError: 
er/extensions/appserver/ERXApplication : Unsupported major.minor version 52.0
===

on a client's server, where there is

===
53 # java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-10M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
54 # 
===

On all my machines, where happen to be Javas 8-10, the application runs all 
right.

Thanks for any insight,
OC

 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Flattened one-side M:N fails wildly with SharedEC

2018-09-26 Thread Chuck Hill
Hi OC,

No, no magic like that.  At least not that I know of.  Subclassing 
EOEditingContext, EOSharedEditingContext, maybe EODatabaseContext is probably 
your best bet to pursue this.

Chuck

From: "ocs@ocs" 
Date: Wednesday, September 26, 2018 at 8:40 AM
To: Chuck Hill 
Cc: WebObjects-Dev Mailing List 
Subject: Re: Flattened one-side M:N fails wildly with SharedEC

Chuck,


On 19 Sep 2018, at 9:57 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:
Uh oh, the dreaded Schrödinger EOF behaviour!  Have you figured anything out?

Alas, nope. The darned “The shared context recently initialized the object ...” 
thing occurs intermittently, and whenever I add extra logs to find the culprit, 
it disappears. To occur again the next day or the next week.

Is there some trick to set up something somewhere so that

(a) until the SEC tries to load a non-shared object, all runs normally, there 
are no extra logs nor big performance delays,
(b) but, as soon as that happens, I get a very detailed log which would not 
only say which object is the culprit, but also the reason why has it been 
loaded into SEC, through which relationship, etc.?

Thanks and all the best,
OC



From: "ocs@ocs" mailto:o...@ocs.cz>>
Date: Wednesday, August 29, 2018 at 12:38 PM
To: Chuck Hill mailto:ch...@gevityinc.com>>
Cc: WebObjects-Dev Mailing List 
mailto:webobjects-dev@lists.apple.com>>
Subject: Re: Flattened one-side M:N fails wildly with SharedEC

Darn...



might have been caused by something else, which is just loosely related to the 
change — a log in the code for all I know; the Schrödinger EOF behaviour did 
bit me once or twice already

... I should have not written this part!

I have seen the blasted “The shared context recently initialized the object 
...” thing again.

Added log to pursue it. It did not happen.

Removed the log. It still did not happen.

Curiouser and curiouser...

Thanks and all the best,
OC



On 29 Aug 2018, at 7:49 PM, ocs@ocs mailto:o...@ocs.cz>> wrote:

Chuck,



On 29 Aug 2018, at 7:14 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:
I am not sure that I am following this correctly.  The rule is that no Shared 
EO should have a relationship to anything that is not also a Shared EO.

The opposite direction (from normal EC to SEC) should be all right though, 
should it not?



That includes the tables not materialized into an EO.

I do not follow here.

My shared entity S had no relationship to non-shared ones at all. Not even an 
empty one; none altogether.

My non-shared entity A has a to-many relationship “aaa” to a non-shared B; B 
has a to-one relationship “bbb” to shared S (no inverse here). B is the M:N 
table, i.e., it contains just the A's and S's PKs.

When non-shared A contained a flattened relationship “ddd” defined as 
“aaa.bbb”, EOF kept trying to load A into SEC (which naturally failed).

I've removed the flattened “ddd” from the model (no other change there), and 
implemented its behaviour manually (in A just getting “aaa” programmatically, 
and then for all its objects collecting their “bbb”'s), and the problem 
disappeared; A has been no more loaded to SEC.

Of course, it might have been caused by something else, which is just loosely 
related to the change — a log in the code for all I know; the Schrödinger EOF 
behaviour did bit me once or twice already :) it does seem very weird to me 
that the flattened thing should be the culprit; that's why I am asking whether 
such kind of behaviour is to be expected, or whether I should try to hunt for 
the culprit elsewhere.

Thanks and all the best,
OC




From: Webobjects-dev 
mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of "ocs@ocs" mailto:o...@ocs.cz>>
Date: Wednesday, August 29, 2018 at 8:28 AM
To: WebObjects-Dev Mailing List 
mailto:webobjects-dev@lists.apple.com>>
Subject: Flattened one-side M:N fails wildly with SharedEC

Hi there,

just have bumped into another weird (at least to me) behaviour.

In my model, there used to be a very standard M:N relationship, which exploits 
an “invisible” intermediate table, flattened “direct” relationships ad both 
sides.

One of the sides lately went to the sharedEC; thus I made sure to delete this 
side's flattened relationship. The other side and the intermediate table both 
stay outside of the sharedEC, so I thought that is all right.

It failed miserably with “The shared context recently initialized the object 
 which is already registered in this context yadda yadda”, 
i.e., EOF for some godforsaken reason kept loading the non-shared object (the 
one whose relationship remained intanct) into SEC along with the shared one 
(whose relationship were removed all right, no traces remained; I have checked 
about zillion times).

Out of desperation, I have just tried to remov the flattened relationship from 
the non-shared side, exposing instead the intermediate table, and repla

Re: Flattened one-side M:N fails wildly with SharedEC

2018-09-19 Thread Chuck Hill
Uh oh, the dreaded Schrödinger EOF behaviour!  Have you figured anything out?

Chuck

From: "ocs@ocs" 
Date: Wednesday, August 29, 2018 at 12:38 PM
To: Chuck Hill 
Cc: WebObjects-Dev Mailing List 
Subject: Re: Flattened one-side M:N fails wildly with SharedEC

Darn...


might have been caused by something else, which is just loosely related to the 
change — a log in the code for all I know; the Schrödinger EOF behaviour did 
bit me once or twice already

... I should have not written this part!

I have seen the blasted “The shared context recently initialized the object 
...” thing again.

Added log to pursue it. It did not happen.

Removed the log. It still did not happen.

Curiouser and curiouser...

Thanks and all the best,
OC


On 29 Aug 2018, at 7:49 PM, ocs@ocs mailto:o...@ocs.cz>> wrote:

Chuck,


On 29 Aug 2018, at 7:14 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:
I am not sure that I am following this correctly.  The rule is that no Shared 
EO should have a relationship to anything that is not also a Shared EO.

The opposite direction (from normal EC to SEC) should be all right though, 
should it not?


That includes the tables not materialized into an EO.

I do not follow here.

My shared entity S had no relationship to non-shared ones at all. Not even an 
empty one; none altogether.

My non-shared entity A has a to-many relationship “aaa” to a non-shared B; B 
has a to-one relationship “bbb” to shared S (no inverse here). B is the M:N 
table, i.e., it contains just the A's and S's PKs.

When non-shared A contained a flattened relationship “ddd” defined as 
“aaa.bbb”, EOF kept trying to load A into SEC (which naturally failed).

I've removed the flattened “ddd” from the model (no other change there), and 
implemented its behaviour manually (in A just getting “aaa” programmatically, 
and then for all its objects collecting their “bbb”'s), and the problem 
disappeared; A has been no more loaded to SEC.

Of course, it might have been caused by something else, which is just loosely 
related to the change — a log in the code for all I know; the Schrödinger EOF 
behaviour did bit me once or twice already :) it does seem very weird to me 
that the flattened thing should be the culprit; that's why I am asking whether 
such kind of behaviour is to be expected, or whether I should try to hunt for 
the culprit elsewhere.

Thanks and all the best,
OC



From: Webobjects-dev 
mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of "ocs@ocs" mailto:o...@ocs.cz>>
Date: Wednesday, August 29, 2018 at 8:28 AM
To: WebObjects-Dev Mailing List 
mailto:webobjects-dev@lists.apple.com>>
Subject: Flattened one-side M:N fails wildly with SharedEC

Hi there,

just have bumped into another weird (at least to me) behaviour.

In my model, there used to be a very standard M:N relationship, which exploits 
an “invisible” intermediate table, flattened “direct” relationships ad both 
sides.

One of the sides lately went to the sharedEC; thus I made sure to delete this 
side's flattened relationship. The other side and the intermediate table both 
stay outside of the sharedEC, so I thought that is all right.

It failed miserably with “The shared context recently initialized the object 
 which is already registered in this context yadda yadda”, 
i.e., EOF for some godforsaken reason kept loading the non-shared object (the 
one whose relationship remained intanct) into SEC along with the shared one 
(whose relationship were removed all right, no traces remained; I have checked 
about zillion times).

Out of desperation, I have just tried to remov the flattened relationship from 
the non-shared side, exposing instead the intermediate table, and replacing the 
flattened relationship by something like

===
List availablePrototypes { // this is how the original flattened rel has 
been named
def mn=this.db_Prototype_DataBlock // 1:N relationship to the 
intermediate table, exposed
mn.collect {
it.valueForKey('prototype') // N:1 relationship from the inmdt 
table to the shared object
}
}
===

and it seems to work all right :-O So, it looks like the culprit was the 
existence of the flattened rel with definiton 
“db_Prototype_DataBlock.prototype” at the non-shared side.

Is that the intended behaviour? Seems pretty weird to me, but as always, I 
might be overlooking something of importance. Or should that work even with the 
flattened relationship, and the problems mean I must have done something wrong 
elsewhere?

Thanks and all the best,
OC

___
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/ocs%40ocs.cz

This email sent to o...@ocs.cz

 _

Re: Flattened one-side M:N fails wildly with SharedEC

2018-09-19 Thread Chuck Hill
Hi OC,

Sorry, this got lost (scrolled off the screen) in my in-box.

I am not sure why this is happening, but what you are describing is a bug.  
Somewhere…  Those relationships and the flattened relationship should work as 
you expect.


Chuck



From: "ocs@ocs" 
Date: Wednesday, August 29, 2018 at 10:49 AM
To: Chuck Hill 
Cc: WebObjects-Dev Mailing List 
Subject: Re: Flattened one-side M:N fails wildly with SharedEC

Chuck,


On 29 Aug 2018, at 7:14 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:
I am not sure that I am following this correctly.  The rule is that no Shared 
EO should have a relationship to anything that is not also a Shared EO.

The opposite direction (from normal EC to SEC) should be all right though, 
should it not?


That includes the tables not materialized into an EO.

I do not follow here.

My shared entity S had no relationship to non-shared ones at all. Not even an 
empty one; none altogether.

My non-shared entity A has a to-many relationship “aaa” to a non-shared B; B 
has a to-one relationship “bbb” to shared S (no inverse here). B is the M:N 
table, i.e., it contains just the A's and S's PKs.

When non-shared A contained a flattened relationship “ddd” defined as 
“aaa.bbb”, EOF kept trying to load A into SEC (which naturally failed).

I've removed the flattened “ddd” from the model (no other change there), and 
implemented its behaviour manually (in A just getting “aaa” programmatically, 
and then for all its objects collecting their “bbb”'s), and the problem 
disappeared; A has been no more loaded to SEC.

Of course, it might have been caused by something else, which is just loosely 
related to the change — a log in the code for all I know; the Schrödinger EOF 
behaviour did bit me once or twice already :) it does seem very weird to me 
that the flattened thing should be the culprit; that's why I am asking whether 
such kind of behaviour is to be expected, or whether I should try to hunt for 
the culprit elsewhere.

Thanks and all the best,
OC



From: Webobjects-dev 
mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of "ocs@ocs" mailto:o...@ocs.cz>>
Date: Wednesday, August 29, 2018 at 8:28 AM
To: WebObjects-Dev Mailing List 
mailto:webobjects-dev@lists.apple.com>>
Subject: Flattened one-side M:N fails wildly with SharedEC

Hi there,

just have bumped into another weird (at least to me) behaviour.

In my model, there used to be a very standard M:N relationship, which exploits 
an “invisible” intermediate table, flattened “direct” relationships ad both 
sides.

One of the sides lately went to the sharedEC; thus I made sure to delete this 
side's flattened relationship. The other side and the intermediate table both 
stay outside of the sharedEC, so I thought that is all right.

It failed miserably with “The shared context recently initialized the object 
 which is already registered in this context yadda yadda”, 
i.e., EOF for some godforsaken reason kept loading the non-shared object (the 
one whose relationship remained intanct) into SEC along with the shared one 
(whose relationship were removed all right, no traces remained; I have checked 
about zillion times).

Out of desperation, I have just tried to remov the flattened relationship from 
the non-shared side, exposing instead the intermediate table, and replacing the 
flattened relationship by something like

===
List availablePrototypes { // this is how the original flattened rel has 
been named
def mn=this.db_Prototype_DataBlock // 1:N relationship to the 
intermediate table, exposed
mn.collect {
it.valueForKey('prototype') // N:1 relationship from the inmdt 
table to the shared object
}
}
===

and it seems to work all right :-O So, it looks like the culprit was the 
existence of the flattened rel with definiton 
“db_Prototype_DataBlock.prototype” at the non-shared side.

Is that the intended behaviour? Seems pretty weird to me, but as always, I 
might be overlooking something of importance. Or should that work even with the 
flattened relationship, and the problems mean I must have done something wrong 
elsewhere?

Thanks and all the best,
OC

 ___
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: HTTP Adaptor settings

2018-09-18 Thread Chuck Hill
Those are the TCP buffer sizes.  The best settings will depend on the size of 
the requests and responses of your app.  I am not aware that the value makes a 
large difference in most cases.  I think you would need some network level data 
to assess.

Chuck

On 2018-09-17, 11:10 AM, "Webobjects-dev on behalf of Michael Kondratov" 
 wrote:

Hello!
Are there any recommendations to what “send buffer size” and “receive 
buffer size” values should be set to? Does it make any difference?

Sincerely,

Michael

 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: List of all Properties? Legacy EOModel with exposed keys.....

2018-09-17 Thread Chuck Hill
“the database has exposed primary and foreign keys that are mostly strings and 
char. The application is a mess”

You repeat yourself.  :-)

Exposed PK values are generally a bad idea, but EOF is OK with them.  Exposed 
FK values cause serious problems with EOF maintaining graph consistency.  Fix 
that and setting relationships should just work again.

Chuck

From: Webobjects-dev 
 on behalf of Aaron 
Rosenzweig 
Date: Monday, September 17, 2018 at 2:47 PM
To: Markus Ruggiero 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Re: List of all Properties? Legacy EOModel with exposed keys.

Hi Markus,

I don’t know of any property.

Because they are exposed they are treated as attributes.

Because they are relationships they are treated as foreign keys.

So you really have to set both… I don’t see a way around it. If you don’t there 
is a race condition for who wins and you’ll never win.

Would be better to make the attribute non-exposed and then create a cover read 
only (perhaps derived) property on that attribute to “expose” it for the legacy 
app. I mean… for whatever reason they want those integer values exposed so this 
is your best bet.
Aaron Rosenzweig / Chat 'n Bike
e:  aa...@chatnbike.com  t:  (301) 956-2319

[Image removed by sender. Chat 'n Bike]

[Image removed by sender. Chat 'n Bike]



On Sep 17, 2018, at 4:59 PM, Markus Ruggiero 
mailto:mailingli...@kataputt.com>> wrote:

I thought I have seen a list of the properties that Wonder supports but I 
cannot find it anymore. I have no idea where I saw this list. Could have been 
here or somewhere in the docs or the Wonder Source. But it is late and I am 
tired and I have been searching for it invain. Anyone to help me?

Background:
I am struggling with a legacy legacy legacy pure old time WebObjects 
application. No Wonder, no Eclipse, but WindowsXP with ProjectBuilder (sourcode 
goes back to 1998/1999!!!). And the database has exposed primary and foreign 
keys that are mostly strings and char. The application is a mess and I am 
trying to bring it into Eclipse and use Wonder. Unfortunately 
WOToOneRelationship does not connect objects. Manually using 
addObjectToBoth does not connect objects either (debugger shows that the 
relationship is set, but it does not populate the foreign key fields). 
Populating them manually in addition to addObject... fixes things. I have a 
vague recollection of a property that might help here, and that is why I am 
looking for that list.

Any ideas? What am I missing?

Thanks
---markus---
___
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/aaron%40chatnbike.com

This email sent to aa...@chatnbike.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: Flattened one-side M:N fails wildly with SharedEC

2018-08-29 Thread Chuck Hill
I am not sure that I am following this correctly.  The rule is that no Shared 
EO should have a relationship to anything that is not also a Shared EO.  That 
includes the tables not materialized into an EO.

Chuck


From: Webobjects-dev 
 on behalf of 
"ocs@ocs" 
Date: Wednesday, August 29, 2018 at 8:28 AM
To: WebObjects-Dev Mailing List 
Subject: Flattened one-side M:N fails wildly with SharedEC

Hi there,

just have bumped into another weird (at least to me) behaviour.

In my model, there used to be a very standard M:N relationship, which exploits 
an “invisible” intermediate table, flattened “direct” relationships ad both 
sides.

One of the sides lately went to the sharedEC; thus I made sure to delete this 
side's flattened relationship. The other side and the intermediate table both 
stay outside of the sharedEC, so I thought that is all right.

It failed miserably with “The shared context recently initialized the object 
 which is already registered in this context yadda yadda”, 
i.e., EOF for some godforsaken reason kept loading the non-shared object (the 
one whose relationship remained intanct) into SEC along with the shared one 
(whose relationship were removed all right, no traces remained; I have checked 
about zillion times).

Out of desperation, I have just tried to remov the flattened relationship from 
the non-shared side, exposing instead the intermediate table, and replacing the 
flattened relationship by something like

===
List availablePrototypes { // this is how the original flattened rel has 
been named
def mn=this.db_Prototype_DataBlock // 1:N relationship to the 
intermediate table, exposed
mn.collect {
it.valueForKey('prototype') // N:1 relationship from the inmdt 
table to the shared object
}
}
===

and it seems to work all right :-O So, it looks like the culprit was the 
existence of the flattened rel with definiton 
“db_Prototype_DataBlock.prototype” at the non-shared side.

Is that the intended behaviour? Seems pretty weird to me, but as always, I 
might be overlooking something of importance. Or should that work even with the 
flattened relationship, and the problems mean I must have done something wrong 
elsewhere?

Thanks and all the best,
OC



 ___
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: OSCPool/EO stack management/relaunch (was: Should ERXEC get sharedEC automagically?)

2018-08-29 Thread Chuck Hill
EOF will reconnect if the connection to the database is lost (database 
restarted, network problems, etc.).  See the EOAdaptor.Delegate method

reconnectionDictionaryForAdaptor

NSDictionary 
reconnectionDictionaryForAdaptor(EOAdaptor adaptor)
Creates a new connection dictionary for the adaptor. It is responsible for 
guaranteeing that the new connection dictionary is compatible with any 
EODatabase that is currently using the adaptor. Note that if reconnection 
succeeds, the EODatabase will continue to use its database snapshots as if 
nothing had happened so the new database server should have the same data as 
the original.

I am not sure that will be useful in your case.

Chuck

From: "ocs@ocs" 
Date: Wednesday, August 29, 2018 at 4:54 AM
To: Chuck Hill 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Re: OSCPool/EO stack management/relaunch (was: Should ERXEC get 
sharedEC automagically?)

Thanks a lot!

Incidentally, is there somewhere a clean set of rules when might EOF decide to 
re-connect using the model CD?

What I mean is

(a) I set up the CD to contain some settings (e.g., “isolation=read_committed” 
in URL)
(b) I force this to be used through forceConnectionWithModel, overriding the 
URL to “isolation=serializable”
(c) I perform the init work
(d) at end of which I reconnect, again using forceConnectionWithModel, this 
time without an override, so that “read_committed” applies.

Far as my testing goes, this works.

Nevertheless, may I be sure that during (c), EOF would never happen to 
reconnect by itself, using the CD from the model? Should I perhaps instead of 
the above, to keep at the safe side, do uglier, but perhaps more robust

(a) set up the CD to contain temporary settings (“isolation=serializable” in 
URL)
(b) either use forceConnectionWithModel without an override, or just let EOF to 
connect automatically;
(c) do the init work
(d) at end of which change the CD in all models to “isolation=read_committed”, 
and reconnect using forceConnectionWithModel without an override

? Thanks!
OC


On 27 Aug 2018, at 5:48 AM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:

Finally, an easy question!

Compatible just means that 
modelA.connectionDictionary().equals(modelB.connectionDictionary())

Chuck

From: "ocs@ocs" mailto:o...@ocs.cz>>
Date: Thursday, August 23, 2018 at 7:03 PM
To: Chuck Hill mailto:ch...@gevityinc.com>>
Cc: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
mailto:webobjects-dev@lists.apple.com>>
Subject: Re: OSCPool/EO stack management/relaunch (was: Should ERXEC get 
sharedEC automagically?)

Chuck,

I guess I have solved the mystery :) Looks like all what's needed is

- to set up freely the OSCPool with any number of coordinators
- at the init time, to use "isolation=serializable/locking=pessimistic" in my 
models
- and switch off the SEC (by setting it to null in my ERXEC)
- when all the init work is done, I simply call

EODatabaseContext.forceConnectionWithModel(model,[URL:"jdbc:FrontBase://$dbhost/$dbname/user=$user/isolation=read_committed/locking=optimistic"],ec)

and that's that, it seems it works all right, for subsequently all 
(session-based) ECs seem to work properly with the (OSC-based) SEC, and the 
connexion indeed is read-committed/optimistic, as need be.

There's just one small thing I am not sure of: forceConnectionWithModel 
re-connects “all compatible models in the model group” too. Alas the 
documentation does not say what a “compatible” model is — what does that mean? 
How does the EOF determine which models are compatible?

Thanks and all the best,
OC



On 22 Aug 2018, at 2:06 PM, ocs@ocs mailto:o...@ocs.cz>> wrote:

Chuck,

hmmm... coudn't I somehow switch off temporarily the OSCPool, so that the 
initialisation code happens precisely as if there was no pool at all, and only 
then, when done, the pool starts behaving as normally? Actually I could benefit 
— if it is possible — from that, not only due to the SEC, but for other reasons 
as well (it would help if I could run the initialisation code against the DB in 
the “isolation=serializable/locking=pessimistic” mode, switching to 
“isolation=read_committed/locking=optimistic” for the normal processing).

The init code just reads some objects from the db (including 
INFORMATION_SCHEMA, which is the reason for the DB mode), checks them, 
potentially updates them, and that's that — if at this moment the application 
quits and immediately runs again without the init code, it would work just as 
well. But for the objects in the shared EC, there's no EO which the init code 
would create/fetch and a later session-based code would use anyhow.

I might switch off the SEC for the initialisation completely: I would run the 
init code using an EC with its SEC explicitly set to null, then somehow trash 
the init EO stack completely and start afresh with a new one (or ones with 
OSCPool) and no

Re: OSCPool/EO stack management/relaunch (was: Should ERXEC get sharedEC automagically?)

2018-08-26 Thread Chuck Hill
Finally, an easy question!

Compatible just means that 
modelA.connectionDictionary().equals(modelB.connectionDictionary())

Chuck

From: "ocs@ocs" 
Date: Thursday, August 23, 2018 at 7:03 PM
To: Chuck Hill 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Re: OSCPool/EO stack management/relaunch (was: Should ERXEC get 
sharedEC automagically?)

Chuck,

I guess I have solved the mystery :) Looks like all what's needed is

- to set up freely the OSCPool with any number of coordinators
- at the init time, to use "isolation=serializable/locking=pessimistic" in my 
models
- and switch off the SEC (by setting it to null in my ERXEC)
- when all the init work is done, I simply call

EODatabaseContext.forceConnectionWithModel(model,[URL:"jdbc:FrontBase://$dbhost/$dbname/user=$user/isolation=read_committed/locking=optimistic"],ec)

and that's that, it seems it works all right, for subsequently all 
(session-based) ECs seem to work properly with the (OSC-based) SEC, and the 
connexion indeed is read-committed/optimistic, as need be.

There's just one small thing I am not sure of: forceConnectionWithModel 
re-connects “all compatible models in the model group” too. Alas the 
documentation does not say what a “compatible” model is — what does that mean? 
How does the EOF determine which models are compatible?

Thanks and all the best,
OC


On 22 Aug 2018, at 2:06 PM, ocs@ocs mailto:o...@ocs.cz>> wrote:

Chuck,

hmmm... coudn't I somehow switch off temporarily the OSCPool, so that the 
initialisation code happens precisely as if there was no pool at all, and only 
then, when done, the pool starts behaving as normally? Actually I could benefit 
— if it is possible — from that, not only due to the SEC, but for other reasons 
as well (it would help if I could run the initialisation code against the DB in 
the “isolation=serializable/locking=pessimistic” mode, switching to 
“isolation=read_committed/locking=optimistic” for the normal processing).

The init code just reads some objects from the db (including 
INFORMATION_SCHEMA, which is the reason for the DB mode), checks them, 
potentially updates them, and that's that — if at this moment the application 
quits and immediately runs again without the init code, it would work just as 
well. But for the objects in the shared EC, there's no EO which the init code 
would create/fetch and a later session-based code would use anyhow.

I might switch off the SEC for the initialisation completely: I would run the 
init code using an EC with its SEC explicitly set to null, then somehow trash 
the init EO stack completely and start afresh with a new one (or ones with 
OSCPool) and normal session-based processing.

Can this, i.e.,

- to begin without OSCPool and connecting to DB in the 
“isolation=serializable/locking=pessimistic” mode;
- do some stuff (without SEC), save changes;
- completely trash the EO stack;
- create a new one with OSCPool connecting to DB in the 
“isolation=read_committed/locking=optimistic” mode with SEC, and run happily 
ever after

be done in some cleaner way than, well, restarting the application — which with 
some trickery exploiting Auto Recover in JavaMonitor might even prove possible, 
but would be super-ugly and I would rather do without?

Thanks,
OC


On 22 Aug 2018, at 5:11 AM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:

That is a good question.  I’ve not used the combination.   There must be some 
code that uses the default instead of getting the SEC from the 
EOEditingContext.  There is a lot of code in Wonder (and some in WO) that 
assumes the defaultWhatever is the only one that will ever exist.  You would 
have to step into the code to see where this is happening, or enable the 
logging of stack traces of fetches.  It should be a simple fix once you find 
the spot.

Chuck

From: "ocs@ocs" mailto:o...@ocs.cz>>
Date: Tuesday, August 21, 2018 at 1:02 PM
To: Chuck Hill mailto:ch...@gevityinc.com>>
Cc: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
mailto:webobjects-dev@lists.apple.com>>
Subject: Re: Should ERXEC get sharedEC automagically?

Indeed! If I switch off the OSCPool, it starts to work properly.

Thanks just again!

Nevertheless, I still must be missing something of grave importance, for with 
OCSPool (I use ), I would presume the SEC for the pool being currently used by 
the ERXEC would load the shared objects?

It does not: the global one does automatically load the shared objects, but the 
SEC-based one of ERXEC remains empty.

Note: the code in question does not run in a session context; it is performed 
at launch, before the first session is created. Might that be important perhaps?

All the best,
OC




On 21 Aug 2018, at 9:42 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:

Are you using the ERXObjectStoreCoordinatorPool?  It keeps one SEC per pool, 
not one shared globally.  EOSharedEditingConte

Re: Should ERXEC get sharedEC automagically?

2018-08-21 Thread Chuck Hill
That is a good question.  I’ve not used the combination.   There must be some 
code that uses the default instead of getting the SEC from the 
EOEditingContext.  There is a lot of code in Wonder (and some in WO) that 
assumes the defaultWhatever is the only one that will ever exist.  You would 
have to step into the code to see where this is happening, or enable the 
logging of stack traces of fetches.  It should be a simple fix once you find 
the spot.

Chuck

From: "ocs@ocs" 
Date: Tuesday, August 21, 2018 at 1:02 PM
To: Chuck Hill 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Re: Should ERXEC get sharedEC automagically?

Indeed! If I switch off the OSCPool, it starts to work properly.

Thanks just again!

Nevertheless, I still must be missing something of grave importance, for with 
OCSPool (I use ), I would presume the SEC for the pool being currently used by 
the ERXEC would load the shared objects?

It does not: the global one does automatically load the shared objects, but the 
SEC-based one of ERXEC remains empty.

Note: the code in question does not run in a session context; it is performed 
at launch, before the first session is created. Might that be important perhaps?

All the best,
OC



On 21 Aug 2018, at 9:42 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:

Are you using the ERXObjectStoreCoordinatorPool?  It keeps one SEC per pool, 
not one shared globally.  EOSharedEditingContext.defaultSharedEditingContext() 
is the global one.

Chuck

From: "ocs@ocs" mailto:o...@ocs.cz>>
Date: Tuesday, August 21, 2018 at 12:23 PM
To: Chuck Hill mailto:ch...@gevityinc.com>>
Cc: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
mailto:webobjects-dev@lists.apple.com>>
Subject: Re: Should ERXEC get sharedEC automagically?

P.S. It seems ERX completely ignores the default shared EC, using its own one. 
If I try e.g., this:

===
println "The default sharedEC is 
${EOSharedEditingContext.defaultSharedEditingContext()}"
6.times {
def e=ERXEC.newEditingContext()
println "EC $e gets sec $e.sharedEditingContext"
}
println "The default sharedEC still is 
${EOSharedEditingContext.defaultSharedEditingContext()}"
===

it looks like this:

===
The default sharedEC is com.webobjects.eocontrol.EOSharedEditingContext@26bbe604
2005 [main] INFO er.extensions.eof.ERXObjectStoreCoordinatorPool  - 
initializing Pool...
2008 [main] INFO er.extensions.eof.ERXObjectStoreCoordinatorPool  - 
initializing Pool finished
EC er.extensions.eof.ERXEC@40e32762 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@7d78f3d5 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@f5b6e78 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@71926a36 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@48976e6d gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@7f6874f2 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
The default sharedEC still is 
com.webobjects.eocontrol.EOSharedEditingContext@26bbe604
===

Thanks and all the best,
OC



On 21 Aug 2018, at 9:07 PM, ocs@ocs mailto:o...@ocs.cz>> wrote:

Chuck,

sorry, I did not describe the problem clearly enough...



On 21 Aug 2018, at 8:39 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:
Once an EC has objects in it, its shared EC won’t get changed if a new default 
is set.  The notification is ignored.

Quite, but that's not the problem.

With EOEditingContext, it works like this:

(i) ec created, has no sharedEC (ec.sharedEditingContext==null)
(ii) (due to something which creates a DBContext, I believe) the default 
sharedEC is initialized; it loads the shared objects, and sends the notification
(iii) ec observes the notification, and sets the default sharedEC as its own 
sharedEC (for it is still empty)
(iv) now, ec fetches the objects — automatically giving shared ones from its 
sharedEC, which does contain them

With ERXEC (and ERXEC.useSharedEditingContext=true), there's an important 
difference:

(i) erxec created, immediately gets a sharedEC (ec.sharedEditingContext!=null). 
This sharedEC differs from the default shared EC
(ii) (due to something which creates a DBContext, I believe) the default 
sharedEC is initialized; it loads the shared objects, and sends the notification
(iii) erxec (although still empty) does nothing, it already has a sharedEC, 
different from the default one
(iv) now, erxec fetches the objects — would automatically give shared ones from 
its sharedEC, which, alas, contains nothing (the default one does).

Thanks and all the best,
OC





From: "ocs@ocs" mailto:o...@ocs.cz>>
Date: Tuesday, August 21, 2018 at 11:21 AM
To: Chuck Hill mailto:ch...@gevityinc.com>>
Cc: "we

Re: Should loading a shared object try to fetch? (was: Should ERXEC get sharedEC automagically?)

2018-08-21 Thread Chuck Hill
Assuming that we are looking at the same version of ERXGenericRecord, the NPE 
is from here:

EOGlobalID gid = 
editingContext.globalIDForObject(this);
if (gid.isTemporary()) {

That suggests that editingContext != this.editingContext()
In other words, that the object is registered in an editing context that is 
different from the parameter to the awakeFromInsertion method.  Can you check 
what ECs those are?  I am not sure how you would get them to be different…

Also, I see two awakeFromInsertion methods in your code:
at 
cz.ocs.model.OCSEnterpriseObject.super$4$awakeFromInsertion(OCSEnterpriseObject.groovy)
and
at 
cz.ocs.model.OCSEnterpriseObject.awakeFromInsertion(OCSEnterpriseObject.groovy:265)
 // [*]

Or that just an artifact from using Groovy?

Chuck


From: "ocs@ocs" 
Date: Tuesday, August 21, 2018 at 7:05 PM
To: Chuck Hill 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Re: Should loading a shared object try to fetch? (was: Should ERXEC 
get sharedEC automagically?)

Chuck,

thanks again! I did not know that (well one could write a much bigger book than 
you did with just those things I do not know...)

Nevertheless, there still must be some ugly fault of mine. When using 
objectWithPrimaryKeyValue, there's the superfluous fetch, but it works.

When replaced by faultWithPrimaryKeyValue, I keep getting NPEs somewhere inside 
of awakeFromInsertion — at the moment, I can't really make sense of it :( It 
looks like this:

===
== about to load 110 from 348ad293 (SEC ) // first time, there's yet no SEC...
4105 [main] DEBUG NSLog  - Using JDBCPlugIn 
'com.webobjects.jdbcadaptor.FrontbasePlugIn' for JDBCAdaptor@2076611420
... and it is being initialised here; it fetches properly all the shared EOs ...
4110 [main] DEBUG NSLog  -  connecting with dictionary: {username = ""; 
password = ""; URL = 
"jdbc:FrontBase://localhost/SBERDAT3/user=FINServis/isolation=read_committed/locking=optimistic";
 }
... ... ... the proper SQL to load all the shared objects here ... ... ...
4235 [main] DEBUG NSLog  -  === Commit Internal Transaction
... and here's a problem; my overridden awakeFromInsertion logs this just 
before a super.awakeFromInsertion:
awakeFromInsertion:  in 
er.extensions.eof.ERXEC@348ad293
... and a log _after_ super does not happen; instead, I get this:
java.lang.Exception:
... ... ...
Caused by: java.lang.NullPointerException
at 
er.extensions.eof.ERXGenericRecord.awakeFromInsertion(ERXGenericRecord.java:512)
at 
cz.ocs.model.OCSEnterpriseObject.super$4$awakeFromInsertion(OCSEnterpriseObject.groovy)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
... groovy stuff here ...
at 
cz.ocs.model.OCSEnterpriseObject.awakeFromInsertion(OCSEnterpriseObject.groovy:265)
 // [*]
at 
com.webobjects.eocontrol.EOEditingContext.insertObjectWithGlobalID(EOEditingContext.java:2871)
at er.extensions.eof.ERXEC.insertObjectWithGlobalID(ERXEC.java:975)
at er.extensions.eof.ERXEC$insertObjectWithGlobalID$0.call(Unknown Source)
... groovy stuff here ...
at cz.ocs.model.OCSEnterpriseObject.staticEOSVM(OCSEnterpriseObject.groovy:164) 
// the faultWith... here
===

The awake code looks simply like this:

===
void awakeFromInsertion(EOEditingContext ec) {
println "awakeFromInsertion: ${this} in ${ec}" // this one happens before the 
NPE
super.awakeFromInsertion(ec) // [*]
println "supered awakeFromInsertion: ${this} in ${ec}" // we do not get this far
... ... ...
===

Alas, at the moment I have no idea at all what in my code might be the culprit 
:(

Thanks and all the best,
OC


On 22 Aug 2018, at 3:14 AM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:

Yes, that makes complete sense.  EOUtilities.objectWithPrimaryKeyValue is 
documented to “Fetches the Enterprise Object identified by the specified 
primary key value”.  It will fetch. Always.  It might not use the fetched 
result, but you asked it to fetch so it will.  The method you want is 
faultWithPrimaryKeyValue.  That will either resolve the object reference from 
an EO already in the EC, in the shared EC, or in the snapshot cache.  If all of 
those fail, only then will it fetch.

And yes, the JavaDocs for faultWithPrimaryKeyValue are wrong (copied from 
objectWithPrimaryKeyValue).


Chuck


From: "ocs@ocs" mailto:o...@ocs.cz>>
Date: Tuesday, August 21, 2018 at 5:15 PM
To: Chuck Hill mailto:ch...@gevityinc.com>>
Cc: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
mailto:webob

Re: Should loading a shared object try to fetch? (was: Should ERXEC get sharedEC automagically?)

2018-08-21 Thread Chuck Hill
Yes, that makes complete sense.  EOUtilities.objectWithPrimaryKeyValue is 
documented to “Fetches the Enterprise Object identified by the specified 
primary key value”.  It will fetch. Always.  It might not use the fetched 
result, but you asked it to fetch so it will.  The method you want is 
faultWithPrimaryKeyValue.  That will either resolve the object reference from 
an EO already in the EC, in the shared EC, or in the snapshot cache.  If all of 
those fail, only then will it fetch.

And yes, the JavaDocs for faultWithPrimaryKeyValue are wrong (copied from 
objectWithPrimaryKeyValue).


Chuck


From: "ocs@ocs" 
Date: Tuesday, August 21, 2018 at 5:15 PM
To: Chuck Hill 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Should loading a shared object try to fetch? (was: Should ERXEC get 
sharedEC automagically?)

Even without ERXObjectStoreCoordinatorPool, there's another strange behaviour. 
I happen to be loading my objects (many of which happen to be in the SEC) using 
“EOUtilities.objectWithPrimaryKeyValue”.

If the object happens to be in the SEC, I get it all right, but when I switch 
on SQL log, it looks like it is fetched anyway?!? I.e., something like this:

===
println "== about to load $pk from $ec.identityHashString (SEC 
$ec.sharedEditingContext.identityHashString)"
def foo=ec.sharedEditingContext.objectsByEntityName[ename].find { 
it.rawPrimaryKey==pk }
if (foo!=nil) println "   it IS pre-loaded in SEC: $foo"
//object=EOUtilities.objectWithPrimaryKeyValue(ec,ename,pk)

object=ERXEOControlUtilities.objectWithPrimaryKeyValue(ec,ename,pk,NSArray.EmptyArray,NO,NO)
println "   got $object"
===

logs out something like

===
== about to load 101 from 25673087 (SEC a7cf42f)
   it IS pre-loaded in SEC: 
4663 [main] DEBUG NSLog  -  === Begin Internal Transaction
4663 [main] DEBUG NSLog  -  evaluateExpression: 

4664 [main] DEBUG NSLog  - 1 row(s) processed
4665 [main] DEBUG NSLog  -  === Commit Internal Transaction
   got 
===

Happens even with a 
“ERXEOControlUtilities.objectWithPrimaryKeyValue(...,NSArray.EmptyArray,false,false)”
 instead.

Does it make any sense? I would presume that with the desired object in the 
SEC, no database roundtrip should be needed (and done) at all?

Thanks and all the best,
OC


On 21 Aug 2018, at 10:02 PM, ocs@ocs mailto:o...@ocs.cz>> wrote:

Indeed! If I switch off the OSCPool, it starts to work properly.

Thanks just again!

Nevertheless, I still must be missing something of grave importance, for with 
OCSPool (I use ), I would presume the SEC for the pool being currently used by 
the ERXEC would load the shared objects?

It does not: the global one does automatically load the shared objects, but the 
SEC-based one of ERXEC remains empty.

Note: the code in question does not run in a session context; it is performed 
at launch, before the first session is created. Might that be important perhaps?

All the best,
OC



On 21 Aug 2018, at 9:42 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:

Are you using the ERXObjectStoreCoordinatorPool?  It keeps one SEC per pool, 
not one shared globally.  EOSharedEditingContext.defaultSharedEditingContext() 
is the global one.

Chuck

From: "ocs@ocs" mailto:o...@ocs.cz>>
Date: Tuesday, August 21, 2018 at 12:23 PM
To: Chuck Hill mailto:ch...@gevityinc.com>>
Cc: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
mailto:webobjects-dev@lists.apple.com>>
Subject: Re: Should ERXEC get sharedEC automagically?

P.S. It seems ERX completely ignores the default shared EC, using its own one. 
If I try e.g., this:

===
println "The default sharedEC is 
${EOSharedEditingContext.defaultSharedEditingContext()}"
6.times {
def e=ERXEC.newEditingContext()
println "EC $e gets sec $e.sharedEditingContext"
}
println "The default sharedEC still is 
${EOSharedEditingContext.defaultSharedEditingContext()}"
===

it looks like this:

===
The default sharedEC is com.webobjects.eocontrol.EOSharedEditingContext@26bbe604
2005 [main] INFO er.extensions.eof.ERXObjectStoreCoordinatorPool  - 
initializing Pool...
2008 [main] INFO er.extensions.eof.ERXObjectStoreCoordinatorPool  - 
initializing Pool finished
EC er.extensions.eof.ERXEC@40e32762 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@7d78f3d5 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@f5b6e78 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@71926a36 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@48976e6d gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@7f6874f2 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
The default sharedEC still is 
com.webobjects.eocontrol.EO

Re: Should ERXEC get sharedEC automagically?

2018-08-21 Thread Chuck Hill
Are you using the ERXObjectStoreCoordinatorPool?  It keeps one SEC per pool, 
not one shared globally.  EOSharedEditingContext.defaultSharedEditingContext() 
is the global one.

Chuck

From: "ocs@ocs" 
Date: Tuesday, August 21, 2018 at 12:23 PM
To: Chuck Hill 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Re: Should ERXEC get sharedEC automagically?

P.S. It seems ERX completely ignores the default shared EC, using its own one. 
If I try e.g., this:

===
println "The default sharedEC is 
${EOSharedEditingContext.defaultSharedEditingContext()}"
6.times {
def e=ERXEC.newEditingContext()
println "EC $e gets sec $e.sharedEditingContext"
}
println "The default sharedEC still is 
${EOSharedEditingContext.defaultSharedEditingContext()}"
===

it looks like this:

===
The default sharedEC is com.webobjects.eocontrol.EOSharedEditingContext@26bbe604
2005 [main] INFO er.extensions.eof.ERXObjectStoreCoordinatorPool  - 
initializing Pool...
2008 [main] INFO er.extensions.eof.ERXObjectStoreCoordinatorPool  - 
initializing Pool finished
EC er.extensions.eof.ERXEC@40e32762 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@7d78f3d5 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@f5b6e78 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@71926a36 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@48976e6d gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
EC er.extensions.eof.ERXEC@7f6874f2 gets sec 
com.webobjects.eocontrol.EOSharedEditingContext@5875de6a
The default sharedEC still is 
com.webobjects.eocontrol.EOSharedEditingContext@26bbe604
===

Thanks and all the best,
OC


On 21 Aug 2018, at 9:07 PM, ocs@ocs mailto:o...@ocs.cz>> wrote:

Chuck,

sorry, I did not describe the problem clearly enough...


On 21 Aug 2018, at 8:39 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:
Once an EC has objects in it, its shared EC won’t get changed if a new default 
is set.  The notification is ignored.

Quite, but that's not the problem.

With EOEditingContext, it works like this:

(i) ec created, has no sharedEC (ec.sharedEditingContext==null)
(ii) (due to something which creates a DBContext, I believe) the default 
sharedEC is initialized; it loads the shared objects, and sends the notification
(iii) ec observes the notification, and sets the default sharedEC as its own 
sharedEC (for it is still empty)
(iv) now, ec fetches the objects — automatically giving shared ones from its 
sharedEC, which does contain them

With ERXEC (and ERXEC.useSharedEditingContext=true), there's an important 
difference:

(i) erxec created, immediately gets a sharedEC (ec.sharedEditingContext!=null). 
This sharedEC differs from the default shared EC
(ii) (due to something which creates a DBContext, I believe) the default 
sharedEC is initialized; it loads the shared objects, and sends the notification
(iii) erxec (although still empty) does nothing, it already has a sharedEC, 
different from the default one
(iv) now, erxec fetches the objects — would automatically give shared ones from 
its sharedEC, which, alas, contains nothing (the default one does).

Thanks and all the best,
OC




From: "ocs@ocs" mailto:o...@ocs.cz>>
Date: Tuesday, August 21, 2018 at 11:21 AM
To: Chuck Hill mailto:ch...@gevityinc.com>>
Cc: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
mailto:webobjects-dev@lists.apple.com>>
Subject: Re: Should ERXEC get sharedEC automagically?

Chuck,



On 21 Aug 2018, at 7:50 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:

See er.extensions.ERXEC.useSharedEditingContext at
https://wiki.wocommunity.org/display/documentation/Explanation+of+the+default+properties+in+a+Wonder+project

Thanks a lot!

(Why on earth don't they mention this on the ERXEC documentation page? Oh, 
never mind.)



Did that fix it?

Well, sort of.

It gets curiouser and curiouser — in other words, I must be doing something far 
wrong.

When I set the “ERXEC.useSharedEditingContext” property to true, then

- the newly created ERXEC gets a shared editing context immediately upon 
creation, not later upon receiving 
DefaultSharedEditingContextWasInitializedNotification;
- and it is a different shared EC instance, not 
EOSharedEditingContext.defaultSharedEditingContext()
- but it is EOSharedEditingContext.defaultSharedEditingContext() who reads in 
automatically all the shared EOs
- and therefore, when fetching EOs through the ERXEC, I am still getting 
non-shared ones in the ERXEC (for its own sharedEC is empty, and thus 
EOSharedEditingContext.defaultSharedEditingContext is ignored).

Can you make any sense of that?

Thanks again a very big lot,
OC





On 2018-08-21, 9:43 AM, "Webobjects-dev on behalf of ocs@ocs" 
mailt

Re: Should ERXEC get sharedEC automagically?

2018-08-21 Thread Chuck Hill
Once an EC has objects in it, its shared EC won’t get changed if a new default 
is set.  The notification is ignored.

From: "ocs@ocs" 
Date: Tuesday, August 21, 2018 at 11:21 AM
To: Chuck Hill 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Re: Should ERXEC get sharedEC automagically?

Chuck,


On 21 Aug 2018, at 7:50 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:

See er.extensions.ERXEC.useSharedEditingContext at
https://wiki.wocommunity.org/display/documentation/Explanation+of+the+default+properties+in+a+Wonder+project

Thanks a lot!

(Why on earth don't they mention this on the ERXEC documentation page? Oh, 
never mind.)


Did that fix it?

Well, sort of.

It gets curiouser and curiouser — in other words, I must be doing something far 
wrong.

When I set the “ERXEC.useSharedEditingContext” property to true, then

- the newly created ERXEC gets a shared editing context immediately upon 
creation, not later upon receiving 
DefaultSharedEditingContextWasInitializedNotification;
- and it is a different shared EC instance, not 
EOSharedEditingContext.defaultSharedEditingContext()
- but it is EOSharedEditingContext.defaultSharedEditingContext() who reads in 
automatically all the shared EOs
- and therefore, when fetching EOs through the ERXEC, I am still getting 
non-shared ones in the ERXEC (for its own sharedEC is empty, and thus 
EOSharedEditingContext.defaultSharedEditingContext is ignored).

Can you make any sense of that?

Thanks again a very big lot,
OC




On 2018-08-21, 9:43 AM, "Webobjects-dev on behalf of ocs@ocs" 
mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>
 on behalf of o...@ocs.cz<mailto:o...@ocs.cz>> wrote:

   Hi there,

   the EOEditing context doc pretty unequivocally says

   ===
   By default, an editing context that has no shared editing context listens 
for DefaultSharedEditingContextWasInitializedNotifications. If a notification 
is posted while the context has no registered objects, the editing context sets 
its shared editing context to the newly initialized default shared editing 
context.
   ===

   Should it apply for an ERXEC, too? I sort of inferred it would, but by my 
testing, it does not seem so: an ERXEC I make (through 
ERXEC.newEditingContext()) seems to adamantly stay without 
sharedEditingContext, although the notification is posted all right (I have 
observed it myself to be sure), and if there's a good ole EOEditingContext, it 
indeed duly sets its sharedEC at the time.

   Have I missed something of importance somewhere? The ERXEC documentation 
does not say essentially anything of the sharedEC, far as I can say:

   http://wonder.sourceforge.net/javadoc/er/extensions/ERXEC.html

   In principle, I could work around the problem by setting the sharedEC to all 
my ERXECs programmatically -- that works all right --, but it would be a lot of 
work, with a danger I overlook something somewhere and got bit in the tender 
parts by that...

   Thanks,
   OC

___
   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/chill%40gevityinc.com

   This email sent to ch...@gevityinc.com<mailto:ch...@gevityinc.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: EOFetchSpecification .fspec plist description?

2018-08-21 Thread Chuck Hill
And is guaranteed to be correct vs documentation that may or may not be up to 
date!

From: "ocs@ocs" 
Date: Tuesday, August 21, 2018 at 11:29 AM
To: Chuck Hill 
Cc: "webobjects-dev@lists.apple.com" 
Subject: Re: EOFetchSpecification .fspec plist description?

Chuck,


On 21 Aug 2018, at 7:44 PM, Chuck Hill 
mailto:ch...@gevityinc.com>> wrote:
I don’t think it is documented.  These are meant to be created via a UI (old 
EOModeler, WOLips Entity Modeler).

Well, given they (i.e., NeXT — far as I know, the document's as old as that) 
bothered to write the “WebObjects File Format Reference” at all, I presume they 
presumed one might need to create/edit those files manually. Which position I 
happened to find myself, for the old EOModeler is sorta at the dead side, and 
alas, since I have found Eclipse very seriously lacking when compared with 
Xcode, I had to write one of my own (https://github.com/jvanek/EOModeler-OSX).

That looks to be the output/input of a EOKeyValueArchiver.

Ha! Thanks a lot: the possibility to test how any particular qualifier might 
look like is the second best thing after a perfect documentation :D

All the best,
OC


From: Webobjects-dev 
mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of "ocs@ocs" mailto:o...@ocs.cz>>
Date: Tuesday, August 21, 2018 at 10:18 AM
To: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
mailto:webobjects-dev@lists.apple.com>>
Subject: EOFetchSpecification .fspec plist description?

Hi there,

incidentally, does perhaps anyone know of a reliable documentation of the 
property list items which describe an EOFetchSpecification inside of a .fspec 
file in a model?

The Apple documentation (“WebObjects File Format Reference”) either blatantly 
lies, or I must be doing something terribly wrong; the doc says

===
qualifier / string / A formatted string for an EOQualifier object that 
indicates which records or objects the fetch specification should fetch. See 
EOQualifier in WebObjects 5.4 Reference for the format of this string.
===

nevertheless, when I tried with a

===
"SharedStaticObjects" = {
class = EOFetchSpecification;
entityName = DBDFList;
fetchLimit = 0;
isDeep = YES;
qualifier = "uid < 9";
};
===

it simply did not work. Having checked some real .fpecs I have changed it to

===
...
qualifier = {
class = EOKeyValueQualifier;
key = uid;
selectorName = "isLessThan:";
value = {
class = NSNumber;
value = 9;
};
};
...
===

which works like a charm, but — far as I was able to ascertain — does not seem 
to be documented anywhere at all...

Thanks again,
OC


 ___
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: Should ERXEC get sharedEC automagically?

2018-08-21 Thread Chuck Hill
See er.extensions.ERXEC.useSharedEditingContext at 
https://wiki.wocommunity.org/display/documentation/Explanation+of+the+default+properties+in+a+Wonder+project

Did that fix it?

Chuck


On 2018-08-21, 9:43 AM, "Webobjects-dev on behalf of ocs@ocs" 
 wrote:

Hi there,

the EOEditing context doc pretty unequivocally says

===
By default, an editing context that has no shared editing context listens 
for DefaultSharedEditingContextWasInitializedNotifications. If a notification 
is posted while the context has no registered objects, the editing context sets 
its shared editing context to the newly initialized default shared editing 
context.
===

Should it apply for an ERXEC, too? I sort of inferred it would, but by my 
testing, it does not seem so: an ERXEC I make (through 
ERXEC.newEditingContext()) seems to adamantly stay without 
sharedEditingContext, although the notification is posted all right (I have 
observed it myself to be sure), and if there's a good ole EOEditingContext, it 
indeed duly sets its sharedEC at the time.

Have I missed something of importance somewhere? The ERXEC documentation 
does not say essentially anything of the sharedEC, far as I can say:

http://wonder.sourceforge.net/javadoc/er/extensions/ERXEC.html

In principle, I could work around the problem by setting the sharedEC to 
all my ERXECs programmatically -- that works all right --, but it would be a 
lot of work, with a danger I overlook something somewhere and got bit in the 
tender parts by that...

Thanks,
OC

 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: EOFetchSpecification .fspec plist description?

2018-08-21 Thread Chuck Hill
I don’t think it is documented.  These are meant to be created via a UI (old 
EOModeler, WOLips Entity Modeler).  That looks to be the output/input of a 
EOKeyValueArchiver.

Chuck

From: Webobjects-dev 
 on behalf of 
"ocs@ocs" 
Date: Tuesday, August 21, 2018 at 10:18 AM
To: "webobjects-dev@lists.apple.com" 
Subject: EOFetchSpecification .fspec plist description?

Hi there,

incidentally, does perhaps anyone know of a reliable documentation of the 
property list items which describe an EOFetchSpecification inside of a .fspec 
file in a model?

The Apple documentation (“WebObjects File Format Reference”) either blatantly 
lies, or I must be doing something terribly wrong; the doc says

===
qualifier / string / A formatted string for an EOQualifier object that 
indicates which records or objects the fetch specification should fetch. See 
EOQualifier in WebObjects 5.4 Reference for the format of this string.
===

nevertheless, when I tried with a

===
"SharedStaticObjects" = {
class = EOFetchSpecification;
entityName = DBDFList;
fetchLimit = 0;
isDeep = YES;
qualifier = "uid < 9";
};
===

it simply did not work. Having checked some real .fpecs I have changed it to

===
...
qualifier = {
class = EOKeyValueQualifier;
key = uid;
selectorName = "isLessThan:";
value = {
class = NSNumber;
value = 9;
};
};
...
===

which works like a charm, but — far as I was able to ascertain — does not seem 
to be documented anywhere at all...

Thanks again,
OC



 ___
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: updates to same value: why they happen?

2018-08-14 Thread Chuck Hill
Could there be some place in your code that is changing type between Integer 
and Long?  EOF would see that as a value change, though the value logged would 
appear the same.

Chuck

From: Webobjects-dev 
 on behalf of 
"ocs@ocs" 
Date: Tuesday, August 14, 2018 at 10:26 AM
To: "webobjects-dev@lists.apple.com" 
Subject: updates to same value: why they happen?

Gentlemen,

my code logs out all database changes in the 
databaseContextWillPerformAdaptorOperations delegate method.

Lately from these logs I have found that one of my applications tends to pretty 
often update an attribute to the same value it used to have before, like this:

===
249 /tmp> fgrep "UPDATE on 'DBAuction' ((uid = 1002533)" LOG
13:38:25.214|WorkerThread7 - 4: UPDATE on 'DBAuction' ((uid = 1002533)) 
1{originalAmount:11058}
09:02:58.136|WorkerThread2 - 1: UPDATE on 'DBAuction' ((uid = 1002533)) 
1{originalAmount:11058}
09:55:57.970|WorkerThread5 - 2: UPDATE on 'DBAuction' ((uid = 1002533)) 
1{originalAmount:11058}
10:09:37.079|WorkerThread22 - 2: UPDATE on 'DBAuction' ((uid = 1002533)) 
1{originalAmount:11058}
10:14:31.399|WorkerThread11 - 2: UPDATE on 'DBAuction' ((uid = 1002533)) 
1{originalAmount:11058}
251 /tmp>
===

Can you see what might be the culprit?

I understand this would happen if the value in the object itself does not 
change, whilst the value in the snapshot would; but how could change the 
attribute value of the snapshot without being written out to the database 
(which, if happened, would be logged as well)?

Thanks a lot for any advice,
OC

 ___
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: Web service disturbs wotaskd communication

2018-05-04 Thread Chuck Hill
Hi Maik,

Are the WOWorkerThreads still running?  Try getting a thread dump.  Is your 
refactored web service running as a daemon thread?  If that, that could be by 
the app is not stopping.  You will need to tie in application.terminate() to 
stop the web service.

That is the only thing that I can think of that sort-of fits your description.


Chuck

From: Webobjects-dev 
 on behalf of Maik 
Musall 
Date: Friday, May 4, 2018 at 5:48 AM
To: WebObjects-Dev 
Subject: Web service disturbs wotaskd communication

Hi all,

we recently refactored a web service running within a WO application. It was 
based on com.sun.net.httpserver which is of course 
deprecated, and now we use org.apache.http instead. It creates a socket on a 
high port number, waits for requests and serves responses. Nothing special that 
I can see.

Now, whenever we fire up the new implementation, the entire WO app instance 
can't be stopped any more through wotaskd (e.g. by stopping the instance 
manually in WOMonitor). Force Quit still works, and shutting down from within 
through Runtime.exit() works, too. And if I disable that webservice, normal 
stops also work fine again.

The application port (2003 here) is reachable, I can connect to it via curl or 
telnet, I even get an exception in the log when I send some garbage there. It 
just doesn't react to wotaskd commands any more, and I can't figure out why.

Does anyone have a hunch about where to look?

Thanks
Maik

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

2018-03-17 Thread Chuck Hill
That method gets called for all entities, not just read only ones.  The check 
for being read-only is inside the method.

Some state inside EOF is messed up.  Are you doing anything with database 
operations in your app?  Or it could be concurrency and unlocked EOF access 
that is scrambling the state.  What changed before this started?

You probably need to figure out what is on line 4700, and what might be null 
and work back from there.

Chuck


From: Webobjects-dev 
 on behalf of 
Ricardo Parada 
Date: Saturday, March 17, 2018 at 5:34 PM
To: Michael Kondratov 
Cc: WebObjects-Dev 
Subject: Re: Strange error

Hi Michael,

It appears one of the objects being saved is for a read only entity.  Can you 
tell if that is what is going on?
Ricardo


On Mar 17, 2018, at 11:34 AM, Michael Kondratov 
> wrote:
Hello!
I am getting a new strange error in our new WO application:

java.lang.NullPointerException
at 
com.webobjects.eoaccess.EODatabaseContext._verifyNoChangesToReadonlyEntity(EODatabaseContext.java:4700)
at 
com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseContext.java:6187)
at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:376)
at 
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1178)
at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1099)




Would any one know what is causing it?

Thank you!


Michael
___
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/rparada%40mac.com

This email sent to rpar...@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: invalidate relationship cache

2018-03-05 Thread Chuck Hill
Hi André,

Invalidating the GlobalIds won’t work.  That will just refresh the objects that 
you have a list of already.  From your description, I think that you want to 
refresh what is in list (get an updated list with inserted and deleted rows 
that match the databse).  This should work
ERXEOControlUtilities. clearSnapshotForRelationshipNamed(eo, " extWsProjects ");

Following that you many need to refault the objects in the relationship.



On 2018-03-05, 8:31 AM, "Webobjects-dev on behalf of André Rothe" 
 wrote:

Hi,

I have an EO with a relationship to a second EO. The database in the
background will be changed by another application, so it will be
necessary to refetch the associated EOs of the relationship on every
access.

How I can invalidate the list of the associated EOs?

This is the generated method (EOGenerator):

public NSArray extWsProjects() {
 // TODO: invalidate this array
 return (NSArray)storedValueForKey("extWsProjects");
}

On the page
https://en.wikibooks.org/wiki/WebObjects/EOF/Using_EOF/Caching_and_Freshness

I read something from Jesse Barnum, should I get all the ExtWsProject
objects and their GIDs to call ec.invalidateObjectsWithGlobalIDs(ids) to
make faults?

But what about deleted rows in the database, the other application can
also delete rows, so the faults should not be necessary?

Thanks a lot
Andre

 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Single Sign-On

2018-02-23 Thread Chuck Hill
And I've integrated these and it was pretty straightforward:
http://weblogin.org
https://www.shibboleth.net

Chuck

On 2018-02-23, 11:22 AM, "Webobjects-dev on behalf of Steve Peery" 
 wrote:

I’m not sure what you have in mind, but the ERGoogleSignIn framework makes 
it very easy to log into a WO site using a google account.

Steve


> On Feb 23, 2018, at 2:10 PM, Robert Hanviriyapunt  
wrote:
> 
> Any useful resources in integrating with SSO services in WebO?
> 
> = Robert =
> ___
> 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/speery%40me.com
> 
> This email sent to spe...@me.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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Using database objects in different schemas

2017-12-15 Thread Chuck Hill
Yeah, it is not straight-forward at all.  You need to always know where you are 
getting your data from.  If it is session based, you just set this up when the 
session is created which simplified things somewhat.  These EOF stacks need to 
be strictly isolated, so getting a few of Foos across multiple slaves is just 
not possible in terms of a single fetch.  You can fetch on each slave and then 
mash them together in an array, but the objects in the array will not all share 
the same EC.  Personally, I’d run away.

Chuck


From: Paul Hoadley <pa...@logicsquad.net>
Date: Friday, December 15, 2017 at 2:54 PM
To: Chuck Hill <ch...@gevityinc.com>
Cc: André Rothe <andre.ro...@phosco.info>, WebObjects-Dev 
<webobjects-dev@lists.apple.com>
Subject: Re: Using database objects in different schemas

Hi Chuck,

On 16 Dec 2017, at 6:17 am, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

I think you can make it work, but it is going to need a database connection for 
each slave.  And there can’t be relationships between slaves or between the 
master and the slave.  And it is going to be susceptible to “bad assumption” 
errors in Wonder (I think that version of EOF is OK).

What you would need to do is to create a new EOModelGroup for each slave and 
copy (not a reference, a brand new object) the models into it, adding the 
schema to the table names.  That avoids the need to tweak the SQL. They you 
need to create a new EOObjectStoreCoordinator for each of these groups.  
EOObjectStoreCoordinators don’t co-operate so the duplicate GID should be OK.  
Then make sure that your code uses the correct EOObjectStoreCoordinator to 
create EOEditingContexts in.

I *think* that will work, I have never tried it.  Using the 
EOSharedEditingContext with objects in the slave tables is going to challenging 
as a lot of code is going to assume that there is only one, not per 
EOObjectStoreCoordinator.  I’d avoid the EOSharedEditingContext.  The other 
place where you may run into problems is notifications that are not scoped to 
the EOObjectStoreCoordinator.

But all in all, this is not really what EOF is meant for.  With EOF you would 
use a different data model for this sort of multi-tenant solution.

Does all of this require “deep” knowledge at the application level of what’s 
going on in the database? To get it set up, as you describe above, obviously it 
does, but then beyond that, say André wants a particular Foo object—does he 
need to know where to ask for it from? Or say he wants all Foo objects—doesn’t 
he now need to go ask for all Foos from each stack? I got the impression from 
the original post that he wanted a kind of merged view over all these tables, 
which presumably just isn’t possible.


--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/


 ___
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: Using database objects in different schemas

2017-12-15 Thread Chuck Hill
EOAdaptorChannel.Delegate.adaptorChannelShouldEvaluateExpression

boolean adaptorChannelShouldEvaluateExpression(EOAdaptorChannel channel, 
EOSQLExpression expression)
Invoked from evaluateExpression to tell the delegate that the adaptor channel 
object is sending expression to the database server. The delegate should return 
true to permit the adaptor channel to send expression to the server. If the 
delegate returns false, the adaptor channel does not send the expression and 
returns immediately. When the delegate returns false, the adaptor channel 
expects that the implementor of the delegate has done the work that 
evaluateExpression would have done. The delegate can create a new 
EOSQLExpression and send the expression itself before returning false.

Parameters:
   channel - An adaptor channel object.
   expression - The expression to be sent to the database server.

Returns:
   true to permits the adaptor channel to send expression to the database 
server.
See Also:
EOAdaptorChannel.evaluateExpression(EOSQLExpression expression), EOSQLExpression


On 2017-12-13, 1:06 AM, "Webobjects-dev on behalf of Markus Ruggiero" 
 wrote:

André,

I seem to remember that there are hooks in WebObjects that allow you to 
have a last look at the generated SQL statement before it is executed. You can 
then fine tune your statements by adding the qualifiying schema name to any 
table name. No need to fiddle with the EOModel.

EOAdaptor delegate something

Chuck will certainly be able to give you more info to climb over that Hill 
.

---markus---

> On 13 Dec 2017, at 08:10, André Rothe  wrote:
> 
> Hello Jean,
> 
> The problem with the "slave" accounts is, that I don't have the passwords 
for them. So I cannot create a connection to every account except the "master" 
account.
> 
> Within the "master" there is a table, which holds the account names of 
the "slaves". So it is possible to get the account names and build within the 
database some queries like:
> 
> sql := 'select * from' || get_a_slave_name() || '.table1';
> execute_immediate sql;
> 
> But I need such a thing within WebObjects. I looked around in the API and 
I found a theoretical solution, which I will try today.
> 
> * get the "master" model (EOModel), it has a valid database connection
> * get the database context of that model
> * from the database context get:
>  dc.availableChannel().adaptorChannel()
> 
> * there is a method describeModelWithTableNames(tablenames), which
>  creates an EOModel from the given tablenames
> 
> Maybe it is possible, to set full-qualified tablenames there, so I could 
build EOModels for every "slave" dynamically. The names of the "slaves" I can 
get from my "master" account with a simple query (this table will be filled by 
another application). Also I could rename the models, to get better access from 
the defaultModelGroup (maybe the name of the "slave" account per model).
> 
> The questions would be, whether or not the method above will accept 
full-qualified table names, and whether or not the method is not an abstract 
method for the Oracle database plugin.
> 
> Best regards
> André
> 
> Am 2017-12-13 00:40, schrieb Jean-François Veillette:
>> Hmmm … reading your email a few times again, it seems that I didn’t
>> understand your problem at first and that my answer was off-topic.
>> I’m still not sure I really understand enough to be of any help, but
>> let me try again with (I hope) a better answer.
>> It seems that you would need a new jdbc connection to access the slave 
DB.
>> As described in my previous email, you could create a new EOF stack,
>> listen for the notification to update the model’s connection
>> dictionary, adjust it to connect to the desired slave DB, then use the
>> stack at will.
>> In hope that this is at least a closer attempts to answer your question,
>> jfv
>>> On Dec 12, 2017, at 10:49 AM, Jean-François Veillette 
 wrote:
>>> You might need to create a new jdbc connection for every user.
>>> If I understand your situation correctly, I would try to use a unique 
EOF stack for every session (user).  In practice this can work well as long as 
you don’t have too many sessions (exhausting DB connection).
>>> You will have to change the ‘delegate’ that updates the connection 
dictionary so that it updates it specifically for the current user.
>>> This might sound more complicated than it really is, here is the 2 
things you have to do (in short):
>>> 1- make sure you create a new EOF stack for every user:
>>> 2- Make sure the connection dictionary is correctly set for every new 
stack
>>> Now in 

Re: Cross-Site Request Forgery

2017-12-15 Thread Chuck Hill
Hi Leigh,

There is no build-in way to do this.  For Direct Actions you have to do it on 
your own.  Component Actions are already somewhat safe due to the obscure 
nature of the element ID on the URL.  But if someone knows WO and is familiar 
with the structure of your site there is still a window for CSRF attacks.  I 
don’t think you can do anything automatic without having access to the WO 
source code, but the ERXForm etc. subclasses that Wonder installs might let you 
create an automated way of doing this.

Chuck


From: Webobjects-dev 
 on behalf of Leigh 
Kivenko 
Date: Friday, December 15, 2017 at 11:56 AM
To: WebObjects-Dev 
Subject: Cross-Site Request Forgery

Hello,
Just wondering if anyone has ever had to harden their WebObjects applications 
against CSRF:

https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet

Is there a way to have WebObjects do this automatically or do we need to 
implement this on our own?

Thanks,

Leigh Kivenko | VP, Technology
PortfolioAid
t. 416-479-0523 | e. lei...@portfolioaid.com

This e-mail may be privileged and confidential. If you received this e-mail in 
error, please do not use, copy or distribute it, but advise me immediately (by 
return e-mail or otherwise), and delete the e-mail.

 ___
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: Using database objects in different schemas

2017-12-15 Thread Chuck Hill
I think you can make it work, but it is going to need a database connection for 
each slave.  And there can’t be relationships between slaves or between the 
master and the slave.  And it is going to be susceptible to “bad assumption” 
errors in Wonder (I think that version of EOF is OK).

What you would need to do is to create a new EOModelGroup for each slave and 
copy (not a reference, a brand new object) the models into it, adding the 
schema to the table names.  That avoids the need to tweak the SQL. They you 
need to create a new EOObjectStoreCoordinator for each of these groups.  
EOObjectStoreCoordinators don’t co-operate so the duplicate GID should be OK.  
Then make sure that your code uses the correct EOObjectStoreCoordinator to 
create EOEditingContexts in.

I *think* that will work, I have never tried it.  Using the 
EOSharedEditingContext with objects in the slave tables is going to challenging 
as a lot of code is going to assume that there is only one, not per 
EOObjectStoreCoordinator.  I’d avoid the EOSharedEditingContext.  The other 
place where you may run into problems is notifications that are not scoped to 
the EOObjectStoreCoordinator.

But all in all, this is not really what EOF is meant for.  With EOF you would 
use a different data model for this sort of multi-tenant solution.

Chuck

From: Webobjects-dev 
 on behalf of Paul 
Hoadley 
Date: Friday, December 15, 2017 at 2:22 AM
To: André Rothe 
Cc: WebObjects-Dev 
Subject: Re: Using database objects in different schemas

Hi André,

On 15 Dec 2017, at 6:33 pm, André Rothe 
> wrote:

But how does EOF differ the objects? They come from different tables (but with 
the same name, only the owners differ). The owner I would intercept and change 
in the SQL code. Can EOF track this without a model? Also the primary keys 
could overlap, because the "slaves" use its own sequence objects, which all 
start at 1.

Unless Chuck chimes in with some serious esoterica, I cannot imagine how you’d 
get this to work. No, EOF won’t be able to track that without a model. And even 
if you could somehow trick it into using a union of several tables, then, and I 
think you know this, they’re not really going to function as primary keys if 
they can possibly collide.


At the moment I havent't found a delegate for the SQL injection, so I cannot 
test it :-(

I don’t think it’s going to help. I just can’t see how EOF can be the solution 
to this problem.


--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/


 ___
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: Question regarding the old WebObjects tools (WOBuilder et.al.)

2017-12-13 Thread Chuck Hill
I have not heard of them.

Chuck

On 2017-12-13, 8:53 AM, "Webobjects-dev on behalf of Markus Ruggiero" 
 wrote:

Does anybody know whether the old Objective-C tools like EOModeler and 
WOBuilder are available in source form? The D2W RuleModeler is, but I'd like to 
play with the two other tools.

Call me masochistic

---markus---


 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Polymorphic Relationship

2017-11-28 Thread Chuck Hill
That is not a solution.  That is a terrible thing to do.  I don’t want to 
spread bad ideas.


From: Webobjects-dev 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf of remy 
<r...@algodata.fr>
Date: Tuesday, November 28, 2017 at 1:47 AM
To: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com>
Subject: Re: Polymorphic Relationship

Hi Chuck,

How do I this? I think change my method for create my EntitySub but it 
interests me to know this solution. Mostly : "discarding all cached knowledge 
of EO".

If that is what you need, then look at the Role design pattern instead
> Where I can find it?

Rémy


Le 24 nov. 2017 à 19:05, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> a écrit :

Remy,

You *can* get an EO to change its class over time by changing the restricting 
qualifier, discarding all cached knowledge of EO and doing a fetch.  *But* that 
is really, really not recommended.  If that is what you need, then look at the 
Role design pattern instead.  That is probably closer to what you need.

If you just need to create instances of different classes based on a string 
(EntitySub.ENTITY_NAME) then create a factory method that takes the string and 
returns an instance of a sub-class of EntityAbstract.  All of the information 
needed to do this is in the model and can be referenced at runtime.  It is 
quite simple.  The way you are doing it below is just wrong.

Chuck

From: Webobjects-dev 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of remy <r...@algodata.fr<mailto:r...@algodata.fr>>
Date: Friday, November 24, 2017 at 2:30 AM
To: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Polymorphic Relationship

Hi,
I want make an polymorphic entity.
I have an Entity Abstract named "EntityAbstract" and a subclass Entity named 
"EntitySub" where the qualifier is (refEntityName=‘EntitySub').
I have third Entity named "Relation" that has an relationship with "EntitySub".
I have a problem when :

EOEditingContext editingContext = ERXEC.newEditingContext();



int relationID = Integer.valueOf(relation().primaryKeyInTransaction());



EntityAbstract entityAbstract = 
ERXEOControlUtilities.createAndInsertObject(editingContext(), 
EntityAbstract.class);

entityAbstract.setRefEntityName(EntitySub.ENTITY_NAME);

entityAbstract.setRefEntityID(relationID);



editingContext().saveChanges();



ERXEOControlUtilities.refreshObject(relation());

for (EntityAbstract e : relation().entitySubs())

 System.err.println(e); // Print  and not  ?
I don't want use the class "Entity" for 
ERXEOControlUtilities.createAndInsertObject
Do you have an idea?
I tested :
eo.invalidateAllObjects(); eo.parentObjectStore().invalidateAllObjects(); 
eo.rootObjectStore().invalidateAllObjects();
It does not work...
The project : https://github.com/algodata44/PolymorphicRelationship
Use DB H2

Thx


 ___
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: New WebObjects book ?

2017-11-25 Thread Chuck Hill
Those are the exact questions that keep me awake at night!  Now I will never 
sleep again!

On 2017-11-25, 9:23 AM, "Webobjects-dev on behalf of Hugi Thordarson" 
 wrote:

Dang. Then how do I reduce the effort in the WebObjects work to be done to 
get problems solved? How can I ensure that plans of action include every 
WebObjects task and that every WebObjects outcome is in place? How will I save 
time investigating strategic and tactical options and ensuring WebObjects 
opportunity costs are low? How can I deliver tailored WebObjects advise 
instantly with structured going-forward plans?

Now I'll never know.


https://www.amazon.com/WebObjects-Practical-Integration-Gerard-Blokdyk/dp/1979934959/ref=sr_1_1?s=books=UTF8=1511630156=1-1=webobjects

- hugi



> On 25 Nov 2017, at 17:21, David Holt  wrote:
> 
> Haha. 2165 results for Gerard. All published Nov 21. Very prolific.
> 
> Thanks,
> David
> 
>> On Nov 25, 2017, at 9:17 AM, David Holt  wrote:
>> 
>> Looks like a scam to me. The details on the cover have nothing to do 
with WebObjects.
>> 
>> Thanks,
>> David
>> 
>>> On Nov 25, 2017, at 8:59 AM, Francois BIENTZ  
wrote:
>>> 
>>> WebObjects: Practical Integration from Gerard Blokdyk ISBN : 1979934954
>>> 
>>> ___
>>> 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/programmingosx%40mac.com
>>> 
>>> This email sent to programming...@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/programmingosx%40mac.com
>> 
>> This email sent to programming...@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/hugi%40karlmenn.is
> 
> This email sent to h...@karlmenn.is

 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Polymorphic Relationship

2017-11-24 Thread Chuck Hill
Remy,

You *can* get an EO to change its class over time by changing the restricting 
qualifier, discarding all cached knowledge of EO and doing a fetch.  *But* that 
is really, really not recommended.  If that is what you need, then look at the 
Role design pattern instead.  That is probably closer to what you need.

If you just need to create instances of different classes based on a string 
(EntitySub.ENTITY_NAME) then create a factory method that takes the string and 
returns an instance of a sub-class of EntityAbstract.  All of the information 
needed to do this is in the model and can be referenced at runtime.  It is 
quite simple.  The way you are doing it below is just wrong.

Chuck

From: Webobjects-dev 
 on behalf of remy 

Date: Friday, November 24, 2017 at 2:30 AM
To: "webobjects-dev@lists.apple.com" 
Subject: Polymorphic Relationship

Hi,
I want make an polymorphic entity.
I have an Entity Abstract named "EntityAbstract" and a subclass Entity named 
"EntitySub" where the qualifier is (refEntityName=‘EntitySub').
I have third Entity named "Relation" that has an relationship with "EntitySub".
I have a problem when :

EOEditingContext editingContext = ERXEC.newEditingContext();



int relationID = Integer.valueOf(relation().primaryKeyInTransaction());



EntityAbstract entityAbstract = 
ERXEOControlUtilities.createAndInsertObject(editingContext(), 
EntityAbstract.class);

entityAbstract.setRefEntityName(EntitySub.ENTITY_NAME);

entityAbstract.setRefEntityID(relationID);



editingContext().saveChanges();



ERXEOControlUtilities.refreshObject(relation());

for (EntityAbstract e : relation().entitySubs())

 System.err.println(e); // Print  and not  ?
I don't want use the class "Entity" for 
ERXEOControlUtilities.createAndInsertObject
Do you have an idea?
I tested :
eo.invalidateAllObjects(); eo.parentObjectStore().invalidateAllObjects(); 
eo.rootObjectStore().invalidateAllObjects();
It does not work...
The project : https://github.com/algodata44/PolymorphicRelationship
Use DB H2

Thx
 ___
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: Issues with instances automatically restarting

2017-11-21 Thread Chuck Hill
Hi Leigh,

You might have more than one issue.

“not restart but refuse new requests” generally indicates that one or more 
threads did not exit.  If the app creates any threads, they need to be daemon 
threads or need to get shut down when the graceful restart notification is 
received.  A more likely scenario in your case is that there is a deadlock 
between worker threads.  You can diagnose this by getting a full thread dump of 
the affected instances.

“might not restart and continues to accept requests” sounds like long-lived 
sessions.  When the apps gracefully restart they refuse requests that don’t 
contain an instance ID.  This allows existing sessions to continue until the 
user logs out or the session times out.  Pages with JavaScript that contacts 
the server in any way can keep the instance alive for a long period of time.  
You would need to distinguish those from regular user actions and allow the 
session to terminate if no user actions have been received in the session 
timeout period.  I have done this before, though I forget the specifics of what 
I did.  I can look it up if you need.   Diagnosing this is trickier.  I’d look 
at something like adding a direct action that can dump out the session store, 
and the last N request URLs.

Chuck 


On 2017-11-21, 5:29 AM, "Webobjects-dev on behalf of Leigh Kivenko" 
 wrote:

Hello,
We have our instances set to automatically restart daily at 3am. We run 
multiple instances and see different behavior. Sometimes all instances restart 
fine, sometimes one or more might not restart but refuse new requests (it's 
just dormant), and sometimes one or more might not restart and continues to 
accept requests.

This started happening after moving from RHEL5 and Java 6 to RHEL7 and Java 
8 but I don't think that's necessarily the issue since we have other 
environments with similar setup and we aren't seeing the same thing. The only 
thing unique about this environment is that the database is on a separate 
server (but that was the case before the move to RHEL7). I'm assuming there's 
something messed up in our WebObjects or OS config, but don't know what to look 
for, and because the issue occurs sporadically (and apparently randomly), not 
sure where to start.

Has anyone ever seen this before or have any ideas on how to debug?

Thanks,

Leigh Kivenko | VP, Technology
PortfolioAid
t. 416-479-0523 | e. lei...@portfolioaid.com

This e-mail may be privileged and confidential. If you received this e-mail 
in error, please do not use, copy or distribute it, but advise me immediately 
(by return e-mail or otherwise), and delete the e-mail.


 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: ERProfiling with Java8? Any working solution?

2017-11-21 Thread Chuck Hill
Can you provide any specifics on the problems you are having?

Chuck


On 2017-11-21, 2:05 AM, "Webobjects-dev on behalf of Riccardo De Menna" 
 wrote:

Hi all,

I’m having problems running ERProfiling with Java8. Does anyone know a way 
to have it work?

rdm 
 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Any formal notice

2017-10-26 Thread Chuck Hill
But don’t ask him about Icelandic Sheep!  Or Hakarl for that matter.


On 2017-10-26, 4:08 PM, "Webobjects-dev on behalf of Hugi Thordarson" 
 wrote:

All I can say is that since the WOCommunity Association took out that gag 
order I'm not allowed to talk to the media about WO anymore.



> On 26 Oct 2017, at 22:52, Alan Ward  wrote:
> 
> I heard that Goat Herding is the new WO.
> 
> Alan
> 
>> On Oct 26, 2017, at 1:24 PM, Ken Anderson  wrote:
>> 
>> At least the WO union is in better shape than the united states… :(
>> 
>>> On Oct 26, 2017, at 10:21 AM, Gino Pacitti  wrote:
>>> 
>>> I do not think I am the first to notice the lack of activity on this 
list but I was just interested to know what was the State of the Union?
>>> 
>>> Gino
>>> ___
>>> 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/kenlists%40anderhome.com
>>> 
>>> This email sent to kenli...@anderhome.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/award%40apple.com
>> 
>> This email sent to aw...@apple.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/hugi%40karlmenn.is
> 
> This email sent to h...@karlmenn.is

 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Any formal notice

2017-10-26 Thread Chuck Hill
I am still saving my pennies for a Dream Goat Farm in New Zealand.
http://www.mirror.co.uk/news/uk-news/couple-quit-high-flying-city-7565610


On 2017-10-26, 3:53 PM, "Webobjects-dev on behalf of Alan Ward" 
 wrote:

I heard that Goat Herding is the new WO.

Alan

> On Oct 26, 2017, at 1:24 PM, Ken Anderson  wrote:
> 
> At least the WO union is in better shape than the united states… :(
> 
>> On Oct 26, 2017, at 10:21 AM, Gino Pacitti  wrote:
>> 
>> I do not think I am the first to notice the lack of activity on this 
list but I was just interested to know what was the State of the Union?
>> 
>> Gino
>> ___
>> 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/kenlists%40anderhome.com
>> 
>> This email sent to kenli...@anderhome.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/award%40apple.com
> 
> This email sent to aw...@apple.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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Database access

2017-10-26 Thread Chuck Hill
Hi André,

I think there must be  more to this than you have written here.  The only way 
that I can think of that (1) could happen is if you have multiple threads 
(maybe in multiple application instances) that are all writing to the same row 
in the database.  If saveChanges() does not throw, the change has already been 
written to the database and committed.

For (2) try re-fetching the EO(s) using a fetch spec with 
setRefreshesRefetchedObjects(true).  If that is not showing the correct 
numbers, then I have no idea what is happening.

Chuck

On 2017-10-26, 2:08 PM, "Webobjects-dev on behalf of André Rothe" 
 wrote:

Hi,

some more questions:

1. I have a thread, which runs a long time. To store the current status, 
I use an EO, which has an attribute called "completed". This attribute I 
set to 10% or 50% and so on. After a value change, I call 
ec.saveChanges(). But it seems, that the values are not visible in the 
database in the correct chronologically order. Sometimes I see 90, than 
I see 60 again. How can I force the write access to the database backend 
for the specific EO?

2. The attribute above I try to read in another EdititingContext. But I 
always see 0% (the start value) and after the thread finishes, I will 
see 100%. But it is not possible to get other values as long as the 
second thread runs. I have tried ec.invalidateObjectsWithGlobalIDs(ids), 
but it did not work as expected, "completed" returns always 0%. How I 
can force the EditingContext to read the current value from the 
database?

Thank you
Andre
 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: Wonder upgrade 6 to 7

2017-10-13 Thread Chuck Hill
Hi Rachel,

The problem with that property seems to be that two different pieces of code 
are using it and one still has the old name.

The question you really need to answer is why the principal class getting 
initialized is affecting your DB connection:
https://github.com/wocommunity/wonder/blob/master/Frameworks/EOAdaptors/JavaERJDBCAdaptor/Sources/er/jdbcadaptor/PrincipalClass.java

All that is doing is setting the delegate:
https://github.com/wocommunity/wonder/blob/master/Frameworks/EOAdaptors/JavaERJDBCAdaptor/Sources/er/jdbcadaptor/ERAdaptorContextDelegate.java

I had a brief look at this and did not see anything that looked suspicious.

Chuck


From: Rachel Han <rachel@vmlabs.id.au>
Date: Thursday, October 12, 2017 at 8:45 PM
To: Chuck Hill <ch...@gevityinc.com>
Subject: Re: Wonder upgrade 6 to 7

Hi Chuck,

Thank you so much for your reply. :)

So I went to check why the build.properties file in JavaJDBCAdaptor framework 
get changed from the git history, then I find 
this:(https://github.com/wocommunity/wonder/commit/3b4161daefdc883e0ce7f69bb8dbeea5003b05f6#diff-443c66aa35046e768ef88a148b081593)

Here are the comments on the commit:



ressurect principalClass property

Temporarily ressurect the principalClass property as the build files bundled 
with WOLips are looking for that instead of project.principal.class and thus 
will produce problems when you run a project within Eclipse instead of running 
the ant build that uses the build.xml files from Wonder. We will remove that 
when WOLips has been updated…



Should I wait for the build.properties get changed back to previous version in 
the future? I will still go through the principle class and see what breaks the 
DB connection and will report back if anything interesting comes up.



Thank you again for your help and it is really appreciated.

Cheers,

Rachel

On 13 October 2017 at 06:03, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:
Hi Rachel,

One clarification: the NSPrincipal class in a bundle (.framework usually), is 
loaded and initialized (static init done) when NSBundle loads the bundle at the 
start of application launch.  That class can then do any runtime configuration 
that the bundle needs.  Something in er.jdbcadaptor.PrincipalClass must be 
doing something that affects your database connections, check the code to see 
what.

This file is generated from the (from memory) woantbuild.properties file in the 
framework.   Or maybe wobuild.properties.

Chuck

From: Webobjects-dev 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com<mailto:gevityinc@lists.apple.com>>
 on behalf of Rachel Han 
<rachel@vmlabs.id.au<mailto:rachel@vmlabs.id.au>>
Date: Wednesday, October 11, 2017 at 5:52 PM
To: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Wonder upgrade 6 to 7

Hi All,

I am a webobjects developer for a few years now and we have a project which is 
about 10 years old, so it is kind of hibernation of legacy and sweetness of 
wonder. We were doing wonder upgrade from 6 to 7 and like to share our 
experience in the forum so it would be of any help if anyone having the same 
issue.


Firstly, of course download wonder7 from jenkins latest build, and copied all 
the frameworks over to Library/Frameworks. And then reopen eclipse oxygen 
(eclipse caches frameworks, so need to be reopened and then clean the project), 
after fixed all the compile error,

Then run the application gave me this exception:

Oct 12 09:21:27 xxx[51032] WARN  NSLog  - An exception occurred while trying to 
open a channel: N/A

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.Exceptions  - Database 
Exception occured: java.lang.IllegalStateException: _obtainOpenChannel -- 
er.extensions.eof.ERXDatabaseContext 
er.extensions.eof.ERXDatabaseContext@4e31276e: failed to open database channel. 
 Check your connection dictionary, and ensure your database is correctly 
configured.

Oct 12 09:21:27 xxx[51032] INFO  er.extensions.eof.ERXDatabaseContextDelegate  
- xxx: {username = "xxx"; driver = "oracle.jdbc.driver.OracleDriver"; 
DataSourceJndiName = "xxx"; password = ""; URL = 
"jdbc:oracle:thin:@xxx"; }

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Checking JDBC connection with information {username = "xxx"; driver = 
"oracle.jdbc.driver.OracleDriver"; DataSourceJndiName = "xxx"; password = 
""; URL = "jdbc:oracle:thin:@xxx"; }

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Trying to create JDBCAdaptor...

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Successfully cre

Re: Object registered within another EditingContext

2017-10-13 Thread Chuck Hill
A correction: ec.lock() does not lock the object store.  The object store only 
gets locked when operations that may change EO state are performed - fetching 
and saving being the most common.

Chuck


From: Webobjects-dev 
 on behalf of René 
Bock 
Date: Friday, October 13, 2017 at 1:14 AM
To: Paul Hoadley 
Cc: WebObjects-Dev 
Subject: Re: Object registered within another EditingContext

Hi,

just creating a new EOEditingContext for the background task may lead to nasty 
deadlocks, as this EC refers to the default object store.  As an ec.lock()  
locks its object store, so locking the ec  in the background  task has a side 
effect to the ECs in the main (worker) thread.

You may consider to use ERXTask, which relies on a separate object store 
coordinator. (there is nice screencast about this topic in the WOCommunity 
space)

The downside will be, that you have more open database connections and an 
increased heap footprint.


Am 13.10.2017 um 00:42 schrieb Paul Hoadley 
>:

Hi André,

On 13 Oct 2017, at 04:53, André Rothe 
> wrote:

Then I have created a thread with a new EditingContext to insert a lot of 
detail records, which have a reference to the first inserted record.

You need to take some additional care when working in a background thread.

1. Don’t pass an existing EOEditingContext into a background thread, create a 
new one—you’re doing this.

2. Don’t pass existing EOs into a background thread, pass in the object’s 
EOGlobalID, and then get the object in the thread using that ID.

* ERXEOControlUtilities.convertEOtoGID()
* ERXEOControlUtilities.convertGIDtoEO()

3. There are some classes in er.extensions.concurrency that you might find 
helpful, though I’ve never used them. If you just want to use regular Java 
concurrency features, remember to handle EC locking/unlocking yourself:

ec.lock();
try {
  // ...
} finally {
  ec.unlock();
}

(On the main thread, Wonder handles locking/unlocking for you.)


--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/


___
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/bock%40salient-doremus.de

This email sent to b...@salient-doremus.de

Mit freundlichen Grüßen

René Bock

--
Telefon: +49 69 650096 18

salient GmbH, Lindleystraße 12, 60314 Frankfurt
Telefon Zentrale: 069 / 65 00 96 - 0  |  
www.salient-doremus.de

 ___
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 upgrade 6 to 7

2017-10-12 Thread Chuck Hill
Hi Rachel,

One clarification: the NSPrincipal class in a bundle (.framework usually), is 
loaded and initialized (static init done) when NSBundle loads the bundle at the 
start of application launch.  That class can then do any runtime configuration 
that the bundle needs.  Something in er.jdbcadaptor.PrincipalClass must be 
doing something that affects your database connections, check the code to see 
what.

This file is generated from the (from memory) woantbuild.properties file in the 
framework.   Or maybe wobuild.properties.

Chuck

From: Webobjects-dev 
 on behalf of 
Rachel Han 
Date: Wednesday, October 11, 2017 at 5:52 PM
To: "webobjects-dev@lists.apple.com" 
Subject: Wonder upgrade 6 to 7

Hi All,

I am a webobjects developer for a few years now and we have a project which is 
about 10 years old, so it is kind of hibernation of legacy and sweetness of 
wonder. We were doing wonder upgrade from 6 to 7 and like to share our 
experience in the forum so it would be of any help if anyone having the same 
issue.


Firstly, of course download wonder7 from jenkins latest build, and copied all 
the frameworks over to Library/Frameworks. And then reopen eclipse oxygen 
(eclipse caches frameworks, so need to be reopened and then clean the project), 
after fixed all the compile error,

Then run the application gave me this exception:

Oct 12 09:21:27 xxx[51032] WARN  NSLog  - An exception occurred while trying to 
open a channel: N/A

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.Exceptions  - Database 
Exception occured: java.lang.IllegalStateException: _obtainOpenChannel -- 
er.extensions.eof.ERXDatabaseContext 
er.extensions.eof.ERXDatabaseContext@4e31276e: failed to open database channel. 
 Check your connection dictionary, and ensure your database is correctly 
configured.

Oct 12 09:21:27 xxx[51032] INFO  er.extensions.eof.ERXDatabaseContextDelegate  
- xxx: {username = "xxx"; driver = "oracle.jdbc.driver.OracleDriver"; 
DataSourceJndiName = "xxx"; password = ""; URL = 
"jdbc:oracle:thin:@xxx"; }

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Checking JDBC connection with information {username = "xxx"; driver = 
"oracle.jdbc.driver.OracleDriver"; DataSourceJndiName = "xxx"; password = 
""; URL = "jdbc:oracle:thin:@xxx"; }

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Trying to create JDBCAdaptor...

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Successfully created adaptor class er.extensions.jdbc.ERXJDBCAdaptor

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Trying to create plugin...

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Created plugin class com.webobjects.jdbcadaptor.EROraclePlugIn

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Trying to load JDBC driver oracle.jdbc.driver.OracleDriver...

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Successfully loaded JDBC driver oracle.jdbc.driver.OracleDriver

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
JDBC driver and plugin are loaded, trying to connect...

Oct 12 09:21:27 xxx[51032] INFO  er.transaction.adaptor.ConnectionAnalyzer  - 
Error: Exception thrown while connecting.

Check exception message carefully.

Oct 12 09:21:27 xxx[51032] ERROR er.transaction.adaptor.ConnectionAnalyzer  - 
No connection.

Oct 12 09:21:27 xxx[51032] WARN  NSLog  - A fatal exception occurred: 
_obtainOpenChannel -- er.extensions.eof.ERXDatabaseContext 
er.extensions.eof.ERXDatabaseContext@4e31276e: failed to open database channel. 
 Check your connection dictionary, and ensure your database is correctly 
configured.

[2017-10-12 9:21:27 AEDT]  java.lang.IllegalStateException: 
_obtainOpenChannel -- er.extensions.eof.ERXDatabaseContext 
er.extensions.eof.ERXDatabaseContext@4e31276e: failed to open database channel. 
 Check your connection dictionary, and ensure your database is correctly 
configured.

at 
com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel(EODatabaseContext.java:1967)

Then, for the purpose of pinpointing exactly which framework is causing this 
error, I tried to upgrade the frameworks batch by batch. so firstly I upgraded 
all frameworks in wonder/core, and again reopen eclipse and clean, the 
application started up ok. Secondly, I upgraded all frameworks in EOAdaptor, 
the application did not start up and gave me the error, so it is obviously one 
of the frameworks in EOAdaptor is causing the issue. At this moment, everything 
looks simple enough, we only were using JavaERJDBCAdaptor framework.

After comparing everything in the JavaERJDBCAdaptor framework between wonder6 
and wonder7, only one difference is in the info.plist file

in wonder7, these two 

Re: Object registered within another EditingContext

2017-10-12 Thread Chuck Hill
localInstance is the correct answer.

Chuck

From: Webobjects-dev 
 on behalf of 
Theodore Petrosky 
Date: Thursday, October 12, 2017 at 11:42 AM
To: André Rothe 
Cc: WebObjects-Dev 
Subject: Re: Object registered within another EditingContext

I don’t know if this could help but, in the generated code of an entity is a 
method:  (localInstanceIn)

  public com.eltek.model.Person localInstanceIn(EOEditingContext 
editingContext) {
com.eltek.model.Person localInstance = 
(com.eltek.model.Person)EOUtilities.localInstanceOfObject(editingContext, this);
if (localInstance == null) {
  throw new IllegalStateException("You attempted to localInstance " + this 
+ ", which has not yet committed.");
}
return localInstance;
  }

of course you could create a new entity in your new editingContext and copy 
over the attributes, or as you suggest fetch the entity again (in the new 
editingContext).

I would look for what has the least keystrokes.

Ted

On Oct 12, 2017, at 2:23 PM, André Rothe 
> wrote:

Hi,

I have insert an object into the default EditingContext (from session). Then I 
have created a thread with a new EditingContext to insert a lot of detail 
records, which have a reference to the first inserted record. WebObjects says 
now:

Cannot obtain globalId for an object which is registered in an other than the 
databaseContext's active editingContext

It is clear, that the first record is registered within the default 
EditingContext and not in my second EC. Can I register the object on the latter 
EC or should I simply fetch the record again?

Thank you
Andre
___
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/tedpet5%40yahoo.com

This email sent to tedp...@yahoo.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: Display database content on a page

2017-10-06 Thread Chuck Hill
And it will also show you the correct and effective way to leverage WO and 
Wonder.  The architecture is quite different from most other frameworks and if 
you don’t make the adjustment to that, you will be forever struggling against 
the intention of the frameworks.

Chuck


From: Webobjects-dev 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf of 
Markus Ruggiero <mailingli...@kataputt.com>
Date: Friday, October 6, 2017 at 6:51 AM
To: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com>
Subject: Re: Display database content on a page

Hi Andre,

I am the author of Learning the Wonders. If you have any question regarding the 
book you can reach me here or directly by writing to 
aut...@learningthewonders.com<mailto:aut...@learningthewonders.com>. I'll be 
glad to help you get started.

---markus---

PS
Chuck and Theo, thanks for the recommendation :-)))
Yes, I use the book as official coursebook in formal education in Switzerland 
for the module "Object Oriented implementation of Multiuser Applications". This 
in itself has nothing to do with Wonder but everything with oo-concepts and I 
use Wonder/WebObjecs as a showcase for clean oo design.


On 5 Oct 2017, at 23:12, Theodore Petrosky 
<tedp...@yahoo.com<mailto:tedp...@yahoo.com>> wrote:

"Learning the Wonders" is the best book to start with. The author uses that 
book in classes he teaches (I believe in Germany).

I would recommend that book to start with over the others that are available.

All of the videos are available in the iTunes podcasts. I know the other links 
sometimes don’t work.

Use the iTunes podcasts. go to podcasts, then select Store, then search for 
WebObjects.

I know you mentioned that you viewed the two chapters of Leaning the Wonders. 
It really gets going after that.

Ted




On Oct 5, 2017, at 3:31 PM, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

Here is a good place to start:

https://www.amazon.com/Learning-Wonders-Markus-Ruggiero-ebook/dp/B00FCDHDAA
http://learningthewonders.com


Chuck

On 2017-10-05, 12:25 PM, "Webobjects-dev on behalf of André Rothe" 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com on behalf of 
andre.ro...@phosco.info> wrote:

  Am 2017-10-05 20:10, schrieb Theodore Petrosky:

You are working too hard!

  :-)


you need to look at all the examples. what you are asking for is so
simple (when you know how).

  LOL, exact. When you know how and where... The problem is, that a lot of
  WebObjects links on the internet are dead.


Have you used EOModeler to build your model?

  Yes, I have.


I recommend you look at these videos:

  50% of these videos I have already watched (and downloaded). A lot
  things you don't understand at the first time you will watch the video,
  because the WO community has its own "language", so it is hard to follow
  the concepts.

  Nevertheless, I have downloaded the examples for the WebObjects
  Developer's Guide. This book is not bad, but it doesn't summarize the
  workflows. So I have to read all the pages to find a hint for a specific
  problem. That is also a problem to find something, if you cannot name
  the problem with the correct "WO Community term".

  My question refers to WOTable. In the meantime I have decompiled
  WORepetition and find out, that you have to set components into the
  WOTable tags, one component for every column of the database table,
  which I need. The output of WOTable base on the "list" attribute, which
  needs an NSArray or List and the "item" attribute, which is of the type
  of the underlying database table.

  As I sent my question, I thought, that WOTable creates output for all
  attributes of the "item" automatically, so I tried to reduce the
  attributes of "item" before it will be visible to WOTable. But that was
  a fault.

  Sorry for my "simple" questions, but this is a learning process. And
  there are almost 20 years between my knowlegde of WebObjects and the
  knowledge of the other readers here.

  Best regards
  Andre
   ___
  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/chill%40gevityinc.com

  This email sent to ch...@gevityinc.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/mailinglists%40kataputt.com

This email sent to mailingli...@kataputt.com

 __

Re: Display database content on a page

2017-10-05 Thread Chuck Hill
Here is a good place to start:

https://www.amazon.com/Learning-Wonders-Markus-Ruggiero-ebook/dp/B00FCDHDAA
http://learningthewonders.com


Chuck

On 2017-10-05, 12:25 PM, "Webobjects-dev on behalf of André Rothe" 
 wrote:

Am 2017-10-05 20:10, schrieb Theodore Petrosky:
> You are working too hard!

:-)

> you need to look at all the examples. what you are asking for is so
> simple (when you know how).

LOL, exact. When you know how and where... The problem is, that a lot of 
WebObjects links on the internet are dead.

> Have you used EOModeler to build your model?

Yes, I have.

> I recommend you look at these videos:

50% of these videos I have already watched (and downloaded). A lot 
things you don't understand at the first time you will watch the video, 
because the WO community has its own "language", so it is hard to follow 
the concepts.

Nevertheless, I have downloaded the examples for the WebObjects 
Developer's Guide. This book is not bad, but it doesn't summarize the 
workflows. So I have to read all the pages to find a hint for a specific 
problem. That is also a problem to find something, if you cannot name 
the problem with the correct "WO Community term".

My question refers to WOTable. In the meantime I have decompiled 
WORepetition and find out, that you have to set components into the 
WOTable tags, one component for every column of the database table, 
which I need. The output of WOTable base on the "list" attribute, which 
needs an NSArray or List and the "item" attribute, which is of the type 
of the underlying database table.

As I sent my question, I thought, that WOTable creates output for all 
attributes of the "item" automatically, so I tried to reduce the 
attributes of "item" before it will be visible to WOTable. But that was 
a fault.

Sorry for my "simple" questions, but this is a learning process. And 
there are almost 20 years between my knowlegde of WebObjects and the 
knowledge of the other readers here.

Best regards
Andre
 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: WOXMLDecoder not thread safe

2017-09-07 Thread Chuck Hill
Hi Terry,

There is no magic, just don’t share it between threads.  That means no keeping 
it in a static variable for sure.  And don’t keep it in an instance variable in 
an object that can be accessed by multiple threads (e.g on the Application).  
If your requests are session based, then keeping it in the session should be 
OK.  If they are not, then create a new instance in the action where you need 
to use it.

Chuck

From: Webobjects-dev 
 on behalf of 
"Soles, James T" 
Date: Wednesday, September 6, 2017 at 12:19 PM
To: "webobjects-dev@lists.apple.com" 
Cc: eval-dev 
Subject: WOXMLDecoder not thread safe

All,

I've seen some comments when searching that indicate that WOXMLDecoder is not 
thread safe.  However, I've not found anything that indicates how to resolve 
this or any workarounds.

First, is it true that WOXMLDecoder is not thread safe?

If so, are there any options to resolve this or workarounds?  We are using it 
to read and parse a string on an incoming web service call.  Recently we have 
started seeing a lot of parser errors 
(com.webobjects.foundation.NSForwardException for org.xml.sax.SAXException: 
FWK005 parse may not be called while parsing.) when it appears that we receive 
many calls to our web service at about the same time.

Any thoughts or suggestions are welcome.

Thanks,

Terry Soles

214-273-3916
 ___
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: Enforcing a maximum cardinality on a many-to-many relationship

2017-08-15 Thread Chuck Hill
Hi Paul,

For cases like this, the database is the right, and only, place to guarantee 
this.

Chuck

From: Webobjects-dev 
 on behalf of Paul 
Hoadley 
Date: Monday, August 14, 2017 at 7:11 PM
To: WebObjectsDev 
Subject: Enforcing a maximum cardinality on a many-to-many relationship

Hello,

I have EOs Job and Worker. Job.workers is a many-to-many relationship to 
Worker, set up in the usual way, so there’s a JobWorker join table. 
Job.maxWorkers is a mandatory Integer attribute whose value will be 1 or 
greater.

I need to enforce a business rule such that Job.workers.count can never exceed 
Job.maxWorkers. It’s sufficient that this is enforced at save-time: if a 
particular in-memory Job has addToWorkersRelationship() called on it too many 
times, I’m not too bothered, but it can’t be saved that way. Further, it needs 
to be robust in the presence of multiple EOF stacks. (And although we use 
JGroups synchronisation in deployment, assume that we don’t. The sync may not 
happen fast enough.)

To me this sounds like a problem for database triggers: reject an insert on 
JobWorker that would cause Job.workers.count to exceed Job.maxWorkers for the 
referenced Job. Before I launch into that, though, does anyone know of (or can 
anyone think of) a robust EOF-only solution to this problem?


--
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: Active Directory, JNDI, EOModel

2017-07-25 Thread Chuck Hill
You might want to consider a custom LDAPPlugin, it is a subclass of the JNDI 
one.  That seems like the appropriate place to set this.

Chuck


On 2017-07-25, 9:24 AM, "Tim Worman" <li...@thetimmy.com> wrote:

Thanks (as always) Chuck!

I tested out the URL approach and it works. I’m also connecting to port 
3268 instead of 389 per this:


https://stackoverflow.com/questions/16412236/how-to-resolve-javax-naming-partialresultexception.

That’s solved everything for now and it looks like including the search 
base in the URL is a somewhat standard way to go. I’m still gonna investigate 
some more code-centric ways of handling it - seems less brittle.

JNDIAdaptor does not expose the search base attribute. It does expose the 
connection dictionary - so I’m guessing you could read it and add a key/value 
pair for the search base, which I think would update the wrapped DirContext.

Tim


> On Jul 24, 2017, at 11:56 AM, Chuck Hill <ch...@gevityinc.com> wrote:
> 
> Hi Tim,
>  
> Take a look at the JNDIAdaptor class.  There are connection dictionary 
parameters in there, one of those might be what you want.  Or can you specify 
that on the connection URL?
>  
> Chuck
>  
>  
> From: Tim Worman <li...@thetimmy.com>
    > Date: Monday, July 24, 2017 at 11:43 AM
> To: Chuck Hill <ch...@gevityinc.com>
> Cc: WebObjects Development <webobjects-dev@lists.apple.com>
> Subject: Re: Active Directory, JNDI, EOModel
>  
> Using Wireshark, below is what I’m seeing for the two queries. The 
biggest difference right off the bat is that the WO/EOModel search seems to 
search ROOT as the base DN whereas the Apache DirectoryStudio is using 
“DC=adinstance,DC=ucla,DC=edu” as the base. The WO/EOModel search also appears 
to have additional objectClass ‘AND’ filters.
>  
> Looks like my first guess was somewhat likely - I need to find a way to 
get a handle on the query and feed a base DN to my fetch in WO.
>  
> It looks like this might be a way to set that:
> JNDIPlugin - base
>  
> But I’m wondering if there is a way to set it once at the launch of an 
app and not have to set it again.
>  
> 
>  
> From WebObjects:
> Lightweight Directory Access Protocol
> LDAPMessage searchRequest(2) "" wholeSubtree
> messageID: 2
> protocolOp: searchRequest (3)
> searchRequest
> baseObject: 
> scope: wholeSubtree (2)
> derefAliases: derefAlways (3)
> sizeLimit: 0
> timeLimit: 3601
> typesOnly: False
> Filter: (objectClass=user)
> filter: and (0)
> and: (objectClass=user)
> and: 1 item
> Filter: (objectClass=user)
> attributes: 0 items
> [Response In: 8]
> controls: 1 item
> Control
> controlType: 2.16.840.1.113730.3.4.2 (Manage DSA IT 
LDAPv3 control)
>  
> From Apache Directory Studio:
> Lightweight Directory Access Protocol
> LDAPMessage searchRequest(14) “DC=adinstance,DC=ucla,DC=edu" 
wholeSubtree
> messageID: 14
> protocolOp: searchRequest (3)
> searchRequest
> baseObject: DC=adinstance,DC=ucla,DC=edu
> scope: wholeSubtree (2)
> derefAliases: derefAlways (3)
> sizeLimit: 1000
> timeLimit: 0
> typesOnly: False
> Filter: (objectClass=user)
> filter: equalityMatch (3)
> equalityMatch
> attributeDesc: objectClass
> assertionValue: user
> attributes: 2 items
> AttributeDescription: cn
> AttributeDescription: objectClass
> [Response In: 2]
>  
> 
> 
> On Jul 21, 2017, at 12:58 PM, Chuck Hill <ch...@gevityinc.com> wrote:
> 
> Try going through a proxy like Charles.  Comparing what is sent from WO 
and from Directory Studio might highlight what is wrong.  I am sure that I did 
this many years ago, but the details escape me.  Microsoft’s standard is just a 
little…different.
> 
> Chuck
> 
> On 2017-07-21, 12:56 PM, "Webobjects-d

Re: Active Directory, JNDI, EOModel

2017-07-21 Thread Chuck Hill
Try going through a proxy like Charles.  Comparing what is sent from WO and 
from Directory Studio might highlight what is wrong.  I am sure that I did this 
many years ago, but the details escape me.  Microsoft’s standard is just a 
little…different.

Chuck

On 2017-07-21, 12:56 PM, "Webobjects-dev on behalf of Tim Worman" 
 wrote:

Yeah, I’m not using the model for authentication to AD, I’m intending to 
use simply to return EO's from AD. I’m encountering the error below when I 
simply try:

ADUser.fetchAllADUsers(pageEditingContext());

The WARN log seems to indicate that I can’t search objectClass “user.” But 
it is modeled and was reverse engineered. I’m unsure why that would be 
considering I haven’t had that issue before with other ldap services.

Tim

> On Jul 21, 2017, at 12:50 PM, Theodore Petrosky  wrote:
> 
> did you see this:
> 
> https://www.slideshare.net/wocommunity/third-party-auth-in-webobjects
> 
> I was looking to see if there was a video to go along with the slides but 
didn’t find one.
> 
> 
>> On Jul 21, 2017, at 3:10 PM, Tim Worman  wrote:
>> 
>> Has anyone used the JNDI plugin to model Active Directory? I’ve used it 
with a lot of success with other ldap directories but I’m running into a 
problem with a pretty simple model (which I’m sure has to do with AD’s 
implementation).
>> 
>> I reverse engineered our AD (Server 2016) instance with no problem - and 
only included Person and User in my model. However, when I try to do a simple 
fetch of all User (or Person) I get sth like:
>> 
>> Jul 21 11:11:23 GSEISNetTestApplication[54777] DEBUG NSLog  - Waiting 
for requests...
>> Jul 21 11:11:24 GSEISNetTestApplication[54777] WARN  
er.extensions.eof.ERXModelGroup  - Clearing previous class descriptions
>> Jul 21 11:11:24 GSEISNetTestApplication[54777] DEBUG NSLog  - Context 
factory cache is already clear
>> Jul 21 11:11:24 GSEISNetTestApplication[54777] DEBUG NSLog  - 
Connecting: {plugInClassName = "com.webobjects.jndiadaptor.LDAPPlugIn"; timeout 
= "3600"; scope = "Subtree"; username = "CN="Application Server",OU="Service 
Accounts",OU=ETU,DC=gseisnet,DC=ucla,DC=edu"; authenticationMethod = "Simple"; 
password = ""; serverUrl = "ldap://gseisnet.ucla.edu:389;; 
initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory"; }
>> Jul 21 11:11:24 GSEISNetTestApplication[54777] DEBUG NSLog  - Creating 
plug-in com.webobjects.jndiadaptor.LDAPPlugIn for JNDIAdaptor@1084219182
>> Jul 21 11:11:24 GSEISNetTestApplication[54777] WARN  NSLog  - Cannot 
search (&(objectClass=user))
>> [2017-7-21 11:11:24 PDT]  
javax.naming.NameNotFoundException: [LDAP: error code 32 - 208D: NameErr: 
DSID-0310021B, problem 2001 (NO_OBJECT), data 0, best match of:
>>  ''
>> ]; remaining name ''
>> 
>> When I use Directory Studio to perform what appears to be the same 
search, filtering on objectClass user, I get the results I would expect. I’m 
using the same bind credentials in both as well. One guess I have is the search 
base, which I have set to the base DN in Directory Studio. Is there a way to 
get a handle on the JNDI adaptor and set the search base globally in case it 
isn’t right?
>> 
>> Any other ideas? I know I’m probably off the reservation here.
>> 
>> Tim
>> UCLA GSE
>> ___
>> 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/tedpet5%40yahoo.com
>> 
>> This email sent to tedp...@yahoo.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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: java.util.logging and Maven builds

2017-06-27 Thread Chuck Hill
It is all a nightmare which will be resolved by retirement.  :-P

On the bright side, you could be committing PHP all day long.



From: Paul Hoadley <pa...@logicsquad.net>
Date: Tuesday, June 27, 2017 at 4:42 PM
To: Chuck Hill <ch...@gevityinc.com>
Cc: WebObjects Development <webobjects-dev@lists.apple.com>, Hugi Thordarson 
<h...@karlmenn.is>
Subject: Re: java.util.logging and Maven builds

Hi Chuck,

On 28 Jun 2017, at 03:59, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

What you are describing seems to be the intent of this part of Java:

If "java.util.logging.config.class" property is not set, then the 
"java.util.logging.config.file" system property can be used to specify a 
properties file (in java.util.Properties format). The initial logging 
configuration will be read from this file.
If neither of these properties is defined then, as described above, the 
LogManager will read its initial configuration from a properties file 
"lib/logging.properties" in the JRE directory.

I did not see any mention of a default file name or location, other than the 
JRE one.

Thanks for doing my research for me! That would seem to explain everything. 
Well, everything except that Eclipse seems to pick up logging.properties from 
src/main/resources, which must be what set my expectation for how things would 
work in deployment. Unless I imagined even that. I’ve moved on. I’m putting 
this episode behind me…


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: java.util.logging and Maven builds

2017-06-27 Thread Chuck Hill
It is all a nightmare which will be resolved by retirement.  :-P

On the

From: Paul Hoadley <pa...@logicsquad.net>
Date: Tuesday, June 27, 2017 at 4:42 PM
To: Chuck Hill <ch...@gevityinc.com>
Cc: WebObjects Development <webobjects-dev@lists.apple.com>, Hugi Thordarson 
<h...@karlmenn.is>
Subject: Re: java.util.logging and Maven builds

Hi Chuck,

On 28 Jun 2017, at 03:59, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

What you are describing seems to be the intent of this part of Java:

If "java.util.logging.config.class" property is not set, then the 
"java.util.logging.config.file" system property can be used to specify a 
properties file (in java.util.Properties format). The initial logging 
configuration will be read from this file.
If neither of these properties is defined then, as described above, the 
LogManager will read its initial configuration from a properties file 
"lib/logging.properties" in the JRE directory.

I did not see any mention of a default file name or location, other than the 
JRE one.

Thanks for doing my research for me! That would seem to explain everything. 
Well, everything except that Eclipse seems to pick up logging.properties from 
src/main/resources, which must be what set my expectation for how things would 
work in deployment. Unless I imagined even that. I’ve moved on. I’m putting 
this episode behind me…


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: java.util.logging and Maven builds

2017-06-27 Thread Chuck Hill
Hi Paul,

What you are describing seems to be the intent of this part of Java:

If "java.util.logging.config.class" property is not set, then the 
"java.util.logging.config.file" system property can be used to specify a 
properties file (in java.util.Properties format). The initial logging 
configuration will be read from this file.
If neither of these properties is defined then, as described above, the 
LogManager will read its initial configuration from a properties file 
"lib/logging.properties" in the JRE directory.

I did not see any mention of a default file name or location, other than the 
JRE one.
Chuck

From: Paul Hoadley <pa...@logicsquad.net>
Date: Monday, June 26, 2017 at 8:32 PM
To: WebObjects Development <webobjects-dev@lists.apple.com>
Cc: Hugi Thordarson <h...@karlmenn.is>, Chuck Hill <ch...@gevityinc.com>
Subject: Re: java.util.logging and Maven builds

For the archives:

On 24 Jun 2017, at 10:18 am, Paul Hoadley 
<pa...@logicsquad.net<mailto:pa...@logicsquad.net>> wrote:

If you'd like, here's a workaround: You can force maven to copy the java 
resources (or certain resources). But of course, this is less than optimal.

https://gist.github.com/hugith/a2ece8632ab33b994403ff9a04722fc1

Thanks Hugi I’ll check that out.

Unbelievably, that’s not the complete fix. That copies logging.properties into 
the root of the application’s JAR, but java.util.logging _still_ doesn’t 
automatically find it. It allows me to change this startup parameter:

-Djava.util.logging.config.file="Contents/Resources/logging.properties”

to this:

-Djava.util.logging.config.file=logging.properties

at which point I think that's as good as we’re going to get. (I’ve never used 
java.util.logging before, and now I know why!)


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: Application no longer responding after OSX and Server update

2017-06-26 Thread Chuck Hill
Hi Louis,

You should always make a back up of httpd.conf when doing this.  Apple loves to 
fiddle.

Not Found
The requested URL /cgi-bin/WebObjects/Alexandria was not found on this server.

Means that it is not seeing cgi-bin as a script directory.  Check these 
sections of the Apache config:

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client.  The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) 
"/Library/WebServer/CGI-Executables/$1"

#
# "/Library/WebServer/CGI-Executables" should be changed to whatever your 
ScriptAliased
# CGI directory exists, if you have that configured.
#

AllowOverride None
Options None
Require all granted



Chuck

From: Webobjects-dev 
 on behalf of Louis 
Demers 
Date: Monday, June 26, 2017 at 11:15 AM
To: "webobjects-dev@lists.apple.com" 
Subject: Application no longer responding after OSX and Server update

Hi,

applied to our OSX server this morning the latest os and server versions. Now 
ou app is no longer responding

wotasd is running without error

Javamonitor is running without error

application is running whether started from Javamonitor or manually

accessing the application  with 
http://alexandria.obzerv.com/cgi-bin/WebObjects/Alexandria yields

Not Found
The requested URL /cgi-bin/WebObjects/Alexandria was not found on this server.


accessing the application  with http://alexandria.obzerv.com:2001/ yields

Safari can't open page
Safari can't open page ... because the server unexpectedly dropped the 
connection...


Any clue ?

Louis Demers Eng.
louisdem...@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: Maven: trying to filter Properties breaks Eclipse launch

2017-06-25 Thread Chuck Hill
No, it is not meant to be.

From: Paul Hoadley <pa...@logicsquad.net>
Date: Saturday, June 24, 2017 at 11:43 PM
To: Chuck Hill <ch...@gevityinc.com>
Cc: WebObjects Development <webobjects-dev@lists.apple.com>
Subject: Re: Maven: trying to filter Properties breaks Eclipse launch

On 25 Jun 2017, at 2:59 pm, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

Is the pom.xml getting copied into target/?

No, though I don’t think it’s meant to be.


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: Maven: trying to filter Properties breaks Eclipse launch

2017-06-24 Thread Chuck Hill
Is the pom.xml getting copied into target/?

From: Webobjects-dev 
 on behalf of Paul 
Hoadley 
Date: Saturday, June 24, 2017 at 10:11 PM
To: WebObjects Development 
Subject: Maven: trying to filter Properties breaks Eclipse launch

Hi Maveners,

I seem to have hit yet another Maven resource-related issue. I’ve got a project 
that doesn’t do anything non-standard with src/main/resources. (It’s the same 
project I was talking about a couple of days ago, but I haven’t, for example, 
used Hugi’s 'copy-resources’ hack yet to get logging.properties into the right 
place—I will sort that out later.) All I want to do is filter Properties on 
build so that some Maven-related properties are substituted with their 
build-time values. I’ve just added this to the POM:


  
Resources
${basedir}/src/main/resources
true
  


At which point Eclipse loses its mind on application launch:

2017-06-25 05:00:28 Rescue[63636] DEBUG NSLog  - : Warning - 
Unable to find project at path 
/Users/paulh/Projects/WebObjects/GitRepos/Rescue/target/classes - Ignoring 
project.
[2017-6-25 5:0:28 UTC]  com.webobjects.foundation.NSForwardException 
[java.lang.StringIndexOutOfBoundsException] String index out of range: 
-1:java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at 
com.webobjects._ideservices._IDEProjectWOLips.wolipsProjectFromEclipseProject(_IDEProjectWOLips.java:78)
at 
com.webobjects._ideservices._IDEProjectWOLips.wolipsProjectAtPath(_IDEProjectWOLips.java:87)
at com.webobjects._ideservices._WOProject.ideProjectAtPath(_WOProject.java:110)
at 
com.webobjects.appserver._private.WOProjectBundle._isProjectBundlePath(WOProjectBundle.java:226)

This happens a few times, and the application fails to launch because it can’t 
find any of the components. Indeed, the layout under target/classes does look 
very different based on whether that resource block is present in the POM, but 
I’ve done this in other projects and it works fine. To be clear, the built 
bundle looks fine if I manually run ‘mvn package’, it’s just Eclipse that can’t 
seem to launch the app.

Hugi—you seen this before? Any guesses?


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: java.util.logging and Maven builds

2017-06-23 Thread Chuck Hill
As you use more modern Java tools and libraries, it become increasingly 
important to recognize the differences between “The WO Way” and “The Java Way”. 
 Trying to force one to be the other is a recipe for pain.  As you have 
experienced.  :-)   WOLifecyle needs to evolve.

Chuck

From: Paul Hoadley <pa...@logicsquad.net>
Date: Friday, June 23, 2017 at 5:48 PM
To: Hugi Thordarson <h...@karlmenn.is>
Cc: Chuck Hill <ch...@gevityinc.com>, WebObjects Development 
<webobjects-dev@lists.apple.com>
Subject: Re: java.util.logging and Maven builds

Hi Hugi,

On 23 Jun 2017, at 6:17 pm, Hugi Thordarson 
<h...@karlmenn.is<mailto:h...@karlmenn.is>> wrote:

I’m stumped—any Maven aficionados want to chime in?

WOLifecycle modifies the maven standard behaviour by enlisting src/resources 
for WO bundle resources only (equivalent to /Resources in Fluffy Bunny). 
However, the Eclipse compiler doesn't know about WOLifecycle's eccentricities 
and will continue to behaves as if the project is a standard maven project and 
copy the resources in src/main to target/classes. That's why everything works 
during development and blows up in production.

I've mentioned that we should really change this behaviour: Make WOLifecycle 
handle src/resources like a standard maven java project does and then add a 
separate folder for WO bundle resources (app-resources, wo-resources or 
something like that). You can see a bit of discussion in #maven on Slack on 
January 24th. Unfortunately I haven't had the time to actually *do* anything 
about that :).

Ah, yes—I remember the discussion. I also remember not quite having a concrete 
understanding of the problem or how the solution would help. Now that this has 
bitten me, I know _exactly_ what you’re talking about!

If you'd like, here's a workaround: You can force maven to copy the java 
resources (or certain resources). But of course, this is less than optimal.

https://gist.github.com/hugith/a2ece8632ab33b994403ff9a04722fc1

Thanks Hugi I’ll check that out.


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: java.util.logging and Maven builds

2017-06-23 Thread Chuck Hill
Yes, that change to WOLifeCycle is The Right Thing To Do.

Chuck

From: Hugi Thordarson <h...@karlmenn.is>
Date: Friday, June 23, 2017 at 1:47 AM
To: Paul Hoadley <pa...@logicsquad.net>
Cc: Chuck Hill <ch...@gevityinc.com>, WebObjects Development 
<webobjects-dev@lists.apple.com>
Subject: Re: java.util.logging and Maven builds

src/main/resources is a path to a Java resource.  Contents/Resources is a path 
to a WebObjects resource.  Java knows Jacques Schmidt about these.  Only WO 
classes know about this.   Your Maven build needs to get this file into the top 
level directory that the class files are under (would normally go into a 
package, top level is the default package).

logging.properties _does_ get copied from src/main/resources into 
target/classes during build. But it _doesn’t_ make it into the app’s JAR (which 
ends up in Contents/Resources/Java), which I suspect is where it needs to be.

I’m stumped—any Maven aficionados want to chime in?

WOLifecycle modifies the maven standard behaviour by enlisting src/resources 
for WO bundle resources only (equivalent to /Resources in Fluffy Bunny). 
However, the Eclipse compiler doesn't know about WOLifecycle's eccentricities 
and will continue to behaves as if the project is a standard maven project and 
copy the resources in src/main to target/classes. That's why everything works 
during development and blows up in production.

I've mentioned that we should really change this behaviour: Make WOLifecycle 
handle src/resources like a standard maven java project does and then add a 
separate folder for WO bundle resources (app-resources, wo-resources or 
something like that). You can see a bit of discussion in #maven on Slack on 
January 24th. Unfortunately I haven't had the time to actually *do* anything 
about that :).

If you'd like, here's a workaround: You can force maven to copy the java 
resources (or certain resources). But of course, this is less than optimal.

https://gist.github.com/hugith/a2ece8632ab33b994403ff9a04722fc1

Cheers,
- hugi
 ___
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: java.util.logging and Maven builds

2017-06-22 Thread Chuck Hill
Yes, that also works.

From: Paul Hoadley <pa...@logicsquad.net>
Date: Thursday, June 22, 2017 at 10:32 PM
To: Chuck Hill <ch...@gevityinc.com>
Cc: WebObjects Development <webobjects-dev@lists.apple.com>
Subject: Re: java.util.logging and Maven builds

Hi Chuck,

On 23 Jun 2017, at 14:49, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

src/main/resources is a path to a Java resource.  Contents/Resources is a path 
to a WebObjects resource.  Java knows Jacques Schmidt about these.  Only WO 
classes know about this.   Your Maven build needs to get this file into the top 
level directory that the class files are under (would normally go into a 
package, top level is the default package).

Ah, thanks. I’ll look into that. Meanwhile, a workaround is adding an argument 
in JavaMonitor:

-Djava.util.logging.config.file="Contents/Resources/logging.properties”


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: java.util.logging and Maven builds

2017-06-22 Thread Chuck Hill
Hi Paul,

src/main/resources is a path to a Java resource.  Contents/Resources is a path 
to a WebObjects resource.  Java knows Jacques Schmidt about these.  Only WO 
classes know about this.   Your Maven build needs to get this file into the top 
level directory that the class files are under (would normally go into a 
package, top level is the default package).

Chuck


From: Webobjects-dev 
 on behalf of Paul 
Hoadley 
Date: Thursday, June 22, 2017 at 10:07 PM
To: WebObjects Development 
Subject: java.util.logging and Maven builds

Hello,

This is admittedly rather obscure, but just in case…

I’m using Maven to build an app. It depends on a JAR that uses 
java.util.logging, and it’s also ridiculously chatty—I need to get it under 
control. I’ve got a logging.properties file in src/main/resources that does 
what I want in development. But once deployed, that’s _not_ getting picked up 
on application launch, though it is present in Contents/Resources.

Has anyone hit this before, or would anyone like to guess at a solution?


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



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

2017-06-21 Thread Chuck Hill
These are not the droids you are looking for.

ERXEC installs the missing delegate.  So using that, you won’t get the message 
below.  But somewhere eo.editingContext() == null is still true.  You never saw 
that message before using EOEditingContext as eo.editingContext() was not null. 
 Perhaps some bad data somewhere?

Chuck


From: Markus Ruggiero <mailingli...@kataputt.com>
Date: Wednesday, June 21, 2017 at 7:34 AM
To: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com>
Cc: Chuck Hill <ch...@gevityinc.com>
Subject: Re: Strange error

Hi Chuck,

I just got more info from the customer and was able to reproduce this in my dev 
env. It was easy to fix but I have no idea why it did not work before. We did 
restructure the Resources/Properties and the customer claims that the issue did 
show up afterwards.

This fetch resulted in the error. Changed code to

EOEditingContext ec = new EOEditingContext();
NSArray cats = Category.fetchAllCategories(ec);

Changing to this

EOEditingContext ec = DSMEditiingContext.newEditingContex();
NSArray cats = Category.fetchAllCategories(ec);

...and everything is fine. DSMEditingContext is our extension of ERXEC.

Why would the good old EOEditingContext result in such a crash?

Your assessment that the user might have backtracked and such seems not 
relevant here. I started the application (it's an old moden D2W thingy), 
selected the entity from the popup, and selected Query. This is a plain D2W 
page with one custom property level query component. This component shows a 
list of Categories and lets the user select one from a popup as query criteria. 
It was the accessor for the list binding that crashed. I did not even get as 
far as to use the selectec value for anything.

Anyway, things work now (as far I have tested, let's see, if the customer also 
has it working in production).

Thanks for your answer. I already thought that the mailing list was dead. It 
has become a bit lonesome here.

---markus---

On 21 Jun 2017, at 16:11, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

Hi Markus,

The root cause was that the user did something (most likely, though a rare code 
bug is also a possibility) so that they were working with an EO that was not 
registered in an EC.  The messages below come from the code reporting this.

Mostly I have seen this happen by the user back-tracking in the browser.  Eg. 
Start a New operation, Cancel it (ec.revert()), then back track and enter data 
in the new EO and Save.  Or delete and then backtrack.  Other logic errors can 
result in this too.

Chuck

From: Webobjects-dev 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of Markus Ruggiero 
<mailingli...@kataputt.com<mailto:mailingli...@kataputt.com>>
Date: Wednesday, June 21, 2017 at 2:52 AM
To: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Strange error

A customer just reported a problem in a functionality that has not been touched 
for at least 3 years.



Error:

java.lang.IllegalStateException: Found null delegate. You can disable this 
check by setting er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in 
your WebObjects.properties

Reason:

Found null delegate. You can disable this check by setting 
er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in your 
WebObjects.properties


Setting er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in the 
Properties File results in:

Error:

java.lang.IllegalStateException: Attempt to access an EO that has either not 
been inserted into any EOEditingContext or its EOEditingContext has already 
been disposed

Reason:

Attempt to access an EO that has either not been inserted into any 
EOEditingContext or its EOEditingContext has already been disposed



We are trying to reproduce this and get some more info about what the user has 
done and whether there is something in the log files. In the mean time I dare 
asking here :-)

Anyone got an idea what this could be?

Thanks
---markus---



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

2017-06-21 Thread Chuck Hill
Hi Markus,

The root cause was that the user did something (most likely, though a rare code 
bug is also a possibility) so that they were working with an EO that was not 
registered in an EC.  The messages below come from the code reporting this.

Mostly I have seen this happen by the user back-tracking in the browser.  Eg. 
Start a New operation, Cancel it (ec.revert()), then back track and enter data 
in the new EO and Save.  Or delete and then backtrack.  Other logic errors can 
result in this too.

Chuck

From: Webobjects-dev 
 on behalf of 
Markus Ruggiero 
Date: Wednesday, June 21, 2017 at 2:52 AM
To: "webobjects-dev@lists.apple.com" 
Subject: Strange error

A customer just reported a problem in a functionality that has not been touched 
for at least 3 years.



Error:

java.lang.IllegalStateException: Found null delegate. You can disable this 
check by setting er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in 
your WebObjects.properties

Reason:

Found null delegate. You can disable this check by setting 
er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in your 
WebObjects.properties


Setting er.extensions.ERXRaiseOnMissingEditingContextDelegate=false in the 
Properties File results in:

Error:

java.lang.IllegalStateException: Attempt to access an EO that has either not 
been inserted into any EOEditingContext or its EOEditingContext has already 
been disposed

Reason:

Attempt to access an EO that has either not been inserted into any 
EOEditingContext or its EOEditingContext has already been disposed



We are trying to reproduce this and get some more info about what the user has 
done and whether there is something in the log files. In the mean time I dare 
asking here :-)

Anyone got an idea what this could be?

Thanks
---markus---


 ___
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: Save order of EO objects to support database foreign key constraints.

2017-05-25 Thread Chuck Hill
That is in Wonder now, IIRC.

The other thing to do, if you database supports it, is to mark the constraints 
as DEFERRABLE INITIALLY DEFERRED.  The delegate was intended to handle the 
cases where the database did not support that.

Chuck


From: Webobjects-dev 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf of Aaron 
Rosenzweig <aa...@chatnbike.com>
Date: Thursday, May 25, 2017 at 8:32 AM
To: Steve Peery <spe...@me.com>
Cc: WebObjects Development <webobjects-dev@lists.apple.com>
Subject: Re: Save order of EO objects to support database foreign key 
constraints.

Hi Steve,

You can make a delegate to handle the ordering of database operations.

Chuck Hill made one that might just work for you but if you need something 
additionally custom you’ll have to take over.
https://lists.apple.com/archives/webobjects-dev/2007/Jun/msg00751.html

Aaron Rosenzweig / Chat 'n Bike<http://www.chatnbike.com>
e:  aa...@chatnbike.com<mailto:aa...@chatnbike.com>  t:  (301) 956-2319

[mage removed by sender. Chat 'n Bike]

[mage removed by sender. Chat 'n Bike]


On May 25, 2017, at 10:54 AM, Steve Peery <spe...@me.com<mailto:spe...@me.com>> 
wrote:

Hey List,

I am importing a bunch of relational data into a project and when I try to save 
changes I get an error something like this:

Error when attempting to save data: EvaluateExpression failed: : Next 
exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a 
child row: a foreign key constraint fails (`valueA`.`valueB`, CONSTRAINT 
`TableA_tableBID_id_FK` FOREIGN KEY (`tableBID`) REFERENCES `tableB` (`id`))

I know it is because they are not written to the database in the order created. 
I have dealt with this in the past by doing incremental saving and other 
awkward things, but in this case that would be a total pain.

Any suggestions for the best way to deal with this?

Thank you,

Steve Peery
___
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/aaron%40chatnbike.com

This email sent to aa...@chatnbike.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: Esoteric issue with automatic property validation and validationFailedWithException()

2017-05-19 Thread Chuck Hill
Looking at the code, it looks like it should work.  
WOKeyValueAssociation.setValue() does the validation and calls that method.  Is 
it calling it on a different component than in the first example?

Chuck

From: Webobjects-dev 
 on behalf of Paul 
Hoadley 
Date: Friday, May 19, 2017 at 3:52 AM
To: WebObjects-Dev 
Subject: Esoteric issue with automatic property validation and 
validationFailedWithException()

Hello,

Let’s say I have a Page component. On this page is a subcomponent, MyText, that 
looks like this in Page’s template:



And then MyText itself is just this:



Item.content is a String, and allowsNull is N in the model. So, obviously, it’s 
a candidate for automatic EOF property validation on form submission. When I 
leave the textarea blank and submit, validationFailedWithException() is called 
on the page—great.

But that’s not quite what MyText looks like—say I need to do other things with 
the bound string. So it actually looks like this:



and has a couple of accessor methods instead:

public String value() {
return stringValueForBinding("value");
}

public void setValue(String value) {
setValueForBinding(value, "value");
}

Now, when I submit a blank textarea, validationFailedWithException() is _not_ 
called on the page. What’s going on here? What have I stomped on? How do I 
trigger automatic property validation with a component like this?


--
Paul Hoadley
http://logicsquad.net/
https://www.linkedin.com/company/logic-squad/



 ___
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: Compiling ERExtensions in Sierra no worky

2017-05-11 Thread Chuck Hill
I am not saying that Maven feels unnatural or un-WO like, but that there are 
Maven ways of doing things (like the project layout) and fighting that to do it 
“the way that I always have” just leads to a poor Maven experience.  With Ant 
you can beat it into whatever shape you want.  

Chuck

On 2017-05-11, 1:01 PM, "Hugi Thordarson"  wrote:

> Wait, what?  You had a life before?!!?   :-P

Good point.

> Maven is actually good

:-O

> and useful

:-O :-O

> provided that you do things The Maven Way and don’t try and fight it to 
do things the WO way.

I know where you’re coming from and I totally agreed with you for a long 
time. But… I found that once I gave it a chance, it soon started to feel very 
WO Way-ish.

> Yes, Chuck just said that.  No, I have not been drinking.

I find that extremely unlikely :-P.

- hugi



> Chuck
> 
> 
> On 2017-05-11, 12:29 PM, "Webobjects-dev on behalf of Hugi Thordarson" 
 wrote:
> 
>The documentation on the wiki seems pretty outdated. But the 
transition isn’t really complicated. Most of the work is the manual work of 
converting the Eclipse project—here’s a basic guide for achieving that for an 
application project:
> 
>https://gist.github.com/hugith/e9a49e91fbcebe204e0feb4989f55631
> 
>Note that before you can actually do this, though, you’ll have to copy 
the following file to ~/.m2/settings.xml. It informs maven about the 
WOCommunity maven repositories where the WO specific stuff lives.
> 
>https://gist.github.com/hugith/e2887fad3baecdd493e0b9f5311fe0bf
> 
>After having done this with a few dozen projects, migrating a regular 
no-frills Fluffy Bunny project to maven takes me less than an hour these days 
(including upgrading the Jenkins build :). I sincerely recommend you give it a 
try. It’s a huge boon to productivity; dependency management alone will save 
you hours of headaches if you’re using any 3rd party software. And not having 
to manage framework installations is awesome.
> 
>Also, I currently don't have a life so I’m usually online to help if 
you run into issues ;).
> 
>Cheers,
>- hugi
> 
> 
> 
>> On 11 May 2017, at 18:59, Tim Worman  wrote:
>> 
>> I’m definitely interested in moving to Maven. It seems it can be a rocky 
transition from what I’ve seen. But it also positions one better to make the 
move to other technologies that probably utilize Maven too (Cayenne?).
>> 
>> Is the wiki pretty up-to-date regarding what’s required to mavenize?
>> 
>> Tim
>> UCLA GSE
>> 
>>> On May 9, 2017, at 9:38 AM, Hugi Thordarson  wrote:
>>> 
>>> You can also switch to maven and skip that whole “install 
WebObjects”-mess [ducks and runs away before anyone can beat him up]
>>> 
>>> - hugi
>>> 
>>> 
 On 9 May 2017, at 16:05, Calven Eggert  wrote:
 
 I’ve finally managed to get the ERExtensions to compile without 
errors.  The trick was to place the commons-lang3-3.5 folder (downloaded from 
apache) in the Libraries folder in ERExtensions like so:
 /Users/calven/WonderSource/Frameworks/Core/ERExtensions/Libraries
 
 And now all my WO projects run in Eclipse and from the terminal.
 
 Calven
 
> On May 8, 2017, at 8:24 AM, Johann Werner  
wrote:
> 
> The reported constructor method signature
> 
> (String, String, String, String, int, boolean, boolean)
> 
> does only exist in Wonder’s variant of WOCookie and not in the 
original WOCookie class. Thus you probably have some sort of class ordering 
problem in your project. Check if ERXExtensions comes before JavaWebObjects.
> 
> jw
> 
> 
>> Am 08.05.2017 um 14:15 schrieb Calven Eggert :
>> 
>> 
>> I changed the woolies.properties to new point to the 
woolies.543.properties and now it works.  Thanks for that hint.  I suppose with 
the changes we discussed earlier in getting this setup it messed this up. 
>> 
>> However, I’m still having problems with one of my apps where I try 
to run it from eclipse and I get this error (which I thought was going to be 
corrected once that compile was working but no):
>> 
>> java.lang.NoSuchMethodError: 
com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
>> com.webobjects.foundation.NSForwardException 
[java.lang.NoSuchMethodError] 

Re: Compiling ERExtensions in Sierra no worky

2017-05-11 Thread Chuck Hill
Wait, what?  You had a life before?!!?   :-P

Maven is actually good and useful provided that you do things The Maven Way and 
don’t try and fight it to do things the WO way.

Yes, Chuck just said that.  No, I have not been drinking.

Chuck


On 2017-05-11, 12:29 PM, "Webobjects-dev on behalf of Hugi Thordarson" 
 wrote:

The documentation on the wiki seems pretty outdated. But the transition 
isn’t really complicated. Most of the work is the manual work of converting the 
Eclipse project—here’s a basic guide for achieving that for an application 
project:

https://gist.github.com/hugith/e9a49e91fbcebe204e0feb4989f55631

Note that before you can actually do this, though, you’ll have to copy the 
following file to ~/.m2/settings.xml. It informs maven about the WOCommunity 
maven repositories where the WO specific stuff lives.

https://gist.github.com/hugith/e2887fad3baecdd493e0b9f5311fe0bf

After having done this with a few dozen projects, migrating a regular 
no-frills Fluffy Bunny project to maven takes me less than an hour these days 
(including upgrading the Jenkins build :). I sincerely recommend you give it a 
try. It’s a huge boon to productivity; dependency management alone will save 
you hours of headaches if you’re using any 3rd party software. And not having 
to manage framework installations is awesome.

Also, I currently don't have a life so I’m usually online to help if you 
run into issues ;).

Cheers,
- hugi



> On 11 May 2017, at 18:59, Tim Worman  wrote:
> 
> I’m definitely interested in moving to Maven. It seems it can be a rocky 
transition from what I’ve seen. But it also positions one better to make the 
move to other technologies that probably utilize Maven too (Cayenne?).
> 
> Is the wiki pretty up-to-date regarding what’s required to mavenize?
> 
> Tim
> UCLA GSE
> 
>> On May 9, 2017, at 9:38 AM, Hugi Thordarson  wrote:
>> 
>> You can also switch to maven and skip that whole “install 
WebObjects”-mess [ducks and runs away before anyone can beat him up]
>> 
>> - hugi
>> 
>> 
>>> On 9 May 2017, at 16:05, Calven Eggert  wrote:
>>> 
>>> I’ve finally managed to get the ERExtensions to compile without errors. 
 The trick was to place the commons-lang3-3.5 folder (downloaded from apache) 
in the Libraries folder in ERExtensions like so:
>>> /Users/calven/WonderSource/Frameworks/Core/ERExtensions/Libraries
>>> 
>>> And now all my WO projects run in Eclipse and from the terminal.
>>> 
>>> Calven
>>> 
 On May 8, 2017, at 8:24 AM, Johann Werner  
wrote:
 
 The reported constructor method signature
 
 (String, String, String, String, int, boolean, boolean)
 
 does only exist in Wonder’s variant of WOCookie and not in the 
original WOCookie class. Thus you probably have some sort of class ordering 
problem in your project. Check if ERXExtensions comes before JavaWebObjects.
 
 jw
 
 
> Am 08.05.2017 um 14:15 schrieb Calven Eggert :
> 
> 
> I changed the woolies.properties to new point to the 
woolies.543.properties and now it works.  Thanks for that hint.  I suppose with 
the changes we discussed earlier in getting this setup it messed this up. 
> 
> However, I’m still having problems with one of my apps where I try to 
run it from eclipse and I get this error (which I thought was going to be 
corrected once that compile was working but no):
> 
> java.lang.NoSuchMethodError: 
com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
> com.webobjects.foundation.NSForwardException 
[java.lang.NoSuchMethodError] 
com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V:java.lang.NoSuchMethodError:
 
com.webobjects.appserver.WOCookie.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IZZ)V
>   at 
com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:39)
>   at 
com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:124)
>   at 
com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
>   at 
com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
>   at 
com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:546)
>   at 

Re: SSL and port fun

2017-04-07 Thread Chuck Hill
The presence of the x-forwarded-port is a pretty good clue that a proxy or load 
balancer is in front of the app:
https://en.wikipedia.org/wiki/X-Forwarded-For

Yes, you should check the x-forwarded-port header first, and if it is 443, 
ignore the rest.

Better still is to check the x-forwarded-proto for http or https in case they 
are using a non-standard SSL port:
http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html

Chuck



From: "o...@ocs.cz" <o...@ocs.cz>
Date: Friday, April 7, 2017 at 10:04 AM
To: Chuck Hill <ch...@gevityinc.com>
Cc: WebObjectsDev Development <webobjects-dev@lists.apple.com>
Subject: Re: SSL and port fun

Chuck,

(as always to the rescue, you the man! Thanks!)

On 7. 4. 2017, at 6:41 PM, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:
Is there a SSL terminating proxy or load balancer in front of the new 
installation?

Absolutely no idea :( Aside of asking the side admin, might I check somehow?


x-forwarded-port is more standard and dependable in that case.  The other 
headers are from mod_webobjects.

Just making sure I am not misunderstanding you, this means I should check the 
x-forwarded-port header first, and if it is 443, can I safely ignore 
server_port (not speaking of x-webobjects-server-port) and assume the access to 
application was SSL-protected, right?

Thanks again a big lot,
OC


On 2017-04-07, 9:31 AM, "Webobjects-dev on behalf of OC" 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>
 on behalf of o...@ocs.cz<mailto:o...@ocs.cz>> wrote:

   Hi there,

   my ages-old code to support SSL

   - gets the request
   - checks its server_port and x-webobjects-server-port headers
   - if at least one of them is 443, we were accessed under SSL and all is well 
and swell. Otherwise, it generates 302 and HTTPS URL to re-direct to the same 
page under SSL.

   So far it worked like a charm for long long years. Now I am told that on a 
new installation on a new product server (I believe it is a Mac OS X 10.11) the 
redirections keep coming. Having added extra logs, I have found that

   (a) the server_port is always 80, even when the application is accessed 
through HTTPS
   (b) nevertheless, the request contains a header x-forwarded-port with the 
proper value of 443

   Does someone here understand this stuff?

   Should I check the x-forwarded-port header first, and if it is 443, can I 
safely ignore server_port and assume the access to application was 
SSL-protected?

   Or should I tell them they need to fix their Apache settings, or whatever?

   Thanks a lot,
   OC

___
   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/chill%40gevityinc.com

   This email sent to ch...@gevityinc.com<mailto:ch...@gevityinc.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: SSL and port fun

2017-04-07 Thread Chuck Hill
Is there a SSL terminating proxy or load balancer in front of the new 
installation?  x-forwarded-port is more standard and dependable in that case.  
The other headers are from mod_webobjects.  

Chuck


On 2017-04-07, 9:31 AM, "Webobjects-dev on behalf of OC" 
 wrote:

Hi there,

my ages-old code to support SSL

- gets the request
- checks its server_port and x-webobjects-server-port headers
- if at least one of them is 443, we were accessed under SSL and all is 
well and swell. Otherwise, it generates 302 and HTTPS URL to re-direct to the 
same page under SSL.

So far it worked like a charm for long long years. Now I am told that on a 
new installation on a new product server (I believe it is a Mac OS X 10.11) the 
redirections keep coming. Having added extra logs, I have found that

(a) the server_port is always 80, even when the application is accessed 
through HTTPS
(b) nevertheless, the request contains a header x-forwarded-port with the 
proper value of 443

Does someone here understand this stuff?

Should I check the x-forwarded-port header first, and if it is 443, can I 
safely ignore server_port and assume the access to application was 
SSL-protected?

Or should I tell them they need to fix their Apache settings, or whatever?

Thanks a lot,
OC

 ___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: ERXWOConditional - where does it get installed?

2017-03-23 Thread Chuck Hill
Ah…. Now it makes sense.  Thanks for reporting back Ricardo.

From: <webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf of 
Ricardo Parada <rpar...@mac.com>
Date: Thursday, March 23, 2017 at 2:47 PM
To: Johann Werner <j...@oyosys.com>
Cc: WebObjectsDev <webobjects-dev@lists.apple.com>
Subject: Re: ERXWOConditional - where does it get installed?

Hi all,

I'm reporting back.  I noticed my test app had WOConcurrentRequestHandling set 
to false.  Once I turned it on the dynamic elements started being shared across 
the sessions.

Thanks everyone.

Ricardo


On Mar 21, 2017, at 7:34 PM, Ricardo Parada 
<rpar...@mac.com<mailto:rpar...@mac.com>> wrote:
Thanks Johann.
I'm confused because in my test I was seeing 3 x 5 for #3. Each session had 3 
dynamic elements created.  The dynamic elements started being shared within the 
same session when I started creating multiple instances of the page. All the 
pages in the session started using the same three dynamic elements. But other 
sessions kept on using their own. Each of the 5 sessions was using three.
So I am not sure why I see that behavior and you see only 3 being created.
But if they work as you described #3 then yes I can see trouble big time.
To make things worse I have not found great documentation on how they are used 
by WebObjects. I will take a look at that session that you mentioned.
On Mar 21, 2017, at 6:50 PM, Johann Werner 
<j...@oyosys.de<mailto:j...@oyosys.de>> wrote:
The essence is that a
1) WOComponent is created for every occurrence within a specific page template 
for each session
2) stateless WOComponent is created once for any number of occurrences within 
any page template, additional instances are created if a stateless component is 
currently used by a thread and requested by another one
3) WODynamicElement is created for every occurrence within a specific page 
template
That means that if you have one page where the template uses your component / 
element three times and you are serving 5 users you end up with
1) 3 × 5 = 15
2) 1 ≤ n ≤ 5
3) 3
instances of your component / element. For 1) and 2) you can be sure that 
during a RR-phase you won’t share an instance with multiple threads (unless you 
do some weird things like passing a component instance into a background thread 
or stuff like that). However in case 3) those instances are shared with any 
thread that requests them which can happen at any time during the RR-loop where 
WO does not mind for initialization or cleanup of local values (that is one 
point in making those components fast).
jw
Am 21.03.2017 um 23:18 schrieb Ricardo Parada 
<rpar...@mac.com<mailto:rpar...@mac.com>>:
Was that in a session-less app instance perhaps? I have not tested that 
scenario.
In my test I do not see dynamic elements being shared across sessions, so I'm 
not seeing exactly how is it that concurrency plays a role in the session app 
scenario where the dynamic elements are not shared with the ones from other 
sessions processing a request at the same time.
But again, there may be something else, a property or something that affects 
this sharing that I may be missing.
Anyways, the consensus is that it is a bad idea, so I'll follow advise and 
implement it as a WOComponent subclass instead.
Thank you all.
On Mar 21, 2017, at 5:34 PM, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:
I’ve run into code that did this in the past.  It is very, very much not fun to 
debug.  You could stash the values in a ThreadLocal or in the 
context.userInfo().  But don’t ever add state to a WODynamicElement subclass.
Chuck
From: 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of Johann Werner <j...@oyosys.com<mailto:j...@oyosys.com>>
Date: Tuesday, March 21, 2017 at 2:19 PM
To: Ricardo Parada <rpar...@mac.com<mailto:rpar...@mac.com>>
Cc: WebObjectsDev 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Re: ERXWOConditional - where does it get installed?
Hi Ricardo,
you are ignoring one very important aspect of dynamic components: they must be 
thread-safe!
As soon as you are holding local values you will head to a serious mess. In 
your „manual“ tests of course you probably won’t ever encounter concurrency 
problems as long as you are not doing sort of automated parallel tests where 
multiple request are processed concurrently. Just think about why WO uses 
constructs like WOAssociations in dynamic components which introduce an 
additional layer of complexity to exchange / access request dependent values. 
Surely not for the fun of it ;-)
Of course concurrency problems only show up infrequently and are often not 
reproducible. So depending on the number and activity of your app users you 
could have been just luckily to not run i

Re: ERXWOConditional - where does it get installed?

2017-03-21 Thread Chuck Hill
I’ve run into code that did this in the past.  It is very, very much not fun to 
debug.  You could stash the values in a ThreadLocal or in the 
context.userInfo().  But don’t ever add state to a WODynamicElement subclass.

Chuck

From:  on behalf of 
Johann Werner 
Date: Tuesday, March 21, 2017 at 2:19 PM
To: Ricardo Parada 
Cc: WebObjectsDev 
Subject: Re: ERXWOConditional - where does it get installed?

Hi Ricardo,

you are ignoring one very important aspect of dynamic components: they must be 
thread-safe!

As soon as you are holding local values you will head to a serious mess. In 
your „manual“ tests of course you probably won’t ever encounter concurrency 
problems as long as you are not doing sort of automated parallel tests where 
multiple request are processed concurrently. Just think about why WO uses 
constructs like WOAssociations in dynamic components which introduce an 
additional layer of complexity to exchange / access request dependent values. 
Surely not for the fun of it ;-)

Of course concurrency problems only show up infrequently and are often not 
reproducible. So depending on the number and activity of your app users you 
could have been just luckily to not run into any problems or—most likely—did 
not notice when you actually hit one of those situations.

jw


PS: If you have access to the recordings of WOWODC 2012 there is actually a 
talk on dynamic elements.


Am 21.03.2017 um 21:11 schrieb Ricardo Parada 
>:
Hi all,
I’m just reporting back on my findings on whether saving state between 
appendToResponse and a subsequent takeValuesFromRequest in a dynamic component 
is bad or not.
I read Chuck’s Practical WebObjects, p. 193 where it talks about Dynamic 
Elements.  As he pointed out there, dynamic elements are shared among all 
instances of a WOComponent subclass.  My MPVWOConditional is implemented as a 
dynamic element because it extends ERXWOConditional which then extends 
WODynamicGroup which then extends WODynamicElement.
To test this I created a Hello app with a single page, Main.wo.  I have three 
MPVWOConditionals in there.  An instance is created for each occurrence of my 
MPVWOConditional in Main.  A total of three to be exact.
I then have a link on Main that calls an action returning a new instance of the 
page Main:
public WOActionResults newPage() {
 return pageWithName(Main.class);
}
Every time this newPage() action gets called I can confirm that the constructor 
in Main gets called, which indicates that a new page is being created every 
single time this action gets called.
However, the constructor of the MPVWOConditional is not getting called three 
times as when the first/second time the page was created.  On the other hand, 
the appendToResponse() of the MPVWOConditional keeps getting called three 
times, once for every instance of MPVWOConditional in Main.  The hashCode() of 
each of these three MPVWOConditional coincides with the ones that were 
previously created.
To summarize, when new instances of the page are created, the MPVWOConditionals 
are being reused on new instances of the page.
Fortunately, the dynamic components are not shared among page instances from 
different sessions.  Which makes sense.  The sharing only applies among 
instances within the same session.
I can see how some might object to storing this state in the dynamic component. 
 It has worked like this all this time.  It’s the way it works.
However, I think it is okay to save this piece of state between an 
appendToResponse and a subsequent takeValuesFromRequest because the 
takeValuesFromRequest is being done on the same page that generated the 
appendToResponse.
Furthermore, if a new page is created and the components are shared, their 
appendToResponse will get called and this piece of state will be re-computed 
and saved awaiting a subsequent takeValuesFromRequest.
Now, let’s assume that instead of submitting a form, a regular action is called 
on the page.  Let’s suppose this action retrieves the previous page from some 
sort of cache and returns that page.  Then that page’s appendToResponse will 
get called and so will the appendToResponse of the  dynamic components being 
shared, which would recompute the condition and save it awaiting a possible 
subsequent takeValuesFromRequest or invokeAction.  Again, this behavior just 
makes the appendToResponse consistent with the 
invokeAction/takeValuesFromRequest phases.
Having this behavior has corrected problems for me.  It is yet to be determined 
whether this will create a problem.  If I find out later that this creates a 
problem I’ll be happy to report back to the group.
But so far, on my tests, it looks like it is okay.
Thanks for all the comments and feedback.
Ricardo
On Mar 14, 2017, at 10:46 AM, Samuel Pelletier 
> 

Re: ERXQuery Preview

2017-03-19 Thread Chuck Hill
Hi Ricardo,

You need to create a branch (push from your local) in your GitHub fork of 
Wonder for each set of changes in GitHub (aka a Feature Branch), then make a 
pull request from that branch to Wonder.  Otherwise all of your changes get 
inter-mixed.

Chuck


From: Ricardo Parada <rpar...@mac.com>
Date: Saturday, March 18, 2017 at 11:22 PM
To: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com>
Cc: Markus Ruggiero <mailingli...@kataputt.com>, Paul Hoadley 
<pa...@logicsquad.net>, "koa...@icloud.com" <koa...@icloud.com>, 
"g...@knuckleheads.net" <g...@knuckleheads.net>, Chuck Hill 
<ch...@gevityinc.com>, "aa...@chatnbike.com" <aa...@chatnbike.com>
Subject: Re: ERXQuery Preview

Hi all,

As promised, I have committed ERXQuery to my Wonder clone on GitHub, i.e. 
rparada/wonder.  I just need help creating the pull request.  :-)

It turns out that I created first a pull request for ERXExtensions.java 
unrelated to ERXQuery.  Now when I tried to create the pull request for 
ERXQuery it just seems to show the previous pull request.  So I’m not sure what 
is going on.  I don’t have much experience with GitHub.

Anyways, the ERXQuery is an additive change to Wonder and consists of only 
three files: ERXQuery.java, ERXQueryAttributes and ERXQueryEOAttribute.  It’s 
the last two commits in rparada/wonder.

I took the time to polish the API a bit more.  I think the API came out nicer 
than what I had the first time around.  Specially the single variadic select() 
method that allows you to specify EOAttributes, Strings, ERXKeys, or any 
Iterable containing these. Same for groupBy().  And the a similar technique 
with the orderBy() which can take EOSortOrderings or any Iterable 
(ERXSortOrderings, NSArray, List, Collection).

The documentation is more extensive now.  I have included here a copy of the 
ERXQuery class from the javadoc tab in my Eclipse.

I have tested with ORACLE which is the easiest for me to test.  It would be 
great to hear others using this with other databases (h2, derby, mssql, mysql, 
frontbase, etc.)


ERXQuery.java
Overview
This class has a fluent API that mimics a select statement:

  NSArray<NSDictionary<String,Object>> records =

  ERXQuery.create()

  .select (keys)

  .from (entity)

  .where (qualifier)

  .groupBy (groupings)

  .having (havingQualifier)

  .orderBy (sortings)

  .fetch();


It allows you to use EOF/Wonder higher-level constructs (qualifiers, 
attributes, orderings, key paths, ERXKeys, etc.) to create a query that looks 
like this:

  SELECT ...

  FROM ...

  WHERE ...

  GROUP BY ...

  HAVING ...

  ORDER BY ...



Specifying the Attributes to Fetch
The select() method is very flexible and powerful. It accepts a variable number 
of objects of different types that specify the attributes to fetch. These 
objects can be EOAttributes, ERXKeys, Strings. You may also specify NSArray or 
List objects containing any combination of these (EOAttributes, ERXKeys, 
Strings).
The ERXKeys and String objects correspond to keys and key paths to the 
attributes to fetch, i.e. "customer.name". The keys and key paths can also be 
relationships to objects, i.e. "customer" which translate into a fetch of 
foreign keys used to build object faults and return them in the results.
You may call the select() method multiple times to keep adding to the list of 
attributes to fetch.
Using Ad Hoc Attributes
It is very common to aggregate attributes in these queries. For this purpose, 
you may want to create what ERXQuery refers to as ad hoc attributes. These 
attributes have a definition but are not physically attached to the entity. You 
can use the ERXQueryAttributes class to easily create multiple ad hoc 
attributes. The definition of the attribute can reference relationships and 
attributes as shown below. If you just want to create a single ad hoc attribute 
you may use the ERXQueryEOAttribute class.

  // Using a single query against the order entity to count the number of

  // orders and line items that match an order qualifier.



  ERXQueryAttributes attributes = ERXQueryAttributes.create(orderEntity)

  .add("itemCount", "COUNT(DISTINCT lineItems.lineItemID)", "intNumber")

  .add("orderCount", "COUNT(DISTINCT orderID)", "intNumber");



  ERXQuery query =

  ERXQuery.create()

  .select (attributes)

  .from (orderEntity)

  .where (qualifier);



  // Fetch into a dictionary

  NSDictionary<String,Object> row = query.fetch().lastObject();



  int orderCount = ((Number) row.objectForKey("orderCount")).intValue();

  int itemCount = ((Number) row.objectForKey("itemCount")).intValue();



Fetching Results into a Custom Class
It is useful to fetch results into objects of 

Re: ERXQuery Preview

2017-03-11 Thread Chuck Hill
That looks like a very cool, useful contribution!

Chuck

From:  on behalf of 
Ricardo Parada 
Date: Saturday, March 11, 2017 at 2:41 PM
To: "webobjects-dev@lists.apple.com WebObjects" 
Subject: ERXQuery Preview

Hi all,

Over the years, I’ve worked on an class for doing ad hoc queries.  This class 
has gotten better and better.  At first, the API of this class and some 
implementation details were not  ready for public consumption in my opinion.

However, recently I took the time to polish the code as much as possible and if 
I can get my employer's approval I would like to contribute this code to 
project Wonder which has given us so much in return during the years.

Here is a preview of its functionality.  Please let me know if you guys think 
this would be a useful contribution.
ERXQuery.java
This class has a fluent API that mimics a select statement:
NSArray> records =
   ERXQuery.create()
  .select (keys)
  .from (entity)
  .where (qualifier)
  .groupBy (groupings)
  .having (havingQualifier)
  .orderBy (sortings)
  .fetch();

Overview
ERXQuery allows you to use EOF constructs (EOQualifiers, EOAttributes, 
EOSortOrdering, EOAttribute names, relationships, etc.) to create queries of 
the form:
SELECT ...
FROM ...
WHERE ...
GROUP BY ...
HAVING ...
ORDER BY ...

Using Ad Hoc Attributes
You may use the ERXAdHocAttributes class to easily create ad hoc attributes to 
use with your query. For example, the code below creates two ad hoc 
EOAttributes. An ad hoc attribute is an EOAttribute that is not physically 
attached to an entity and that has a definition. They are useful for 
aggregating other attributes. The definition of the attribute can reference 
relationships and attributes as shown below.
// Using a single query against the order entity, count the number of
// orders and line items that match the qualifier.
ERXAdHocAttributes attributes = ERXAdHocAttributes.create(orderEntity)
   .add("itemCount", "COUNT(DISTINCT lineItems.lineItemID)", "intNumber")
   .add("orderCount", "COUNT(DISTINCT orderID)", "intNumber");
NSDictionary row =
   ERXQuery.create()
  .select (attributes)
  .from (orderEntity)
  .where (qualifier)
  .fetch()
  .lastObject();
int orderCount = ((Number) row.objectForKey("orderCount")).intValue();
int itemCount = ((Number) row.objectForKey("itemCount")).intValue();

Fetching into a Custom Record Class
You can also fetch using a custom class of your choice, i.e. Foo, as shown 
below:
// Using java >= 8 is easy with a lambda expression
NSArray objs = query.fetch(editingContext, (ec, row) -> new Foo(ec, row));

// Using java < 8 you must provide a RecordConstructor
ERXQuery.RecordConstructor recordConstructor =
   new ERXQuery.RecordConstructor {
   @Override
   public Foo constructRecord(EOEditingContext ec, NSMutableDictionary row) 
{
  return new Foo(ec, row);
   }
   };
NSArray objs = query.fetch(editingContext, recordConstructor);

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

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


Re: I guess this is the end...

2017-02-15 Thread Chuck Hill
That has been happening for years.

From:  on behalf of 
"Musall, Maik" 
Date: Wednesday, February 15, 2017 at 3:59 AM
To: WebObjects-Dev 
Subject: Re: I guess this is the end...

I will set up a mailman mailing list on the wocommunity server soon. Hang on.


Am 15.02.2017 um 11:38 schrieb Flavio Donadio 
>:
Hello, all!
I’ve just received this (“blahblah” is an ID I removed):
From: 
webobjects-dev-confirm+blahb...@lists.apple.com
Subject: Your confirmation is required to leave the Webobjects-dev mailing list
Date: 14 February 2017 21:25:35 GMT-2
To: fla...@donadio.com.br
Reply-To: 
webobjects-dev-confirm+blahb...@lists.apple.com
Mailing list removal confirmation notice for mailing list
Webobjects-dev
We have received a request from 17.151.62.50 for the removal of your
email address, "fla...@donadio.com.br" from the
webobjects-dev@lists.apple.com mailing 
list.  To confirm that you want
to be removed from this mailing list, simply reply to this message,
keeping the Subject: header intact.  Or visit this web page:
   https://lists.apple.com/mailman/confirm/webobjects-dev/blahblah
Or include the following line -- and only the following line -- in a
message to 
webobjects-dev-requ...@lists.apple.com:
   confirm blahblah
Note that simply sending a `reply' to this message should work from
most mail readers, since that usually leaves the Subject: line in the
right form (additional "Re:" text in the Subject: is okay).
If you do not wish to be removed from this list, please simply
disregard this message.  If you think you are being maliciously
removed from the list, or have any other questions, send them to
webobjects-dev-ow...@lists.apple.com.
I guess this is the end…
Regards,
Flavio
___
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/maik%40selbstdenker.ag
This email sent to m...@selbstdenker.ag


___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: compiling Wonder CLI

2017-02-08 Thread Chuck Hill
Those are build products.

From:  on behalf of 
Theodore Petrosky 
Date: Wednesday, February 8, 2017 at 7:06 PM
To: WebObjects-Dev 
Subject: compiling Wonder CLI

I am confused by a little thing.

I am using Tower to pull from the Repo. So I pull and everything looks good. 
Then in the Terminal, I use ant:

sudo ant -Duser.home=$HOME frameworks frameworks.install

As soon as I do that, Tower reports that there are changed files:

/WonderSource/Frameworks/Ajax/Ajax/WebServerResources/wondaculous-min.js
/WonderSource/Frameworks/Ajax/Ajax/WebServerResources/wondaculous.js
/WonderSource/Frameworks/Misc/WOJRebel/manifest.mf

What’s going on here. This must be common because I never hear anyone 
complaining, and I never ask for obvious reasons.

I feel I want to understand what’s going on and what to do about it.

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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: wiki information

2017-02-08 Thread Chuck Hill
Unmarked small bills in a brown paper bag?

From: Theodore Petrosky <tedp...@yahoo.com>
Date: Wednesday, February 8, 2017 at 12:14 PM
To: Chuck Hill <ch...@gevityinc.com>
Cc: Jérémy DE ROYER <jeremy.dero...@ingencys.net>, WebObjects-Dev 
<webobjects-dev@lists.apple.com>
Subject: Re: wiki information


Maik Musall is working on it (from what he said in his reply).

I know we all want to get him money to keep things going! Any idea how can we 
get them money?


On Feb 8, 2017, at 3:00 PM, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

The last that I heard is that Pascal was looking to wind up the association as 
an entity in Canada and Samuel Pelletier was going to help him in that.  
Someone will need to take over the domain names and Confluence (wiki).

Chuck


From: 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of Jérémy DE ROYER 
<jeremy.dero...@ingencys.net<mailto:jeremy.dero...@ingencys.net>>
Date: Wednesday, February 8, 2017 at 4:35 AM
To: Theodore Petrosky <tedp...@yahoo.com<mailto:tedp...@yahoo.com>>
Cc: WebObjects-Dev 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Re: wiki information

I would ask…

- what’s the state of the association (as I was not in Montreal last year) ?

- how much is needed every year to keep the assets up and running ? We all pay 
last year and could this year too.

That’s another +1 for the annual meeting in Iceland !

Jérémy

Le 8 févr. 2017 à 13:27, Theodore Petrosky 
<tedp...@yahoo.com<mailto:tedp...@yahoo.com>> a écrit :
just after the list went down, I posted an interrogative requesting information 
on the state of the wiki.  (so it never posted!!)
Who pays for it? Where is it?
With Pascal no longer with us, what is going to happen with these assets?
if it requires funding, I will make the donation. I would hope others here will 
also.
___
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/jeremy.deroyer%40ingencys.net
This email sent to 
jeremy.dero...@ingencys.net<mailto:jeremy.dero...@ingencys.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/chill%40gevityinc.com

This email sent to ch...@gevityinc.com<mailto:ch...@gevityinc.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: wiki information

2017-02-08 Thread Chuck Hill
The last that I heard is that Pascal was looking to wind up the association as 
an entity in Canada and Samuel Pelletier was going to help him in that.  
Someone will need to take over the domain names and Confluence (wiki).

Chuck


From:  on behalf of 
Jérémy DE ROYER 
Date: Wednesday, February 8, 2017 at 4:35 AM
To: Theodore Petrosky 
Cc: WebObjects-Dev 
Subject: Re: wiki information

I would ask…

- what’s the state of the association (as I was not in Montreal last year) ?

- how much is needed every year to keep the assets up and running ? We all pay 
last year and could this year too.

That’s another +1 for the annual meeting in Iceland !

Jérémy

Le 8 févr. 2017 à 13:27, Theodore Petrosky 
> a écrit :
just after the list went down, I posted an interrogative requesting information 
on the state of the wiki.  (so it never posted!!)
Who pays for it? Where is it?
With Pascal no longer with us, what is going to happen with these assets?
if it requires funding, I will make the donation. I would hope others here will 
also.
___
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/jeremy.deroyer%40ingencys.net
This email sent to 
jeremy.dero...@ingencys.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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: WOWODC17?? a little OT

2017-01-19 Thread Chuck Hill
I am pretty sure that we are.  A visit to Iceland in the summer would be quite 
nice.

From: <webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf of 
Hugi Thordarson <h...@karlmenn.is>
Date: Thursday, January 19, 2017 at 8:47 AM
To: Ken Anderson <kenli...@anderhome.com>
Cc: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com>
Subject: Re: WOWODC17?? a little OT

On the contrary, I’m quite terrified you’re all serious.

- hugi


On 17. jan. 2017, at 19:59, Ken Anderson 
<kenli...@anderhome.com<mailto:kenli...@anderhome.com>> wrote:
Somehow I don’t think Hugi is taking us seriously…
On Jan 17, 2017, at 2:42 PM, Tim Worman 
<li...@thetimmy.com<mailto:li...@thetimmy.com>> wrote:
Ha! LOL! I love that. That sense of humor is all the invitation I need. If I 
could fit WOWODC ‘17 in my schedule, I will, wherever it is.
Tim
UCLA GSE
On Jan 13, 2017, at 6:39 AM, Hugi Thordarson 
<h...@karlmenn.is<mailto:h...@karlmenn.is>> wrote:
Awesome, I’ve already booked a venue. Look forward to seeing you guys.

On 13. jan. 2017, at 14:22, Markus Ruggiero 
<mailingli...@kataputt.com<mailto:mailingli...@kataputt.com>> wrote:
Iceland? Would be interesting. And I may go if there is a WOWODC17 at all
On 13.01.2017, at 04:10, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:
You have an extremely lenient definition of food!
+1 on women and hot springs

-100 on hakarl
hakarl? what's that? Must be aful judging by Chuck's thumbs down
---markus---
___
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/hugi%40karlmenn.is
This email sent to h...@karlmenn.is<mailto:h...@karlmenn.is>
___
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/lists%40thetimmy.com
This email sent to li...@thetimmy.com<mailto:li...@thetimmy.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/kenlists%40anderhome.com
This email sent to kenli...@anderhome.com<mailto:kenli...@anderhome.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/chill%40gevityinc.com

This email sent to ch...@gevityinc.com<mailto:ch...@gevityinc.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: WOWODC17?? a little OT

2017-01-17 Thread Chuck Hill
It is a smallish island.  Where is he going to hide?

From: <webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf of 
Ken Anderson <kenli...@anderhome.com>
Date: Tuesday, January 17, 2017 at 11:59 AM
To: Tim Worman <li...@thetimmy.com>
Cc: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com>
Subject: Re: WOWODC17?? a little OT

Somehow I don’t think Hugi is taking us seriously…

On Jan 17, 2017, at 2:42 PM, Tim Worman 
<li...@thetimmy.com<mailto:li...@thetimmy.com>> wrote:

Ha! LOL! I love that. That sense of humor is all the invitation I need. If I 
could fit WOWODC ‘17 in my schedule, I will, wherever it is.

Tim
UCLA GSE


On Jan 13, 2017, at 6:39 AM, Hugi Thordarson 
<h...@karlmenn.is<mailto:h...@karlmenn.is>> wrote:

Awesome, I’ve already booked a venue. Look forward to seeing you guys.





On 13. jan. 2017, at 14:22, Markus Ruggiero 
<mailingli...@kataputt.com<mailto:mailingli...@kataputt.com>> wrote:

Iceland? Would be interesting. And I may go if there is a WOWODC17 at all


On 13.01.2017, at 04:10, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

You have an extremely lenient definition of food!

+1 on women and hot springs




-100 on hakarl
hakarl? what's that? Must be aful judging by Chuck's thumbs down

---markus---


___
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/hugi%40karlmenn.is

This email sent to h...@karlmenn.is

___
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/lists%40thetimmy.com

This email sent to li...@thetimmy.com<mailto:li...@thetimmy.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/kenlists%40anderhome.com

This email sent to kenli...@anderhome.com<mailto:kenli...@anderhome.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: WOWODC17?? a little OT

2017-01-13 Thread Chuck Hill
Dang, I just blew coffee out of my nose!

From: Mark Gowdy <m...@gowdy.co.uk>
Date: Friday, January 13, 2017 at 9:21 AM
To: Chuck Hill <ch...@gevityinc.com>
Cc: Hugi Thordarson <h...@karlmenn.is>, "webobjects-dev@lists.apple.com" 
<webobjects-dev@lists.apple.com>
Subject: Re: WOWODC17?? a little OT


On 13 Jan 2017, at 17:15, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

Are those…. Goats?

I ain’t afraid of no goats!




From: 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of Hugi Thordarson <h...@karlmenn.is<mailto:h...@karlmenn.is>>
Date: Friday, January 13, 2017 at 6:39 AM
To: "webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>" 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Re: WOWODC17?? a little OT

Awesome, I’ve already booked a venue. Look forward to seeing you guys.






On 13. jan. 2017, at 14:22, Markus Ruggiero 
<mailingli...@kataputt.com<mailto:mailingli...@kataputt.com>> wrote:

Iceland? Would be interesting. And I may go if there is a WOWODC17 at all



On 13.01.2017, at 04:10, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

You have an extremely lenient definition of food!

+1 on women and hot springs





-100 on hakarl
hakarl? what's that? Must be aful judging by Chuck's thumbs down

---markus---


___
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/hugi%40karlmenn.is

This email sent to h...@karlmenn.is<mailto:h...@karlmenn.is>

___
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/mark%40gowdy.co.uk

This email sent to m...@gowdy.co.uk<mailto:m...@gowdy.co.uk>

_
Mark Gowdy
Gowdy Associates Ltd
M: +44 7808 400 941
Skype: markgowdy




 ___
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: WOWODC17?? a little OT

2017-01-12 Thread Chuck Hill
You have an extremely lenient definition of food!

+1 on women and hot springs
-100 on hakarl


From: <webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf of 
Ken Anderson <kenli...@anderhome.com>
Date: Thursday, January 12, 2017 at 7:00 PM
To: Matthew Ness <m...@logicsquad.net>
Cc: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com>
Subject: Re: WOWODC17?? a little OT

a it’s food?  I was thinking women and hot springs

On Jan 12, 2017, at 9:48 PM, Matthew Ness 
<m...@logicsquad.net<mailto:m...@logicsquad.net>> wrote:

Aye, but I'm only going if Hugi organises Hakarl.


On Fri, Jan 13, 2017, at 01:28 PM, Michael Kondratov wrote:
Love the idea. And beer is so "cheap" in Iceland.

Michael

Sent from my iPhone

On Jan 12, 2017, at 7:10 PM, Ken Anderson 
<kenli...@anderhome.com<mailto:kenli...@anderhome.com>> wrote:
Aye!

On Jan 12, 2017, at 7:09 PM, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

All in favor of Hugi organizing it in Iceland?

From: 
<webobjects-dev-bounces+chill=gevityinc@lists.apple.com<mailto:webobjects-dev-bounces+chill=gevityinc@lists.apple.com>>
 on behalf of Hugi Thordarson <h...@karlmenn.is<mailto:h...@karlmenn.is>>
Date: Thursday, January 12, 2017 at 4:01 PM
To: Steve Peery <spe...@me.com<mailto:spe...@me.com>>
Cc: WebObjects-Dev 
<webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>>
Subject: Re: WOWODC17?? a little OT

Same here.

- hugi



On 12. jan. 2017, at 23:52, Steve Peery <spe...@me.com<mailto:spe...@me.com>> 
wrote:
If it happens, I will come.
Steve
On Jan 12, 2017, at 1:53 PM, Theodore Petrosky 
<tedp...@yahoo.com<mailto:tedp...@yahoo.com>> wrote:
So I take it that there is very little chance of WOWODC17. From the amount of 
traffic on the mailing list I feel like things are what they are!
What are your feelings!
___
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/speery%40me.com
This email sent to spe...@me.com<mailto:spe...@me.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/hugi%40karlmenn.is
This email sent to h...@karlmenn.is<mailto:h...@karlmenn.is>


___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.com<mailto:ch...@gevityinc.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/kenlists%40anderhome.com

This email sent to kenli...@anderhome.com<mailto:kenli...@anderhome.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/michael%40aspireauctions.com

This email sent to mich...@aspireauctions.com<mailto:mich...@aspireauctions.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/matt%40logicsquad.net

This email sent to m...@logicsquad.net<mailto:m...@logicsquad.net>

--
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<mailto:Webobjects-dev@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/kenlists%40anderhome.com

This email sent to kenli...@anderhome.com

 

Re: WOWODC17?? a little OT

2017-01-12 Thread Chuck Hill
All in favor of Hugi organizing it in Iceland?

From:  on behalf of 
Hugi Thordarson 
Date: Thursday, January 12, 2017 at 4:01 PM
To: Steve Peery 
Cc: WebObjects-Dev 
Subject: Re: WOWODC17?? a little OT

Same here.

- hugi



On 12. jan. 2017, at 23:52, Steve Peery > 
wrote:
If it happens, I will come.
Steve
On Jan 12, 2017, at 1:53 PM, Theodore Petrosky 
> wrote:
So I take it that there is very little chance of WOWODC17. From the amount of 
traffic on the mailing list I feel like things are what they are!
What are your feelings!
___
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/speery%40me.com
This email sent to spe...@me.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/hugi%40karlmenn.is
This email sent to h...@karlmenn.is


___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: excel dates

2016-11-28 Thread Chuck Hill
Ah, The Joy of Dates!  If you go back further with Java you can find all sorts 
of peculiar things.

From:  on behalf of 
Theodore Petrosky 
Date: Monday, November 28, 2016 at 2:08 PM
To: Leigh Kivenko 
Cc: WebObjects-Dev 
Subject: Re: excel dates

Why does excel behave so badly. well the original website I found said that 
excel calculated dates fro 01/01/1900 but that was incorrect. it is really 
01/00/1900, but there is more:

Actually, this number is one greater than the actual number of days.  This is 
because Excel behaves as if the date 1900-Feb-29 existed.  It did not.  The 
year 1900 was not a leap year (the year 2000 is a leap year).  In Excel, the 
day after 1900-Feb-28 is 1900-Feb-29.  In reality, the day after 1900-Feb-28  
was 1900-Mar-1 .  This is not a "bug".  Indeed, it is by design.  Excel works 
this way because it was truly a bug in Lotus 123.  When Excel was introduced, 
123 has nearly the entire market for spreadsheet software.  Microsoft decided 
to continue Lotus' bug, in order to fully compatible.  Users who switched from 
123 to Excel would not have to make any changes to their data.   As long as all 
your dates later than 1900-Mar-1, this should be of no concern.

My head hurts.

On Nov 28, 2016, at 1:17 PM, Leigh Kivenko 
> wrote:

I think the century rule is overridden if it is also divisible by 400. So that 
explains 2000 and 1 of your days. The other day might just be an offset?

Leigh Kivenko | VP, Technology
PortfolioAid
t. 416-479-0523 | e. lei...@portfolioaid.com

This e-mail may be privileged and confidential. If you received this e-mail in 
error, please do not use, copy or distribute it, but advise me immediately (by 
return e-mail or otherwise), and delete the e-mail.

From: 
webobjects-dev-bounces+dev=portfolioaid@lists.apple.com
 [mailto:webobjects-dev-bounces+dev=portfolioaid@lists.apple.com] On Behalf 
Of Theodore Petrosky
Sent: Monday, November 28, 2016 1:08 PM
To: WebObjects-Dev 
>
Subject: excel dates

So excel stores and expects to find date as an integer. The number of days 
since 01-01-1900.

I am trying to write out to excel and I have these dates. So is created a 
method that calculates the number of days from 01-01-1900. My problem is that I 
am two days off, so I adjusted the jan01 date two days.

Does anyone know why it is two days off? the only thing I can think of is that 
it is calculating the leap years incorrectly. every four years except century 
years, and there are two century years here (1900 and 2000),

   public int dateAsInt() {

  SimpleDateFormat format = new SimpleDateFormat("-MM-dd");

  Date date = null;
  try {
 date = format.parse ( "1899-12-30" );
  } catch (ParseException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
  }

  NSTimestamp jan011900 = new NSTimestamp(date);

  System.out.println(jan011900);

  long diff = eventDate().getTime() - jan011900.getTime(); // diff 
is in milliseconds
  long roundingOffset = ( diff >= 0 ) ? 12 : -12; // if diff is 
positive, offset up, if negative, offset down
  // next, convert diff to hours, offset by .5 days to round the 
end result, divide by 24 and truncate.
  long days = ( ( diff / ( 1000 * 60 * 60 ) ) + roundingOffset ) / 
24;

  return (int)days;
   }

 ___
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: problem is maintain checkbox status while doing pagination

2016-11-08 Thread Chuck Hill
You need to use a form submission to change pages, not a  hyperlink.

From:  on behalf of 
sai krishna Bhogireddy 
Date: Monday, November 7, 2016 at 11:25 PM
To: "webobjects-dev@lists.apple.com" 
Subject: problem is maintain checkbox status while doing pagination

Hi,

I am displaying list of objects using a
WODisplaygroup, and WORepetition. The user will select
some items from first page, then move on to next page
and select some and so on using check boxes.

The problem is when the use selects a previous page,
his selection is gone. How to implement this. I want
the user's earlier selection still checked when he
traverses to a previous page, so that when he presses
a button such as "select checked items" all his
selection from multiple pages is stored.


Is there any code sample of a small app available to
show how to accomplish this.

Thanks.

sai krishna

 ___
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: reverse engineered DB

2016-10-31 Thread Chuck Hill
I’d make a subclass of your editing context class, and override saveChanges() 
to do nothing.  Then install it with the ERXEC factory.

Chuck


From:  on behalf of 
Theodore Petrosky 
Date: Monday, October 31, 2016 at 8:25 AM
To: WebObjects-Dev 
Subject: reverse engineered DB

I am reverse engineering an Oracle DB to be able to read from it. I will not 
write!

I am of course afraid of this DB. it is not my product and it could be very 
hurt if something was written to it incorrectly.

Would you recommend checking the “Read Only”  check box in the Advanced tab in 
Entity Modeler for the Entities that I reverse engineer?
___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: reverse engineer table problem

2016-10-29 Thread Chuck Hill
Just change the name in the model (the Java side, not the database side).

From:  on behalf of 
Theodore Petrosky 
Date: Saturday, October 29, 2016 at 5:43 AM
To: WebObjects-Dev 
Subject: reverse engineer table problem

my first real gottcha!  it seems that the database I need to reverse has a 
reserved word for a table name. Important info here!! I am never going to write 
to this database, just read.

in a table I need, there is an attribute called “super”.

what are my choices? I don’t even care about this attribute so I could comment 
the accessors out. but if I were to rerun the EOGenerate,  I would have a 
problem.

anything I can do besides commenting out the accessors?
___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: first time with oracle

2016-10-28 Thread Chuck Hill
Is it finding a different model somewhere?   And ojdbc14.jar is kind of old 
(Java 1.4).  There are newer ones.

Chuck


From:  on behalf of 
Theodore Petrosky 
Date: Friday, October 28, 2016 at 6:21 PM
To: WebObjects-Dev 
Subject: first time with oracle

I am trying to access an Oracle backend. I think I am almost there.

first. I created a Wonder framework and added ojdbc14.jar to the build path. In 
entity modeler I added for the URL:
jdbc:oracle:thin:@//10.1.3.250:1521/XE

and i gave it the user name and password.

Entity Modeler connected to the database and I was able to reverse compile the 
database. so far so good.

So I created a Wonder D2W app, added my reverse compiled framework, added 
EROraclePlugin. I added the ojdbc14.jar to my build path.

I added into the propery file:
# Oracle Connection Dictionary
dbConnectUserGLOBAL=name
dbConnectPasswordGLOBAL=pw
dbConnectURLGLOBAL=jdbc:oracle:thin:@//10.1.3.250:1521/XE?capitalizeTypenames=true=convertToNull

the app compiled and ran then on the home page I see all the tables that I 
reverse compiled. so far so good until I click any Find button on any table:

_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext 
com.webobjects.eoaccess.EODatabaseContext@3dc4f166: failed to open database 
channel. Check your connection dictionary, and ensure your database is 
correctly configured.

am I missing something in my setup?

Oct 28 21:14:22 MySilentPartner[58575] WARN  er.extensions.eof.ERXModelGroup 
(null) - Clearing previous class descriptions
Oct 28 21:14:22 MySilentPartner[58575] DEBUG NSLog (null) - Using JDBCPlugIn 
'com.webobjects.jdbcadaptor.EROraclePlugIn' for ERXJDBCAdaptor@2112380784
Oct 28 21:14:22 MySilentPartner[58575] INFO  
er.extensions.appserver.ERXStaticResourceRequestHandler  - Unable to get 
contents of file 'ERROR_NOT_FOUND_framework_app_filename_customizations.css' 
for uri: ERROR_NOT_FOUND_framework_app_filename_customizations.css
Oct 28 21:14:26 MySilentPartner[58575] DEBUG NSLog  - Using JDBCPlugIn 
'com.webobjects.jdbcadaptor.EROraclePlugIn' for ERXJDBCAdaptor@1670927216
Oct 28 21:14:26 MySilentPartner[58575] DEBUG NSLog  -  connecting with 
dictionary: {password = ""; username = "spartner"; 
URL = 
"jdbc:oracle:thin:@//10.1.3.250:1521/XE?capitalizeTypenames=true=convertToNull";
 }
Oct 28 21:14:26 MySilentPartner[58575] WARN  NSLog  - An exception occurred 
while trying to open a channel: Io exception: NL Exception was generatedat 
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:441)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)
at 
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at com.webobjects.jdbcadaptor.JDBCContext.connect(JDBCContext.java:236)
at er.extensions.jdbc.ERXJDBCAdaptor$Context.connect(ERXJDBCAdaptor.java:400)
at com.webobjects.jdbcadaptor.JDBCContext._tryConnect(JDBCContext.java:362)
at com.webobjects.jdbcadaptor.JDBCContext._channelWillOpen(JDBCContext.java:505)
at com.webobjects.jdbcadaptor.JDBCChannel.openChannel(JDBCChannel.java:111)
at 
com.webobjects.eoaccess.EODatabaseContext._openChannelWithLoginPanel(EODatabaseContext.java:1907)
at 
com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel(EODatabaseContext.java:1966)
at 
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3054)
at 
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195)
at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
at 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1307)
at 
com.webobjects.eoaccess.EODatabaseDataSource.fetchObjects(EODatabaseDataSource.java:589)
at com.webobjects.appserver.WODisplayGroup.fetch(WODisplayGroup.java:2132)
at er.extensions.appserver.ERXDisplayGroup.fetch(ERXDisplayGroup.java:196)
at er.directtoweb.pages.ERD2WListPage._fetchDisplayGroup(ERD2WListPage.java:466)
at er.directtoweb.pages.ERD2WListPage.setupPhase(ERD2WListPage.java:568)
at er.directtoweb.pages.ERD2WListPage.appendToResponse(ERD2WListPage.java:499)
at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:1385)
at 

Re: log4j bug causes deadlock?!? (was: which sort of application bugs hang wotaskd?)

2016-10-25 Thread Chuck Hill
Well, the fix seems easy if that works for you.

From: <webobjects-dev-bounces+chill=gevityinc@lists.apple.com> on behalf of 
"o...@ocs.cz" <o...@ocs.cz>
Date: Tuesday, October 25, 2016 at 2:56 PM
To: WebObjects-Dev <webobjects-dev@lists.apple.com>
Subject: Re: log4j bug causes deadlock?!? (was: which sort of application bugs 
hang wotaskd?)

Hmmm, looks like we are not the only one who got bit by that thing in tender 
parts: http://stackoverflow.com/a/7397857

On 25. 10. 2016, at 10:59 PM, OC <o...@ocs.cz<mailto:o...@ocs.cz>> wrote:
Chuck,
On 24. 10. 2016, at 18:23, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:
Running “sudo jstack –F ” should dump a trace of all threads.  
Should…
Luckily, it did; just it is sort of weird that it identifies threads by name in 
the deadlock report, but by some unknown ID (perhaps hash of the Thread 
instance, looks like that) in the traces, which makes for sort of difficult 
parsing. I guess I'm not the first one to swear :)
... As for the hang, the code in the logging does seem like a likely culprit.
Actually it looks like the culprit is log4j itself?!? What the heck! Anyroad, 
here's the deadlock report:
===
"model.ReportPDFTask@5f6ce9a5":
  waiting to lock Monitor@0x00012c0008a8 (Object@0x0003f7efb980, a 
org/apache/log4j/spi/RootLogger),
  which is held by "WorkerThread6"
"WorkerThread6":
waiting for ownable synchronizer 0x0003f9538960, (a 
java/util/concurrent/locks/ReentrantLock$NonfairSync),
which is held by "model.ReportPDFTask@5f6ce9a5"
===
the WorkerThread6 problem happens in the “log.info("$tch")” part, it looks like 
this (and although changesFromCommittedSnapshot happens to be part of the 
culprit, I believe the problem is actually caused by the logger itself): 
instead of rendering its argument immediately, as soon as it is determined that 
we should log, it does that self-evidently under a lock:
=== Worker6 (cleaned up considerably) ===
- er.extensions.eof.ERXEC.lockObjectStore() // the lock W6 [2] hangs on, caused 
by...
- er.extensions.eof.ERXGenericRecord.changesFromCommittedSnapshot() // ... 
changesFromCommittedSnapshot ...
- cz.ocs.model.OCSEnterpriseObject.toString() // ... which yours truly dumbly 
uses in toString, alas!
- org.apache.log4j.or.DefaultRenderer.doRender(java.lang.Object) // ... this 
thing happens INSIDE of log4j code
... lot of frames here; self-evidently, some of them acquires and holds 
Monitor@0x00012c0008a8 [1] ...
- org.apache.log4j.Category.info(java.lang.Object) // this is the 
log.info("$tch") of mine
... the loop and the other standard stuff up to dispatchRequest and 
WOWorkerThread.run() ...
===
The "model.ReportPDFTask" actually does not do anything wrong (far as I can 
say) -- it just fetches. A fetch presumably (and understandably) would lock the 
object store. With locked object store, it... logs! (I do not think the stack 
trace is important here; anyway, I have attached it at the end of this message 
for reference.)
Nothing wrong there I believe, it feels right to be able to log with a locked 
object store; but it causes deadlock, for the log tries to acquire its 
Monitor@0x00012c0008a8 -- which is held by Worker6.
Now, although in my case the culprit happens to be unneeded (and generally 
dangerous) changesFromCommittedSnapshot, I believe that
(a) whatever which locks object store in the log would cause deadlock just as 
well
(b) which can be e.g., a fault fired, or lots of other perfectly valid things 
to log.
I do understand why log4j methods accept generic Object and render the result 
inside -- it is reasonable not to render anything unless we want to log with 
the current setting.
What seems to me to be a grave bug though is that this rendering happens under 
a lock, which causes a deadlock if two threads log concurrently and it so 
happens that
(i) one of them logs under object store lock (which I believe is valid and 
correct)
(ii) the other's log contents causes an object store lock (which again I 
believe is valid and correct, see (a) and (b) above).
So, well, is there indeed a grave bug inside of the ubiquitous log4j, or am I 
overlooking something of importance?
And if there is a bug, is there anything better one can do to work around it 
than using toStrings for all non-trivial logs, like 
“log.info("non-trivial-contents".toString())”, which would affect efficiency 
pretty bad?
Thanks and all the best,
OC
=== "model.ReportPDFTask@5f6ce9a5" slightly cleaned up ===
- org.apache.log4j.Category.callAppenders(org.apache.log4j.spi.LoggingEvent) 
@bci=12, line=204 (Compiled frame) // hangs on Monitor@0x00012c0008a8, 
which is held by [1] above
- org.apache.log4j.Category.forcedLog(java.lang.String, 
org.apache.log4j.Priority, java.lang.Object, java.lang.Throwable) @bci=14, 
line=391 (Compiled frame)

Re: NPE in ERXObjectStoreCoordinatorSynchronizer

2016-10-24 Thread Chuck Hill
Looks like eo.editingContext() == null  but beyond that…


From:  on behalf of 
Paul Hoadley 
Date: Monday, October 24, 2016 at 3:45 PM
To: WebObjects Development 
Subject: Re: NPE in ERXObjectStoreCoordinatorSynchronizer

On 19 Oct 2016, at 1:12 PM, Paul Hoadley 
> wrote:

Oct 17 23:10:57 Relief[2002] ERROR 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer  - 
java.lang.NullPointerException
NullPointerException
  at 
com.webobjects.eocontrol.EOCustomObject.willReadRelationship(EOCustomObject.java:1270)
  at 
er.extensions.eof.ERXGenericRecord.willReadRelationship(ERXGenericRecord.java:385)
  at 
com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyGenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:614)
  at 
er.extensions.eof.ERXGenericRecord$TouchingBinding.valueInObject(ERXGenericRecord.java:214)
  at 
com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634)
  at net.logicsquad.relief.model._Job.classTeacher(_Job.java:192)
 ... skipped 6 stack elements
  at 
er.extensions.eof.ERXGenericRecord$InverseRelationshipUpdater.includeObjectIntoPropertyWithKey(ERXGenericRecord.java:1367)
  at 
er.extensions.eof.ERXGenericRecord.includeObjectIntoPropertyWithKey(ERXGenericRecord.java:1225)
  at net.logicsquad.relief.model._ClassTeacher.addToJobs(_ClassTeacher.java:212)
 ... skipped 5 stack elements
  at 
com.webobjects.eocontrol.EOCustomObject.addObjectToPropertyWithKey(EOCustomObject.java:940)
  at 
com.webobjects.eocontrol.EOEditingContext._mergeValueForKey(EOEditingContext.java:660)
  at 
com.webobjects.eocontrol.EOEditingContext._mergeObjectWithChanges(EOEditingContext.java:3457)
  at 
com.webobjects.eocontrol.EOEditingContext._processObjectStoreChanges(EOEditingContext.java:3546)
  at er.extensions.eof.ERXEC._processObjectStoreChanges(ERXEC.java:1549)
 ... skipped 5 stack elements
  at 
com.webobjects.eocontrol.EOEditingContext._sendOrEnqueueNotification(EOEditingContext.java:4715)
  at 
com.webobjects.eocontrol.EOEditingContext._objectsChangedInStore(EOEditingContext.java:3562)
  at er.extensions.eof.ERXEC._objectsChangedInStore(ERXEC.java:1489)
 ... skipped 7 stack elements
  at 
com.webobjects.eocontrol.EOObjectStoreCoordinator._objectsChangedInSubStore(EOObjectStoreCoordinator.java:693)
 ... skipped 7 stack elements
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue$ToManyUpdateCacheChangeProcessor.processCacheChange(ERXObjectStoreCoordinatorSynchronizer.java:466)
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue.processRemoteChange(ERXObjectStoreCoordinatorSynchronizer.java:566)
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue.run(ERXObjectStoreCoordinatorSynchronizer.java:622)
  ... skipped 1 stack elements

Does anyone want to take a guess at this one?

Come on, I know you want to.


--
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: which sort of application bugs hang wotaskd?

2016-10-24 Thread Chuck Hill
This should explain the how and why (IIRC) 
http://www.podcastchart.com/podcasts/webobjects-podcasts/episodes/wotaskd-internals-bringing-sanity-to-deployment

And offer some fixes and improvements.  And like most (all?) of my WOWODC 
presentations, never fully finished.

As for the hang, the code in the logging does seem like a likely culprit.  
Running “sudo jstack –F ” should dump a trace of all threads.  
Should…


Chuck

From:  on behalf of 
OC 
Date: Monday, October 24, 2016 at 8:41 AM
To: WebObjects-Dev 
Subject: which sort of application bugs hang wotaskd?

Hello there,

there seems to be one pretty rare, ugly and hard-to find lock in my application 
(I shall get back to it at the end, in hope it might ring a bell), but what's 
most weird: it seems that when it happens, it's _wotaskd_ what primarily goes 
down?!?

Alas, the information is sparse: it is the deployment site, to where the 
programming team has no access (and so far we were not able to repeat the 
problem at the test site whatever we try), but due to the site admin and logs, 
it looks like

(a) first, one of the worker threads hangs somehow, so far inexplicably (EC 
locking problem possible but improbable, explained below)
(b) for some time, other threads run without a glitch, new reqeusts are served, 
new R/R loop worker threads are spawned and logged (I log out all R/R loops)
(c) shortly (in minutes) though the adaptor begins to redirect requests to the 
“Redirection URL”
(d) now, the site admin is alerted; he runs JavaMonitor **which reports “Failed 
to contact 127.0.0.1-1085”**!
(e) he finds which process belongs to *the application instance* (*not* the 
wotaskd!), and kills it from Terminal
(f) which causes wotaskd to magically cure and JavaMonitor starts working and 
stops showing the 1085 fail, allows to re-launch the instance, all is well and 
swell.

Does this perhaps ring a bell? To me this behaviour does not make any sense :/

As for the hang itself, it's rather weird too. There is a loop which goes 
through a list of EOs; each of them is logged out. Something like this:

===
for (DBTimeChunk tch in session().currentMarket.orderedTimeChunks()) {
log.info(""+tch)
if (tch.someTimestamp>fixedTimestamp) continue // happens to be 
true in our case
... therefore some irrelevant code here (it would log if it 
happened, does not) ...
}
===

The problem is that

- this goes through some of the TimeChunks, and _then_ it hangs -- not at the 
start of R/R loop, where EC locking problems could be expected
- in the same session, with the same EC, even in the same thread (for the 
method which contains the loop happens to be used twice in the page template) 
the loop already run through all the TimeChunks and tested their someTimestamp 
and ended without a glitch (so, no fault is fired when it hangs)

So far it happened about thrice; each time on different TimeChunk.

About the only thing I guess _might_ cause the hang of the thread is the "log 
tch". TimeChunk's toString() is comparatively complex, it might call, among 
more mundane things, also
- this.changesFromCommittedSnapshot()
- this.attributeKeys()
- this.primaryKey() (of ERXGenericRecord which it inherits)

Might one of them hang the thread, if another thread does the same/something 
other at the wrong moment? (Presumed all of them were already called for the 
same EO in the same thread all right shortly ago.)

If it happens again, it would help if the site admin could, before killing the 
application, to force it somehow to log the stacktracks of all its threads. Is 
there some trick for that?

And of course, for any other advice how to hunt for this bloody kind of bug 
I'll be extremely grateful.

Thanks a lot,
OC


___
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/chill%40gevityinc.com

This email sent to ch...@gevityinc.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: IllegalStateException: "...EOEditingContext has already been disposed"

2016-09-29 Thread Chuck Hill
On Sep 29, 2016, at 12:18 PM, Paul Hoadley 
<pa...@logicsquad.net<mailto:pa...@logicsquad.net>> wrote:

On 29 Sep 2016, at 7:31 PM, Chuck Hill 
<ch...@gevityinc.com<mailto:ch...@gevityinc.com>> wrote:

Backtracking?

I can't seem to reproduce it in development using backtracking, but _who knows_ 
what the users are doing in real life.

Amen brother! Is The object in question ever deleted?

Potentially, but can't be deleted by the user that's seeing this error. So it 
could have been deleted by _someone else_ quite definitely, though in another 
EC.

Bingo!  If the EC on the Page is getting unlocked and locked again then this is 
probably what it is

It could be somebody backtracking to before a deletion and then doing something 
else. I don't see how else it could have a null editing context.

I'll see if I can simulate that.

Or perhaps an inserted object and it gets reverted and then they backtrack over 
that?

Don't think that's happening.

When do you dispose of the EC?

I don't formally dispose of it. I just let it eventually fall out of scope and 
get GC'd. Is that a bad idea?

No but seems the right thing to do. I was just trying to understand how it was 
getting a null editing context

When should you normally explicitly dispose() an EC? That's really not 
something I do very much of at all.


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

  1   2   3   4   5   6   7   8   9   10   >