Re: Does anyone use WOLips groovy support?

2024-12-18 Thread Aaron Rosenzweig via Webobjects-dev
I also have not used groovy with WO

> On Dec 18, 2024, at 4:55 PM, Paul Hoadley via Webobjects-dev 
>  wrote:
> 
> Hi Ramsey,
> 
> On 18 Dec 2024, at 21:07, Ramsey Gurley via Webobjects-dev 
>  wrote:
> 
>> Which just leaves the WOLips groovy support. My question is again, does 
>> anyone use this?
> 
> Just by way of a data point for your survey: never used it, no plans to.
> 
> 
> -- 
> 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/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: WOLips development

2024-12-08 Thread Aaron Rosenzweig via Webobjects-dev
You’re the best, thank you Ramsey :-)

> On Dec 8, 2024, at 6:30 PM, Ramsey Gurley  wrote:
> 
> Oh, I see, it's a new issue. This is why I haven't merged to master yet :) I 
> assumed it would take some time for issues to be reported. I can verify you 
> are right, it works on WOLips master branch but not WOLips5. I'll see if I 
> can hunt down the problem and fix it. I've started a ticket for it,
> 
> https://github.com/wocommunity/wolips/issues/185
> 
> On 12/9/24 12:37 AM, Aaron Rosenzweig wrote:
>> Yes I noticed this too, that dynamic elements like > do auto-complete anymore. A minor issue. Everything else seems great :-) The 
>> entity modeler and component editor work in all other respects.
>> 
>> It’s really nice to have WOLips on the latest Eclipse. Thank you Ramsey :-)
>> 
>>> On Dec 7, 2024, at 6:43 AM, Ramsey Gurley via Webobjects-dev 
>>>  wrote:
>>> 
>>> If I have to hazard a guess, it is that WOString is not a WOComponent but a 
>>> WODynamicElement. It doesn't have an API file. ERXBooleanSelector is a 
>>> component and does have an API file. There could also be some weirdness 
>>> because WOString is replaced by ERXWOString in wonder, but that would be my 
>>> first hunch. All the examples you named are dynamic elements unless I'm 
>>> mistaken. It makes sense that dynamic elements should autocomplete equally 
>>> well as components if that is the cause.
>>> 
>>> On 12/7/24 7:28 PM, Martino Limido wrote:
>>>> Hi Ramsey,
>>>> 
>>>> First, let me express my gratitude for the hard work and dedication to 
>>>> updating WOLips. The new version (5) installs smoothly on both Eclipse 
>>>> 2024-09 and Eclipse 2024-12, and I truly appreciate the improvements.
>>>> 
>>>> However, I am experiencing an issue with the WOComponent Editor when using 
>>>> the latest WOLips version. Specifically, the autocomplete for binding 
>>>> names does not work for standard WebObjects components (e.g., WOString, 
>>>> WOConditional, WOTextField). This issue occurs both when using the inline 
>>>> syntax and when editing the bindings in the .woo file.
>>>> 
>>>> Interestingly, the autocomplete works perfectly for components from 
>>>> Project WOnder or custom components from internal frameworks or the 
>>>> current project.
>>>> 
>>>> To better illustrate the problem, you can access the following link: 
>>>> https://poodoo.xplants.net/test-wolips.mp4.
>>>> 
>>>> I am unsure if this is an issue specific to my environment or a broader 
>>>> problem. Any guidance or suggestions would be greatly appreciated.
>>>> 
>>>> Best regards,
>>>> Martino
>>>> 
>>>>> Il giorno 27 nov 2024, alle ore 21:00, 
>>>>> webobjects-dev-requ...@lists.apple.com ha scritto:
>>>>> 
>>>>> Hi again everyone.
>>>>> 
>>>>> I just finished setting up a build of WOLips5 with Github actions. That
>>>>> means you no longer need to build it locally to install it. The new
>>>>> update site url is,
>>>>> 
>>>>> https://wocommunity.github.io/wolips/repository/
>>>>> 
>>>>> There is currently no index.html so if you go there in a browser, it
>>>>> will give you a 404. It will work as an update site url however. It will
>>>>> build a fresh update for every push to the wolips5 branch. Maybe we can
>>>>> put a nice index.html in there sooner or later :)
>>>>> 
>>>>> Ramsey
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/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: WOLips development

2024-12-08 Thread Aaron Rosenzweig via Webobjects-dev
Yes I noticed this too, that dynamic elements like  On Dec 7, 2024, at 6:43 AM, Ramsey Gurley via Webobjects-dev 
>  wrote:
> 
> If I have to hazard a guess, it is that WOString is not a WOComponent but a 
> WODynamicElement. It doesn't have an API file. ERXBooleanSelector is a 
> component and does have an API file. There could also be some weirdness 
> because WOString is replaced by ERXWOString in wonder, but that would be my 
> first hunch. All the examples you named are dynamic elements unless I'm 
> mistaken. It makes sense that dynamic elements should autocomplete equally 
> well as components if that is the cause.
> 
> On 12/7/24 7:28 PM, Martino Limido wrote:
>> Hi Ramsey,
>> 
>> First, let me express my gratitude for the hard work and dedication to 
>> updating WOLips. The new version (5) installs smoothly on both Eclipse 
>> 2024-09 and Eclipse 2024-12, and I truly appreciate the improvements.
>> 
>> However, I am experiencing an issue with the WOComponent Editor when using 
>> the latest WOLips version. Specifically, the autocomplete for binding names 
>> does not work for standard WebObjects components (e.g., WOString, 
>> WOConditional, WOTextField). This issue occurs both when using the inline 
>> syntax and when editing the bindings in the .woo file.
>> 
>> Interestingly, the autocomplete works perfectly for components from Project 
>> WOnder or custom components from internal frameworks or the current project.
>> 
>> To better illustrate the problem, you can access the following link: 
>> https://poodoo.xplants.net/test-wolips.mp4.
>> 
>> I am unsure if this is an issue specific to my environment or a broader 
>> problem. Any guidance or suggestions would be greatly appreciated.
>> 
>> Best regards,
>> Martino
>> 
>>> Il giorno 27 nov 2024, alle ore 21:00, 
>>> webobjects-dev-requ...@lists.apple.com ha scritto:
>>> 
>>> Hi again everyone.
>>> 
>>> I just finished setting up a build of WOLips5 with Github actions. That
>>> means you no longer need to build it locally to install it. The new
>>> update site url is,
>>> 
>>> https://wocommunity.github.io/wolips/repository/
>>> 
>>> There is currently no index.html so if you go there in a browser, it
>>> will give you a 404. It will work as an update site url however. It will
>>> build a fresh update for every push to the wolips5 branch. Maybe we can
>>> put a nice index.html in there sooner or later :)
>>> 
>>> Ramsey
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/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: Java 11

2024-11-29 Thread Aaron Rosenzweig via Webobjects-dev
Hi Michael, 

We’ve been running Java 17 for a while now. I’ve heard others run Java 21. 

The main issue is the lack of modules and newer java requires modules for 
scope. You’ll need to add the following VM arguments both in Eclipse and also 
in the launch script of your .woa

VM Arguments: --add-exports=java.base/sun.security.action=ALL-UNNAMED 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.sql/java.sql=ALL-UNNAMED

> On Nov 29, 2024, at 11:56 AM, Michael Kondratov via Webobjects-dev 
>  wrote:
> 
> Hello everyone !
> 
>   I am thinking of migrating away from Java 8 to 11. HAs anyone had 
> success with 11 and later versions of Java? Any issues?
> 
> 
> 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/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: WOLips5 new update url

2024-11-28 Thread Aaron Rosenzweig via Webobjects-dev
Thank you Ramsey. 

So much to be thankful for this time of year. 

I tried your new WOLips v5 using the update site url with Eclipse 2024-09 for 
enterprise and web developers.

Works great :-) I can launch apps, use entity modeler, and the component 
editor. 

> On Nov 26, 2024, at 7:49 PM, Ramsey Gurley via Webobjects-dev 
>  wrote:
> 
> Hi again everyone.
> 
> I just finished setting up a build of WOLips5 with Github actions. That means 
> you no longer need to build it locally to install it. The new update site url 
> is,
> 
> https://wocommunity.github.io/wolips/repository/
> 
> There is currently no index.html so if you go there in a browser, it will 
> give you a 404. It will work as an update site url however. It will build a 
> fresh update for every push to the wolips5 branch. Maybe we can put a nice 
> index.html in there sooner or later :)
> 
> Ramsey
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/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: WOLips5

2024-11-18 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Ramsey!

> On Nov 17, 2024, at 10:12 PM, Ramsey Gurley via Webobjects-dev 
>  wrote:
> 
> I'm pleased to announce a new WOLips version: WOLips5. I've now pushed a new 
> branch to the WOLips repository where you can check it out and test it 
> yourselves.
> 
> https://github.com/wocommunity/wolips/tree/wolips5
> 
> WOLips5 features:
> 
> * Easy maven build, just 'git clone',  'mvn clean package' and you're done.
> * Built with Java 21 instead of Java 1.5.
> * Builds with the newer p2 repository layout.
> * Builds an Eclipse product, which is a full Eclipse application with WOLips5 
> preinstalled for five different platform+arch combinations. (Win+X86_64, 
> Linux+aarch64, Linux+X86_64, Mac+aarch64, Mac+X86_64)
> 
> Once maven has downloaded the internet, the entire build process takes about 
> 5 minutes on my 2020 i5 laptop. It takes only about 2 minutes if I disable 
> the product build. We plan to set up a full build as a github action, and 
> that will automatically build on github for each change committed to master. 
> In the meantime, you can build and install it locally quite easily, which is 
> what I am doing currently. The README on the branch explains how.
> 
> 
> ___
> 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: WOLips development

2024-11-05 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Ramsey, 

I used jprofiler once and it was useful but I would not be sad if we dropped it 
from Webobjects. Today I use visualvm which is a free standalone tool that 
comes with most java installations and provides good profiling. 

I never used jrebel. For those that aren’t familiar, if you pay a licensing fee 
you can add/remove methods while your app is running in Eclipse without 
restarting it. Normally you have to restart your app if you do anything other 
than modify internals of methods. For me I never salivated at this feature so I 
never messed with it. Wouldn’t mind to see jrebel dropped. 

Thank you Ramsey for spearheading this. 

> On Nov 5, 2024, at 7:06 PM, Ramsey Gurley via Webobjects-dev 
>  wrote:
> 
> That is a work in progress. Are there opinions on which D2W look(s) would be 
> nice to have? I'm sure I'll set up an archetype with my own R2D2W framework. 
> The other options I remember are modern, diva, neutral, and the core erd2w 
> components.
> 
> Right now, my focus is on fixing the wolips build so we can build against 
> latest eclipse. That is a source of a lot of bugs currently. There's a lot of 
> cruft in the repo, like jrebel/jprofiler that doesn't appear to be used at 
> all anymore. But I'm proceeding carefully :) I don't want to toss out 
> something people are actively using and love.
> 
> On 11/6/24 12:55 AM, Theodore Petrosky wrote:
>> I tried jrebel a few years ago... but gave up.
>> 
>> Thank you for your service!!
>> 
>> Did anything ever happen to adding D2W templates to the Maven setup?
>> 
>> 
>> 
>> Theodore Petrosky | IT/Finance Director
>> AgencySacks
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> On 11/4/24, 8:50 PM, "Ramsey Gurley via Webobjects-dev" 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> 
>> Hi all,
>> 
>> 
>> I'm doing some work on WOLips currently and I am wondering how many of
>> you active WO devs actually use jprofiler or jrebel. Does anyone
>> actually use either of those or are they like workspace mechanic where
>> nobody even noticed when that went away?
>> 
>> 
>> Ramsey
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com 
>> )
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/tpetrosky%40agencysacks.com
>>  
>> 
>> 
>> 
>> This email sent to tpetro...@agencysacks.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/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: JavaMemoryAdaptor not loading

2024-11-01 Thread Aaron Rosenzweig via Webobjects-dev
Hi Ramsey, 

I’ve never used the in-memory adaptor. That said, if I understand you correctly 
you are saying the source file has the correct info.plist file but when it gets 
built, it has the wrong one. 

In the very short term you could re-zip the correct file and place in your 
.m2/repository

In the long term someone would have to figure out why it isn’t building 
properly. 

> On Nov 1, 2024, at 3:04 AM, Ramsey Gurley via Webobjects-dev 
>  wrote:
> 
> Hi all,
> 
> I'm trying to get an old demo project running again. Since it has an EOModel, 
> I thought it would be simple enough to make it use the JavaMemoryAdaptor in 
> wonder. However, that fails to find the adaptor class name on startup when I 
> try it. It seems to be missing a key in the Info.plist file. If I look in the 
> build dir,
> 
> EOAdaptors/JavaMemoryAdaptor/build/JavaMemoryAdaptor.framework/Resources/Info.plist:
>  EOAdaptorClassName
> 
> I see the key. However, if I go into my .m2/repository and unzip the 
> JavaMemoryAdaptor jar file for 7.4, that key is missing in the 
> Resources/Info.plist file. Since it can't find the class name, it chokes and 
> dies on startup. Has anyone recently used this adaptor successfully in a 
> maven project?
> 
> Ramsey
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/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: Custom EOQualifier

2024-08-30 Thread Aaron Rosenzweig via Webobjects-dev
I agree with Xavier. Try it and see how it goes. You should be able to use the 
existing qualifier and it will work. 

Here’s a summary of things to try:

1) QualifierOperatorCaseInsensitiveLike - it should work. 

2) Derived attribute - you can do “upper” in a derived attribute and then in 
java upper case the string and do an “equals” comparison

3) Create custom collation in the DB for that column so that it is case 
insensitive

I ordered them by how easy to implement. First one is the easiest and third one 
is hardest but could be more performant in a large table. 

> On Aug 30, 2024, at 10:40 AM, Xavier (WO) via Webobjects-dev 
>  wrote:
> 
> Hi André,
> 
> You shouldn’t need to do anything, your String will be called as a variable, 
> the EOQualifer will escape the problematic characters for you.
> 
> Xavier
> 
> 
>> On 30 Aug 2024, at 16:17, André Rothe  wrote:
>> 
>> Hi Xavier,
>> 
>> How I can escape the wildcards, with a backslash? I did not find any 
>> information about that.
>> 
>> Thank you
>> André
>> 
>> 
>> Am 30.08.2024 15:24, schrieb Xavier (WO):
>>> Hello André,
>>> Didi you actually try to use the regular 
>>> QualifierOperatorCaseInsensitiveLike, I’d say that it would “escape” the 
>>> special characters in the Strings so your “*” shouldn’t be an issue.
>>> Xavier
 On 30 Aug 2024, at 15:06, André Rothe via Webobjects-dev 
  wrote:
 Hi,
 I need a custom EOQualifier, which executes for Strings in an Oracle 
 database
 WHERE UPPER(table.aStr) = UPPER(bStr)
 (compare both Strings in uppercases). A 
 QualifierOperatorCaseInsensitiveLike will not work, because the Strings 
 could contain "*", but these should not act as wildcards.
 How I can build such a class?
 Greetings
 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/webobjects%40anazys.com
 This email sent to webobje...@anazys.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/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: overlapping R/Rs in same session

2024-08-21 Thread Aaron Rosenzweig via Webobjects-dev
If you open a second tab, using cookies, they are shared. 

If you continue doing more than 30 actions or so in the second tab, and then 
later try to do 1 action in the first tab, it will break. The first tab will 
try to do something but the page is out of the backtrack cache already. 

Last tab wins. 

> On Aug 21, 2024, at 6:55 AM, OCsite  wrote:
> 
> Aaron,
> 
>> On 21. 8. 2024, at 1:16, Aaron Rosenzweig  wrote:
>> Sounds like maybe your session is in the URL? 
> 
> Nope, we store them in cookies.
> 
>> What if you put the session in a cookie? Then it’s not possible to have 
>> multiple tabs in the same browser. The last tab wins. 
> 
> Alas, that's not how the browser works. Pretty often, e.g., if one opens a 
> link by shift-cmd-click in a new tab, and in other cases too, more 
> tabs/windows simply share the same wosid cookie, i.e., the same session.
> 
> Myself I use Safari exclusively, but based on 
> https://stackoverflow.com/questions/49687204/same-browser-but-different-windows-do-they-share-cookies
>  
> <https://stackoverflow.com/questions/49687204/same-browser-but-different-windows-do-they-share-cookies>
>  it seems it is a customary behaviour in other browsers, too.
> 
> Thanks,
> OC
> 
>> 
>>> On Aug 19, 2024, at 9:25 AM, ocs--- via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>> 
>>> wrote:
>>> 
>>> Hi there,
>>> 
>>> looks like the main cause of those overlapping R/Rs which we ar clashing 
>>> with lately is that some users just open their session in more windows or 
>>> tabs, and work concurrently in those. Sigh.
>>> 
>>> It's self-evident why it is a pretty bad idea from the technical POV, but I 
>>> am afraid we can't explain it to plain users. Worse, if we found a way to 
>>> prevent that (offhand, I am not sure whether it is technically possible, 
>>> but even if so), I am afraid the users would complain that they simply 
>>> insist on this terrible approach.
>>> 
>>> Now though they complain some operations are “inexplicably” slow: “I 
>>> understand that operation A which I've launched in one of my windows is 
>>> complicated and thus takes many seconds, that's OK. But at the same moment 
>>> I've launched an operation B in another of my windows; operation B is 
>>> trivial and should be lightning fast, but it took an eternity! Fix your 
>>> broken application!“
>>> 
>>> Well you twit, op B took an eternity since it first waited many seconds 
>>> until the slow op A you yourself launched in the same session finished; 
>>> after that, A took about 100 ms of its own time. But this kind of 
>>> explanation would not do with plain users at all :(
>>> 
>>> Could anybody see any practical solution?
>>> 
>>> Note please that making _all_ R/R lightning fast is practically impossible 
>>> (we would have to refactor too heavily, not an option in a near future). 
>>> Besides I am afraid even if we somehow succeeded to make all R/R reliably 
>>> belong a second or so, they would still launch ten second-long operations 
>>> in ten windows plus one 100 ms in another, and then complain that the last 
>>> one took seconds too :(
>>> 
>>> At this moment about the only solution very ugly work-around I can think of 
>>> would be to choose a couple of the trivial operations whose speed the users 
>>> consider most important, and re-write them without session (they would 
>>> still need to work with the session ID, but important things like the 
>>> current user etc. would have to be cached in the application in some kind 
>>> of static map without using the Session instance at all). Sigh. Darn 
>>> complex, but still worlds easier than attempting to make _all_ R/Rs 
>>> 100ms-or-less...
>>> 
>>> Any better idea?
>>> 
>>> 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/aaron%40chatnbike.com
>>>  
>>> <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: overlapping R/Rs in same session

2024-08-20 Thread Aaron Rosenzweig via Webobjects-dev
Sounds like maybe your session is in the URL? 

What if you put the session in a cookie? Then it’s not possible to have 
multiple tabs in the same browser. The last tab wins. 

> On Aug 19, 2024, at 9:25 AM, ocs--- via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> looks like the main cause of those overlapping R/Rs which we ar clashing with 
> lately is that some users just open their session in more windows or tabs, 
> and work concurrently in those. Sigh.
> 
> It's self-evident why it is a pretty bad idea from the technical POV, but I 
> am afraid we can't explain it to plain users. Worse, if we found a way to 
> prevent that (offhand, I am not sure whether it is technically possible, but 
> even if so), I am afraid the users would complain that they simply insist on 
> this terrible approach.
> 
> Now though they complain some operations are “inexplicably” slow: “I 
> understand that operation A which I've launched in one of my windows is 
> complicated and thus takes many seconds, that's OK. But at the same moment 
> I've launched an operation B in another of my windows; operation B is trivial 
> and should be lightning fast, but it took an eternity! Fix your broken 
> application!“
> 
> Well you twit, op B took an eternity since it first waited many seconds until 
> the slow op A you yourself launched in the same session finished; after that, 
> A took about 100 ms of its own time. But this kind of explanation would not 
> do with plain users at all :(
> 
> Could anybody see any practical solution?
> 
> Note please that making _all_ R/R lightning fast is practically impossible 
> (we would have to refactor too heavily, not an option in a near future). 
> Besides I am afraid even if we somehow succeeded to make all R/R reliably 
> belong a second or so, they would still launch ten second-long operations in 
> ten windows plus one 100 ms in another, and then complain that the last one 
> took seconds too :(
> 
> At this moment about the only solution very ugly work-around I can think of 
> would be to choose a couple of the trivial operations whose speed the users 
> consider most important, and re-write them without session (they would still 
> need to work with the session ID, but important things like the current user 
> etc. would have to be cached in the application in some kind of static map 
> without using the Session instance at all). Sigh. Darn complex, but still 
> worlds easier than attempting to make _all_ R/Rs 100ms-or-less...
> 
> Any better idea?
> 
> 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/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: awake-time long lags

2024-08-01 Thread Aaron Rosenzweig via Webobjects-dev
How is your RAM headspace? Is it possible you are running out of runway? Maybe 
it’s doing lots of garbage collection. 

> On Aug 1, 2024, at 8:32 PM, ocs--- via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> we are encountering another weird problem: a (very) long lag awake-time.
> 
> We happen to log the application-level awake and some of the component-level 
> awakes. Normally, the latter happen just a couple milliseconds from the 
> former. Nevertheless _sometimes_ when the load gets higher and more R/R loops 
> run concurrently, this lag grows up to a complete nonsense — tens or, in the 
> worst cases, hundreds of seconds (between Application.awake and some 
> Component.awake).
> 
> The most obvious answer that either the session-level awake or some of the 
> non-logged component-level awakes might take an eternity upon a higher load 
> is still an open possibility, but quite improbable one: we have profiled our 
> application when the problem did happen with a smaller load, a couple of 
> times the lag grew up to about 5-7 s, and still none of the awake methods 
> ever took more than 40 ms.
> 
> Has perhaps anyone here encountered a similar problem and might suggest a 
> solution or at least a reasonable way to find the culprit?
> 
> 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/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


Solved: Properties file not loading

2024-07-31 Thread Aaron Rosenzweig via Webobjects-dev
NSProjectBundleEnabled is critical!

I don’t rightly know what this setting is about. By the name of it, I’d figure 
if it was on and enabled it would make a bundle for ProjectBuilder and/or Xcode 
(back when Apple had not abandoned us). 

For an app to find properties in a framework the "WO" tab in a launch 
configuration must have: checked -DNSProjectBundleEnabled=true

It’s the key difference between the new launch config and the old one that made 
it work. Also, if you happened to follow closely, I mentioned that one app I 
had was fine and the other wasn’t. The app that was fine (could see properties 
in the included framework) is a newer app and the launch config for it had 
NSProjectBundleEnabled both checked and true. The older app, did not. 

> On Jul 31, 2024, at 10:45 AM, Aaron Rosenzweig  wrote:
> 
> Thanks Ramsey, 
> 
> That’s a very insightful tip. My framework had it correct but both apps did 
> not. Namely, inside the  tags of the pom.xml file should contain:
> 
> 
> 
> Resources
> false
> Components
> 
> 
> Resources
> false
> Resources
> 
> 
> WebServerResources
> false
> WebServerResources
> 
> 
> 
> But that didn’t help my situation of one app being the framework properties 
> and the other app not seeing them. Still, it makes sense to have that defined 
> in both the apps and the framework so glad you called it out! Thank you. 
> 
> Good news though, I’ve made some progress. If I make a completely new Eclipse 
> launch config (not a duplicate) I can launch the troublesome app and the 
> framework properties are visible to the app! 
> 
> Curiously, I don’t know what is significantly different between the new and 
> the old “.launch” config files. When I try to selectively make changes by 
> hand to the old file (while visually diffing with the new file) the result 
> doesn’t work. If copy/replace all the contents of the old with new, it works. 
> 
> The old .launch file is in git and shared by others. So right now I’m trying 
> to get things like VM arguments and other settings into it while keeping it 
> still finding the framework properties. 
> 
> Confused but getting there. 
> 
> Thank you Ramsey, Markus, and everyone :-)
> 
>> On Jul 31, 2024, at 9:29 AM, Ramsey Gurley > <mailto:ramsey.gur...@practicemojo.com>> wrote:
>> 
>> Maven by default checks src/main/resources whereas fluffy bunny layout by 
>> default looks at Resources. You can specify that maven should look in 
>> Resources in your pom.xml file if that is where you would like them located, 
>> which you probably do for zero conflicts with WOLips. See lines 52-70 here,
>> https://github.com/nullterminated/woarchetypes/blob/master/webobjects-app/src/main/resources/archetype-resources/pom.xml
>>  
>> <https://github.com/nullterminated/woarchetypes/blob/master/webobjects-app/src/main/resources/archetype-resources/pom.xml>
>> 
>> 
>> From: Aaron Rosenzweig via Webobjects-dev > <mailto:webobjects-dev@lists.apple.com>>
>> Sent: Tuesday, July 30, 2024 5:34 PM
>> To: WebObjects-Dev List > <mailto:webobjects-dev@lists.apple.com>>
>> Subject: Properties file not loading
>>  
>> Anyone struggle with app not finding properties files when launching from 
>> Eclipse? 
>> 
>> I’m still trying to go form ANT -> Maven and there is a shared framework 
>> with a properties file in it that I want to be pulled into various apps. 
>> 
>> Curiously, app “A” is able to pull in the properties just fine but app “B” 
>> does not. 
>> 
>> I would have thought I could compare the two projects and determine a useful 
>> difference (since it works in one app) but I have struck out. Don’t see what 
>> the difference could be. 
>> 
>> Anyone have any insight or advice on what to look for? How can I get app “B” 
>> to see the properties file from the framework? 
>> 
>> Many thanks,
>> — Aaron
>> 
>>  ___
>> 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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apple.com%2Fmailman%2Foptions%2Fwebobjects-dev%2Framsey.gurley%2540practicemojo.com&data=05%7C02%7Cramsey.gurley%40practicemojo.com

Re: Properties file not loading

2024-07-31 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Ramsey, 

That’s a very insightful tip. My framework had it correct but both apps did 
not. Namely, inside the  tags of the pom.xml file should contain:



Resources
false
Components


Resources
false
Resources


WebServerResources
false
WebServerResources



But that didn’t help my situation of one app being the framework properties and 
the other app not seeing them. Still, it makes sense to have that defined in 
both the apps and the framework so glad you called it out! Thank you. 

Good news though, I’ve made some progress. If I make a completely new Eclipse 
launch config (not a duplicate) I can launch the troublesome app and the 
framework properties are visible to the app! 

Curiously, I don’t know what is significantly different between the new and the 
old “.launch” config files. When I try to selectively make changes by hand to 
the old file (while visually diffing with the new file) the result doesn’t 
work. If copy/replace all the contents of the old with new, it works. 

The old .launch file is in git and shared by others. So right now I’m trying to 
get things like VM arguments and other settings into it while keeping it still 
finding the framework properties. 

Confused but getting there. 

Thank you Ramsey, Markus, and everyone :-)

> On Jul 31, 2024, at 9:29 AM, Ramsey Gurley  
> wrote:
> 
> Maven by default checks src/main/resources whereas fluffy bunny layout by 
> default looks at Resources. You can specify that maven should look in 
> Resources in your pom.xml file if that is where you would like them located, 
> which you probably do for zero conflicts with WOLips. See lines 52-70 here,
> https://github.com/nullterminated/woarchetypes/blob/master/webobjects-app/src/main/resources/archetype-resources/pom.xml
>  
> <https://github.com/nullterminated/woarchetypes/blob/master/webobjects-app/src/main/resources/archetype-resources/pom.xml>
> 
> 
> From: Aaron Rosenzweig via Webobjects-dev 
> Sent: Tuesday, July 30, 2024 5:34 PM
> To: WebObjects-Dev List 
> Subject: Properties file not loading
>  
> Anyone struggle with app not finding properties files when launching from 
> Eclipse? 
> 
> I’m still trying to go form ANT -> Maven and there is a shared framework with 
> a properties file in it that I want to be pulled into various apps. 
> 
> Curiously, app “A” is able to pull in the properties just fine but app “B” 
> does not. 
> 
> I would have thought I could compare the two projects and determine a useful 
> difference (since it works in one app) but I have struck out. Don’t see what 
> the difference could be. 
> 
> Anyone have any insight or advice on what to look for? How can I get app “B” 
> to see the properties file from the framework? 
> 
> Many thanks,
> — Aaron
> 
>  ___
> 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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apple.com%2Fmailman%2Foptions%2Fwebobjects-dev%2Framsey.gurley%2540practicemojo.com&data=05%7C02%7Cramsey.gurley%40practicemojo.com%7C25e56162b7b9400ce3dd08dcb0e7c671%7Cde0a512999d34d35a92809047a134775%7C0%7C0%7C638579756726673666%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=g%2BH%2FBhYmvb9eGeqBrRLtNBUFjAN2fg7DhlXZxrq4Fps%3D&reserved=0
>  
> <https://lists.apple.com/mailman/options/webobjects-dev/ramsey.gurley%40practicemojo.com>
> 
> This email sent to ramsey.gur...@practicemojo.com 
> <mailto:ramsey.gur...@practicemojo.com>
> Confidentiality Notice: This email, including all attachments and replies 
> thereto, are covered by the Electronic Communications Privacy Act, 18 U.S.C. 
> Sections 2510-2521 and are legally privileged. This information is 
> confidential, and intended only for the use of the individuals or entities 
> named above. If you are not the intended recipient, you are hereby notified 
> that any disclosure, copying, distribution or the taking of any action in 
> reliance on the contents of this transmitted information is strictly 
> prohibited. Please notify us if you have received this transmission in error. 
> Thank you.

 ___
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


Properties file not loading

2024-07-30 Thread Aaron Rosenzweig via Webobjects-dev
Anyone struggle with app not finding properties files when launching from 
Eclipse? 

I’m still trying to go form ANT -> Maven and there is a shared framework with a 
properties file in it that I want to be pulled into various apps. 

Curiously, app “A” is able to pull in the properties just fine but app “B” does 
not. 

I would have thought I could compare the two projects and determine a useful 
difference (since it works in one app) but I have struck out. Don’t see what 
the difference could be. 

Anyone have any insight or advice on what to look for? How can I get app “B” to 
see the properties file from the framework? 

Many thanks,
— Aaron

 ___
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


Advisory: Eclipse bundless builds + maven = no está bien

2024-07-30 Thread Aaron Rosenzweig via Webobjects-dev
Do you know there is a concept of “bundless builds” ? It works with ANT but not 
with Maven. 

If you try to use bundless builds with Maven you’ll get runtime errors when 
launching via Eclipse related to “null” for "NSProperties._mainBundleName()”

I've been using Eclipse bundless builds for a very long time. It's an option in 
Eclipse WOLips (I'll tell you where in a moment). I think once upon a time, in 
Ant/Eclipse, it used to build .woa bundles and launch from that. It was ok but 
sometimes it would get sort of stuck and you'd have to manually delete the .woa 
to get a true build and it was a little slow to package up the .woa before 
launch. Other than those niggling issues, it was fine. But those issues were 
enough to bother some people in the WO community to question why we even needed 
a .woa bundle and if we could launch without it. I don't even know how that 
works but it was an option to go with a bundless build and that seemed to be 
more reliable, faster to launch, etc. 

Turns out, now with Maven, you cannot use bundless builds! If you do, you won't 
see any errors/problems (no red) in Eclipse but you'll get runtime errors when 
you launch. Most notable is a null mainBundleName. 

It now seems so obvious, I don't have a bundle name because I don't have a 
bundle (you can add "dumb ass" if you want). But I didn't need one for ANT and 
this was not at all obvious to me. It's one of those settings you make in your 
Eclipse workspace and forget about it. 

In Eclipse, if you go to "Preferences" in the top menu bar (I think it is OS 
specific, maybe under "Help" or "Eclipse") you get preferences for he entire 
workspace:
  1. There you can open the triangle for "WOLips"
  2. Now choose "Build" and you'll see many checkboxes. 
  3. Maven requires you to have this box checked "Generate bundles"
  4. Restart Eclipse then clean the workspace, etc. 

When you do this, now inside the "target" folder where Maven puts compiled java 
class files, it now makes a .woa bundle and obviously uses that during launch 
from inside Eclipse. 
 ___
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


Summary: modern maven requires secure HTTPS

2024-07-29 Thread Aaron Rosenzweig via Webobjects-dev
I haven’t figured out all my ant -> maven conversion issues but wanted to 
summarize one finding. 

Newer maven installations require HTTPS (with an “S” for “secure”) for your 
connections to things such as the wocommunity repos. 

It wasn’t always this way and following community tutorials you might cut and 
paste and not realize the difference between http: and https:

You might see lines like this when working with maven: Using mirror 
maven-default-http-blocker (http://0.0.0.0/) for wocommunity.releases 
(http://maven.wocommunity.org/content/groups/public).

That’s because there is a default settings file in a location like this one if 
you are using home-brew:
/usr/local/Cellar/maven/3.9.5/libexec/conf/settings.xml

And the following definition there ruins your day:

  maven-default-http-blocker
  external:http:*
  Pseudo repository to mirror external repositories initially using 
HTTP.
  http://0.0.0.0/
  true


The good news is the fix is simple, be sure you always use “https:” (with the 
“s” on the end) whenever you need a resource. 

Inside your local ~/.m2/settings.xml you probably need something like this:
https://maven.apache.org/POM/4.0.0";
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="https://maven.apache.org/POM/4.0.0
  https://maven.apache.org/xsd/settings-1.0.0.xsd";>

org.objectstyle.woproject.maven2




default

true



wocommunity.releases
WOCommunity Releases 
Repository


https://maven.wocommunity.org/content/groups/public


true


false



wocommunity.snapshots
WOCommunity Snapshots 
Repository


https://maven.wocommunity.org/content/groups/public-snapshots


false


true





wocommunity.releases
WOCommunity Releases 
Repository


https://maven.wocommunity.org/content/groups/public


true


false



wocommunity.snapshots
WOCommunity Snapshots 
Repository


https://maven.wocommunity.org/content/groups/public-snapshots


false


true











 ___
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 build - no main bundle name

2024-07-29 Thread Aaron Rosenzweig via Webobjects-dev
Hi Markus, 

I'm still getting a similar error when I do "mvn build" from terminal -> 
[ERROR] Unresolveable build extension: Plugin 
org.wocommunity:wolifecycle-maven-plugin:2.6-SNAPSHOT or one of its 
dependencies could not be resolved

I'm referring to the 2.6-SNAPSHOT from the pom.xml file like so:

org.wocommunity
wolifecycle-maven-plugin
2.6-SNAPSHOT
true

true



Not sure what I'm missing, maybe the group id is wrong? But it doesn't complain 
in Eclipse. I'm really confused! Thanks for helping me. 

> On Jul 29, 2024, at 12:52 PM, Markus Stoll, junidas GmbH 
>  wrote:
> 
> as its a snapshot, its here
> 
> Index of 
> /repositories/snapshots/org/wocommunity/wolifecycle-maven-plugin/2.6-SNAPSHOT
> maven.wocommunity.org
> 
>  
> <https://maven.wocommunity.org/content/repositories/snapshots/org/wocommunity/wolifecycle-maven-plugin/2.6-SNAPSHOT/>Index
>  of 
> /repositories/snapshots/org/wocommunity/wolifecycle-maven-plugin/2.6-SNAPSHOT 
> <https://maven.wocommunity.org/content/repositories/snapshots/org/wocommunity/wolifecycle-maven-plugin/2.6-SNAPSHOT/>
> maven.wocommunity.org 
> <https://maven.wocommunity.org/content/repositories/snapshots/org/wocommunity/wolifecycle-maven-plugin/2.6-SNAPSHOT/>
> 
> <https://maven.wocommunity.org/content/repositories/snapshots/org/wocommunity/wolifecycle-maven-plugin/2.6-SNAPSHOT/>
> 
> 2.6 has some small but important changes (at least to me)
> 
> Markus
> 
>> Am 29.07.2024 um 18:47 schrieb Aaron Rosenzweig :
>> 
>> Hi Markus, 
>> 
>> The latest I see is 2.5 for the lifecycle plugin here: 
>> https://mvnrepository.com/artifact/org.wocommunity/wolifecycle-maven-plugin 
>> <https://mvnrepository.com/artifact/org.wocommunity/wolifecycle-maven-plugin>
>> 
>> Where is 2.6?
>> 
>>> On Jul 29, 2024, at 12:45 PM, Aaron Rosenzweig >> <mailto:aa...@chatnbike.com>> wrote:
>>> 
>>> Thanks Markus,
>>> 
>>> I was using this to refer to the plugin:
>>> 
>>> 
>>> org.wocommunity
>>> wolifecycle-maven-plugin
>>> 2.5
>>> true
>>> 
>>> true
>>> 
>>> 
>>> 
>>> I’ll try 2.6-SNAPSHOT :-)
>>> 
>>>> On Jul 29, 2024, at 12:17 PM, Markus Stoll, junidas GmbH 
>>>> mailto:markus.st...@junidas.de>> wrote:
>>>> 
>>>> you should use version 2.6-SNAPSHOT for wolifecycle-maven-plugin, which is 
>>>> the current one and do you refer to the wocommunity repository for 
>>>> obtaining the plugin?
>>>> 
>>>> I strongly suggest to first fix the maven standalone build. Once this is 
>>>> building and running, do a new import as maven project into eclipse.
>>>> 
>>>> Regards
>>>> Markus
>>>> 
>>>> 
>>>>> Am 29.07.2024 um 18:07 schrieb Aaron Rosenzweig >>>> <mailto:aa...@chatnbike.com>>:
>>>>> 
>>>>> Inside the WO app’s folder from terminal I tried: mvn build
>>>>> 
>>>>> It says: Unresolveable build extension: Plugin 
>>>>> org.wocommunity:wolifecycle-maven-plugin:2.5 or one of its dependencies 
>>>>> could not be resolved: Failed to read artifact descriptor for 
>>>>> org.wocommunity:wolifecycle-maven-plugin:jar:2.5: 
>>>>> 
>>>>> That’s interesting, I don’t see errors like that within Eclipse. 
>>>>> 
>>>>>> On Jul 29, 2024, at 12:02 PM, Aaron Rosenzweig >>>>> <mailto:aa...@chatnbike.com>> wrote:
>>>>>> 
>>>>>> Hi Markus thanks for the quick reply!
>>>>>> 
>>>>>> Good question, I don’t know. I haven’t run from command line, hadn’t 
>>>>>> done it with Ant and also haven’t tried it with Maven. It’s an 
>>>>>> interesting idea to try if I can figure it out. Maybe it will show a 
>>>>>> difference that leads to discovery. 
>>>>>> 
>>>>>>> On Jul 29, 2024, at 11:58 AM, Markus Stoll, junidas GmbH 
>>>>>>> mailto:markus.st...@junidas.de>> wrote:
>>>>>>> 
>>>>>>> Hi Aaron,
>>>>>>> 
>>>>>>> I did the very thing just recently without any problems
>>>>>>> 
>>>>>>> does the maven build run outside eclipse (standalone)? So does the 
>>

Re: Maven build - no main bundle name

2024-07-29 Thread Aaron Rosenzweig via Webobjects-dev
Hi Markus, 

The latest I see is 2.5 for the lifecycle plugin here: 
https://mvnrepository.com/artifact/org.wocommunity/wolifecycle-maven-plugin 
<https://mvnrepository.com/artifact/org.wocommunity/wolifecycle-maven-plugin>

Where is 2.6?

> On Jul 29, 2024, at 12:45 PM, Aaron Rosenzweig  wrote:
> 
> Thanks Markus,
> 
> I was using this to refer to the plugin:
> 
> 
>   org.wocommunity
>   wolifecycle-maven-plugin
>   2.5
>   true
>   
>   true
>   
> 
> 
> I’ll try 2.6-SNAPSHOT :-)
> 
>> On Jul 29, 2024, at 12:17 PM, Markus Stoll, junidas GmbH 
>> mailto:markus.st...@junidas.de>> wrote:
>> 
>> you should use version 2.6-SNAPSHOT for wolifecycle-maven-plugin, which is 
>> the current one and do you refer to the wocommunity repository for obtaining 
>> the plugin?
>> 
>> I strongly suggest to first fix the maven standalone build. Once this is 
>> building and running, do a new import as maven project into eclipse.
>> 
>> Regards
>> Markus
>> 
>> 
>>> Am 29.07.2024 um 18:07 schrieb Aaron Rosenzweig >> <mailto:aa...@chatnbike.com>>:
>>> 
>>> Inside the WO app’s folder from terminal I tried: mvn build
>>> 
>>> It says: Unresolveable build extension: Plugin 
>>> org.wocommunity:wolifecycle-maven-plugin:2.5 or one of its dependencies 
>>> could not be resolved: Failed to read artifact descriptor for 
>>> org.wocommunity:wolifecycle-maven-plugin:jar:2.5: 
>>> 
>>> That’s interesting, I don’t see errors like that within Eclipse. 
>>> 
>>>> On Jul 29, 2024, at 12:02 PM, Aaron Rosenzweig >>> <mailto:aa...@chatnbike.com>> wrote:
>>>> 
>>>> Hi Markus thanks for the quick reply!
>>>> 
>>>> Good question, I don’t know. I haven’t run from command line, hadn’t done 
>>>> it with Ant and also haven’t tried it with Maven. It’s an interesting idea 
>>>> to try if I can figure it out. Maybe it will show a difference that leads 
>>>> to discovery. 
>>>> 
>>>>> On Jul 29, 2024, at 11:58 AM, Markus Stoll, junidas GmbH 
>>>>> mailto:markus.st...@junidas.de>> wrote:
>>>>> 
>>>>> Hi Aaron,
>>>>> 
>>>>> I did the very thing just recently without any problems
>>>>> 
>>>>> does the maven build run outside eclipse (standalone)? So does the 
>>>>> problem occur only when started from eclipse?
>>>>> 
>>>>> Regards
>>>>> Markus
>>>>> 
>>>>>> Am 29.07.2024 um 17:49 schrieb Aaron Rosenzweig via Webobjects-dev 
>>>>>> mailto:webobjects-dev@lists.apple.com>>:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I’m trying to convert an ANT based webobjects application into a Maven 
>>>>>> build. At the moment It’s building in Eclipse without errors but when I 
>>>>>> try to launch within the Eclipse environment I get errors due to not 
>>>>>> finding the main bundle. 
>>>>>> 
>>>>>> Specifically the following call inside of ERXApplication returns null: 
>>>>>> NSProperties._mainBundleName()
>>>>>> 
>>>>>> It should return something, but it doesn’t. Has anyone any advice on 
>>>>>> what the issue might be?
>>>>>> 
>>>>>> Many thanks,
>>>>>> — Aaron
>>>>>> ___
>>>>>> 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/markus.stoll%40junidas.de
>>>>>>  
>>>>>> <https://lists.apple.com/mailman/options/webobjects-dev/markus.stoll%40junidas.de>
>>>>>> 
>>>>>> This email sent to markus.st...@junidas.de 
>>>>>> <mailto:markus.st...@junidas.de>
>>>>> 
>>>>> 
>>>> 
>>> 
>> 
>> Mit freundlichen Grüßen
>> 
>> Markus Stoll
>> 
>> -- 
>> Dr. Markus Stoll (Geschäftsführer)
>> markus.st...@junidas.de <mailto:markus.st...@junidas.de>
>> 
>> Junidas GmbH, Aixheimer Str. 12, 70619 Stuttgart
>> Tel. +49 (711) 4599799-13, Fax +49 (711) 4599799-10
>> Geschäftsführer: Dr. Markus Stoll, Matthias Zepf
>> Amtsgericht Stuttgart, HRB 21939
>> 
> 

 ___
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 build - no main bundle name

2024-07-29 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Markus,

I was using this to refer to the plugin:


org.wocommunity
wolifecycle-maven-plugin
2.5
true

true



I’ll try 2.6-SNAPSHOT :-)

> On Jul 29, 2024, at 12:17 PM, Markus Stoll, junidas GmbH 
>  wrote:
> 
> you should use version 2.6-SNAPSHOT for wolifecycle-maven-plugin, which is 
> the current one and do you refer to the wocommunity repository for obtaining 
> the plugin?
> 
> I strongly suggest to first fix the maven standalone build. Once this is 
> building and running, do a new import as maven project into eclipse.
> 
> Regards
> Markus
> 
> 
>> Am 29.07.2024 um 18:07 schrieb Aaron Rosenzweig :
>> 
>> Inside the WO app’s folder from terminal I tried: mvn build
>> 
>> It says: Unresolveable build extension: Plugin 
>> org.wocommunity:wolifecycle-maven-plugin:2.5 or one of its dependencies 
>> could not be resolved: Failed to read artifact descriptor for 
>> org.wocommunity:wolifecycle-maven-plugin:jar:2.5: 
>> 
>> That’s interesting, I don’t see errors like that within Eclipse. 
>> 
>>> On Jul 29, 2024, at 12:02 PM, Aaron Rosenzweig >> <mailto:aa...@chatnbike.com>> wrote:
>>> 
>>> Hi Markus thanks for the quick reply!
>>> 
>>> Good question, I don’t know. I haven’t run from command line, hadn’t done 
>>> it with Ant and also haven’t tried it with Maven. It’s an interesting idea 
>>> to try if I can figure it out. Maybe it will show a difference that leads 
>>> to discovery. 
>>> 
>>>> On Jul 29, 2024, at 11:58 AM, Markus Stoll, junidas GmbH 
>>>> mailto:markus.st...@junidas.de>> wrote:
>>>> 
>>>> Hi Aaron,
>>>> 
>>>> I did the very thing just recently without any problems
>>>> 
>>>> does the maven build run outside eclipse (standalone)? So does the problem 
>>>> occur only when started from eclipse?
>>>> 
>>>> Regards
>>>> Markus
>>>> 
>>>>> Am 29.07.2024 um 17:49 schrieb Aaron Rosenzweig via Webobjects-dev 
>>>>> mailto:webobjects-dev@lists.apple.com>>:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I’m trying to convert an ANT based webobjects application into a Maven 
>>>>> build. At the moment It’s building in Eclipse without errors but when I 
>>>>> try to launch within the Eclipse environment I get errors due to not 
>>>>> finding the main bundle. 
>>>>> 
>>>>> Specifically the following call inside of ERXApplication returns null: 
>>>>> NSProperties._mainBundleName()
>>>>> 
>>>>> It should return something, but it doesn’t. Has anyone any advice on what 
>>>>> the issue might be?
>>>>> 
>>>>> Many thanks,
>>>>> — Aaron
>>>>> ___
>>>>> 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/markus.stoll%40junidas.de
>>>>>  
>>>>> <https://lists.apple.com/mailman/options/webobjects-dev/markus.stoll%40junidas.de>
>>>>> 
>>>>> This email sent to markus.st...@junidas.de 
>>>>> <mailto:markus.st...@junidas.de>
>>>> 
>>>> 
>>> 
>> 
> 
> Mit freundlichen Grüßen
> 
> Markus Stoll
> 
> -- 
> Dr. Markus Stoll (Geschäftsführer)
> markus.st...@junidas.de
> 
> Junidas GmbH, Aixheimer Str. 12, 70619 Stuttgart
> Tel. +49 (711) 4599799-13, Fax +49 (711) 4599799-10
> Geschäftsführer: Dr. Markus Stoll, Matthias Zepf
> Amtsgericht Stuttgart, HRB 21939
> 

 ___
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 build - no main bundle name

2024-07-29 Thread Aaron Rosenzweig via Webobjects-dev
Inside the WO app’s folder from terminal I tried: mvn build

It says: Unresolveable build extension: Plugin 
org.wocommunity:wolifecycle-maven-plugin:2.5 or one of its dependencies could 
not be resolved: Failed to read artifact descriptor for 
org.wocommunity:wolifecycle-maven-plugin:jar:2.5: 

That’s interesting, I don’t see errors like that within Eclipse. 

> On Jul 29, 2024, at 12:02 PM, Aaron Rosenzweig  wrote:
> 
> Hi Markus thanks for the quick reply!
> 
> Good question, I don’t know. I haven’t run from command line, hadn’t done it 
> with Ant and also haven’t tried it with Maven. It’s an interesting idea to 
> try if I can figure it out. Maybe it will show a difference that leads to 
> discovery. 
> 
>> On Jul 29, 2024, at 11:58 AM, Markus Stoll, junidas GmbH 
>> mailto:markus.st...@junidas.de>> wrote:
>> 
>> Hi Aaron,
>> 
>> I did the very thing just recently without any problems
>> 
>> does the maven build run outside eclipse (standalone)? So does the problem 
>> occur only when started from eclipse?
>> 
>> Regards
>> Markus
>> 
>>> Am 29.07.2024 um 17:49 schrieb Aaron Rosenzweig via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>>:
>>> 
>>> Hi,
>>> 
>>> I’m trying to convert an ANT based webobjects application into a Maven 
>>> build. At the moment It’s building in Eclipse without errors but when I try 
>>> to launch within the Eclipse environment I get errors due to not finding 
>>> the main bundle. 
>>> 
>>> Specifically the following call inside of ERXApplication returns null: 
>>> NSProperties._mainBundleName()
>>> 
>>> It should return something, but it doesn’t. Has anyone any advice on what 
>>> the issue might be?
>>> 
>>> Many thanks,
>>> — Aaron
>>> ___
>>> 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/markus.stoll%40junidas.de
>>>  
>>> <https://lists.apple.com/mailman/options/webobjects-dev/markus.stoll%40junidas.de>
>>> 
>>> This email sent to markus.st...@junidas.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: Maven build - no main bundle name

2024-07-29 Thread Aaron Rosenzweig via Webobjects-dev
Hi Markus thanks for the quick reply!

Good question, I don’t know. I haven’t run from command line, hadn’t done it 
with Ant and also haven’t tried it with Maven. It’s an interesting idea to try 
if I can figure it out. Maybe it will show a difference that leads to 
discovery. 

> On Jul 29, 2024, at 11:58 AM, Markus Stoll, junidas GmbH 
>  wrote:
> 
> Hi Aaron,
> 
> I did the very thing just recently without any problems
> 
> does the maven build run outside eclipse (standalone)? So does the problem 
> occur only when started from eclipse?
> 
> Regards
> Markus
> 
>> Am 29.07.2024 um 17:49 schrieb Aaron Rosenzweig via Webobjects-dev 
>> :
>> 
>> Hi,
>> 
>> I’m trying to convert an ANT based webobjects application into a Maven 
>> build. At the moment It’s building in Eclipse without errors but when I try 
>> to launch within the Eclipse environment I get errors due to not finding the 
>> main bundle. 
>> 
>> Specifically the following call inside of ERXApplication returns null: 
>> NSProperties._mainBundleName()
>> 
>> It should return something, but it doesn’t. Has anyone any advice on what 
>> the issue might be?
>> 
>> Many thanks,
>> — Aaron
>> ___
>> 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/markus.stoll%40junidas.de
>> 
>> This email sent to markus.st...@junidas.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


Maven build - no main bundle name

2024-07-29 Thread Aaron Rosenzweig via Webobjects-dev
Hi,

I’m trying to convert an ANT based webobjects application into a Maven build. 
At the moment It’s building in Eclipse without errors but when I try to launch 
within the Eclipse environment I get errors due to not finding the main bundle. 

Specifically the following call inside of ERXApplication returns null: 
NSProperties._mainBundleName()

It should return something, but it doesn’t. Has anyone any advice on what the 
issue might be?

Many thanks,
— Aaron
 ___
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: WOAjaxCollapsibleComponentContent ???

2024-06-26 Thread Aaron Rosenzweig via Webobjects-dev
Hi Markus :-)

Glad that worked out for you. I think there is an AjaxExamples project in 
WOnder which is an app you can run and see a few things. 

You pick up on things after toiling with it for a while. 


> On Jun 26, 2024, at 7:34 AM, mailinglists  wrote:
> 
> Thanks Aaron, works perfectly. 
> 
> Other than looking at the code how would one discover what AjaxHyperlink and 
> friends can do? The documentation / JavaDoc is not very revealing.
> 
> ---markus---
> 
>> On 23 Jun 2024, at 17:43, Aaron Rosenzweig  wrote:
>> 
>> Hi Markus, 
>> 
>> To use  like you envision you need to add some 
>> scaffolding. 
>> 
>> Realize that the ajax link and the ajax submit button can be given a named 
>> function. When you do that, they don’t render, put provide a name you can 
>> call on the client side that will do a round trip to the server. So you need 
>> to consider if you have a form (or not) and if you want to synchronize 
>> bindings (or not) to choose between them. But let’s assume you just want a 
>> “click” without form values going across. You’ll need to place an element 
>> like this near your :
>> 
>> > ERXWOContext.safeIdentifierName(context(), true /*willCache*/);
>>   }
>>   return _toggleFunctionName;
>> }
>> 
>> public WOActionResults toggle() {
>>   setIsOpen( ! isOpen());
>>   return null;
>> }
>> 
>> 
>> Then you’ll need to build your summary tag as a container element and listen 
>> to click events like so:
>> 
>> >   return code;
>> }
>> 
>> Or if there is a lot of complex stuff going on and race conditions with JS 
>> events maybe you need a hack to invoke Ajax on a delay
>> public String onclickJavascript(){
>>   String code = "setTimeout(" + toggleFunctionName() + ", 500); return 
>> true;";
>>   return code;
>> }
>> 
>> Notice that there is no update container specified on the AjaxHyperlink. 
>> That’s because you don’t need to refresh anything, you only need to tell the 
>> server the state of open/close. 
>> 
>> 
>>> On Jun 23, 2024, at 7:28 AM, mailinglists via Webobjects-dev 
>>>  wrote:
>>> 
>>> Anyone using this component? It has bindings that seem not to be used.  
>>> Does this work at all? I cannot make sense of it.
>>> 
>>> Alternatively has anyone made proper use of the html construct 
>>> ? It works nicely but I cannot preserve “open” state when 
>>> updating an enclosing container because I have not found a way to call back 
>>> into the server when the summary is clicked to open/close. This action is 
>>> pure client side performed by the browser itself. Any way to tap into it?
>>> 
>>> Any other usable component around for such a hide/reveal functionality?
>>> 
>>> Thanks for your ideas
>>> ---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: WOAjaxCollapsibleComponentContent ???

2024-06-23 Thread Aaron Rosenzweig via Webobjects-dev
Hi Markus, 

To use  like you envision you need to add some scaffolding. 

Realize that the ajax link and the ajax submit button can be given a named 
function. When you do that, they don’t render, put provide a name you can call 
on the client side that will do a round trip to the server. So you need to 
consider if you have a form (or not) and if you want to synchronize bindings 
(or not) to choose between them. But let’s assume you just want a “click” 
without form values going across. You’ll need to place an element like this 
near your :

 On Jun 23, 2024, at 7:28 AM, mailinglists via Webobjects-dev 
>  wrote:
> 
> Anyone using this component? It has bindings that seem not to be used.  Does 
> this work at all? I cannot make sense of it.
> 
> Alternatively has anyone made proper use of the html construct 
> ? It works nicely but I cannot preserve “open” state when 
> updating an enclosing container because I have not found a way to call back 
> into the server when the summary is clicked to open/close. This action is 
> pure client side performed by the browser itself. Any way to tap into it?
> 
> Any other usable component around for such a hide/reveal functionality?
> 
> Thanks for your ideas
> ---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: re/store context somehow? (OCsite)

2024-05-17 Thread Aaron Rosenzweig via Webobjects-dev
Your best bet is likely to store the entire WOComponent as an ivar in the 
session. You can get it from context().page()

That way wen they return and the session is still alive you can return that 
ivar to render where they were and what they were doing. 

So you’ll need to store it in the session in something like the end of 
appendToResponse() and then maybe have a link in the top left corner to 
“restore prior page"

> On May 17, 2024, at 4:56 PM, Amedeo Mantica via Webobjects-dev 
>  wrote:
> 
> I no longer use WO but I recall this framework in wonder: 
> ERPersistentSessionStorage
> 
> Amedeo
> 
> 
>> On 17 May 2024, at 22:01, Martino Limido via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> Hi there,
>> 
>> it’s important to note that the `WOContext` object in WebObjects ends with 
>> the lifecycle of the request and response. This means that simply storing 
>> the `WOContext` object is not feasible as it will no longer be available 
>> after the request is completed.
>> 
>> ### Possibility of Implementation:
>> 
>> 1. **Context Serialization**:
>>  - While WebObjects does not natively support serializing the entire 
>> `WOContext`, it is possible to manually serialize the essential parts of the 
>> context. This includes capturing the state of components, user inputs, and 
>> any relevant session information.
>>  - You can use `context().clone()` in `Session.sleep()` to clone the context 
>> state. However, ensure that all referenced objects within the context are 
>> serializable. This might involve customizing the serialization process for 
>> complex objects.
>> 
>> 2. **State Storage**:
>>  - Store the serialized state in a persistent format, such as a database or 
>> a session file. The storage mechanism should be robust enough to handle the 
>> complexity of the serialized data and ensure it can be accurately retrieved 
>> later.
>> 
>> 3. **State Restoration**:
>>  - In the `restorePreviousAction` DirectAction, implement a mechanism to 
>> deserialize and reintegrate the previously saved state. This involves 
>> reconstructing the `WOContext` and ensuring all components and user states 
>> are accurately restored.
>>  - This might require a custom deserialization logic to handle complex 
>> objects and ensure they are correctly linked within the session.
>> 
>> ### Challenges:
>> - **Complexity**: Serializing complex objects and managing cross-references 
>> can significantly increase code complexity. WebObjects' inherent 
>> statefulness and deep object graph make this particularly challenging.
>> - **Data Integrity**: Ensuring data consistency during the serialization and 
>> deserialization process is critical. Any mismatch can lead to errors or 
>> inconsistent application states.
>> - **Performance**: Serialization and deserialization can impact performance, 
>> especially if the context is large or complex. It’s important to optimize 
>> this process to minimize the performance overhead.
>> 
>> ### Recommendation:
>> Given the complexities and potential issues with this approach, it might be 
>> better to rethink the application design. Consider structuring the 
>> application to use DirectActions with simpler states that are easier to 
>> restore. This could involve:
>> - Breaking down complex states into smaller, more manageable parts that can 
>> be easily serialized and deserialized.
>> - Ensuring that each DirectAction has a well-defined and minimal state that 
>> can be captured and restored without requiring the entire context.
>> - Leveraging stateless designs where possible, and using session storage 
>> judiciously to maintain essential state information.
>> 
>> ### Conclusion:
>> Implementing this functionality is technically possible but requires 
>> significant effort and a deep understanding of the object lifecycle in 
>> WebObjects. Given that the `WOContext` object ends with the request/response 
>> cycle, manually serializing and restoring its state is complex and 
>> potentially error-prone.
>> 
>> 
>> Best regards,  
>> Martino
>> 
>>> Il giorno 17 mag 2024, alle ore 21:00, webobjects-dev-
>>> 
>>> 1. re/store context somehow? (OCsite)
>>> 
>>> 
>>> --
>>> 
>>> Message: 1
>>> Date: Thu, 16 May 2024 21:14:39 +0200
>>> From: OCsite 
>>> To: OCsite via Webobjects-dev 
>>> Subject: re/store context somehow?
>>> Message-ID: <1d450aeb-ded8-4b1a-8438-59039f31b...@ocs.cz>
>>> Content-Type: text/plain; charset="utf-8"
>>> 
>>> Hi there,
>>> 
>>> my client made a somewhat weird request: wants me to store ?the last 
>>> context the user worked in? in his session, and restore it when the user 
>>> comes to the application through a specific Direct Action (and the session 
>>> still lives).
>>> 
>>> In other words, suppose the user works in the app for awhile, and then 
>>> closes his browser, remembering just the session ID, nothing else.
>>> 
>>> Next thing he does, he opens 
>>> .

Re: Thanks Stefan! (mod_proxy)

2024-03-08 Thread Aaron Rosenzweig via Webobjects-dev
Hi Michael, 

I don’t know the future of mod_WebObjects. Last updates were two years ago but 
they were fairly significant, fixing a security exploit. 

Thanks for mentioning MPM-event issues as I wasn’t aware until you mentioned 
them. Perhaps that is what we were experiencing. 

To give an update, we got stuck deploying to production environment last night 
and gave up but we kept looking into it and deployed mod_proxy today and 
preliminary reports show people are happy. 

We had missed the part about adding a header: x-webobjects-adaptor-version

We had it in staging but overlooked it in production. 

So if you have a java instance running and direct-connect disabled, you can’t 
do something like this:
curl localhost:9001/cgi-bin/WebObjects/app.woa

If you do you’ll get a: (52) Empty reply from server

So how would mod_proxy or mod_WebObjects connect to it then? Well they give 
that header I mentioned above. So you’d need to do this with curl: 
curl localhost:9001/cgi-bin/WebObjects/app.woa -H 
'x-webobjects-adaptor-version: mod_proxy’

You need to have this line in your Apache config files:
RequestHeader append x-webobjects-adaptor-version “mod_proxy"

While we like this solution we aren’t quite where we want to be yet. Our app 
shows the instance number as “-1” no matter which app is responding. We know 
it’s doing round-robin but we don’t have the instance number in the request 
like WO expects it. Small stuff like that… but the stability and performance 
improvements are huge. So far so good :-)

Thanks everyone,
— Aaron

> On Mar 8, 2024, at 9:15 AM, Michael Schmiedgen  wrote:
> 
> 
> On 3/8/2024 1:55 AM, Aaron Rosenzweig via Webobjects-dev wrote:
>> Thank you Stefan, Johann, and the community for making the switch from 
>> mod_Webobjects.so adaptor to the built-in Apache mod_proxy module.
>> It helped us out this week to dig up Stefan’s 2015 video presentation on 
>> this topic, utilize the ERXApplication cookie generation, and the migration 
>> tab in Java Monitor.
>> The reason for us to make the switch was because Apache had become unstable. 
>> It was having numerous segmentation faults. We were using the latest 
>> available Apache 2.4.x for Amazon Linux along with freshly compiled from 
>> source WO Adaptor taken from latest WOnder repo. Whenever httpd wet-the-bed, 
>> we’d lose communication with an app instance. It seems there was no rhyme or 
>> reason to what was causing it to crash. It did seem that when we downloaded 
>> user files (passed from disk to web browser through fileInputStreams) that 
>> we’d be more likely to see a segmentation fault anywhere from 5 to 7 
>> request-response loops later (navigating the app, clicking links). File 
>> sizes ranged from somewhat small like 4 megs up to about 250 megs.
>> It was almost as if the WO adaptor was getting corrupted. Apache would give 
>> errors about unreadable headers that looked like a stream of binary data and 
>> then shortly after segmentation fault.
> 
> 
> Some Linux distros do not configure Apache with MPM-prefork anymore
> these days. We observed major problems with MPM-event / MPM-multithread
> in combination with WO module, including httpd process crashes. We
> switched back to prefork and that solved the issue.
> 
> But clearly, mod_proxy seems to be the better option here, we are
> looking forward to this.
> 
> Whats the 'official' state of mod_WebObjects? Will it become legacy
> or get abandoned? Are there any plans?
> 
> Thank you all,
>  Michael
> 
> 
> 
> -- 
> ___
> 
> Michael Schmiedgen, BSc
> Senior Software Engineer
> 
> Takwa GmbH
> Friedrich-List-Str. 15
> 99096 Erfurt GERMANY
> 
> Tel  +49 361 6534096
> Fax  +49 361 6534097
> Mail schmied...@takwa.de
> Web  http://www.takwa.de/
> ___
> 
> 
> Amtsgericht Jena HRB 112964
> Geschäftsführung: Ingo Buchholz

 ___
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


Thanks Stefan! (mod_proxy)

2024-03-07 Thread Aaron Rosenzweig via Webobjects-dev
Thank you Stefan, Johann, and the community for making the switch from 
mod_Webobjects.so adaptor to the built-in Apache mod_proxy module. 

It helped us out this week to dig up Stefan’s 2015 video presentation on this 
topic, utilize the ERXApplication cookie generation, and the migration tab in 
Java Monitor. 

The reason for us to make the switch was because Apache had become unstable. It 
was having numerous segmentation faults. We were using the latest available 
Apache 2.4.x for Amazon Linux along with freshly compiled from source WO 
Adaptor taken from latest WOnder repo. Whenever httpd wet-the-bed, we’d lose 
communication with an app instance. It seems there was no rhyme or reason to 
what was causing it to crash. It did seem that when we downloaded user files 
(passed from disk to web browser through fileInputStreams) that we’d be more 
likely to see a segmentation fault anywhere from 5 to 7 request-response loops 
later (navigating the app, clicking links). File sizes ranged from somewhat 
small like 4 megs up to about 250 megs.  

It was almost as if the WO adaptor was getting corrupted. Apache would give 
errors about unreadable headers that looked like a stream of binary data and 
then shortly after segmentation fault. 

Tonight we’re going live with mod_proxy. A bit worried but also happy. It’s 
amazing how much faster file uploads and downloads are. The compiled WebObjects 
adaptor must have had a small packet size that slowed things down. 

One thing to note, I believe the ProxyPass key-value pair of "nofailover=On” 
actually should be set to “Off” — I read the Apache documentation of what it’s 
supposed to do and I think the documentation is wrong. When we cut-and-pasted 
the migration from the last tab in JavaMonitor it said “On” which seemed right 
until we tested it. When app instances go down you won’t get re-routed to 
another good instance with “On” it must be “Off.” 

To round-robin, I needed to clear the cookie completely before refreshing the 
browser. I guess there’s no way around that. Users will have semi-permanent 
affinity with a particular app instance. New users get a true round-robin 
instance. Actually we go through phased deployments every week so people will 
have semi-permanent instance affinity for one week :-) 

This is a smart solution. Feels good to drop the mod_WebObjects.so and probably 
can drop wotaskd too. Less is more. And what’s left is better tested and easy 
to upgrade to Apache 2.6 (whenever that is). 

Hugs and chest bumps all around. Thank you all,
— Aaron
 ___
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: loooong saveChanges prep-stage

2024-01-31 Thread Aaron Rosenzweig via Webobjects-dev
Check your "willUpdate()" logic and similar things such as "didUpdate()".
It may be doing lots of calculations in certain situations that is almost
but not quite an infinite loop.

On Wed, Jan 31, 2024 at 5:59 AM OCsite via Webobjects-dev <
webobjects-dev@lists.apple.com> wrote:

> Thanks, guys!
>
> I am pretty sure though the problem can't be a background process either
> reading for a long time or saving for a long time, for I do use the
> *ERXAdaptorChannelDelegate.trace* logs and through
> *DatabaseContextDelegate.databaseContextWillPerformAdaptorOperations* I
> log each save — and there's nothing like that in the log in the vicinity of
> those long *saveChanges*, alas. Thus the culprit must be something else.
>
> Perhaps indeed *something* locks the OSC pretty often and for a long
> time, but that something is neither a long *SELECT* which would log
> through *ERXAdaptorChannelDelegate.trace*, nor another unrelated save,
> which would log through
> *DatabaseContextDelegate.databaseContextWillPerformAdaptorOperations*.
>
> Besides, it does not really feel like OSC locks caused by another thread.
> Meantime, I've rigged an awk script to compute how long each *saveChanges* 
> takes,
> and it looks like this:
> - for a long time, all is OK
> - when the save times begin to grow, they keep consistently long (e.g.,
> about 30 s each, or about 50 s each) for each save for awhile (a quarter or
> half an hour), before things get back to normal
>
> If another thread locked OSC, it would most probably mean some
> *saveChanges* would be long, but some quick; it does not seem probable a
> background thread would *consistently* keep OSC locked so that *each*
> *saveChanges* takes roughly the same (long) time.
>
> This rather feels by something at the beginning of *saveChanges* becomes
> slow. This would most probably happen under the OSC lock, and given the way
> it works, does not seem really plausible that it is simply waiting to
> acquire the lock itself.
>
> For the moment, I'm rather outta ideas :(
>
> Thanks again 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/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: Replay request

2023-11-14 Thread Aaron Rosenzweig via Webobjects-dev
Excellent André, 

Glad you found an alternate way than trying to replay requests which would be 
brittle if you could get it to work. Your new way is much better with the 
lambdas. It’s basically blocks (like in Smalltalk) that you can execute when 
you want. Javascript does this quite a bit to with functions passed as 
variables. Thanks for sharing your pseudo-code :-)

> On Nov 14, 2023, at 12:01 PM, André Rothe  wrote:
> 
> Hi Aaron,
> 
> Thank you for your reply. That is a nice idea. At the end I have solved it 
> with Lambdas. The action on (3) contains not only a pageWithName(), it 
> initializes also the new component by calling some public method. So I moved 
> that stuff into a Lambda and store it within a class member field of the 
> current page.
> 
> 
> @FunctionalInterface
> public interface ConfirmedAction {
>  WOActionResults perform();
> }
> 
> public class MyPage extends WOComponent {
> 
> private ConfirmedAction userAction = null;
> 
> public WOActionResults myActionMethod() {
>   userAction = () -> {
>  MyNextPage nextPage = pageWithName(MyNextPage.class.getName())
>  nextPage.initSomething();
>  nextPage.initSomeOtherThings()
>  return nextPage;
>   };
>   return validateMyPage() ? userAction.perform() : this;
> }
> 
> // some further similar action methods...
> }
> 
> If the validation returns true, it executes the Lambda immediately, otherwise 
> it returns "this", but during the validation the condition for the waring 
> dialog overlay has been set (5b). So the dialog will be visible now.
> 
> On (7b) the user clicks "Proceed" within the dialog, which executes another 
> action method:
> 
> public WOActionResults proceedAction() {
>   hideDialog()
>   fixValidationProblem();
>   return userAction != null ? userAction.perform() : this;
> }
> 
> This will set the dialog condition to false, so the dialog will be removed on 
> the next page refresh, it fixes the validation problem and stores the changes 
> on the EC and will perform the stored action (i.e. the one from 
> myActionMethod) if available. In all other cases it goes to "this" again.
> 
> If I move the fixValidationProblem() also into a Lambda, I can reuse the code 
> structure for different warnings/validation problems. In the validateMyPage() 
> I can set specific "fix me" Lambdas for every problem that will be found.
> 
> Seems to work. Thanks for idea.
> André
> 
> Am 12.11.2023 03:01, schrieb Aaron Rosenzweig:
>> Hi André,
>> At step 3 can you store a variable that remembers the page the user
>> intends to go to?
>> maybe you can make an enum with all the possible pages they could go
>> to on the next step and the variable would be one of those values.
>> Then, in 7b, you can reference that variable and create the page to
>> send them to.
>>> On Nov 11, 2023, at 5:33 PM, André Rothe  wrote:
>>> Hi Aaron,
>>> Thank you for your answer. Here the more detailled workflow:
>>> 1. User goes to page A.
>>> 2. User clicks there on an element which submits the HTML
>>>  form and should show i.e. page B later (there are a
>>>  lot of possible things the user can do on page A which
>>>  submit the form and forwards the user to different pages).
>>> 3. Server executes the associated action method on the
>>>  PageAComponent.
>>> 4. Action method calls validateSomeThings().
>>> 5a. If validateSomeThings() returns true, the action
>>>   method will return i.e. page B as ActionResults.
>>> 5b. If validateSomeThings() returns false, the action
>>>   method will set a condition and returns page A again.
>>> 6. Because of the condition, the warning dialog (with two
>>>  buttons) will be shown on page A (as an overlay div).
>>> 7a. If the user clicks on "cancel" within the warning dialog,
>>>   a further action method on PageAComponent will be called.
>>>   It sets the condition back to false and returns
>>>   PageAComponent again as ActionResults.
>>> 7b. If the user clicks on "proceed" within the warning dialog,
>>>   a further action method on PageAComponent will be called.
>>>   It fixes the validation problem, sets the condition back
>>>   to false and should return i.e. PageBComponent.
>>> The problem is, that I don't know, which action method has been called on 
>>> (3) and which will be the next page, that should be shown on (7b). 
>>> Therefore I try to replay the initial request from (2) on (7b) to simulate 
>>> the initial action of the user.
>>> I can return Page

Re: Replay request

2023-11-11 Thread Aaron Rosenzweig via Webobjects-dev
Hi André,

At step 3 can you store a variable that remembers the page the user intends to 
go to? 

maybe you can make an enum with all the possible pages they could go to on the 
next step and the variable would be one of those values. 

Then, in 7b, you can reference that variable and create the page to send them 
to. 

> On Nov 11, 2023, at 5:33 PM, André Rothe  wrote:
> 
> Hi Aaron,
> 
> Thank you for your answer. Here the more detailled workflow:
> 
> 1. User goes to page A.
> 2. User clicks there on an element which submits the HTML
>   form and should show i.e. page B later (there are a
>   lot of possible things the user can do on page A which
>   submit the form and forwards the user to different pages).
> 3. Server executes the associated action method on the
>   PageAComponent.
> 4. Action method calls validateSomeThings().
> 5a. If validateSomeThings() returns true, the action
>method will return i.e. page B as ActionResults.
> 5b. If validateSomeThings() returns false, the action
>method will set a condition and returns page A again.
> 6. Because of the condition, the warning dialog (with two
>   buttons) will be shown on page A (as an overlay div).
> 7a. If the user clicks on "cancel" within the warning dialog,
>a further action method on PageAComponent will be called.
>It sets the condition back to false and returns
>PageAComponent again as ActionResults.
> 7b. If the user clicks on "proceed" within the warning dialog,
>a further action method on PageAComponent will be called.
>It fixes the validation problem, sets the condition back
>to false and should return i.e. PageBComponent.
> 
> The problem is, that I don't know, which action method has been called on (3) 
> and which will be the next page, that should be shown on (7b). Therefore I 
> try to replay the initial request from (2) on (7b) to simulate the initial 
> action of the user.
> 
> I can return PageAComponent on (7b) only, but then the user must repeat his 
> action on page A (which will not show the warning dialog this time). But this 
> is ugly.
> 
> The question is, how I can solve that?
> 
> Thanks!
> André
> 
> 
> Am 11.11.2023 01:46, schrieb Aaron Rosenzweig:
>> Hi André,
>> I didn’t fully understand but it sounds like maybe you are working too
>> hard. It’s easier to hold onto WOComponents than it is to hold onto
>> contexts. If you have an “old page” hold onto it and just return the
>> page. If you don’t have the outermost page you can find that quickly
>> by doing “context().page()”
>> Hope that helps,
>> — Aaron
>>> On Nov 10, 2023, at 3:09 AM, André Rothe via Webobjects-dev 
>>>  wrote:
>>> Hi,
>>> I try to replay an old WORequest after some other request/response-loops, 
>>> but I don't know, how it could work.
>>> My application validates some values after the user clickes somewhere on a 
>>> page. In the validation routine I don't know, which action the user has 
>>> executed exactly. But the validation can be wrong, so I display another 
>>> page (an overlay dialog over the current page), where the user can decide 
>>> between "Cancel" and "Proceed". On "Cancel" I return the current page 
>>> without the overlay, on "Proceed" I fix the problem in the validation and 
>>> now I can go back to the current page too, but the user has to execute his 
>>> action again.
>>> Can I automatically execute the previous request? I can store the 
>>> context-Id of the source page (before overlay) like:
>>> String oldCtxId = context().contextId();
>>> WORequest oldReq = context().request();
>>> and after the data fixes (user has clicked on "Proceed", WO calls the 
>>> associated action like proceedChangeAction() on my page component) I could 
>>> restore the source page from the cache:
>>> WOComponent oldPage = session().restorePageForContextID(oldCtxId);
>>> And now I could send the "oldReq" to the component "oldPage". How can I do 
>>> that, to solve the problem?
>>> Thanks a lot
>>> 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/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: AjaxAutoComplete

2023-11-11 Thread Aaron Rosenzweig via Webobjects-dev
That’s clever Samuel. Using the components as building blocks to piggy back 
from each other. Bravo :-)

> On Nov 11, 2023, at 5:12 PM, Samuel Pelletier via Webobjects-dev 
>  wrote:
> 
> Hi,
> 
> I managed to achieve your goal in my apps using this pattern :
>   - Create a submit js function using an AjaxSubmitButton
>   - Use the created function in afterUpdateElement on AjaxAutoComplete. 
> 
>  "addLigneAvecFormat" action = "$selectionnerProduit" />
> 
> 
> Regards,
> 
> Samuel
> 
> 
>> Le 10 nov. 2023 à 05:55, Stavros Panidis via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> a 
>> écrit :
>> 
>> Tim,
>> 
>> Sorry!. I could not put it to work. I am sure that I am making something 
>> wrong.
>> 
>> My AjaxAutocomplete is
>> 
>> > "form-control" list = "$currentValuesForCustomers" selection = "$global" 
>> value = "$value" item = "$currentValue" />
>> 
>> And then I have a AjaxObserveField as follows
>> 
>> 
>> > "invoiceslist" action = "$customerSelected">
>> 
>> 
>> Can you see what I am doing wrong?
>> 
>> Stavros
>> 
>> 
>> 
>>> On 9 Nov 2023, at 10:00 PM, webobjects-dev-requ...@lists.apple.com wrote:
>>> 
>>> Send Webobjects-dev mailing list submissions to
>>> webobjects-dev@lists.apple.com
>>> 
>>> To subscribe or unsubscribe via the World Wide Web, visit
>>> https://lists.apple.com/mailman/listinfo/webobjects-dev
>>> or, via email, send a message with subject or body 'help' to
>>> webobjects-dev-requ...@lists.apple.com
>>> 
>>> You can reach the person managing the list at
>>> webobjects-dev-ow...@lists.apple.com
>>> 
>>> When replying, please edit your Subject line so it is more specific
>>> than "Re: Contents of Webobjects-dev digest..."
>>> 
>>> 
>>> Today's Topics:
>>> 
>>>   1. AjaxAutoComplete (Stavros Panidis)
>>>   2. Re: AjaxAutoComplete (D Tim Cummings)
>>>   3. Re: AjaxAutoComplete (Jesse Tayler)
>>> 
>>> 
>>> --
>>> 
>>> Message: 1
>>> Date: Thu, 9 Nov 2023 09:54:40 +0200
>>> From: Stavros Panidis 
>>> To: webobjects-dev@lists.apple.com
>>> Subject: AjaxAutoComplete
>>> Message-ID: 
>>> Content-Type: text/plain;   charset=us-ascii
>>> 
>>> Hi,
>>> 
>>> Is there any trick available to make AjaxAutoComplete field observable (by 
>>> AjaxAobserveField) ?
>>> 
>>> Many thanks in advance for your help
>>> 
>>> Stavros
>>> 
>>> --
>>> 
>>> Message: 2
>>> Date: Thu, 9 Nov 2023 20:00:33 +1000
>>> From: D Tim Cummings 
>>> To: webobjects-dev@lists.apple.com
>>> Subject: Re: AjaxAutoComplete
>>> Message-ID: 
>>> Content-Type: text/plain; charset=UTF-8; format=flowed
>>> 
>>> Set parameter afterUpdateElement to "observe" and it will behave like it 
>>> is in an AjaxObserveField
>>> 
>>> >> "$theCustomerName" afterUpdateElement = "observe" />
>>> 
>>> Tim
>>> 
>>> On 9/11/23 17:54, Stavros Panidis via Webobjects-dev wrote:
 Hi,
 
 Is there any trick available to make AjaxAutoComplete field observable (by 
 AjaxAobserveField) ?
 
 Many thanks in advance for your help
 
 Stavros
  ___
 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/tim%40triptera.com.au
 
 This email sent to t...@triptera.com.au
>>> 
>>> 
>>> --
>>> 
>>> Message: 3
>>> Date: Thu, 9 Nov 2023 12:00:52 -0500
>>> From: Jesse Tayler 
>>> To: D Tim Cummings 
>>> Cc: webobjects-dev@lists.apple.com
>>> Subject: Re: AjaxAutoComplete
>>> Message-ID: <48f21de2-2301-4c1f-a473-25d1850a4...@oeinc.com>
>>> Content-Type: text/plain; charset="utf-8"
>>> 
>>> I have used Ajax quite easily on a couple of components and for some 
>>> reason, implementing even the simplest test was failing on updating a 
>>> component of a similar sort.
>>> 
>>> Before I make a wholly new component ? are there flags or tests aside from 
>>> jQuery which seems fine? I don?t readily see why this just isn?t seemingly 
>>> observing and updating the way I expect?
>>> 
>>> Thoughts?
>>> 
 On Nov 9, 2023, at 5:00 AM, D Tim Cummings via Webobjects-dev 
  wrote:
 
 Set parameter afterUpdateElement to "observe" and it will behave like it 
 is in an AjaxObserveField
 
 >>> "$theCustomerName" afterUpdateElement = "observe" />
 
 Tim
 
 On 9/11/23 17:54, Stavros Panidis via Webobjects-dev wrote:
> Hi,
> 
> Is there any trick available to make AjaxAutoComplete field observable 
> (by AjaxAobserveField) ?
> 
> Many thanks in advance for your help
> 
> Stavros
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe

Re: Replay request

2023-11-10 Thread Aaron Rosenzweig via Webobjects-dev
Hi André,

I didn’t fully understand but it sounds like maybe you are working too hard. 
It’s easier to hold onto WOComponents than it is to hold onto contexts. If you 
have an “old page” hold onto it and just return the page. If you don’t have the 
outermost page you can find that quickly by doing “context().page()”

Hope that helps,
— Aaron

> On Nov 10, 2023, at 3:09 AM, André Rothe via Webobjects-dev 
>  wrote:
> 
> Hi,
> 
> I try to replay an old WORequest after some other request/response-loops, but 
> I don't know, how it could work.
> 
> My application validates some values after the user clickes somewhere on a 
> page. In the validation routine I don't know, which action the user has 
> executed exactly. But the validation can be wrong, so I display another page 
> (an overlay dialog over the current page), where the user can decide between 
> "Cancel" and "Proceed". On "Cancel" I return the current page without the 
> overlay, on "Proceed" I fix the problem in the validation and now I can go 
> back to the current page too, but the user has to execute his action again.
> 
> Can I automatically execute the previous request? I can store the context-Id 
> of the source page (before overlay) like:
> 
> String oldCtxId = context().contextId();
> WORequest oldReq = context().request();
> 
> and after the data fixes (user has clicked on "Proceed", WO calls the 
> associated action like proceedChangeAction() on my page component) I could 
> restore the source page from the cache:
> 
> WOComponent oldPage = session().restorePageForContextID(oldCtxId);
> 
> And now I could send the "oldReq" to the component "oldPage". How can I do 
> that, to solve the problem?
> 
> Thanks a lot
> 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/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: wildcard search - how to escape asterisk?

2023-10-13 Thread Aaron Rosenzweig via Webobjects-dev
Thank you Jesse and Michael, 

I’ll share the solution we came up with :-)

We have a “user search” tool were we can dynamically fill out and query for 
users in the system with various checks such as obvious things like first and 
last name but also by their roles, whether they are expired or not, and also 
their email address. 

We wanted a new checkbox to look for “non-standard” email addresses. Weird 
characters, or at least ones we think are suspicious like % and * (percent and 
asterisk). Things we don’t like shouldn’t be let in but there is also very old 
data and a desire to clean it up. 

If we want a qualifier to search for asterisk, we might naively attempt using 
Wonder ERXKeys like so:
===
EOQualifier qualifier = User.PERSON.dot(Person.EMAIL).contains("*")

The “contains” method guts are the following:
===
public static ERXKeyValueQualifier contains(String key, String value) {
value = "*" + value + "*";
return ERXQ.likeInsensitive(key, value);
}

So we are effectively doing a case-insensitive-like on triple-asterisk which 
yields all records. The asterisk in WO is like percent for regular SQL, it gets 
translated so * becomes % when it hits the DB. 

As far as I know, there is no way to escape an asterisk. Can’t be done! But 
hope is not lost, when you meet a brick wall, walk around it. 

I dug the raw SQL qualifier out of the basement. NeXT/Apple provides it, it is 
deprecated, but useful when you are in a pickle. 

You would do something like this:
===
EOEntity userEntity = EOUtilities.entityNamed(editingContext(), 
User.ENTITY_NAME);
EOQualifier qualifier = new EOSQLQualifier(userEntity, 
User.PERSON.dot(Person.EMAIL).key() + " like '%%*%%'", null)

WARNING: you might think there should be a single percent (%) but that would 
lead to errors because that is a qualifierFormat string and you typically 
provide variables for replacement with %@ or if you want to be clear you would 
do %s for a string, %d for an int, and %f for a float/double. Then where I 
passed in “null” you would instead pass in an array of values to use for 
replacement. You have to escape the percent and to do that you double it as %%

In context the code could be crafted like so:
===
EOEntity userEntity = EOUtilities.entityNamed(editingContext(), 
User.ENTITY_NAME);
EOQualifier otherThanStandardCharactersQualifier = ERXQ.or(
User.PERSON.dot(Person.EMAIL).contains("#"),
User.PERSON.dot(Person.EMAIL).contains("$"),
User.PERSON.dot(Person.EMAIL).contains("%"), 
… other similar checks
new EOSQLQualifier(userEntity, User.PERSON.dot(Person.EMAIL).key() + " 
like '%%*%%'", null), 
new EOSQLQualifier(userEntity, User.PERSON.dot(Person.EMAIL).key() + " 
like '%%?%%'", null)
);
… do a fetch using EOF.

What gets generated by EOF into SQL looks something like:
===
SELECT *
FROM 
  user t0 
  INNER JOIN person T1 ON t0.person_id = T1.id 
WHERE 
  UPPER(T1.email) LIKE UPPER('%#%' :: varchar(255)) ESCAPE '|' 
  OR 
  UPPER(T1.email) LIKE UPPER('%$%' :: varchar(255)) ESCAPE '|' 
  OR 
  UPPER(T1.email) LIKE UPPER('%|%%' :: varchar(255)) ESCAPE '|' 
  OR 
  T1.email like '%*%' 
  OR 
  T1.email like '%?%' 
;

Note #1: look at how regular qualifiers always produce something that is 
escaped with a pipe symbol "|" even when they have nothing to escape. 

Note #2: when doing a contains("%") it does escape it using a pipe in the 
generated output and makes sense. 

Note #3: The last two lines are from our raw SQL qualifier but it was cool that 
it figured out how to follow the key path and use the join appropriately then 
only using T1.email where its needed. Pretty smart. I was surprised it was able 
to do that. 

Note #4: We could use the raw SQL qualifier to do things that EOF has no way of 
supporting like regular expressions. 
But now we’d have two problems: 
https://blog.codinghorror.com/regular-expressions-now-you-have-two-problems/
How to do regex in Postgres:
https://www.sqlshack.com/working-with-regular-expressions-in-postgresql/
https://www.postgresql.org/docs/current/functions-matching.html

Note #5: I also added the question mark because there is an undocumented 
feature of EOF that would otherwise treat it like a wildcard courtesy of “he 
who will not be named” (a NeXT engineer). 

Cheers,
— Aaron

> On Oct 12, 2023, at 12:52 PM, Michael Kondratov  
> wrote:
> 
> I think you can pass it as a variable to a fetch specification. 
> 
> 
> Sent from my iPhone
> 
>> On Oct 12, 2023, at 10:45, Aaron Rosenzweig via Webobjects-dev 
>>  wrote:
>> 
>> Hi all,
>> 
>> We can do a case insensitive like with EOF for *blue* on a text field (to 
>> find “blue” at the beginning, middle, or end

wildcard search - how to escape asterisk?

2023-10-12 Thread Aaron Rosenzweig via Webobjects-dev
Hi all, 

We can do a case insensitive like with EOF for *blue* on a text field (to find 
“blue” at the beginning, middle, or end of a field)

But what if we want to find an asterisk anywhere in a text field? How do we do 
a case insensitive like looking for an asterisk anywhere in the text? Is this 
possible with WO or do we need to resort to a raw SQL qualifier?

Thanks in advance,
— Aaron

 ___
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: Deployment Ubuntu 22.04

2023-10-02 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Tim, that’s a nice writeup :-)

> On Oct 1, 2023, at 4:26 AM, D Tim Cummings via Webobjects-dev 
>  wrote:
> 
> I have deployed to ubuntu 22.04. I have added the steps I used to wocommunity 
> wiki
> 
> https://wiki.wocommunity.org/display/documentation/Deploying+on+Ubuntu+22.04
> 
> Tim
> 
> On 1/10/23 18:15, Stavros Panidis via Webobjects-dev wrote:
>> Hi all,
>> 
>> Anyone tried to deploy to Ubuntu 22.04? Any issues?
>> 
>> Many thanks in advance
>> 
>> Stavros
>>  ___
>> 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/tim%40triptera.com.au
>> 
>> This email sent to t...@triptera.com.au
> ___
> 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: Own Instance number

2023-03-01 Thread Aaron Rosenzweig via Webobjects-dev
Hi André,

You can try: context.request.applicationNumber

In other words once you have the WORequest you can get the application number 
from that. 

If you don’t have the WORequest handy, maybe you can get the WOContext (like 
from a WOComponent) and then get the request. 

Cheers,
— Aaron

> On Mar 1, 2023, at 6:15 AM, André Rothe via Webobjects-dev 
>  wrote:
> 
> Hi,
> 
> Can I get the instance number of the own WO application? I have multiple 
> instances of the same application running in parallel, but I need the ID 
> which is defined within WOMonitor from inside the running instance.
> 
> It could be possible to extract the instance number from a request url, but I 
> need it during the startup phase in the constructor of the WOApplication 
> subclass.
> 
> WOApplication.getAgentID() is not the right thing, .instanceIdKey() returns 
> only a key. Any other ideas?
> 
> Thanks
> 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/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: Exception within EOModeler

2023-01-09 Thread Aaron Rosenzweig via Webobjects-dev
I’m a poet and didn’t know it :-)

> On Jan 9, 2023, at 1:36 AM, Ramsey Gurley  
> wrote:
> 
> >Wonderful way
> 
> I see what you did there :)
> From: Aaron Rosenzweig 
> Sent: Monday, January 9, 2023 12:31 PM
> To: Ramsey Gurley 
> Cc: André Rothe ; Paul Yu ; 
> Webobjects-dev 
> Subject: Re: Exception within EOModeler
>  
> Thank you Ralf and Ramsey :-) Wonderful way to start the new year :-)
> 
>> On Jan 8, 2023, at 6:34 PM, Ramsey Gurley via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> This is fixed now thanks to some contributions from Ralf Schuchardt. The 
>> WOLips_master build is successful and it seems to work as expected under 
>> 2022-12 for me.
>> From: Paul Yu via Webobjects-dev > <mailto:webobjects-dev@lists.apple.com>>
>> Sent: Monday, December 26, 2022 11:53 PM
>> To: André Rothe mailto:andre.ro...@phosco.info>>
>> Cc: Webobjects-dev > <mailto:webobjects-dev@lists.apple.com>>
>> Subject: Re: Exception within EOModeler
>>  
>> Yeah, if we don’t fix the APIs in WOLips/TBLips, these plugins will be dead 
>> now.
>> 
>> Paul
>> 
>> Sent from my iPad
>> 
>> > On Dec 26, 2022, at 6:36 AM, André Rothe > > <mailto:andre.ro...@phosco.info>> wrote:
>> > 
>> > Hi Paul,
>> > 
>> > The previous Eclipse version works
>> > 
>> > Version: 2022-09 (4.25.0)
>> > Build id: 20220908-1902
>> > 
>> > Best regards
>> > André
>> > 
>> > Am 25.12.2022 11:41, schrieb Paul Yu:
>> >> Andre
>> >> That API has been removed in Eclipse 2022-12.   You have to fall back
>> >> to 2022-09.
>> >> Paul
>>  ___
>> 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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apple.com%2Fmailman%2Foptions%2Fwebobjects-dev%2Framsey.gurley%2540practicemojo.com&data=05%7C01%7Cramsey.gurley%40practicemojo.com%7C61c23e75f45d4924fd1a08dae7510aa5%7Cde0a512999d34d35a92809047a134775%7C0%7C0%7C638076632519390613%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PH4Karml8zzBVUbIBCEiDqDhB2AXnvzuxH5h6uBxGoA%3D&reserved=0
>>  
>> <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apple.com%2Fmailman%2Foptions%2Fwebobjects-dev%2Framsey.gurley%2540practicemojo.com&data=05%7C01%7CRamsey.Gurley%40practicemojo.com%7Ca0afec3462314c62c9a508daf1f20893%7Cde0a512999d34d35a92809047a134775%7C0%7C0%7C638088319098227302%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=T3LPdMe2Xbbud%2BLeZqGhbf3%2BpoATUMH%2FB1DofU3yGAY%3D&reserved=0>
>> 
>> This email sent to ramsey.gur...@practicemojo.com 
>> <mailto:ramsey.gur...@practicemojo.com>
>> Confidentiality Notice: This email, including all attachments and replies 
>> thereto, are covered by the Electronic Communications Privacy Act, 18 U.S.C. 
>> Sections 2510-2521 and are legally privileged. This information is 
>> confidential, and intended only for the use of the individuals or entities 
>> named above. If you are not the intended recipient, you are hereby notified 
>> that any disclosure, copying, distribution or the taking of any action in 
>> reliance on the contents of this transmitted information is strictly 
>> prohibited. Please notify us if you have received this transmission in 
>> error. Thank you.
>> ___
>> 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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apple.com%2Fmailman%2Foptions%2Fwebobjects-dev%2Faaron%2540chatnbike.com&data=05%7C01%7CRamsey.Gurley%40practicemojo.com%7Ca0afec3462314c62c9a508daf1f20893%7Cde0a512999d34d35a92809047a134775%7C0%7C0%7C638088319098227302%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Xbm5rbczUU0FArU4QDAVhZN4Q0ooZy4a4vVXFp2P0%2Bw%3D&reserved=0>
>> 
>> This email sent to aa.

Re: Exception within EOModeler

2023-01-08 Thread Aaron Rosenzweig via Webobjects-dev
Thank you Ralf and Ramsey :-) Wonderful way to start the new year :-)

> On Jan 8, 2023, at 6:34 PM, Ramsey Gurley via Webobjects-dev 
>  wrote:
> 
> This is fixed now thanks to some contributions from Ralf Schuchardt. The 
> WOLips_master build is successful and it seems to work as expected under 
> 2022-12 for me.
> From: Paul Yu via Webobjects-dev  >
> Sent: Monday, December 26, 2022 11:53 PM
> To: André Rothe mailto:andre.ro...@phosco.info>>
> Cc: Webobjects-dev  >
> Subject: Re: Exception within EOModeler
>  
> Yeah, if we don’t fix the APIs in WOLips/TBLips, these plugins will be dead 
> now.
> 
> Paul
> 
> Sent from my iPad
> 
> > On Dec 26, 2022, at 6:36 AM, André Rothe  > > wrote:
> > 
> > Hi Paul,
> > 
> > The previous Eclipse version works
> > 
> > Version: 2022-09 (4.25.0)
> > Build id: 20220908-1902
> > 
> > Best regards
> > André
> > 
> > Am 25.12.2022 11:41, schrieb Paul Yu:
> >> Andre
> >> That API has been removed in Eclipse 2022-12.   You have to fall back
> >> to 2022-09.
> >> Paul
>  ___
> 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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apple.com%2Fmailman%2Foptions%2Fwebobjects-dev%2Framsey.gurley%2540practicemojo.com&data=05%7C01%7Cramsey.gurley%40practicemojo.com%7C61c23e75f45d4924fd1a08dae7510aa5%7Cde0a512999d34d35a92809047a134775%7C0%7C0%7C638076632519390613%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PH4Karml8zzBVUbIBCEiDqDhB2AXnvzuxH5h6uBxGoA%3D&reserved=0
>  
> 
> 
> This email sent to ramsey.gur...@practicemojo.com 
> 
> Confidentiality Notice: This email, including all attachments and replies 
> thereto, are covered by the Electronic Communications Privacy Act, 18 U.S.C. 
> Sections 2510-2521 and are legally privileged. This information is 
> confidential, and intended only for the use of the individuals or entities 
> named above. If you are not the intended recipient, you are hereby notified 
> that any disclosure, copying, distribution or the taking of any action in 
> reliance on the contents of this transmitted information is strictly 
> prohibited. Please notify us if you have received this transmission in error. 
> Thank you.
> ___
> 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: ERXBetweenQualifier evaluateWithObject() does not work with key paths

2022-12-21 Thread Aaron Rosenzweig via Webobjects-dev
Thank you Ricardo!

> On Dec 21, 2022, at 6:03 PM, Ricardo Parada via Webobjects-dev 
>  wrote:
> 
> Hi all,
> 
> I ran into a bug trying to use ERXBetweenQualifier’s evaluateWithObject() to 
> evaluate the qualifier against an object in memory when the key is a key 
> path. 
> 
> I created a pull request with the fix in case anybody has ran into this. 
> 
> <1002.png>
> ERXBetweenQualifier - evaluateWithObject() key path support by rparada · Pull 
> Request #1002 · wocommunity/wonder
> github.com
>  ERXBetweenQualifier - 
> evaluateWithObject() key path support by rparada · Pull Request #1002 · 
> wocommunity/wonder 
> github.com 
> 
> Thanks
> Ricardo
> ___
> 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: Java 17? Half or Full?

2022-12-11 Thread Aaron Rosenzweig via Webobjects-dev
 Project "WebObject-JavaModule"
> >   * List all WebObjects-Jars as Maven-Dependencies
> >   * Build-Target as "fat jar"
> >   o Filter all classes which do not belong to WebObjects because
> > they are provided by the Java-VM or by other dependencies
> >   o Filter all classes where ProjectWonder provides an
> > improved/patched version
> >   * Write a java-module-file for all the remaining WebObjects-Class-Files
> >   * Build this as "fat jar" and use this instead of the "old
> > webobjects-jars" in your projects or Wonder-Projects
> >   * Now all Wonder-Projects could be updated to Java-Module-Format (As
> > long as all the other depencies of them are also in Module-Format)
> > 
> > But be aware of licence-restrictions: The WebObjects-Jars are 
> > distributed with the WebObjects-Licence. The licence states that it is 
> > not allowed to decompile the Jars and maybe this new 
> > "WebObjects-JavaModule" could be seen as derivative work and could be 
> > legally not allowed to exists.
> > 
> > Best Regards,
> > Wolfgang
> > 
> > 
> > *Von:* Aaron Rosenzweig via Webobjects-dev 
> > *Gesendet:* Samstag, 10. Dezember 2022 16:36
> > *An:* WebObjects-Dev List 
> > *Betreff:* Java 17? Half or Full?
> > This is both a topic for both pure NeXT/Apple WO as well as a WOnder.
> > 
> > Your WO deployments, are they on Java 17? Are they half or full Java 17? 
> > Please chime in.
> > 
> > In our case, at present, we are developing and deploying on a Java 17 VM 
> > but using Java 1.8 (version 8) compliance. I call this “Java 17 Half"
> > 
> > Definitions:
> > Java 17 Half -> Developing and deploying on Java 17 but using Java 1.8 
> > compliance.
> > Java 17 Full -> Not only using a Java 17 VM but also targeting v17 
> > compliance and using JPMS (Java Package Management System) which was 
> > introduced with Java 9.
> > 
> > PHB -> “So I was golfing with my buddies and found out they are all 
> > using Java 17 *sealed* classes. This is so cool and will revolutionize 
> > our codebase. I want you to start using it immediately. It was 
> > introduced with Java 17. I’m so glad we are on a 17 VM.”
> > 
> > Me -> “Can’t do it”
> > 
> > PHB -> “Why not? You told me we went to Java 17 over a year ago.”
> > 
> > Me -> “We did and are on Java 17, but we compile for Java 1.8”
> > 
> > PHB -> “That’s no good. We need to be fully modern. We need to be able 
> > to use new constructs as they emerge. Why are we compiling for Java 1.8 
> > ? Is it a problem with WOnder?”
> > 
> > Me -> “Because our core frameworks are closed source, from NeXT/Apple, 
> > our hands are somewhat tied. That’s part of the problem. The other part 
> > is that class loading changed dramatically with Java 9 onward and broke 
> > a lot of things for many people. Because we leverage so much from Apple 
> > and WOnder, we pretty much are stuck. Our frameworks are stuck in java 8 
> > compliance and therefore so are we”
> > 
> > Definitions:
> > Old Class loader -> Java 1.8 (version 8) and older.
> > New Class loader -> Java 9 and newer.
> > 
> > The new class loader tries to avoid “Jar Hell” but that’s something we 
> > actually enjoyed about the old class loader. What Oracle saw as a 
> > weakness and sought to fix, Sun saw as a strength. It’s causing us 
> > trouble right now with going Java 17 Full. Here’s an example.
> > 
> > Consider a jar named “animals_v1.jar” that has classes for birds and 
> > other creatures. Imagine that there is also a newer “animals_v2.jar” Let 
> > me diagram them below in pseudocode:
> > 
> > animals_v1.jar:
> > com.acme.Duck.speak()
> > 
> > animals_v2.jar:
> > com.acme.Duck.speak()
> > com.acme.Duck.hasFeathers()
> > 
> > Suppose you are using the old class loader and somehow had both jars in 
> > your class path. It matters which jar is first because the first one 
> > wins when there are multiple definitions in the class path for 
> > “com.acme.Duck”. You could have a situation where things compile but at 
> > runtime there’s a failure because we can’t ask “hasFeathers()” and it’s 
> > situations like these that Oracle considered a design flaw or “Jar Hell.”
> > 
> > In our case, we considered this functionality of the old class loader a 
> > strength. As long as we are careful, we can avoid the p

Java 17? Half or Full?

2022-12-10 Thread Aaron Rosenzweig via Webobjects-dev
This is both a topic for both pure NeXT/Apple WO as well as a WOnder. 

Your WO deployments, are they on Java 17? Are they half or full Java 17? Please 
chime in. 

In our case, at present, we are developing and deploying on a Java 17 VM but 
using Java 1.8 (version 8) compliance. I call this “Java 17 Half"

Definitions:
Java 17 Half -> Developing and deploying on Java 17 but using Java 1.8 
compliance.
Java 17 Full -> Not only using a Java 17 VM but also targeting v17 compliance 
and using JPMS (Java Package Management System) which was introduced with Java 
9. 

PHB -> “So I was golfing with my buddies and found out they are all using Java 
17 *sealed* classes. This is so cool and will revolutionize our codebase. I 
want you to start using it immediately. It was introduced with Java 17. I’m so 
glad we are on a 17 VM.” 

Me -> “Can’t do it”

PHB -> “Why not? You told me we went to Java 17 over a year ago.”

Me -> “We did and are on Java 17, but we compile for Java 1.8”

PHB -> “That’s no good. We need to be fully modern. We need to be able to use 
new constructs as they emerge. Why are we compiling for Java 1.8 ? Is it a 
problem with WOnder?”

Me -> “Because our core frameworks are closed source, from NeXT/Apple, our 
hands are somewhat tied. That’s part of the problem. The other part is that 
class loading changed dramatically with Java 9 onward and broke a lot of things 
for many people. Because we leverage so much from Apple and WOnder, we pretty 
much are stuck. Our frameworks are stuck in java 8 compliance and therefore so 
are we” 

Definitions:
Old Class loader -> Java 1.8 (version 8) and older. 
New Class loader -> Java 9 and newer. 

The new class loader tries to avoid “Jar Hell” but that’s something we actually 
enjoyed about the old class loader. What Oracle saw as a weakness and sought to 
fix, Sun saw as a strength. It’s causing us trouble right now with going Java 
17 Full. Here’s an example. 

Consider a jar named “animals_v1.jar” that has classes for birds and other 
creatures. Imagine that there is also a newer “animals_v2.jar” Let me diagram 
them below in pseudocode:

animals_v1.jar:
com.acme.Duck.speak()

animals_v2.jar:
com.acme.Duck.speak()
com.acme.Duck.hasFeathers()

Suppose you are using the old class loader and somehow had both jars in your 
class path. It matters which jar is first because the first one wins when there 
are multiple definitions in the class path for “com.acme.Duck”. You could have 
a situation where things compile but at runtime there’s a failure because we 
can’t ask “hasFeathers()” and it’s situations like these that Oracle considered 
a design flaw or “Jar Hell.” 

In our case, we considered this functionality of the old class loader a 
strength. As long as we are careful, we can avoid the pitfalls but also do 
clever patching of closed source Apple frameworks like so:

Apple java frameworks:
com.apple.NSArray

WOnder java frameworks:
com.apple.NSArray

By putting WOnder’s frameworks first in the class path, and being careful to 
not remove needed functionality of NSArray, we can “overwrite” Apple's 
implementation with an improved one while letting the rest of Apple’s code work 
directly with our NSArray replacement. Unfortunately this breaks the new class 
loader. It’s not allowed. Cannot have NSArray defined in more than one named 
place. Even if we take WOnder out of the equation, we still have problems with 
Apple’s JavaXML framework where it redefines W3C and DOM objects that java.xml 
named module natively defines in modern Java. 

If we want to compile for modern java on new VMs what can we do? I’m no expert, 
so correct me if I’m wrong, but I’m trying to make sense of what our options 
are. There is no easy path. There is no set of simple VM arguments or anything 
magic that takes a small amount of effort. We’d have to do something like 
TreasureBoat where we take ownership of the private libraries. We can’t 
surgically replace a few objects in the private libraries anymore by class path 
ordering and I don’t think Aspect-Oriented Programming nor Dependency Injection 
can save us here either. We also now have conflicts in pure Apple libraries 
with what is currently built-into Java. 

How long are we ok using modern VMs but compiling for 1.8? “OK” meaning 
functional but not allowed to use new Java language features. 

2026 is when Amazon stops supporting 1.8 JVMs
2030 is when Oracle stops supporting 1.8 JVMs

I could not determine when javac compliance level support might be dropped for 
Java 1.8 on modern VMs. That said, I guess it would be at least until 2030 when 
Oracle no longer provides 1.8 VM support. It might last longer than that… 
perhaps 2040. Hard to say. Lots of people are struggling with JPMS (Java 
Modules) in similar situations as us. Such as this quote: "Your program might 
even have a dep on some jar that was compiled under jdk4 and the author and 
source are nowhere to be found (or went out of business a decade ago)... and 
sudd

Re: WebObjects Docker Deployment

2022-08-14 Thread Aaron Rosenzweig via Webobjects-dev
Thank you Oleksii for taking the time to write up an excellent blog post. I 
skimmed it just now but I absolutely love how you crafted a story from the 
beginnings, of how we did deployments along with the why/how up to today with 
using Docker and why you did that. 

It sure would be nice to do it as you done, to get rid of wotaskd and let an 
orchestration layer handle it. 

Thanks again for sharing!

> On Aug 14, 2022, at 5:20 PM, Oleksii Serhiienko via Webobjects-dev 
>  wrote:
> 
> Good evening everyone,
> 
> In the past, I was working with a WebObjects application which was migrated 
> to the Cloud.
> To share more findings and experience, I have created a demo application 
>  
> You should be able to run with docker-compose and docker swarm.
> I have some more explanations in the post I made 
> 
>  and some helpful docker images .
> 
> Hope, my experience will be helpful and feel free to ask some questions. 
> 
> best,
> Oleksii
> 
> ___
> 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: [Proposal] Drop Wonder's Ant Build

2022-06-29 Thread Aaron Rosenzweig via Webobjects-dev
Ant -> Maven -> Gradle ?

What Maven brings to the table, over Ant, is “convention over configuration.” 
It’s “fluffy-bunny” (if you will) for build scripts. That’s #1. A close second 
is dependency management (some might say it’s #1, and they’d be right too). 

What Gradle brings, over Maven, is both convention and configuration when you 
want it. It’s having your cake and eating it too. It also has a domain specific 
language that is less verbose than the XML of Maven and Ant. It has smarter 
dependency management. In fact, a close second (some would say #1 benefit) is 
MUCH FASTER builds. Like 17 times faster. 

Here’s a brief article comparing the three and the syntax of their build 
scripts:
https://www.baeldung.com/ant-maven-gradle 
<https://www.baeldung.com/ant-maven-gradle>

Here’s an illustrated article showing compile times and other things Gradle vs 
Maven:
https://tomgregory.com/top-gradle-benefits-over-maven/ 
<https://tomgregory.com/top-gradle-benefits-over-maven/>

— Aaron

> On Jun 28, 2022, at 9:39 PM, Ramsey Gurley  
> wrote:
> 
> >I thought Maven was old-hotness once Gradle stepped in?
> 
> Maven adds dependency management which Ant doesn't have. I don't have to 
> check jars into the repo, I know when jars changed, and to what versions.
> 
> What Gradle adds (that I'm aware of) that Maven doesn't have is Groovy 
> programming language build files. I never really saw an advantage of having 
> that over XML and bash scripts which I already know. Is there anything in 
> Gradle I'm missing out on?
> 
> As for WebObjects specifically, the WOLips plugin understands fluffy bunny 
> projects and Eclipse maven natures, but there's no code in there for gradle 
> natures. Someone would have to write that I think. It's probably not a small 
> project.
> 
> From: Aaron Rosenzweig via Webobjects-dev  <mailto:webobjects-dev@lists.apple.com>>
> Sent: Tuesday, June 28, 2022 6:12 PM
> To: WebObjects-Dev List  <mailto:webobjects-dev@lists.apple.com>>
> Subject: Re: [Proposal] Drop Wonder's Ant Build
>  
> It’s not a completely different issue is it?
> 
> If anyone builds Wonder as part of their CI/CD and is currently using ANT, 
> they will need to switch to Maven going forward. While we wish everyone who 
> makes changes to Wonder would make pull requests to integrate them but that 
> doesn’t always happen. Those teams essentially have a fork of Wonder that 
> they periodically merge public changes into and build with ANT. 
> 
> That said, I can understand why many don’t want to support ANT anymore when 
> they don’t even use it. If Maven is the future then people will have to 
> change. 
> 
> Question… I thought Maven was old-hotness once Gradle stepped in? If we are 
> talking about moving on, why isn’t Gradle on the table? 
> 
> Ant -> Maven -> Gradle
> 
> — Aaron
> 
> > On Jun 28, 2022, at 8:30 PM, Ray Kiddy via Webobjects-dev 
> > mailto:webobjects-dev@lists.apple.com>> 
> > wrote:
> > 
> > No. We are only talking about the building of Wonder itself. Projects using 
> > Wonder can be built in different ways. It is a completely different issue.
> > 
> > - ray
> > 
> > On 6/28/22 06:45, Jesse Tayler via Webobjects-dev wrote:
> >> I admit I’m only half following this thread but I am still using Ant right 
> >> now — I’ve tried to move to Maven once or twice, but it was a fair amount 
> >> of work from where I was at
> >> Are we considering removal of ant as an option?
> > 
> > ___
> > 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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apple.com%2Fmailman%2Foptions%2Fwebobjects-dev%2Faaron%2540chatnbike.com&data=05%7C01%7Cramsey.gurley%40practicemojo.com%7C8446ec5ab2654dc1428508da596c6eb2%7Cde0a512999d34d35a92809047a134775%7C1%7C0%7C637920619633186964%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zcIHSqFzwKT1lZRfVfz40WhX1b5gmqLUppVCM3RIbpQ%3D&reserved=0
> >  
> > <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apple.com%2Fmailman%2Foptions%2Fwebobjects-dev%2Faaron%2540chatnbike.com&data=05%7C01%7Cramsey.gurley%40practicemojo.com%7C8446ec5ab2654dc1428508da596c6eb2%7Cde0a512999d34d35a92809047a134775%7C1%7C0%7C637920619633186964%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata

Re: [Proposal] Drop Wonder's Ant Build

2022-06-28 Thread Aaron Rosenzweig via Webobjects-dev
It’s not a completely different issue is it?

If anyone builds Wonder as part of their CI/CD and is currently using ANT, they 
will need to switch to Maven going forward. While we wish everyone who makes 
changes to Wonder would make pull requests to integrate them but that doesn’t 
always happen. Those teams essentially have a fork of Wonder that they 
periodically merge public changes into and build with ANT. 

That said, I can understand why many don’t want to support ANT anymore when 
they don’t even use it. If Maven is the future then people will have to change. 

Question… I thought Maven was old-hotness once Gradle stepped in? If we are 
talking about moving on, why isn’t Gradle on the table? 

Ant -> Maven -> Gradle

— Aaron

> On Jun 28, 2022, at 8:30 PM, Ray Kiddy via Webobjects-dev 
>  wrote:
> 
> No. We are only talking about the building of Wonder itself. Projects using 
> Wonder can be built in different ways. It is a completely different issue.
> 
> - ray
> 
> On 6/28/22 06:45, Jesse Tayler via Webobjects-dev wrote:
>> I admit I’m only half following this thread but I am still using Ant right 
>> now — I’ve tried to move to Maven once or twice, but it was a fair amount of 
>> work from where I was at
>> Are we considering removal of ant as an option?
> 
> ___
> 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: Wrong SQL when joining in an OR-part of the qualifier

2022-02-14 Thread Aaron Rosenzweig via Webobjects-dev
Hi OC,

That’s called the object to relational impedance mismatch. The qualifier works 
in memory but fails when you try to invoke with SQL. 

To get around it, you can use an ERXExistsQualifier for your to-one 
relationship. Typically you use this with to-many relationships but it actually 
can work with to-one relationships too. The reason it works is because once 
inside the “exists” clause of SQL, it acts a bit like a namespace shield… in 
other words it’s not doing an inner-join so not negating things that you want 
to OR. 

Another possibility is to do multiple fetches. One with the attribute only. 
Then a second with the relationship only. Then merge the results. 

A third possibility is to not use an inner-join when mapping your PLIST in 
Entity Modeler, use one of the other join types… but that’s maybe not the best 
option unless you really know what you are doing. 

Personally, I’d give the Exists qualifier a try. 

Cheers,
— Aaron


> On Feb 14, 2022, at 1:13 AM, ocs--- via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> lately, I am encountering wrong fetches (with FrontBase, if important). I log 
> out my qualifier and SQL, and the gist of the problem is a join in the 
> OR-part of the qualifier. I want to fetch rows where there's an empty 
> attribute, OR when there's a specific join:
> 
> 06:52:06.510 DEBUG -> ((savedPresentationEndDate = null) or 
> (lastValidPriceOfferCache.user = (model.DBUser)'[rc/Registration 
> centre#104]'))
> 
> Alas, SQL-level, it boils down to something entirely different:
> 
> 06:52:06.535 DEBUG "DBAuction"@318794136 expression took 1 ms: SELECT ... 
> FROM "T_AUCTION" t0, "T_PRICE_OFFER" T1 WHERE (T1."C_CREATOR_ID" = 104 OR 
> t0."C_PRESENTATION_END_DATE" is NULL) AND t0."C_LAST_VALID_PRICE_OFFER_CACHE" 
> = T1."C_UID"
> 
> The SQL generator properly sets up the OR checking the right target PK, but 
> then, instead of placing the join into the OR-part where it belongs to, it 
> forces the join absolute to the entire condition — even to the NULL-check 
> which should be completely independent.
> 
> That self-evidently is not what I need here: if t0."C_PRESENTATION_END_DATE" 
> is NULL, I want to fetch the row regardless of whatever vaue there is or is 
> not in the C_LAST_VALID_PRICE_OFFER_CACHE foreign key. Actually, if there 
> happens to be NULL in C_PRESENTATION_END_DATE, I would prefer if the 
> SQL-level would not try to join at all, for it is self-evidently superfluous. 
> I've tried manually
> 
> SELECT * FROM "T_AUCTION" t0, "T_PRICE_OFFER" T1 WHERE 
> (t0."C_PRESENTATION_END_DATE" is NULL) OR (T1."C_CREATOR_ID" = 104 AND 
> t0."C_LAST_VALID_PRICE_OFFER_CACHE" = T1."C_UID")
> 
> which is what, I  believe, the SQL generator should have created from the 
> qualifier, and it seems to work (at least, it produces no error; I cannot 
> easily check whether the rows returned are OK. but they seem to t the first 
> look).
> 
> Can perhaps anybody see how to fix the problem? (But for by generating 
> directly my SQL at the application level, which I can do if need be, but 
> would rather not, unless really the only way.)
> 
> 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/archive%40mail-archive.com

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


Re: session/logged-in user valid for a specific component only?

2022-01-09 Thread Aaron Rosenzweig via Webobjects-dev
OC, your idea will work, but here’s another to consider. 

Make an interface for user objects, call it “UserInterface”

You are now free to have multiple types of user objects that all implement a 
common interface. You can make your current User implement the interface and 
now make a brand new User type for special access. 

In OCSComponent and your session, you work with objects of that interface. 

In OCSComponent make or modify “canSeePage()” method to know if a valid user is 
authenticated and has ability to see the current page. Generally, it only 
allows people of the old User type to access the page by default. 

In your new page, you can override “canSeePage()” to allow the new type of User 
to have visibility. 

> On Jan 9, 2022, at 10:21 AM, ocs--- via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> I've got a pretty old application, the standard structure: there's Session 
> which (among others) contains a property currentUser containing the user who 
> has logged in and in whose account changes are performed. There is an 
> OCSComponent extends ERXComponent with generic component services (many of 
> which depend on session and/or its currentUser), and all my components 
> inherit this.
> 
> Now I've got a new request to allow a given user to connect to _one specific 
> page_ in the application through a specific URL _without a login_ and do his 
> work in that page.
> 
> I can easily generate appropriate URL for a direct action, which would set up 
> a session and open the desired page, that's easy.
> 
> What I can't quite see is how to prevent the user to go elsewhere in the 
> application (e.g., by manually editing the URL) and stay logged in. Is there 
> some trick for that?
> 
> So far I could think of two solutions:
> 
> (i) add a property allowedPage to Session, and in my direct action set it up 
> appropriately. Then in the shared component awake at OCSComponent level I 
> could check whether this==allowedPage and log out the user if not.
> 
> This looks like a good solution, but I am not entirely sure whether I am not 
> overlooking some tricky way the user still might stay logged in and get to 
> another page (without its awake performed)... is it completely safe?
> 
> (ii) write a complete new page code (ERXComponent-based, skipping 
> OCSComponent altogether) for the specific page, which would contain and use 
> its own component-level currentUser. The direct action would set this up and 
> leave session.currentUser empty.
> 
> This is self-evidently completely safe, but a _lot_ of legwork :/
> 
> Can you see another, better solution? Or can you see that (i) is indeed safe 
> enough?
> 
> Thanks and all the best (especially happy and successful new year),
> 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/archive%40mail-archive.com

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


Re: com.webobjects.foundation.NSTimeZone ... exception

2022-01-07 Thread Aaron Rosenzweig via Webobjects-dev
Try adding:
JVMOptions   --add-exports java.base/sun.security.action=ALL-UNNAMED

And look at similar discussions about this.

After java 1.8 they went module happy but Apple stuff doesn’t abide. 

In other words, Apple jars don’t have named modules. So you need to set things 
to ignore that. 

> On Jan 7, 2022, at 12:57 PM, Kwasi O-Ahoofe via Webobjects-dev 
>  wrote:
> 
> Anyone familiar with this error which is occurring after every Java JDK 
> upgrade ?
> {eg: going from:  Eclipse Temurin 11 [11.0.2] ==> Eclipse Temurin 16 [16.0.1] 
> ==> Eclipse Temurin 17 [17.0.2] .. etc}
> 
> The fatal exception:
> 
> 
> 2022-01-06 23:26:35,299 {MMM dd HH:mm:ss} 
> ProjectComplianceWonderProduction[51227] WARN  NSLog  - A fatal exception 
> occurred: class com.webobjects.foundation.NSTimeZone (in unnamed module 
> @0x5ef6ae06) cannot access class sun.security.action.GetPropertyAction (in 
> module java.base) because module java.base does not export 
> sun.security.action to unnamed module @0x5ef6ae06
> [2022-1-6 23:26:35 EST]  java.lang.IllegalAccessError: class 
> com.webobjects.foundation.NSTimeZone (in unnamed module @0x5ef6ae06) cannot 
> access class sun.security.action.GetPropertyAction (in module java.base) 
> because module java.base does not export sun.security.action to unnamed 
> module @0x5ef6ae06
>   at 
> com.webobjects.foundation.NSTimeZone.systemTimeZone(NSTimeZone.java:971)
>   at 
> com.webobjects.foundation.NSTimeZone.defaultTimeZone(NSTimeZone.java:818)
>   at 
> com.webobjects.foundation.NSTimestampFormatter.defaultFormatTimeZone(NSTimestampFormatter.java:734)
>   at 
> com.webobjects.appserver.WOStatisticsStore.(WOStatisticsStore.java:249)
>   at com.webobjects.appserver.WOApplication.(WOApplication.java:853)
>   at 
> er.extensions.appserver.ajax.ERXAjaxApplication.(ERXAjaxApplication.java:30)
>   at 
> er.extensions.appserver.ERXApplication.(ERXApplication.java:1129)
>   at com.koaassoc.app.Application.(Application.java:420)
>   at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>  Method)
>   at 
> java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
>   at 
> java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at 
> java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
>   at 
> java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
>   at 
> java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:350)
>   at java.base/java.lang.Class.newInstance(Class.java:642)
>   at com.webobjects.appserver.WOApplication.main(WOApplication.java:547)
>   at er.extensions.appserver.ERXApplication.main(ERXApplication.java:890)
>   at com.koaassoc.app.Application.main(Application.java:415)
> 
> 
> Any commentary/help is appreciated.
> 
> Kwasi
> ___
> 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: Log4j Vulnerability

2021-12-27 Thread Aaron Rosenzweig via Webobjects-dev
Should we upgrade the Wonder jars to v2.16? 

I realize they are currently on v1.x which isn’t affected by the latest 
stirrings on the inter webs but maybe this is a good time to move it forward? 

v1.x has a small number of vulnerabilities of its own, though most people 
aren’t affected by them either. 

> On Dec 16, 2021, at 5:13 PM, Paul Hoadley via Webobjects-dev 
>  wrote:
> 
> Just to update this:
> 
> On 14 Dec 2021, at 12:07, Paul Hoadley via Webobjects-dev 
> mailto:webobjects-dev@lists.apple.com>> 
> wrote:
> 
>> * In any case, if you're definitely using Log4J 2 (we are—I went to some 
>> effort months ago to set it up!), you can mitigate the issue immediately by 
>> re-launching all instances with "-Dlog4j2.formatMsgNoLookups=true".
> 
> It turns out that this was not a complete mitigation:
> 
> https://www.lunasec.io/docs/blog/log4j-zero-day/ 
> 
> 
>> That will give you time to re-build with Log4J 2.15.0.
> 
> And that 2.15.0 was not a complete fix either:
> 
> https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046 
> 
> 
> Current release is 2.16.0, and you should update to that if you're using 
> Log4J 2.
> 
> https://logging.apache.org/log4j/2.x/security.html 
> 
> 
> 
> -- 
> 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/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: Single thread creation queue?

2021-11-22 Thread Aaron Rosenzweig via Webobjects-dev
Sounds like you are using Postgres?

You can use the syntax “not valid” when you create a constraint to stop the 
bleeding immediately. It will then only check for new and modified records 
allowing the bad rows to co-exist. When you get around to it, you can remove 
the duplicates. 

If it’s another database, they likely have something similar. 

> On Nov 22, 2021, at 10:18 AM, Jesse Tayler  wrote:
> 
> It’s not a compound key so much as just policy — it’s a handle for social 
> service and so there should just be one row with that value and don’t need to 
> tie into the key
> 
> I guess I can create a unique index just for that one attribute and it would 
> presumedly return an error upon save. I should re-write the EO to handle that 
> error raise and respond by returning the existing object…
> 
> I guess that is not hard to figure if that approach sounds sane.
> 
> I do have dups and I’d guess the constraint will simply fail if the database 
> has any dups in it.
> 
> I guess writing a migration to handle / remove dups is not practical so I’d 
> likely remove them by hand, then add the constraint in a migration update 
> that would gently fail until there are no more dups…
> 
> 
> 
>> On Nov 22, 2021, at 10:07 AM, Samuel Pelletier  wrote:
>> 
>> Jesse,
>> 
>> So your row have a primary key and some other unique identifier derived 
>> other attributes.
>> 
>> If the compound key is a combinaison of full attribute values, you cana a 
>> compound unique key in the database. CREATE UNIQUE INDEX ON Table (col1, 
>> col2, ..., coln)
>> 
>> If it is from partial values, the most reliable way is to add a string 
>> column with the computed key with it's unique constraint.
>> 
>> If you already have duplicate, you can add a method in the migration to 
>> resolve them before adding the constraint or do it manually...
>> 
>> Regards,
>> 
>> Samuel
>> 
>>> Le 22 nov. 2021 à 09:27, Jesse Tayler  a écrit :
>>> 
>>> It’s likely just a unique constraint perhaps.
>>> 
>>> It’s not UIDs or primary keys it’s a unique row type based on a couple 
>>> strings where there should be only one, and that one should last forever.
>>> 
>>> There’s an API where calls can come in basically at the same time and 
>>> instead of fetching first to see if the object exists, I should likely 
>>> respond to an SQL error rejecting a new row and then fetch and return that 
>>> existing object based on that error condition.
>>> 
>>> I’d suppose the database is the best place for that policy, but I don’t 
>>> think I’ve implemented constraints quite like that before so I’d need to 
>>> write some sort of Migrations for it if it’s to be reliable in all those 
>>> situations where it might encounter duplicate data…hmmm…
>>> 
>>> 
>>> 
>>> 
 On Nov 22, 2021, at 8:59 AM, Samuel Pelletier  wrote:
 
 Hi Jesse,
 
 Your question may have multiple answers, can you describe the contexts and 
 duplicate sources you fear ?
 
 Is the primary key generated by the WO app or it is external (like a GUID) 
 ?
 
 Do you have a secondary identifier that should be unique ?
 
 Anyway, you should add constraint in to the database if uniqueness is 
 required (this apply to all frameworks in all language)
 
 If you use EOF primary key generation, you should not have problems with 
 duplicate keys. If you require high throughput, using UUID primary key or 
 implementing a custom generator will help by saving round trips to the 
 database server. If you insert in batch, it will be also faster than 
 individual inserts.
 
 Regards,
 
 Samuel
 
> Le 22 nov. 2021 à 08:34, Jesse Tayler via Webobjects-dev 
>  a écrit :
> 
> I asked on slack but I figured I’d ping the list
> 
> Who has a good way to ensure a serial EO creation queue when the system 
> could be hit really fast and you must avoid duplicate entries?
> 
> I’m a bit surprised I don’t recall EOF style solutions for such things 
> and maybe the Amazon RDS database has a shared connection pattern the 
> apps can use, I didn’t see anything so I figure this is application level 
> stuff.
> 
> Thoughts? 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/samuel%40samkar.com
> 
> This email sent to sam...@samkar.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 thread creation queue?

2021-11-22 Thread Aaron Rosenzweig via Webobjects-dev
Hi Jesse, 

What about SQL level “unique” and “check” constraints? 

> On Nov 22, 2021, at 8:34 AM, Jesse Tayler via Webobjects-dev 
>  wrote:
> 
> I asked on slack but I figured I’d ping the list
> 
> Who has a good way to ensure a serial EO creation queue when the system could 
> be hit really fast and you must avoid duplicate entries?
> 
> I’m a bit surprised I don’t recall EOF style solutions for such things and 
> maybe the Amazon RDS database has a shared connection pattern the apps can 
> use, I didn’t see anything so I figure this is application level stuff.
> 
> Thoughts? 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/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: Idle in transaction

2020-12-15 Thread Aaron Rosenzweig via Webobjects-dev
Hi Markus,

So that means you, too, have some queries that are stuck. Postgres is waiting 
for you to issue a commit. As long as they live, it will not be able to vacuum 
properly. When you close down the .woa, it will no longer be “idle in 
transaction”

It’s a curious thing. 

For me it appears to be from jdbcInfo() when a new objectStore/editingContext 
does a fetch it leaves that around for the life of the .woa instance. 

> On Dec 15, 2020, at 2:41 AM, Markus Stoll, junidas GmbH 
>  wrote:
> 
> Hi Aaron,
> 
> did the same on my single WO system using postgres (with only moderate load), 
> but on your sql query I DO get some result rows. Did no yet have time for 
> further analysis
> 
> Regards, Markus
> 
>> Am 14.12.2020 um 22:29 schrieb Aaron Rosenzweig via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>>:
>> 
>> Has anyone dealt with SQL statements that linger and get stuck “idle in 
>> transaction” ? 
>> 
>> We started looking carefully at our WO app and Postgres data store. We 
>> discovered that it wasn’t vacuuming because of these hung statements. 
>> 
>> Turns out it appears to be deep into WO, when we do fetches sometimes there 
>> is a “begin” with no “commit” - Predominantly it is a select from 
>> “pg_catalog.pg_type” as a fetch of jdbcInfo. Doing a select doesn’t really 
>> warrant a “begin/commit” but since it starts with a “begin” it should 
>> cleanup with a “commit” but it often doesn’t do that… which yields “idle in 
>> transaction”
>> 
>> If you are using Postgres, you might want to run the following to see if you 
>> have anything stuck in this state:
>> 
>> SELECT pid, datname, usename, state, backend_xmin,query_start,xact_start, 
>> age(backend_xmin), backend_start,age(now(), pg_stat_activity.backend_start), 
>>  state_change, query FROM pg_stat_activity WHERE backend_xmin IS NOT NULL  
>> and state = 'idle in transaction’;
>> 
>> For now, we are sidestepping the issue by forcing PG to cut those loose if 
>> they are older than 5 minutes. This allows vacuum to occur. It’s not ideal, 
>> but not a bad workaround either. Anyone have any thoughts or experience with 
>> this? 
>> 
>> Cheers,
>> — Aaron
>> ___
>> 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/markus.stoll%40junidas.de
>>  
>> <https://lists.apple.com/mailman/options/webobjects-dev/markus.stoll%40junidas.de>
>> 
>> This email sent to markus.st...@junidas.de
> 
> Mit freundlichen Grüßen
> 
> Markus Stoll
> 
> -- 
> Dr. Markus Stoll (Geschäftsführer)
> markus.st...@junidas.de <mailto:markus.st...@junidas.de>
> 
> junidas GmbH, Aixheimer Str. 12, 70619 Stuttgart
> Tel. +49 (711) 4599799-11, Fax +49 (711) 4599799-10
> Geschäftsführer: Dr. Markus Stoll, Matthias Zepf
> Amtsgericht Stuttgart, HRB 21939
> 

 ___
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: Idle in transaction

2020-12-14 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Paul for the sanity check :-)

> On Dec 14, 2020, at 4:54 PM, Paul Hoadley  wrote:
> 
> Hi Aaron,
> 
> On 15 Dec 2020, at 07:59, Aaron Rosenzweig via Webobjects-dev 
> mailto:webobjects-dev@lists.apple.com>> 
> wrote:
> 
>> Anyone have any thoughts or experience with this? 
> 
> Just some data points for you. Out of curiosity, I ran that query on several 
> databases in the wild here (modest traffic—daily sessions in the thousands): 
> none of them returned any rows at all. I'd say we're not seeing this issue. 
> Postgres 9 and 11, Wonder 7.1.
> 
> 
> -- 
> Paul Hoadley
> https://logicsquad.net/ <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


Idle in transaction

2020-12-14 Thread Aaron Rosenzweig via Webobjects-dev
Has anyone dealt with SQL statements that linger and get stuck “idle in 
transaction” ? 

We started looking carefully at our WO app and Postgres data store. We 
discovered that it wasn’t vacuuming because of these hung statements. 

Turns out it appears to be deep into WO, when we do fetches sometimes there is 
a “begin” with no “commit” - Predominantly it is a select from 
“pg_catalog.pg_type” as a fetch of jdbcInfo. Doing a select doesn’t really 
warrant a “begin/commit” but since it starts with a “begin” it should cleanup 
with a “commit” but it often doesn’t do that… which yields “idle in transaction”

If you are using Postgres, you might want to run the following to see if you 
have anything stuck in this state:

SELECT pid, datname, usename, state, backend_xmin,query_start,xact_start, 
age(backend_xmin), backend_start,age(now(), pg_stat_activity.backend_start),  
state_change, query FROM pg_stat_activity WHERE backend_xmin IS NOT NULL  and 
state = 'idle in transaction’;

For now, we are sidestepping the issue by forcing PG to cut those loose if they 
are older than 5 minutes. This allows vacuum to occur. It’s not ideal, but not 
a bad workaround either. Anyone have any thoughts or experience with this? 

Cheers,
— Aaron
 ___
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: How to Manually edit SiteConfig.xml

2020-10-01 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Don,

How do you like that setup? 

Why do you have both Kubernetes and Elastic Beanstalk? Is one new and you are 
testing the waters? 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319   


> On Sep 30, 2020, at 10:03 PM, Don Lindsay  wrote:
> 
> I have a working Docker, Kubernetes implementation in AWS 
> 
> I also have a Elastic Beanstalk Docker functional stack with Wotaskd and 
> JavaMonitor with NGINX as the proxy
> 
> You can start looking at how to do it by searching WebObjects Docker
> 
> rentzsch/docker-webobjects
> alextu/wodocker <https://github.com/alextu/wodocker>
> 
> Both of these will help you get started but you will have to build your own 
> Docker recipe to match your configuration.
> 
> Thanks,
> 
> Don
> 
>> On Aug 25, 2020, at 16:57, Aaron Rosenzweig via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> On a related note, I’m wondering how many people have ditched the Apple 
>> DevOps tools and started managing their .woa instances with Kubernetes 
>> containers? Would that solve some of what Bob is wanting to do and maybe 
>> also be more robust and flexible? 
>> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319   
>>  
>> 
>>> On Aug 24, 2020, at 9:23 PM, bob--- via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>> 
>>> wrote:
>>> 
>>> I have to do a bunch of configuring of apps that I would rather script than 
>>> do by hand. Mainly it’s adding new instances and then ensuring the names 
>>> match a naming convention. There does not appear to be a way of renaming 
>>> instances via REST so I was looking at editing the SiteConfig.xml file on 
>>> the WOMonitor machine. BUT I’m concerned I don’t know what I need to do to 
>>> do that safely / correctly. 
>>> 
>>> Any help would be appreciated including telling me I should just suck it up 
>>> and edit by hand, although that is sad for 100+ instance names.
>>> ___
>>> 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 
>> <mailto:Webobjects-dev@lists.apple.com>)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/pccdonl%40me.com 
>> <https://lists.apple.com/mailman/options/webobjects-dev/pccdonl%40me.com>
>> 
>> This email sent to pccd...@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/archive%40mail-archive.com

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


Re: How to Manually edit SiteConfig.xml

2020-08-25 Thread Aaron Rosenzweig via Webobjects-dev
On a related note, I’m wondering how many people have ditched the Apple DevOps 
tools and started managing their .woa instances with Kubernetes containers? 
Would that solve some of what Bob is wanting to do and maybe also be more 
robust and flexible? 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319   


> On Aug 24, 2020, at 9:23 PM, bob--- via Webobjects-dev 
>  wrote:
> 
> I have to do a bunch of configuring of apps that I would rather script than 
> do by hand. Mainly it’s adding new instances and then ensuring the names 
> match a naming convention. There does not appear to be a way of renaming 
> instances via REST so I was looking at editing the SiteConfig.xml file on the 
> WOMonitor machine. BUT I’m concerned I don’t know what I need to do to do 
> that safely / correctly. 
> 
> Any help would be appreciated including telling me I should just suck it up 
> and edit by hand, although that is sad for 100+ instance names.
> ___
> 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: How often do you bounce your apps?

2020-08-08 Thread Aaron Rosenzweig via Webobjects-dev
Thank you Johann for chiming in. I appreciate you stating clearly what I 
intuited that WODynamicElements are “stateless” and I was right to remove all 
the instance variables that it was using. 

Love this group of WOrriors - lots of knowledge and friendly folk willing to 
share and learn together. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319   


> On Aug 8, 2020, at 5:36 AM, Johann Werner  wrote:
> 
> Hi Aaron,
> 
> as you mentioned WODynamicElements and documentation about them is very 
> sparse as well being a special beast, let me say some words about them:
> 
> WOComponent components being the easiest to grasp (and probably most used) 
> represent a WO tag within your HTML templates i.e. every time a page is 
> generated for the client its template will be parsed, for every WO tag an 
> instance of the WOComponent will be created, bindings will be synchronized, 
> the output generated, and finally—as you stated when that page drops out of 
> the backtrack cache—gc’ed. This will happen every time that page is called. 
> If you never requested that page or if it is not present in the backtrack 
> cache anymore, no instance (read memory) will be present. But that means if 
> you do request that page WO has first to create a lot of objects which has on 
> the one hand a performance penalty and on the other hand can lead to memory 
> peaks as for every request a full instance tree has to be generated. This is 
> especially important if you are running a high traffic site.
> 
> On the contrary WODynamicElements are special components which are meant to 
> optimize that use case. Instead of WO creating an instance for every 
> occurence during output generation, dynamic elements are used as a sort of 
> output factory. So first time WO encounters a dynamic element it will be 
> created once (some simplification applied of course ;-) and used for every 
> page where it appears in the template. This instance is then cached, waiting 
> to be reused. By this you will have way less instances (did I say way less?) 
> resulting in less memory consumption and less performance overhead as you 
> don’t need to create lots of Java objects.
> 
> So from this perspective your application will have a slightly higher minimum 
> memory consumption as you will keep one instance per dynamic element around 
> but have less memory peaks as well serving your pages faster.
> 
> One implication of this is that you must not—read you will get into real big 
> trouble—use internal state / instance variables within a dynamic component. 
> That kind of component has to be thread safe because WO will reuse the same 
> object again and again for every component using it. Different users 
> requesting pages with that component in it means concurrent usage of the 
> dynamic component. So if you use instance variables: BOOOM, probably even 
> without you noticing anything but producing wrong output. If you used them 
> for access checks, that is a dangerous game… To circumvent that you already 
> mentioned WOAssociations, those will get/set values you need within your 
> current RR-loop and prevent a mix-match.
> 
> TLDR: use WODynamicElements to optimize your application but know what you 
> are doing ;-) besides that those kind of components give you many more 
> features you cannot achieve with normal components. But that is another story.
> 
> And back to the original question: I do not bounce apps either, had even an 
> application that ran without problems > 2 years in one go.
> 
> Johann
> 
> 
>> Am 08.08.2020 um 04:27 schrieb Aaron Rosenzweig via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>>:
>> 
>> Thanks everyone,
>> 
>> It seems like a pretty even split between those who cycle daily and those 
>> who don’t. 
>> 
>> Perhaps it depends on the app and what minor leaks it might have tend to 
>> skew people to cycling daily… or maybe they are old farts, like me, who 
>> still remember the Objective-C days. It was a bit easier to leak then. 
>> 
>> I debugged something this week that was new to me, in this realm, so I 
>> thought I’d share. 
>> 
>> 1. WODynamicElement
>> 
>> It appears that WODynamicElements, or anything that “is a,” don’t fall out 
>> of memory. Looks like an instance is created for every WOComponent class it 
>> is used in and never goes away for the life of the app. As users visit pages 
>> in a large app it creates a lot of WODynamicElements. These are things like 
>> WOString and WOConditional. We had our own child of WOConditional that did 
>> some processing based on user access

Re: How often do you bounce your apps?

2020-08-07 Thread Aaron Rosenzweig via Webobjects-dev
Thanks everyone,

It seems like a pretty even split between those who cycle daily and those who 
don’t. 

Perhaps it depends on the app and what minor leaks it might have tend to skew 
people to cycling daily… or maybe they are old farts, like me, who still 
remember the Objective-C days. It was a bit easier to leak then. 

I debugged something this week that was new to me, in this realm, so I thought 
I’d share. 

1. WODynamicElement

It appears that WODynamicElements, or anything that “is a,” don’t fall out of 
memory. Looks like an instance is created for every WOComponent class it is 
used in and never goes away for the life of the app. As users visit pages in a 
large app it creates a lot of WODynamicElements. These are things like WOString 
and WOConditional. We had our own child of WOConditional that did some 
processing based on user access permissions. Internally it was saving state 
including making its own sandboxed EOEditingContext. Because of this, that EC 
had legs and filled up quite a bit of memory in the app. I rewrote this 
WODynamicElement to not have any instance variables with the only exception 
being WOAssociations. 

WOComponents do fall out of memory when they fall out of the backtrack cache, 
WODynamicElements do not. Their are strange beasts who don’t have a “parent()” 
and don’t have a “context()” — It’s as if WO decides to cache them in memory 
for future use if they’ve ever been used on a page. Kind of like when you do 
“Integer.valueOf(10)” Java gives you the same instance of ten whereas “new 
Integer(10)” makes a new place in memory for another ten. Because ten is always 
ten, you might argue it’s better to use valueOf and get the same object to 
possibly save time. Others would argue to not do that so you can reclaim more. 
Perhaps a sucky analogy but it helped me think of why WODynamicElement doesn’t 
get reclaimed but WOComponents do. 

There are certainly other gotchas… if you have a “previous page” notion and 
don’t use weak references and don’t trim the length of the chain… you’ll have a 
very long lived chain of pages that goes further than the backtrack cache. 

2. Full GC occurrences and object histogram

You can dump a histogram of all the objects presently in memory using 
techniques listed here: 
https://medium.com/@jerolba/measuring-actual-memory-consumption-in-java-jmnemohistosyne-5eed2c1edd65
 
<https://medium.com/@jerolba/measuring-actual-memory-consumption-in-java-jmnemohistosyne-5eed2c1edd65>

You can register to do something after every GC, such as logging, by using 
techniques listed here:
http://www.fasterj.com/articles/gcnotifs.shtml 
<http://www.fasterj.com/articles/gcnotifs.shtml>

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



> On Aug 6, 2020, at 4:28 AM, Hugi Thordarson via Webobjects-dev 
>  wrote:
> 
> I'd like to add a disclaimer to my EOF comment; I now recall I was invoking a 
> method as a workaround for something. Can't for the life of me remember what 
> it was or why (snapshots were getting GCd too early or something so I had to 
> invoke snapshotReferenceCountingSomethingElseOrOther()) but if memory serves 
> me right it might as well have been called 
> "beAwareYouAreNowExplicitlyLeakingMemory()".
> 
> So—I was being unfair and my leaky EOF was probably because of me doing 
> something stupid :).
> 
> - hugi
> 
> 
> 
>> On 6 Aug 2020, at 05:33, Stefan Gärtner via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> We never bounce, but every few weeks we have an update, which certainly 
>> starts a new instance.
>> We heavily use EOF. I never had the feeling that there is any memory leak, 
>> at least in our scenario.
>> 
>> 
>>> Am 06.08.2020 um 00:56 schrieb D Tim Cummings via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>>:
>>> 
>>> Daily for us. Once every few months we get an instance hanging and it is 
>>> clear at the start of the day that it has hung because it hasn’t restarted 
>>> overnight.
>>> 
>>> Tim
>>> 
>>>> On 6 Aug 2020, at 05:37, Lon Varscsak via Webobjects-dev 
>>>> mailto:webobjects-dev@lists.apple.com>> 
>>>> wrote:
>>>> 
>>>> We don't bounce our apps unless we do a release or if there's an instance 
>>>> that hangs.
>>>> 
>>>> -Lon
>>>> 
>>>> On Wed, Aug 5, 2020 at 9:09 AM Theodore Petrosky via Webobjects-dev 
>>>> mailto:webobjects-dev@lists.apple.com>> 
>>>> wrote:
>>>> My apps upload pdfs. As Java keeps the temp file that was uploaded until

How often do you bounce your apps?

2020-08-04 Thread Aaron Rosenzweig via Webobjects-dev
Personally I feel better bouncing my .woa instances daily. Even if it is a 
small site I have at least two instances and I gracefully cycle them on a daily 
schedule. I feel better knowing that it is fresh every morning for the new day. 

On the other hand, I could see an argument that a java app shouldn’t have any 
memory leaks. The garbage collector should get everything. If it cannot do so, 
then you’ve got something messed up in your app that you should track down and 
rectify. So maybe it’s better to just leave your .woa instances running forever 
until the next redeployment to get new features. 

What does the community do? Do you cycle often (daily, twice per day, or once 
per week) or do you leaving your instances running without a scheduled restart? 

Thanks to all those who chime in :-)
 ___
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: given WOLips is being discussed...

2020-07-04 Thread Aaron Rosenzweig via Webobjects-dev
Thanks OC for sharing your experience and your code for the EOModeler on OSX. 
(I realize that is jvanek’s link; however, it was you who cobbled together the 
first version). 

Eclipse does two things well:
1) Refactoring
2) Cross platform (Macs, PCs, Linux - mixed environment)

I use Eclipse today mainly because my team-mates chose it… and it’s ok, it has 
issues, but it’s alright for me. If we were honest, IntelliJ does those two 
things better than Eclipse but it doesn’t have the WOLips plugin. That plug-in 
is good but it is a never-ending struggle where Eclipse keeps breaking it in 
strange ways and nobody enjoys figuring out that useful friend in a foreign 
land. We’ve never fit in with the Eclipse community.  

It was nice in the days when you could double-click install WebObjects with 
tooling on a Mac. I enjoyed ProjectBuilder, WOBuilder, EOModeler, it all worked 
very nice for the most part. It had some issues too… there are always issues, 
but that was the heyday and when I enjoyed working with WO the most. If it were 
up to me I’d run MacOS Tiger in a VM with all that tooling when doing WO. But 
to be the lone wolf when others prefer getting rid of the .wod file and not 
using the same IDE setup it’s more like fighting than being productive. 

There was something guttural, tangible, enjoyable, with dragging member 
variables into component bindings. I enjoyed WOBuilder immensely and even 
created my member variables there. Whatever I do today I do in a trance where I 
imagine I was doing things that way. It’s like channelling an ancient codex to 
do my bidding in the modern age. 

I’m fortunate that much of what I loved I do today in Ares / Enyo but it too is 
dead. Why is it that the flame that burns Twice as bright burns half as long? 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jul 3, 2020, at 3:29 PM, OCsite via Webobjects-dev 
>  wrote:
> 
> ... well, myself, I have found Eclipse next-to-unuseable (WOLips itself 
> looked good, but it's, alas, Eclipse-based). In case there's more people 
> similarly Eclipse-incompatible, let me just remind that the good ole XCode 
> (with a couple of build scripts added) is considerably more convenient than 
> Eclipse, and the only thing it can't do reasonably is EOmodelling.
> 
> Which is why there's a stand-alone EOModeller application, freely available 
> at https://github.com/jvanek/EOModeler-OSX
> 
> (There's no graph view: for graph view you can use OmniGraffle, which still 
> supports EOModels very nicely.)
> 
> 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/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: Is it normal that ulimit hangs a thread instead of raising an exception or something like that?

2020-06-29 Thread Aaron Rosenzweig via Webobjects-dev
Seems “normal” in the sense that it is trying to connect but it cannot. 
Creating an OSC makes a cursor to the DB which usually ends up being a file on 
disk and can run into ulimits. At some point, maybe, resources will be 
relinquished so it keeps waiting. 

You can:

1) Find out if your cursors are real and needed. If they are not, you need to 
be closing your OSC with an explicit dispose so they don’t linger. 

2) Raise your ulimit if you have a healthy number of cursors open that is not a 
leak and you need more than defaults allow. 

The ulimit is a stop gap to stop you from having a system that falls apart. 
It’s a check of sorts.. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jun 29, 2020, at 10:32 AM, ocs--- via Webobjects-dev 
>  wrote:
> 
> Oh, and there's one related question.
> 
> It seems to me particularly weird that if sockets caused by the stale OSCs 
> exceed the ulimit, the threads which use these sockets hang. Is that the 
> normal and presumed behaviour? I would expect myself an exception thrown 
> instead, or something like that. Nevertheless, that's not what happens; those 
> threads are simply stuck in reading from the database forever, like this 
> (jstack output):
> 
> ===
> Thread t@37443: (state = IN_NATIVE)
>  - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], 
> int, int, int) @bci=0 (Compiled frame; information may be imprecise)
>  - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 
> (Compiled frame)
>  - java.net.SocketInputStream.read() @bci=23, line=182 (Compiled frame)
>  - java.io.FilterInputStream.read() @bci=4, line=66 (Compiled frame)
>  - com.frontbase.jdbc.FBJSocket.readInt() @bci=4 (Compiled frame)
>  - com.frontbase.jdbc.FBJSocket.checkForSecureCommunication() @bci=1 
> (Interpreted frame)
>  - com.frontbase.jdbc.FBJConnection.createConnection() @bci=709 (Interpreted 
> frame)
>  - com.frontbase.jdbc.FBJConnection.(com.frontbase.jdbc.FBJURL) 
> @bci=116 (Interpreted frame)
>  - com.frontbase.jdbc.FBJDriver.connect(java.lang.String, 
> java.util.Properties) @bci=22 (Interpreted frame)
>  - java.sql.DriverManager.getConnection(java.lang.String, 
> java.util.Properties, java.lang.ClassLoader) @bci=210, line=582 (Interpreted 
> frame)
>  - java.sql.DriverManager.getConnection(java.lang.String, 
> java.util.Properties) @bci=7, line=154 (Interpreted frame)
>  - com.webobjects.jdbcadaptor.JDBCContext.connect() @bci=251, line=236 
> (Interpreted frame)
>  - er.extensions.jdbc.ERXJDBCAdaptor$Context.connect() @bci=29, line=404 
> (Interpreted frame)
>  - com.webobjects.jdbcadaptor.JDBCContext._tryConnect() @bci=55, line=362 
> (Interpreted frame)
>  - com.webobjects.jdbcadaptor.JDBCContext._channelWillOpen() @bci=8, line=505 
> (Interpreted frame)
>  - com.webobjects.jdbcadaptor.JDBCChannel.openChannel() @bci=17, line=111 
> (Interpreted frame)
>  - 
> com.webobjects.eoaccess.EODatabaseContext._openChannelWithLoginPanel(com.webobjects.eoaccess.EODatabaseChannel)
>  @bci=19, line=1907 (Compiled frame)
>  - com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel() @bci=62, 
> line=1966 (Compiled frame)
>  - 
> com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(com.webobjects.eocontrol.EOFetchSpecification,
>  com.webobjects.eocontrol.EOEditingContext) @bci=209, line=3054 (Compiled 
> frame)
>  - 
> com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
>  com.webobjects.eocontrol.EOEditingContext) @bci=34, line=3195 (Compiled 
> frame)
>  - 
> com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
>  com.webobjects.eocontrol.EOEditingContext) @bci=97, line=488 (Compiled frame)
>  - 
> com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
>  com.webobjects.eocontrol.EOEditingContext) @bci=79, line=4069 (Interpreted 
> frame)
>  - 
> er.extensions.eof.ERXEC.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification,
>  com.webobjects.eocontrol.EOEditingContext) @bci=10, line=1308 (Interpreted 
> frame)
>  - 
> com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification)
>  @bci=3, line= (Interpreted frame)
>  - 
> er.extensions.eof.ERXEOGlobalIDUtilities.fetchObjectsWithGlobalIDs(com.webobjects.eocontrol.EOEditingContext,
>  com.webobjects.foundation.NSArray, boolean) @bci=325, line=290 (Interpreted 
> frame)
>  - 
>

Re: Looks like an OSC must be disposed manually?!? (was: background tasks locked, workers run all right)

2020-06-29 Thread Aaron Rosenzweig via Webobjects-dev
If other things depend on that OSC, then disposing it would be bad.

If it is an OSC you made to do work in a long running task and then disposed at 
the end of that task, it would be good to dispose it… or… to keep it in an OSC 
pool and check it back into that pool. They aren’t cheap. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jun 29, 2020, at 10:26 AM, o...@ocs.cz wrote:
> 
> Aaron,
> 
> thanks, this I hope I sort of understand.
> 
> Still, in the garbage-collected environment, any object, far as I can say, 
> should
> 
> (a) be automatically disposed when there's no explicit reference to it, 
> regardless of whether it is cheap or big;
> (b) if there's some internal means to keep unreferenced objects alive 
> forever, it should be explicitly documented (e.g., like 
> EOObjectStoreCoordinator.defaultCoordinator()).
> 
> What am I overlooking? And, much more important question: is the explicitly 
> called dispose indeed the right and safe way to get rid of an OSC, wouldn't 
> it cause some other problems elsewhere in the future?
> 
> Thanks,
> OC
> 
>> On 29. 6. 2020, at 4:17 PM, Aaron Rosenzweig > <mailto:aa...@chatnbike.com>> wrote:
>> 
>> OSC is a cursor to the DB. They aren’t particularly cheap to acquire. As far 
>> as I know, they live until you dispose of them. They don’t automatically 
>> dispose. They are not cheap like an editingContext. One OSC can service a 
>> plethora of editingContexts. Simple WOApps have two OSC for the life of the 
>> WOApp:
>> 
>> #1 made for the JDBCInfo, kind of dumb to keep around, Wonder has calls to 
>> close this one. 
>> 
>> #2 stays around and used for any new editing context you make where you 
>> don’t specifically give it a new OSC. 
>> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>> 
>>  
>> 
>>> On Jun 29, 2020, at 10:12 AM, ocs--- via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>> 
>>> wrote:
>>> 
>>> Hi there,
>>> 
>>> it seems finally I succeeded to find the culprit of the problem described 
>>> below. Far as my testing shows, it seems an ObjectStoreCoordinator is never 
>>> garbage collected (presumed it has been used at least once for a fetch). 
>>> Since the OSC opens a socket to the database, this leads to the problem 
>>> with a number of open sockets for a process. Far as my testing shows, the 
>>> only way to make it to do poof is to call dispose manually, which seems a 
>>> bit at the unexpected side, at least for me.
>>> 
>>> My current test code looks like this:
>>> 
>>> ===
>>> class MainPage extends OCSComponent {
>>> def test {
>>> def osc=new OCSOSC(),ec=new OCSEC(osc)
>>> println "created $osc and $ec"
>>> def 
>>> obj=EOUtilities.objectWithPrimaryKeyValue(ec,'DBAuction',101) //[FETCH]
>>> println "got obj $obj and dying..."
>>> ec=nil
>>> osc.dispose() //[WHATTHE]
>>> osc=nil
>>> System.gc()
>>> nil
>>> }
>>> }
>>> class OCSOSC extends EOObjectStoreCoordinator {
>>> void finalize() {
>>> println "### $this about to die"
>>> }
>>> }
>>> @InheritConstructors class OCSEC extends ERXEC {
>>> void finalize() {
>>> println "### $this about to die"
>>> }
>>> }
>>> ===
>>> 
>>> If both the lines marked [FETCH] and [WHATTHE] above are commented out, 
>>> i.e., if the OSC never fetches, both the osc and ec objects report 
>>> finalizing without a need to dispose.
>>> 
>>> Nevertheless, once the fetch happens as above, [WHATTHE] must be active too 
>>> — otherwise only ec gets garbage collected; osc never ever does (and 
>>> subsequently also never releases its DB socket). 
>>> 
>>> Well the explicit dispose seems to be the fix for my problem, so far it 
>>> seems to work properly; but since I did not find any mention of calling 
>>> dispose manually nor using a dispose registry in the documentation 
>>> (otherwise than those two registries related to archivation and D2JClient), 
>>> I wonder whether this is the 

Re: Looks like an OSC must be disposed manually?!? (was: background tasks locked, workers run all right)

2020-06-29 Thread Aaron Rosenzweig via Webobjects-dev
OSC is a cursor to the DB. They aren’t particularly cheap to acquire. As far as 
I know, they live until you dispose of them. They don’t automatically dispose. 
They are not cheap like an editingContext. One OSC can service a plethora of 
editingContexts. Simple WOApps have two OSC for the life of the WOApp:

#1 made for the JDBCInfo, kind of dumb to keep around, Wonder has calls to 
close this one. 

#2 stays around and used for any new editing context you make where you don’t 
specifically give it a new OSC. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jun 29, 2020, at 10:12 AM, ocs--- via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> it seems finally I succeeded to find the culprit of the problem described 
> below. Far as my testing shows, it seems an ObjectStoreCoordinator is never 
> garbage collected (presumed it has been used at least once for a fetch). 
> Since the OSC opens a socket to the database, this leads to the problem with 
> a number of open sockets for a process. Far as my testing shows, the only way 
> to make it to do poof is to call dispose manually, which seems a bit at the 
> unexpected side, at least for me.
> 
> My current test code looks like this:
> 
> ===
> class MainPage extends OCSComponent {
> def test {
> def osc=new OCSOSC(),ec=new OCSEC(osc)
> println "created $osc and $ec"
> def obj=EOUtilities.objectWithPrimaryKeyValue(ec,'DBAuction',101) 
> //[FETCH]
> println "got obj $obj and dying..."
> ec=nil
> osc.dispose() //[WHATTHE]
> osc=nil
> System.gc()
> nil
> }
> }
> class OCSOSC extends EOObjectStoreCoordinator {
> void finalize() {
> println "### $this about to die"
> }
> }
> @InheritConstructors class OCSEC extends ERXEC {
> void finalize() {
> println "### $this about to die"
> }
> }
> ===
> 
> If both the lines marked [FETCH] and [WHATTHE] above are commented out, i.e., 
> if the OSC never fetches, both the osc and ec objects report finalizing 
> without a need to dispose.
> 
> Nevertheless, once the fetch happens as above, [WHATTHE] must be active too — 
> otherwise only ec gets garbage collected; osc never ever does (and 
> subsequently also never releases its DB socket). 
> 
> Well the explicit dispose seems to be the fix for my problem, so far it seems 
> to work properly; but since I did not find any mention of calling dispose 
> manually nor using a dispose registry in the documentation (otherwise than 
> those two registries related to archivation and D2JClient), I wonder whether 
> this is the proper approach, or whether I am doing something wrong and sooner 
> or later I am in for an ugly surprise? Any insight here?
> 
> Thanks a lot,
> OC
> 
>> On 21. 5. 2020, at 1:13 PM, OCsite mailto:o...@ocs.cz>> wrote:
>> 
>> Hi there,
>> 
>> bumped lately into another weird problem. We import some data into DB in 
>> background tasks. Up to yesterday, it worked normally; today six import 
>> tasks were launched, and each of them seemingly hang in its first DB 
>> operation. Restart did help; alas, the site admins did not try to ask JVM to 
>> detect deadlocks when they restarted the application.
>> 
>> The background task looks like this:
>> 
>> ===
>> class ImportCSVTask extends ERXLongResponseTask.DefaultImplementation {
>> def performAction {
>> _thread.priority=Thread.MIN_PRIORITY
>> try {
>> try {
>> editingContext=ERXEC.newEditingContext(objectStore=new 
>> EOObjectStoreCoordinator())
>> editingContext.lock()
>> lognow 1, "=== preparing CSV import in EC $editingContext 
>> ==="
>> 
>> formPrototype=ERXEOGlobalIDUtilities.fetchObjectWithGlobalID(editingContext,formPrototypeGID)
>> lognow 1, "=== local prototype $formPrototype ==="
>> ... ...
>> ===
>> 
>> Always the “preparing” log was the last thing those threads presented; none 
>> of them ever reported “local prototype”. There's no other related log in 
>> there.
>> 
>> Meantime the application ran normally and the worker tasks communicated with 
>> the database all right (with an occasional report that some select took 
>> 70-odd ms from ERXAdaptorChannelDelegate, we have the threshold at 50). We 
>> run with   ERXObjectStoreCoordinatorPool.maxCoordinators=1.

Re: Strange null pointer error

2020-06-26 Thread Aaron Rosenzweig via Webobjects-dev
Hi Michael,

It’s an interesting problem with at first blush seems impossible but on second 
pass, looks plausible. 

That is clearly Wonder code so you can trace it and debug it. The line number 
125 of ERXDatabaseContext.java is likely very accurate. 

Stepping through (mentally) I concur that this is not a read only EO but I’d 
say you have one of the following in your code:

1) a read only attribute - imagine that “first name” has the read-only checkbox 
marked somewhere. Which entities in your code could this be? Maybe a derived 
attribute? One that is a computation and not something you’d ever write back? 

2) you exposed a primary key (or maybe a foreign key) - breaking one of the ten 
commandments. 

Start with hunting down 1 & 2 and see where that leads you. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jun 26, 2020, at 12:24 PM, Michael Kondratov via Webobjects-dev 
>  wrote:
> 
> Hello everybody!
> 
> 
>   We started to see a strange error:
> 
> 
> java.lang.NullPointerException
> at 
> er.extensions.eof.ERXDatabaseContext._verifyNoChangesToReadonlyEntity(ERXDatabaseContext.java:125)
> 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)
> at 
> artstore.components.EditOrderNew.saveEditingContext(EditOrderNew.java:224)
> 
> 
> 
> Any ideas what may be causing it?
> 
> 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/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: Creating a EOModel in code

2020-06-26 Thread Aaron Rosenzweig via Webobjects-dev
Hi Don,

Have a look at EOEntity and friends: EOAttribute, EORelationship. 

You can build them out and setup the “external” name for the column, etc. I did 
it once as an exercise many moons ago. The only practical use I got out of it 
was sometimes sanity checking keyPaths to see if they hit things “in memory” or 
if they were completely traversable through EOEntity relationships. Something 
that trips an in-memory method call is not something you can use to build a 
complex SQL query. 

Like other people have said, the “reverse engineering” of the original WO tools 
is more likely what you want to use instead. You point Entity Modeler at a 
database and it can make a surprisingly good model file from it. Depending on 
how big the database is… it might be worth your trouble of firing up MacOS 
Tiger and installing the NeXTStep GUI tools to do the reverse engineering. I 
don’t think that the Eclipse java based EntityModeler can reverse engineer. I 
don’t know if Cayenne can reverse engineer. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jun 25, 2020, at 8:53 PM, Don Lindsay via Webobjects-dev 
>  wrote:
> 
> Hello;
> 
> The Documentation for EOModel states that you can build one in code, but 
> there are no examples or further information that I can find.  Does anyone 
> have any documentation or samples that they can direct me to so I can create 
> EOModels while the application is running:
> 
> What I want to do is connect to a database that my app does not know about, 
> someone provides connection parameters and I create an EOModel and connect to 
> that database or rest and access it using the EOModel created using new 
> EOModel().
> 
> Thanks
> 
> Don
> ___
> 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: GID for deleted objects

2020-06-15 Thread Aaron Rosenzweig via Webobjects-dev
“mightDelete()” to remember
“didDelete()” to act
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jun 15, 2020, at 6:14 AM, OCsite via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> I've just bumped into another problem which seems it should be pretty common, 
> but I can't see a decent solution (due to my blindness quite probably).
> 
> I am caching some information for EOs; the info is EC-independent, and 
> therefore the cache is keyed by global IDs.
> 
> When an EO is successfully deleted, I want to remove the info from the cache. 
> Thus, the cache observes EditingContextDidSaveChangesNotification and would 
> remove the userInfo[EOObjectStore.DeletedKey] objects.
> 
> The problem is that these objects are already unregistered from the EC and I 
> can't get their GIDs anymore.
> 
> Is there a decent known solution of this problem? I probably can do something 
> like storing GIDs of objects which are only being deleted somewhere and use 
> these stored GIDs later when the deletion succeeds, but that seems to be 
> rather at the complex and awkward side for a conceptually simple operation. 
> Do I overlook some simpler solution, or is this indeed the only way?
> 
> 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/archive%40mail-archive.com

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


WO with docker and kubernetes

2020-06-07 Thread Aaron Rosenzweig via Webobjects-dev
u 
also have to setup each computer individually with wotaskd if you want to scale 
in a big way. There is a lot of manual effort and it is only for your java app. 
Any horizontal scaling of your web server or DB server is totally different 
exercise. With kubernetes you can scale your app, scale your db server, etc and 
be hands off. So far all the examples I’ve been trying this weekend are with 
Node and MongoDB but I’m pretty sure it can be done for java apps, I just 
haven’t wrapped my head around that yet. 

5) Better package manager - On Mac Apple never gave us a package manager (no 
idea why) so we have to pick either Fink, MacPorts, or Homebrew. Each of them 
have various issues. Some of it is app availability (they don’t have the latest 
port of something like maybe Postgres). Other times it’s upgrade X but then you 
break Y (the dependency trees are never perfect and even if they are, there are 
inevitable incompatibilities. Homebrew also installs things where Apple likes 
to and that causes grief sometimes. Anyway… with docker they have a repo where 
you can pull pretty much anything and it just works. When you want to get rid 
of something (like maybe MongoDB) you can trash it and it doesn’t leave rabbit 
droppings all over your host OS. Docker might be used as a better package 
manager. Look at what apps are out there: 
https://hub.docker.com/search?q=&type=image 
<https://hub.docker.com/search?q=&type=image> 

I figure this can work for WO with respect to 1, 2, & 3 but I’m not sure yet 
about 4. Even so, if I cannot do #4, that still seems like a win. 

What are your thoughts? Have you been down this rabbit hole? 

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



 ___
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: data source for “static” objects?

2020-06-07 Thread Aaron Rosenzweig via Webobjects-dev
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 
>  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/archive%40mail-archive.com

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


Re: Chat Bot Framework ?

2020-06-04 Thread Aaron Rosenzweig via Webobjects-dev
A lifetime ago I had worked on an open-source java chatbot. It was based on 
prior work and I made new files to give it a persona named “Charlie” 

I have not kept up with any recent developments but at the time I used the JAR 
and it was embedded in my WO app so it was easy in that sense. 

One thing I liked about it was that it kept good logs of interactions and made 
it easy to see when a customer / user asked Charlie a question for which he had 
no idea. If you monitor the logs you can program responses over time and he 
feels very real. 

Human conversation is more robotic than you might expect so it is easy to trick 
people. People say common opening lines and have common responses. When you 
don’t know something (or are uncomfortable with that topic) you often try to 
steer the conversation another way by going “How about them Red Sox? think 
they’ll make it to the world series?” - So Charlie inherently does all that. 
He’ll respond in ways that make sense when you’ve told him about the topic and 
he’ll find other ways to keep the conversation going when he doesn’t know what 
you mean. 

Here’s the project: https://sourceforge.net/projects/charliebot/ 
<https://sourceforge.net/projects/charliebot/>

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



> On Jun 4, 2020, at 2:52 AM, Jérémy DE ROYER via Webobjects-dev 
>  wrote:
> 
> Hi all,
> 
> We are looking for a chat bot framework to build chat bots for our customers, 
> mainly for web sites.
> 
> We have started developing one from scratch (client + server + bot) but for 
> me it’s a waste of time.
> 
> I’d like to focus on the bot part, with the real logic and added value.
> 
> Has any of yours an experience to share or a « bot objects » framework (open 
> source or commercial) to advise ?
> 
> Many thank’s,
> 
> Jérémy
> ___
> 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: Entity/attribute/relationship terrible toString?

2020-06-02 Thread Aaron Rosenzweig via Webobjects-dev
Hi OC,

Yeah we missed your point. We gave you advice about the EO but not the 
relationships. 

Generally I don’t have logging coming out about relationships nor the object 
graph. I suppose you’ll have to look at what is generating those logs and have 
some sort of preprocessor that does something “smart” for the display of your 
object graph. Maybe a big if/else block for each your relationships or maybe 
something generic if that’s good enough that has heuristics for display names. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jun 2, 2020, at 1:36 PM, ocs--- via Webobjects-dev 
>  wrote:
> 
> Paul,
> 
>> On 2. 6. 2020, at 2:05 PM, Paul Yu mailto:p...@mac.com>> 
>> wrote:
>> There are two templates _EO and EO.java that are used by eogenerate to 
>> create your EO classes.  If you open your Eogenerate File you can see where 
>> your templates are.
> 
> Can't recall anything like that from WO. Isn't that some 
> Eclipse/WOLips-specific thing? I don't use Eclipse anymore; I am yet to see a 
> worse IDE. Having tested many of them (and having suffered with Eclipse for 
> some years), eventually I stick with Xcode, which is far from perfect too and 
> it definitely has a plethora of ugly quirks, but at the very least it is 
> infinitely better than the Eclipse disaster (and aside of that, I do all my 
> *OS development in there, and it's quite convenient to use one and the same 
> IDE for all the work; myself, I found switching IDEs really inconvenient. As 
> always, your mileage may vary ;))
> 
> Besides, well, you got me ranting, but anyway: I do not, not, not use 
> generated code, in my opinion and experience, that's one very very bad 
> approach. My EO classes are based on my own superclass which reads in the 
> model at startup and installs the appropriate accessors dynamically (in a way 
> quite similar, though of course not identical, to CoreData). And it, quite 
> naturally, also contains my own overridden toString.
> 
> Which all seems to me completely beside the point. From the very beginning, I 
> am writing of entities/attributes/relationships, not EO classes. I can do 
> almost whatever I want with the EO classes, but so far, I haven't succeeded 
> to find any way to affect toStrings of entities/attributes/relationships 
> (i.e., the EOEntity, EOAttribute and EORelationship class).
> 
> Or do I miss something of importance here?
> 
> Thanks,
> OC
> 
>>> On Jun 2, 2020, at 7:04 AM, OCsite via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>> 
>>> wrote:
>>> 
>>> Markus,
>>> 
>>>> On 2 Jun 2020, at 12:09, Markus Ruggiero >>> <mailto:mailingli...@kataputt.com>> wrote:
>>>> Why not simply override toString() in EOGenerate templates once and for 
>>>> all?
>>> 
>>> What are “EOGenerate templates” and how they affect the 
>>> entities/attributes/relationships toStrings? I can't find anything like 
>>> that in my WO documentation. Seems it might be the right solution... if I 
>>> knew what it is :)
>>> 
>>> Thanks!
>>> OC
>>> 
>>>> 
>>>>>> On 2 Jun 2020, at 01:52, ocs--- via Webobjects-dev 
>>>>>> mailto:webobjects-dev@lists.apple.com>> 
>>>>>> wrote:
>>>>> 
>>>>> Hi there,
>>>>> 
>>>>> occasionally, I need to put entities/attributes/relationships into 
>>>>> complex nested property lists. Occasionally for debug, I need to print 
>>>>> out these property lists.
>>>>> 
>>>>> Alas, entities/attributes/relationships normally print out their complete 
>>>>> contents in their toStrings, which makes the logs completely unuseable 
>>>>> (and when there's more of them in a property list, actually bogs down the 
>>>>> application so much it must be killed).
>>>>> 
>>>>> Isn't there some trick to make those darned model classes toString 
>>>>> something reasonable, e.g., just their class, name and hash?
>>>>> 
>>>>> 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>)
>>>>&g

Re: Sign in with apple?

2020-06-01 Thread Aaron Rosenzweig via Webobjects-dev
You make a good point Ray - about using a password-less system - and you can do 
that with Auth0 and Okta too:

https://auth0.com/docs/connections/passwordless 
<https://auth0.com/docs/connections/passwordless>

https://www.okta.com/passwordless-authentication/ 
<https://www.okta.com/passwordless-authentication/>

But there are drawbacks with that too: 
https://www.helpnetsecurity.com/2019/07/18/true-passwordless-authentication/ 
<https://www.helpnetsecurity.com/2019/07/18/true-passwordless-authentication/>

Given that you may want to authenticate someone with a password they already 
know… the “win” is that letting them use Apple, Facebook, etc. is that they 
don’t have manage yet-another-password. 

While it seems like a “win” I listened to Chris at scotch.io 
<http://scotch.io/> talk about it being “fun” to add Apple, Facebook, etc. 
logins to his sites. He got like 300% more signups but then… very few of those 
actually paid for his services. He slated it as easy to signup just means 
people quickly look around but aren’t really serious. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jun 1, 2020, at 9:40 PM, Ray Kiddy via Webobjects-dev 
>  wrote:
> 
> What problem are you trying to solve? Are you wanting to not store passwords? 
> Even if you use a third-party solution, you are still going to store 
> user-specific configuration information, yes? Or are you handing all of that 
> to Apple?
> 
> I have apps that are secure and I do not store passwords.
> 
> Somebody comes in to the app, I get their e-mail address and sent them an 
> "invite" into the app. This is exactly as secure as any password-storage 
> system that uses e-mail to reset passwords. Do I have to worry about the 
> security of my password tables? No. Do I have to worry about whether I have 
> picked the right encryption? No. Do I have to worry about whether I have 
> salted the passwords correctly? No. Do I have to make people store their 
> 327th password? No. Because I do not use passwords.
> 
> I can even use 2FA on top of that.
> 
> The real problem with using systems like AppleID or Facebook authentication 
> is that gives people an illusion of security while creating a single, 
> incedibly massive point of failure. So why do that?
> 
>  - ray
> 
> 
> On 5/31/20 5:35 AM, Jesse Tayler via Webobjects-dev wrote:
>> I thought to myself, say —  I should support "Sign in with Apple” —  and 
>> wondered if anyone has experiences they’d like to share about integrating 
>> with your WO Apps??
>> 
>> 
>>  ___
>> 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/ray%40ganymede.org
>> 
>> This email sent to r...@ganymede.org
> ___
> 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: Sign in with apple?

2020-05-31 Thread Aaron Rosenzweig via Webobjects-dev
It’s a good question Jesse. Seems more people these days are paying a small fee 
to people who have perfect solutions we can use immediately. Auth0 and Okta 
come to mind but there are a plethora of choices.

https://auth0.com/blog/try-sign-in-with-apple-in-your-auth0-apps-today/ 
<https://auth0.com/blog/try-sign-in-with-apple-in-your-auth0-apps-today/>

https://developer.okta.com/blog/2019/06/04/what-the-heck-is-sign-in-with-apple 
<https://developer.okta.com/blog/2019/06/04/what-the-heck-is-sign-in-with-apple>


https://auth0.com/docs/quickstart/webapp/java/01-login 
<https://auth0.com/docs/quickstart/webapp/java/01-login>

https://developer.okta.com/code/java/ <https://developer.okta.com/code/java/>

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



> On May 31, 2020, at 8:35 AM, Jesse Tayler via Webobjects-dev 
>  wrote:
> 
> 
> I thought to myself, say —  I should support "Sign in with Apple” —  and 
> wondered if anyone has experiences they’d like to share about integrating 
> with your WO Apps??
> 
> 
> ___
> 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: is there a trick to know that a property of EO did change?

2020-05-24 Thread Aaron Rosenzweig via Webobjects-dev
Hi OC,

Could you override the setter of that property?

If it was “firstName” could you create “setFirstName()” which calls super and 
then does the additional logic you desire?
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On May 24, 2020, at 8:40 PM, ocs--- via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> I'd need to get a notification whenever a property of my EO changes, be it 
> directly through a setter, or through an inverse-relationship being 
> maintained, or through an object of an M:N deleted, whatever way. Something 
> like
> 
> class MyEO extends ERXGenericRecord {
>  void propertyDidChange(String key) {
>... to be called just after any property of mine changes, with its key ...
>  }
> }
> 
> Does EOF or WOnder provide something like that? Whatever I try, I can't find 
> it. I could easily observe willChanges of course, but that's something rather 
> different...
> 
> 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/archive%40mail-archive.com

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


Re: background tasks locked, workers run all right

2020-05-21 Thread Aaron Rosenzweig via Webobjects-dev
Hi OC,

Given that you like the idea of making a new coordinator / cursor for each of 
these tasks - my recommendation is to do it but then don’t lock the EC. Nothing 
else is using it right? You’ve guaranteed it by starting a new thread and a new 
coordinator, so don’t lock it. You can get into a pickle with locking if not 
done right and there is no need in this use case. 

You can do that and be happy :-) But to answer your other questions.

Creating a cursor to the DB is not cheap. It has a cost. If you want a simple 
high performance system you should have a pool of them that are maintained and 
ready to go. You might say, for your particular case, the cost isn’t so bad and 
you don’t care, which is fine, but what about other use cases? You have an 
import that runs sometimes… ok, what about an online game that has to deposit 
gold coins? It’s not a big task but it takes time and you want it to go as fast 
as possible, it’s a different use case. 

I’ve seen systems that let DB cursors go out of control. You start running into 
unix file usage limits. Every DB cursor can become a file pipe on the file 
system. You have to start raising ulimits and if you have oracle you have to 
buy a bigger concurrent license. Sometimes you don’t need 100% concurrency but 
you value having 20 concurrent threads that consume what they can from a queue 
of 10k requests. Does that email merge and send have to be done “now” or can it 
be done within 2 hours? Probably it can be. 

I like Kieran’s system because it gives you a big bang for your buck where it 
solves a lot of problems without you thinking too hard. The main gotcha is that 
it is round robin - which means it can hand the same coordinator / cursor to 
two threads at once at times. There you need to use locking to prevent EOF 
confusion and then you are in a bit of a pickle but… it was a quick and easy 
thing to implement and gives you concurrency 95% of the time. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On May 21, 2020, at 12:29 PM, OCsite  wrote:
> 
> Aaron,
> 
> thanks a lot!
> 
>> On 21 May 2020, at 17:30, Aaron Rosenzweig > <mailto:aa...@chatnbike.com>> wrote:
>> It looks like you are mixing a couple things.
> 
> Well probably I miss something of importance here.
> 
>> If you are going to use Kieran’s code (I believe it was him initially) you 
>> should use it fully and have a healthy number of coordinators
> 
> If “the Kieran’s code” is exploiting of 
> ERXObjectStoreCoordinatorPool.maxCoordinators > 1, well, we actually do not 
> want to do that. We do that in other applications, but not in this one.
> 
> Part of the normal processing which we do is locking the (one and only one) 
> shared OSC to make sure some of the actions are well-serialised — it's more 
> important than the speed. For normal processing (of page actions through R/R 
> loops and their working threads) this causes no problem, quite the contrary, 
> it's precisely what we want.
> 
> Contrariwise, those import tasks are special for they (a) run with very low 
> priority, (b) should not be affected by the main OSC lock (nor affect it and 
> its users) at all. Thus...
> 
>> I say that because his code does round robin and there is a chance that two 
>> threads get the same coordinator under heavy load so you better stock up on 
>> them. Think of each coordinator as a single cursor to the DB.
> 
> ... creating a new coordinator for each import thread as “its own cursor to 
> the DB” (or more precisely, its own EOF stack pretty independent on all the 
> others) is precisely what I want.
> 
> Actually those import tasks could be ideally run from another application or 
> at least instance; only it would be a bit at the inconvenient side :)
> 
> Is that wrong? Why?
> 
>> For some reason you are telling Kieran’s code to only have one coordinator. 
>> Then, on top of that, you make your own coordinator each time. It’s like 
>> crossing the beams in Ghostbusters. Go one way, or the other, don’t mix.
> 
> Probably I misunderstood the Kieran's code mightily.
> 
> I do not need a coordinator pool far as I can say, and but for the default 
> one OSC (which is shared by all the normal processing threads and ECs), I do 
> not want coordinators reused, ever.
> 
> Normally, there's at most one import task at given time (and they happen to 
> be rather infrequent); nevertheless, if due to some extremely rare conditions 
> it so happens and more imports runs at once, I'd still prefer each of them to 
> have its own EOF stack/DB access, independent on all the others.
> 
>> There is something to be said about rolling your 

Re: background tasks locked, workers run all right

2020-05-21 Thread Aaron Rosenzweig via Webobjects-dev
Hi OC,

It looks like you are mixing a couple things.

If you are going to use Kieran’s code (I believe it was him initially) you 
should use it fully and have a healthy number of coordinators. I say that 
because his code does round robin and there is a chance that two threads get 
the same coordinator under heavy load so you better stock up on them. Think of 
each coordinator as a single cursor to the DB. 

For some reason you are telling Kieran’s code to only have one coordinator. 
Then, on top of that, you make your own coordinator each time. It’s like 
crossing the beams in Ghostbusters. Go one way, or the other, don’t mix. 

There is something to be said about rolling your own and ensuring every thread 
has their own coordinator and then you don’t even need to lock. You would also 
want a queuing mechanism so that you don’t create too many coordinators. If you 
are are not going to do that and want the easy button, embrace Kieran’s code 
fully by making a large pool and letting his code give you an EC to work with. 
Think about how many people you expect to be using a long running task 
concurrently and at least double that number for your pool size. Don’t forget 
to send him some Red Breast Whiskey. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On May 21, 2020, at 7:13 AM, OCsite via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> bumped lately into another weird problem. We import some data into DB in 
> background tasks. Up to yesterday, it worked normally; today six import tasks 
> were launched, and each of them seemingly hang in its first DB operation. 
> Restart did help; alas, the site admins did not try to ask JVM to detect 
> deadlocks when they restarted the application.
> 
> The background task looks like this:
> 
> ===
> class ImportCSVTask extends ERXLongResponseTask.DefaultImplementation {
> def performAction {
> _thread.priority=Thread.MIN_PRIORITY
> try {
> try {
> editingContext=ERXEC.newEditingContext(objectStore=new 
> EOObjectStoreCoordinator())
> editingContext.lock()
> lognow 1, "=== preparing CSV import in EC $editingContext ==="
> 
> formPrototype=ERXEOGlobalIDUtilities.fetchObjectWithGlobalID(editingContext,formPrototypeGID)
> lognow 1, "=== local prototype $formPrototype ==="
> ... ...
> ===
> 
> Always the “preparing” log was the last thing those threads presented; none 
> of them ever reported “local prototype”. There's no other related log in 
> there.
> 
> Meantime the application ran normally and the worker tasks communicated with 
> the database all right (with an occasional report that some select took 
> 70-odd ms from ERXAdaptorChannelDelegate, we have the threshold at 50). We 
> run with   ERXObjectStoreCoordinatorPool.maxCoordinators=1.
> 
> Any idea what could have gone wrong and how to find the culprit and prevent 
> the problem in future? I thought a new EC in a new OSC can't be blocked for 
> long, but self-evidently, I was wrong, they seemed to lock indefinitely 
> (application was restarted ten-odd hours after the first import hanged after 
> its “preparing” report, still no “local prototype”).
> 
> 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/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: PWA

2020-04-28 Thread Aaron Rosenzweig via Webobjects-dev
Hi Pierre,

PWA can be PIA until we gain our footing :-)

To be clear for us, and anyone late to the party, when you say “DA and PWA” 
what you mean is:

“I want to vend a progressive-web-app from a WebObjects DirectAction”

No, I have not done that before. I’m not sure why you want to do that but I do 
think it is possible. If you take PWA to also mean “offline first” with either 
server workers or AppCache then you probably want to vend sw.js too. Inside 
“sw.js” there will be an ID or number that has to change for the client to know 
there is something “new” to fetch. 

You are using RPC to store data (remote procedure call) - that sounds like your 
client code is invoking a method through a transport layer to do persistence on 
the backend. Which is fine but I haven’t tried it. There are so many ways to 
achieve our goals, all of them valid. 

For me - I’ve built JS apps like they were real apps and put those resources to 
be vended statically by Apache (or nginx). So I haven’t vended from a DA, I 
vended direct from disk. 

For persistence I have done REST calls to a WO app (which is really a DA when 
you think about it). This is much like you would do with an iOS or other app 
talking with a server through REST with the only difference being it is a pure 
JS app running in a web browser. I used local forage and then later PouchDB for 
some client side persistence so I didn’t have to do REST all the time but could 
batch it up for when a user did “save” 

For persistence I have also done CouchDB in the client (PouchDB) going direct 
to CouchDB as both the DB and the server (removed some layers, which is nice) 
and allowing them to sync natively. That’s what couch does really well, sync. 
Cluster-of-unreliable-commodity-hardware. 

You can make apps like this one: https://minutes.io/welcome 
<https://minutes.io/welcome>

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



> On Apr 28, 2020, at 2:11 AM, GILQUIN Pierre  wrote:
> 
> Hi Aaron,
>  
> Thanks your all theses information.
>  
> Did you successly mixed DA and pwa ?
> I am not sure what you mean :
> « .. then send DA to WO for permanent storage … »
>  
> But I guess, it’s equivalent to what I am doing using rpc call. The rpc 
> mecanism is from the WOGWT framework.
>  
> Pierre
>  
>  
>  
> De : Aaron Rosenzweig [mailto:aa...@chatnbike.com 
> <mailto:aa...@chatnbike.com>] 
> Envoyé : lundi 27 avril 2020 22:47
> À : GILQUIN Pierre
> Cc : WebObjects-Dev
> Objet : Re: PWA
>  
> Hi Pierre,
>  
> The critical part is figuring out how to be “offline first” - it’s a mindset 
> - offline is not an error condition. 
>  
> The “sw.js” you mention is a “service worker” which is a means of caching 
> files on the client so you don’t need to speak with the server. The next time 
> you access the web page it checks the version of the service worker and if 
> nothing has changed, there is no download. That’s great for:
>  
> 1) user experience - you can give users a full version of your app and it 
> doesn’t cost you anything because the information is all on the client. Don’t 
> even need a user account! They can pay when they want to persist and share 
> across devices but by that time they are hooked. 
>  
> 2) bandwidth - with no download your apps pop when they revisit and work 
> “real fast” even without an internet connection. 
>  
> 3) resource utilization - Clients have power, they aren’t dumb, let them do 
> the work and let your “server” just be a bit bucket. Do more with less. 
>  
> You probably want to use something like PouchDB for your client side 
> persistence and then send DA to WO for permanent storage. At some point, you 
> can consider switching out CouchDB for the back end for direct sync. 
>  
> Between you and me - “service worker” is a dumb name. It replaced “AppCache” 
> which was perfectly named and in many ways easier but is now deprecated. 
> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
> 
> <~WRD000.jpg>
> 
> <~WRD000.jpg>
> 
> 
> 
> On Apr 27, 2020, at 9:18 AM, GILQUIN Pierre via Webobjects-dev 
> mailto:webobjects-dev@lists.apple.com>> 
> wrote:
>  
> I found a solution.
>  
> I created an index.html using the html generated by the WO app.
> I just put it in the directory served by apache. It’s works, the rpc call 
> from the client app get the correct results from the WO app
>  
> I guess as domain name is the same, no security/SOP issue.
>  
> So, I think it will much easy to make an installable pwa app.
>  
>  
> Pierre
>  
> De : GIL

Re: PWA

2020-04-27 Thread Aaron Rosenzweig via Webobjects-dev
Hi Pierre,

The critical part is figuring out how to be “offline first” - it’s a mindset - 
offline is not an error condition. 

The “sw.js” you mention is a “service worker” which is a means of caching files 
on the client so you don’t need to speak with the server. The next time you 
access the web page it checks the version of the service worker and if nothing 
has changed, there is no download. That’s great for:

1) user experience - you can give users a full version of your app and it 
doesn’t cost you anything because the information is all on the client. Don’t 
even need a user account! They can pay when they want to persist and share 
across devices but by that time they are hooked. 

2) bandwidth - with no download your apps pop when they revisit and work “real 
fast” even without an internet connection. 

3) resource utilization - Clients have power, they aren’t dumb, let them do the 
work and let your “server” just be a bit bucket. Do more with less. 

You probably want to use something like PouchDB for your client side 
persistence and then send DA to WO for permanent storage. At some point, you 
can consider switching out CouchDB for the back end for direct sync. 

Between you and me - “service worker” is a dumb name. It replaced “AppCache” 
which was perfectly named and in many ways easier but is now deprecated. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Apr 27, 2020, at 9:18 AM, GILQUIN Pierre via Webobjects-dev 
>  wrote:
> 
> I found a solution.
>  
> I created an index.html using the html generated by the WO app.
> I just put it in the directory served by apache. It’s works, the rpc call 
> from the client app get the correct results from the WO app
>  
> I guess as domain name is the same, no security/SOP issue.
>  
> So, I think it will much easy to make an installable pwa app.
>  
>  
> Pierre
>  
> De : GILQUIN Pierre via Webobjects-dev 
> [mailto:webobjects-dev@lists.apple.com] 
> Envoyé : lundi 27 avril 2020 09:16
> À : WebObjects-Dev
> Objet : PWA
>  
> Hi,
>  
> Do you think it’s possible to create a pwa(progressive web app) from a 
> directaction ?
> I am a complete beginner on the subject and everything I can find starts with 
> a static web directory with an index.html and some additionnal files 
> (manifest.json and sw.js) to make a app installable.
> Is there a way to adapt a WO/nder app to that ?
> My directaction just sent a unique component. Inside there is a single page 
> client application. it just uses the directaction to pass parameters.
> Ie : MyApp.woa/wa/questionnaire?type=coronavirus
> The client app is written in java GWT and call some rpc implemented inside 
> the WO/nder server app.
>  
> Thanks in advance for any idea,
>  
> Best, Pierre
>  
>  
>  
>  
> ___
> 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: Maven Unit tests with EOF

2020-02-12 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Paul,

That’s an insightful reply!

If I understand you right you are using the surefire plugin but setting the 
nature for Maven to find the files? That’s a neat way to do it. 

I think that nature was there for people who wanted to build with Maven inside 
of eclipse, but you can use it the way you have done as well.

I had to stop trying but I should revisit soon. I think it is probably better 
to use the “failsafe / verify” instead of “surefire / test” because it will 
have the bundled .woa or .framework by then and should be a standard bundle. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Feb 12, 2020, at 10:37 PM, Paul Hoadley  wrote:
> 
> Hi Aaron,
> 
> I don't know whether you went on to solve your problem here, but I've just 
> spent a few hours of my life that I'll never get back debugging something 
> similar. I had just built a new framework from scratch, and WOUnit testing 
> under maven-surefire-plugin failed, with WOUnit complaining that it couldn't 
> find my models. I started by logging out NSBundle.mainBundle(), and recalled 
> your recent post:
> 
> On 23 Jan 2020, at 15:01, Aaron Rosenzweig  <mailto:aa...@chatnbike.com>> wrote:
> 
>> There are three types of concrete (not abstract) NSBundles:
>> 1) NSLegacyBundle
>> 2) NSFluffyBunnyProjectBundle
>> 3) NSMavenProjectBundle
> 
> During unit test initialisation it was reporting that the main bundle was an 
> NSFluffyBunnyProjectBundle, but the project type is Maven.
> 
>> When I run this from Eclipse I can hit breakpoints and I confirmed that it 
>> is making an NSFluffyBunnyProjectBundle. 
> 
> The model-finding issue described above was apparent only when running "mvn 
> verify" from the command line, and Eclipse does have a habit of doing 
> additional classpath setup, so if you're just talking about "Run As > JUnit 
> Test" from within Eclipse, then all bets are off, but if you're seeing this 
> from the command line and your project is a Maven project, then this is 
> wrong. If you dig down into ERFoundation.jar and decompile 
> NSStandardProjectBundle.Factory, you'll find this:
> 
>   if ("org.maven.ide.eclipse.maven2Nature".equals(nature)) {
>   mavenProject = true;
>   }
> 
> It's scanning the project's .project file and checking for:
> 
>   org.maven.ide.eclipse.maven2Nature
> 
> If it finds that, it creates an NSMavenProjectBundle. If it doesn't, then 
> it's NSFluffyBunnyProjectBundle, which will be deficient because everything 
> is in the wrong places. (For example, it can't find models because they're in 
> src/main/resources, not Resources.)
> 
> Adding that nature element to .project immediately fixed my issue. Why wasn't 
> it there in the first place? Because the Wonder archetype (and our custom 
> archetype that's based on it) no longer adds it because it's obsolete.
> 
>   
>   org.eclipse.m2e.core.maven2Nature
>   org.eclipse.jdt.core.javanature
>   
> org.objectstyle.wolips.incrementalframeworknature
>   
> 
> So, does your framework's .project file contain that nature element, and if 
> not does adding it in fix your issue?
> 
> 
> -- 
> Paul Hoadley
> https://logicsquad.net/ <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: Problem running from Eclipse

2020-01-27 Thread Aaron Rosenzweig via Webobjects-dev
Sweet,

Glad you figured it out in the end. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 27, 2020, at 3:51 PM, Valerio Luccio  wrote:
> 
> OK, it seems to a problem with my workspace. If I create a "Hello World" app 
> from template it doesn't work, but if I use another workspace it does ...
> 
> -- 
> Valerio Luccio (212) 998-8736
> Center for Brain Imaging   4 Washington Place, Room 157
> New York UniversityNew York, NY 10003
> 
>"In an open world, who needs windows or gates ?"
> 

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

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


Re: JavaScripts generated programmatically and/or placed at the end

2020-01-27 Thread Aaron Rosenzweig via Webobjects-dev
Hi OC,

Offhand what you are asking is probably possible; however I have a suggestion 
to not fight against the grain.

If you are using prototype, then wait for the “dom loaded event” like so:
http://api.prototypejs.org/dom/document/observe/ 
<http://api.prototypejs.org/dom/document/observe/>

jQuery has something similar:
https://api.jquery.com/ready/ <https://api.jquery.com/ready/>

If you aren’t using either you could choose window or document onLoad:
https://stackoverflow.com/questions/588040/window-onload-vs-document-onload 
<https://stackoverflow.com/questions/588040/window-onload-vs-document-onload>

In this way, you can put it in the head, and then it will only be executed 
after all the DOM elements are on the page :-)
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 26, 2020, at 12:09 PM, OCsite via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> for once, no deep mystery, but a plain API-related question :)
> 
> I am just switching my old very hap-hazard and ugly way of loading 
> javascripts as needed by components to the very neat ERXComponent's support 
> of additionalJavascriptFiles. Mostly it works like a charm, but for two cases:
> 
> (i) scripts which are generated programmatically
> 
> So far, I have used directly in the particular component template something 
> like
> 
> ===
> 
> 
> 
> ===
> 
> Is there a way to exploit somehow the ERXComponent's support for that, to 
> move these scripts to the  too?
> 
> (ii) scripts which need to be placed at the end of page
> 
> Far as I was able to ascertain, all the  tags for the scripts from 
> additionalJavascriptFiles are always generated to . Mostly it's 
> precisely what I need, but time to tome, the script needs to be placed at the 
> end of page (for it runs something which addresses the page elements). Is 
> there a way to use the ERXComponent's support for that?
> 
> 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/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: Problem running from Eclipse

2020-01-27 Thread Aaron Rosenzweig via Webobjects-dev
Hi Valerio,

It’s that the error complained about not finding NSCoding which should be in 
JavaFoundation. Oh… but you know… there is a WebServerResources version that 
you do not want. Gotta be sure you got the right jar. 

You want something like:
/Library/WebObjects/Versions/WebObjects543/System/Library/Frameworks/JavaFoundation.framework/Resources/Java/javafoundation.jar

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



> On Jan 27, 2020, at 1:29 PM, Valerio Luccio  wrote:
> 
> Not sure what you're suggesting. I tried removing the JavaFoundation and add 
> it back in the configure build path, didn't   give me any errors in the 
> build, but when I try to run it I got the same error. 
> 
> I thinks it's clear that the path is screwed up somehow, but I can't figure 
> out where.
> 
> On 1/27/20 10:35 AM, Aaron Rosenzweig wrote:
> 
>> Hey Valerio,
>> 
>> That sheds some light… did you upgrade to Catalina or other OS changes? Many 
>> people got burned by Catalina moving directories under root to other 
>> locations messing up your class path. It’s very possible that your beans 
>> were arranged above your frank without you knowing… just by an OS upgrade. 
>> 
>> In other words, it can find the magic locations for your frameworks anymore. 
>> “Configure build path” and see if things are read and need to be re-mapped. 
>> AARON ROSENZWEIG / Chat 'n Bike 
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.chatnbike.com&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=zZK0dca4HNf-XwnAN9ais1C3ncS0n2x39pF7yr-muHY&m=bRvHvGoIE939lB-I22_KxvKkW3ZMv0zUs8X5LpWJgJM&s=y3LkTL0h31RLWNB0rwny6icU-m6hISpKWjcsWFPJwcA&e=>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>>  
>> 
>>> On Jan 27, 2020, at 10:31 AM, Valerio Luccio >> <mailto:valerio.luc...@nyu.edu>> wrote:
>>> 
>>> Thanks for the reply.
>>> 
>>> I started that project about 15 years ago and the last time I fired it up 
>>> successfully from Eclipse was in September. Then in December, without 
>>> changing anything in the project, I could not do it anymore.
>>> 
>>> The JavaFoundation.framework in my path is 
>>> /Library/WebObjects/Versions/WebObjects543/System/Library/Frameworks and 
>>> NSCoding is definitely there.
>>> 
>>> I guess I'll have to try reinstalling Eclipse (sigh).
>>> 
>>> On 1/23/20 11:17 PM, Aaron Rosenzweig wrote:
>>> 
>>>> Sorry Valerio, 6 weeks is a long time indeed - you’ve been patient. 
>>>> 
>>>> JNI has to do with Java making calls to a C library. That’s the “native 
>>>> method” part. 
>>>> 
>>>> If it were me, I’d trash Eclipse and start over. I know that’s not what 
>>>> you want to hear but… 
>>>> 
>>>> Hmm… thinking some more…
>>>> 
>>>> “NSCoding” lives inside the “JavaFoundation.framework” from Apple. Do you 
>>>> have that framework included in your project? Can you find it when you 
>>>> “configure build path” for your project?
>>>> AARON ROSENZWEIG / Chat 'n Bike 
>>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.chatnbike.com&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=zZK0dca4HNf-XwnAN9ais1C3ncS0n2x39pF7yr-muHY&m=zNRTRtL2oKMEEiIf7TZw6uoVu7OjEorP2LTNGIVQQ8I&s=CJPoFIXrpAoGaeUPBMEl0iEevpJ6LnRfeG-05Aqm6VI&e=>
>>>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>>>>
>>>> 
>>>>> On Jan 23, 2020, at 2:24 PM, Valerio Luccio via Webobjects-dev 
>>>>> mailto:webobjects-dev@lists.apple.com>> 
>>>>> wrote:
>>>>> 
>>>>> 6 Weeks ago I sent this message, but got no replies. Really nobody has 
>>>>> any clue ?
>>>>> 
>>>>> btw: I get the same using a simple example app and trying from a clean 
>>>>> workspace.
>>>>> 
>>>>> On 12/9/19 2:23 PM, Valerio Luccio wrote:
>>>>> 
>>>>>> Hello all,
>>>>>> 
>>>>>> I have Eclipse Mars.2 running on a Mac with Mojave with JavaSE 1.8. I 
>>>>>> hadn't fired up my web app from Eclipse in a couple of months and today, 
>>>>>> without having any major changes to the O/S, when I tried I got:
>>>>>> 
>>>>>> Error: A JNI

Re: Problem running from Eclipse

2020-01-27 Thread Aaron Rosenzweig via Webobjects-dev
Hey Valerio,

That sheds some light… did you upgrade to Catalina or other OS changes? Many 
people got burned by Catalina moving directories under root to other locations 
messing up your class path. It’s very possible that your beans were arranged 
above your frank without you knowing… just by an OS upgrade. 

In other words, it can find the magic locations for your frameworks anymore. 
“Configure build path” and see if things are read and need to be re-mapped. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 27, 2020, at 10:31 AM, Valerio Luccio  wrote:
> 
> Thanks for the reply.
> 
> I started that project about 15 years ago and the last time I fired it up 
> successfully from Eclipse was in September. Then in December, without 
> changing anything in the project, I could not do it anymore.
> 
> The JavaFoundation.framework in my path is 
> /Library/WebObjects/Versions/WebObjects543/System/Library/Frameworks and 
> NSCoding is definitely there.
> 
> I guess I'll have to try reinstalling Eclipse (sigh).
> 
> On 1/23/20 11:17 PM, Aaron Rosenzweig wrote:
> 
>> Sorry Valerio, 6 weeks is a long time indeed - you’ve been patient. 
>> 
>> JNI has to do with Java making calls to a C library. That’s the “native 
>> method” part. 
>> 
>> If it were me, I’d trash Eclipse and start over. I know that’s not what you 
>> want to hear but… 
>> 
>> Hmm… thinking some more…
>> 
>> “NSCoding” lives inside the “JavaFoundation.framework” from Apple. Do you 
>> have that framework included in your project? Can you find it when you 
>> “configure build path” for your project?
>> AARON ROSENZWEIG / Chat 'n Bike 
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.chatnbike.com&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=zZK0dca4HNf-XwnAN9ais1C3ncS0n2x39pF7yr-muHY&m=zNRTRtL2oKMEEiIf7TZw6uoVu7OjEorP2LTNGIVQQ8I&s=CJPoFIXrpAoGaeUPBMEl0iEevpJ6LnRfeG-05Aqm6VI&e=>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>>  
>> 
>>> On Jan 23, 2020, at 2:24 PM, Valerio Luccio via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>> 
>>> wrote:
>>> 
>>> 6 Weeks ago I sent this message, but got no replies. Really nobody has any 
>>> clue ?
>>> 
>>> btw: I get the same using a simple example app and trying from a clean 
>>> workspace.
>>> 
>>> On 12/9/19 2:23 PM, Valerio Luccio wrote:
>>> 
>>>> Hello all,
>>>> 
>>>> I have Eclipse Mars.2 running on a Mac with Mojave with JavaSE 1.8. I 
>>>> hadn't fired up my web app from Eclipse in a couple of months and today, 
>>>> without having any major changes to the O/S, when I tried I got:
>>>> 
>>>> Error: A JNI error has occurred, please check your installation and try 
>>>> again
>>>> Exception in thread "main" java.lang.NoClassDefFoundError: 
>>>> com/webobjects/foundation/NSCoding
>>>> at java.lang.ClassLoader.findBootstrapClass(Native Method)
>>>> .
>>>> I find this message terribly vague. What should I be looking for ?
>>>> 
>>>> Thanks,
>>>> 
>>>> -- 
>>>> Valerio Luccio (212) 998-8736
>>>> Center for Brain Imaging   4 Washington Place, Room 157
>>>> New York UniversityNew York, NY 10003
>>>> 
>>>> "In an open world, who needs windows or gates ?"
>>> 
>>> 
>>> -- 
>>> Valerio Luccio (212) 998-8736
>>> Center for Brain Imaging   4 Washington Place, Room 157
>>> New York UniversityNew York, NY 10003
>>> 
>>> "In an open world, who needs windows or gates ?"
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com 
>>> <mailto:Webobjects-dev@lists.apple.com>)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com
>>>  
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.apple.com_mailman_options_webobjects-2Ddev_aaron-2540chatnbike.com&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=zZK0dca4HNf-XwnAN9ais1C3ncS0n2x39pF7yr-muHY&m=zNRTRtL2oKMEEiIf7TZw6uoVu7OjEorP2LTNGIVQQ8I&s=tahru65z6JPxcM4IPpTjhtvuptpIVz_bLWVeh6Lhvfg&e=>
>>> 
>>> This email sent to aa...@chatnbike.com <mailto:aa...@chatnbike.com>
>> 
> 
> 
> -- 
> Valerio Luccio (212) 998-8736
> Center for Brain Imaging   4 Washington Place, Room 157
> New York UniversityNew York, NY 10003
> 
> "In an open world, who needs windows or gates ?"

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

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


Re: Problem running from Eclipse

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
Sorry Valerio, 6 weeks is a long time indeed - you’ve been patient. 

JNI has to do with Java making calls to a C library. That’s the “native method” 
part. 

If it were me, I’d trash Eclipse and start over. I know that’s not what you 
want to hear but… 

Hmm… thinking some more…

“NSCoding” lives inside the “JavaFoundation.framework” from Apple. Do you have 
that framework included in your project? Can you find it when you “configure 
build path” for your project?
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 23, 2020, at 2:24 PM, Valerio Luccio via Webobjects-dev 
>  wrote:
> 
> 6 Weeks ago I sent this message, but got no replies. Really nobody has any 
> clue ?
> 
> btw: I get the same using a simple example app and trying from a clean 
> workspace.
> 
> On 12/9/19 2:23 PM, Valerio Luccio wrote:
> 
>> Hello all,
>> 
>> I have Eclipse Mars.2 running on a Mac with Mojave with JavaSE 1.8. I hadn't 
>> fired up my web app from Eclipse in a couple of months and today, without 
>> having any major changes to the O/S, when I tried I got:
>> 
>> Error: A JNI error has occurred, please check your installation and try again
>> Exception in thread "main" java.lang.NoClassDefFoundError: 
>> com/webobjects/foundation/NSCoding
>> at java.lang.ClassLoader.findBootstrapClass(Native Method)
>> .
>> I find this message terribly vague. What should I be looking for ?
>> 
>> Thanks,
>> 
>> -- 
>> Valerio Luccio (212) 998-8736
>> Center for Brain Imaging   4 Washington Place, Room 157
>> New York UniversityNew York, NY 10003
>> 
>> "In an open world, who needs windows or gates ?"
> 
> 
> -- 
> Valerio Luccio (212) 998-8736
> Center for Brain Imaging   4 Washington Place, Room 157
> New York UniversityNew York, NY 10003
> 
> "In an open world, who needs windows or gates ?"
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> 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: Maven Unit tests with EOF

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
Thanks Chuck,

Maven likes to swallow things but I put the flags to not trim stack traces and 
to divert standard out but I haven’t gotten anything additional. I still might 
have missed a flag. 

I thought maybe I could add some logger statements into the WOnder version of 
NSBundle that replaces the Apple version… that lives in ERFoundation.jar inside 
of ERJars.framework but… haha! no source, it’s a secret lib I suppose. 

I’m guessing that Maven may not have built enough to have the Contents and the 
Properties file available or otherwise something was “wrong” and that caused 
the static initializer to fail. When I reverse engineer the Wonder NSBundle 
(did I say that aloud?) I see that the static initializer does a lot! It’s not 
just setting a few variables, it’s rather meaty. 

The next step is to make my own com.webojects.blah.blah.NSBundle that takes 
precedence but looks a lot like the Wonder one but with more logging in it so I 
can see where it is failing when invoked by Maven. I had to cut bait for the 
moment though, spent too much time chasing my own tail. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 23, 2020, at 10:52 PM, Chuck Hill  wrote:
> 
> 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 
>> mailto:webobjects-dev@lists.apple.com>> 
>> 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 <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>> 
>>  
>> 
>>> On Jan 23, 2020, at 11:23 AM, Aaron Rosenzweig >> <mailto:aa...@chatnbike.com>> 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 <http://www.chatnbike.com/>
>>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319
>>> 
>>> 
>>> 
>>>> On Jan 23, 2020, at 10:03 AM, Aaron Rosenzweig >>> <mailto:aa...@chatnbike.com>> 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 <http://www.chatnbike.com/>
>>>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319   
>>>> 
>>>>
>>>> 
>>>>> On Jan 23, 2020, at 9:58 AM, Dennis Scheffer >>>> <mailto:den...@selbstdenker.ag>> 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
>>>>>  
>>>>> <https://maven.apache.org/guides/introduction/introduction-to-profiles.html>).
>>>>>  Then you can fire failsafe every time you check in new code without 
>>>>> selenium

Re: Maven Unit tests with EOF

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
Jesse you are correct. If you are compiling for one java version but running on 
another… you can get java.lang.NoClassDefFoundError - that’s because the object 
you used at compile time might not be available in that other runtime. 

While the error is the same, this feels different but your point is a good one 
and I’ll consider it some more. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 23, 2020, at 4:24 PM, Jesse Tayler  wrote:
> 
> Isn’t that what you get with some java version mismatch ??
> 
>> On Jan 23, 2020, at 11:41 AM, Aaron Rosenzweig via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> 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 <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>> 
>>  
>> 
>>> On Jan 23, 2020, at 11:23 AM, Aaron Rosenzweig >> <mailto:aa...@chatnbike.com>> 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 <http://www.chatnbike.com/>
>>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319
>>> 
>>> 
>>> 
>>>> On Jan 23, 2020, at 10:03 AM, Aaron Rosenzweig >>> <mailto:aa...@chatnbike.com>> 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 <http://www.chatnbike.com/>
>>>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319   
>>>> 
>>>>
>>>> 
>>>>> On Jan 23, 2020, at 9:58 AM, Dennis Scheffer >>>> <mailto:den...@selbstdenker.ag>> 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
>>>>>  
>>>>> <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 >>>>> <mailto:aa...@chatnbike.com>> 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 
>

Re: ERFoundation question

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
Interesting - perhaps it was a gift from a fruit company. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 23, 2020, at 8:08 PM, Henrique Prange  wrote:
> 
> No, you’re not. There's no source code for the ERFoundation framework. 😕
> 
> Sent from my iPhone
> 
>> On 23 Jan 2020, at 13:51, Aaron Rosenzweig via Webobjects-dev 
>>  wrote:
>> 
>> I want to put some logging messages in NSBundle.java that resides in 
>> ERFoundation.jar but I don’t understand how to do so.
>> 
>> It looks like ERFoundation.jar lives inside of ERJars.framework and there is 
>> no source? How is that possible? I must be mistaken. 
>> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>> 
>>  
>> 
>> ___
>> 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/hprange%40gmail.com
>> 
>> This email sent to hpra...@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


ERFoundation question

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
I want to put some logging messages in NSBundle.java that resides in 
ERFoundation.jar but I don’t understand how to do so.

It looks like ERFoundation.jar lives inside of ERJars.framework and there is no 
source? How is that possible? I must be mistaken. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



 ___
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 Aaron Rosenzweig via Webobjects-dev
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 <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto: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 <http://www.chatnbike.com/>
> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319  
> 
>   
> 
>> On Jan 23, 2020, at 10:03 AM, Aaron Rosenzweig > <mailto:aa...@chatnbike.com>> 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 <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>> 
>>  
>> 
>>> On Jan 23, 2020, at 9:58 AM, Dennis Scheffer >> <mailto:den...@selbstdenker.ag>> 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 
>>> <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 >>> <mailto:aa...@chatnbike.com>> 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
>>>>  
>>>> <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 the

Re: Maven Unit tests with EOF

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
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 <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto: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 <http://www.chatnbike.com/>
> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319  
> 
>   
> 
>> On Jan 23, 2020, at 9:58 AM, Dennis Scheffer > <mailto:den...@selbstdenker.ag>> 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 
>> <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 >> <mailto:aa...@chatnbike.com>> 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
>>>  
>>> <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 <http://www.chatnbike.com/>
>>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319
>>> 
>>> 
>>> 
>>>> On Jan 23, 2020, at 2:54 AM, Dennis Scheffer >>> <mailto:den...@selbstdenker.ag>> wrote:
>>>> 
>>>> Hi everyone,
>>>> 
>>>> 
>>>>> // That's the main bundle w

Re: Maven Unit tests with EOF

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
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 <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto: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 
> <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 > <mailto:aa...@chatnbike.com>> 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
>>  
>> <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 <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>> 
>>  
>> 
>>> On Jan 23, 2020, at 2:54 AM, Dennis Scheffer >> <mailto:den...@selbstdenker.ag>> wrote:
>>> 
>>> Hi everyone,
>>> 
>>> 
>>>> // That's the main bundle when running tests from Eclipse
>>>> Path mainBundlePath = Paths.get("build/your-project.woa");
>>>> 
>>>> if (Files.notExists(mainBundlePath)) {
>>>>  // Maven doesn't create a build directory. The WOA bundle goes into the 
>>>> target folder instead.
>>>>  mainBundlePath = Paths.get("target/your-project.woa");
>>>> }
>>>> 
>>>> ERXExtensions.initApp("your-project", mainBundlePath.toUri().toURL(), 
>>>> ACUnitTestingApplication.class, args);
>>> 
>>> This may not work under certain circumstances because the surefire plugin 
>>> usually runs in the Maven 'test' phase which is before the 'package' phase. 
>>> Therefore, there may not be a bundle at 'target/your-project.woa' – 
>>> especially if you do a 'mvn clean test'.
>>> 
>>>

Re: Maven Unit tests with EOF

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
Hey everybody,

I noticed that “NSBundle.java” is defined in ERFoundation and also 
JavaFoundation… 

It appears we aren’t using ERXPatcher to replace it and that might not even be 
an option… so you have to have ERFoundation loaded first for it to override. I 
do have it that way and Maven is doing it that way but I hadn’t noticed before 
that NSBundle is already patched. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 23, 2020, at 9:39 AM, 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 
> <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 <http://www.chatnbike.com/>
> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319  
> 
>   
> 
>> On Jan 23, 2020, at 2:54 AM, Dennis Scheffer > <mailto:den...@selbstdenker.ag>> wrote:
>> 
>> Hi everyone,
>> 
>> 
>>> // That's the main bundle when running tests from Eclipse
>>> Path mainBundlePath = Paths.get("build/your-project.woa");
>>> 
>>> if (Files.notExists(mainBundlePath)) {
>>>  // Maven doesn't create a build directory. The WOA bundle goes into the 
>>> target folder instead.
>>>  mainBundlePath = Paths.get("target/your-project.woa");
>>> }
>>> 
>>> ERXExtensions.initApp("your-project", mainBundlePath.toUri().toURL(), 
>>> ACUnitTestingApplication.class, args);
>> 
>> This may not work under certain circumstances because the surefire plugin 
>> usually runs in the Maven 'test' phase which is before the 'package' phase. 
>> Therefore, there may not be a bundle at 'target/your-project.woa' – 
>> especially if you do a 'mvn clean test'.
>> 
>> The solution is very simple: I would consider tests that depend on a 
>> pre-build bundle integration tests (which makes sense because most of the 
>> time all the application's 'units' are integrated in a bundle). And just use 
>> the Maven failsafe pugin 
>> (https://maven.apache.org/surefire/maven-failsafe-plugin/ 
>> <https://maven.apache.org/surefire/maven-failsafe-plugin/>). It works 
>> exactly the same as the surefire plugin but runs in the 'verify' phase which 
>> is after the 'package' phase. So 'mvn clean verify' will clean your target 
>> directory, create a fresh new bundle and run your tests on your fresh bundle 
>> with the solution mentioned above.
>> 
>> With regards,
>> -- 
>> Dennis
>> 
>> 
>>> On 23. Jan 2020, at 02:28, Henrique Prange via Webobjects-dev 
>>> mailto:webobjects-dev@lists.apple.com>> 
>>> wrote:
>>> 
>>> Hey Aaron,
>>> 
>>> This error rings a bell. I don't recall all the details. It looks like the 
>>> collectMainProps method is trying to find the Properties file of your 
>>> project in the wrong place.
>>> 
>>> When you build your proje

Re: Maven Unit tests with EOF

2020-01-23 Thread Aaron Rosenzweig via Webobjects-dev
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 
<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 <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 23, 2020, at 2:54 AM, Dennis Scheffer  wrote:
> 
> Hi everyone,
> 
> 
>> // That's the main bundle when running tests from Eclipse
>> Path mainBundlePath = Paths.get("build/your-project.woa");
>> 
>> if (Files.notExists(mainBundlePath)) {
>>  // Maven doesn't create a build directory. The WOA bundle goes into the 
>> target folder instead.
>>  mainBundlePath = Paths.get("target/your-project.woa");
>> }
>> 
>> ERXExtensions.initApp("your-project", mainBundlePath.toUri().toURL(), 
>> ACUnitTestingApplication.class, args);
> 
> This may not work under certain circumstances because the surefire plugin 
> usually runs in the Maven 'test' phase which is before the 'package' phase. 
> Therefore, there may not be a bundle at 'target/your-project.woa' – 
> especially if you do a 'mvn clean test'.
> 
> The solution is very simple: I would consider tests that depend on a 
> pre-build bundle integration tests (which makes sense because most of the 
> time all the application's 'units' are integrated in a bundle). And just use 
> the Maven failsafe pugin 
> (https://maven.apache.org/surefire/maven-failsafe-plugin/ 
> <https://maven.apache.org/surefire/maven-failsafe-plugin/>). It works exactly 
> the same as the surefire plugin but runs in the 'verify' phase which is after 
> the 'package' phase. So 'mvn clean verify' will clean your target directory, 
> create a fresh new bundle and run your tests on your fresh bundle with the 
> solution mentioned above.
> 
> With regards,
> -- 
> Dennis
> 
> 
>> On 23. Jan 2020, at 02:28, Henrique Prange via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> Hey Aaron,
>> 
>> This error rings a bell. I don't recall all the details. It looks like the 
>> collectMainProps method is trying to find the Properties file of your 
>> project in the wrong place.
>> 
>> When you build your project in Eclipse with WOLips, it generates a build 
>> folder containing your project's WOA bundle. Maven, however, puts the 
>> generated WOA bundle in the target folder. I'm afraid the application 
>> initialization code keeps looking for the build folder when you run your 
>> tests with Maven.
>> 
>> I'm not sure if there's a better way to solve this problem. Anyway, the code 
>> below may fix it.
>> 
>> // That's the main bundle when running tests from Eclipse
>> Path mainBundlePath = Paths.get("build/your-project.woa");
>> 
>> if (Files.notExists(mainBundlePath)) {
>>  // Maven doesn't create a build directory. The WOA bundle goes into the 
>> target folder instead.
>>  mainBundlePath = Paths.get("target/your-project.woa");
>> }
>> 
>> ERXExtensions.initApp("your-project", mainBundlePath.toUri().toURL(), 
>> ACUnitTestingApplication.class, arg

Re: Maven Unit tests with EOF

2020-01-22 Thread Aaron Rosenzweig via Webobjects-dev
Markus, moin moin! Yes it’s been a long time :-) Thanks for the tip - I located 
the thread you mentioned where Hugi recommended "JarResourceRequestHandler()” - 
I think he might be onto something with respect to Jars but that particular 
thing is for serving static resources not for NSBundle. I’d be interested to 
know how you patched things, that might shed some additional light. I hear you, 
you’d rather not patch but sometimes you gotta do what you gotta do. 

Hey Paul - Yeah the MockEC is neat and doesn’t even need to go to the DB so 
it’s easier in many ways but I have a mandate to be destructive with the DB so 
I cannot use the MockEC for this unit test. 

Henrique - you are so close I think! I tried your suggestion, it didn’t work 
but your hot. 

There are three types of concrete (not abstract) NSBundles:
1) NSLegacyBundle
2) NSFluffyBunnyProjectBundle
3) NSMavenProjectBundle

When I run this from Eclipse I can hit breakpoints and I confirmed that it is 
making an NSFluffyBunnyProjectBundle. 

I don’t know how to debug a maven run or if it is even possible… But it is 
actually giving me a "java.lang.NoClassDefFoundError: Could not initialize 
class com.webobjects.foundation.NSBundle” that later morphs into a null pointer 
in ERXApplication$Loader.collectMainProps()

NSBundle itself is abstract… and I’m trying to run a test on a framework - 
maybe that’s just a bad idea and I should move the test to a WOApplication 
project that uses the framework… Not sure. 

The “NSMavenProjectBundle” seems to be for running from within Eclipse too but 
I don’t know much about it. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 22, 2020, at 8:28 PM, Henrique Prange  wrote:
> 
> Hey Aaron,
> 
> This error rings a bell. I don't recall all the details. It looks like the 
> collectMainProps method is trying to find the Properties file of your project 
> in the wrong place.
> 
> When you build your project in Eclipse with WOLips, it generates a build 
> folder containing your project's WOA bundle. Maven, however, puts the 
> generated WOA bundle in the target folder. I'm afraid the application 
> initialization code keeps looking for the build folder when you run your 
> tests with Maven.
> 
> I'm not sure if there's a better way to solve this problem. Anyway, the code 
> below may fix it.
> 
> // That's the main bundle when running tests from Eclipse
> Path mainBundlePath = Paths.get("build/your-project.woa");
> 
> if (Files.notExists(mainBundlePath)) {
>  // Maven doesn't create a build directory. The WOA bundle goes into the 
> target folder instead.
>  mainBundlePath = Paths.get("target/your-project.woa");
> }
> 
> ERXExtensions.initApp("your-project", mainBundlePath.toUri().toURL(), 
> ACUnitTestingApplication.class, args);
> 
> Cheers,
> 
> HP
> 
>> On Jan 22, 2020, at 2:09 PM, Aaron Rosenzweig via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> 
>> wrote:
>> 
>> Hi,
>> 
>> I’m trying to run maven unit tests with the surefire plugin that make use of 
>> EOF but it’s not working out. 
>> 
>> I can run them in Eclipse with a direct launch as a bundless build and it 
>> works. I make a call in the static initializer of the test case to:
>> ERXExtensions.initApp(ACUnitTestingApplication.class, arguments);
>> 
>> And it thinks it’s a WO app and has access to the model group and all of EOF 
>> and I can do destructive stuff like creating and saving Eos to the DB all 
>> inside a launch from Eclipse.
>> 
>> Where I’m running into trouble is trying to do it with Maven. At the moment 
>> I’m getting a null pointer from maven launch at the following place.
>> 
>> er.extensions.appserver.ERXApplication$Loader.collectMainProps(ERXApplication.java:757)
>> 
>> I think because it is wanting to treat it as a bundle but it isn’t and so… 
>> I’m not sure where to go from here. Any advice?
>> 
>> AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
>> e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319 
>> 
>>  
>> 
>> ___
>> 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/hprange%40gmail.com 
>> <https://lists.apple.com/mailman/options/webobjects-dev/hprange%40gmail.com>
>> 
>> This email sent to hpra...@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


Maven Unit tests with EOF

2020-01-22 Thread Aaron Rosenzweig via Webobjects-dev
Hi,

I’m trying to run maven unit tests with the surefire plugin that make use of 
EOF but it’s not working out. 

I can run them in Eclipse with a direct launch as a bundless build and it 
works. I make a call in the static initializer of the test case to:
ERXExtensions.initApp(ACUnitTestingApplication.class, arguments);

And it thinks it’s a WO app and has access to the model group and all of EOF 
and I can do destructive stuff like creating and saving Eos to the DB all 
inside a launch from Eclipse.

Where I’m running into trouble is trying to do it with Maven. At the moment I’m 
getting a null pointer from maven launch at the following place.

er.extensions.appserver.ERXApplication$Loader.collectMainProps(ERXApplication.java:757)

I think because it is wanting to treat it as a bundle but it isn’t and so… I’m 
not sure where to go from here. Any advice?

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



 ___
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: WebObjects and Javascript Response Rewriter

2020-01-03 Thread Aaron Rosenzweig via Webobjects-dev
Hi Pierre,

Your GWT solution sounds good and useful. You made a great choice. 

The beauty of traditional WO is that it was not cumbersome. You had an answer 
for everything from templating UI to persisting your data and even app 
monitoring / launching. You didn’t have to piece together different software 
and make them work. Anything else is just going to be cumbersome. As far as I 
know, nobody has made a good pure JS solution that does an 
editingContext.saveChages() for a relational DB. But people like / want the 
slick nice of a rich smart client living on the user’s machine. That is a fun / 
slick experience for the user and it offloads a great deal of server processing 
too. 

Enyo is good for templating and component reuse with a visual IDE (Ares) but 
then it is dead like WO and you gotta figure out persistence. They got ways to 
map JS objects to rest calls but it’s cumbersome compared to traditional WO. 

You got CouchDB which pretty much can avoid an app server altogether, which is 
nice for simplicity… Really! You can do REST direct to a CouchDB server without 
any middle tier software translation. But then CouchDB is not a relational DB 
and maybe you don’t want that. That said, you can sync back and forth with 
PouchDB (JS version of CouchDB) and that is easy. So maybe life can be easy if 
you leave the relational world behind and pick a very particular stack. 

In a mixed environment I’ve used Enyo for my pure JS app then PouchDB for its 
persistence in local storage and saved the data to a large VARCHAR in a WO app. 
It was a form filling app with lots of skip patterns and what not. It was cool 
in that all the processing happened in the user’s browser and round trips were 
only for saving the blob to WO. When the traditional WO app needed the 
submitted form, it would parse the JSON structure and create EO objects and 
carry on. 

When I say “anything else is cumbersome” it’s not entirely true. You could fire 
up something like Meteor, which has an answer for everything, and is super fast 
to setup and get persistence going along with user accounts etc. The downside 
is it is MongoDB only. It’s ok if you are willing to use that for persistence 
but what if you want a relational DB? 

WO is still perhaps the best solution for no-cumbersome relational DB usage. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 3, 2020, at 3:57 AM, GILQUIN Pierre via Webobjects-dev 
>  wrote:
> 
> Do you have a example application with this approach?
> 
> I did a "similar" way but 100% Java using GWT and the WOGWT framework instead 
> of REST JSON.
> 
> The eomodel was used to generate the eo equivalent client class.
> The GWT client application used RPC calls to obtain a client objects tree and 
> save them back on the server.
> 
> The transformation between EO server objects into client objects is rather 
> cumbersome. I would like to try WORest to see if it's make thing easier ...
> 
> Pierre
> 
> 
> De : Webobjects-dev 
> [mailto:webobjects-dev-bounces+pierre.gilquin=hcuge...@lists.apple.com] De la 
> part de Aaron Rosenzweig via Webobjects-dev
> Envoyé : jeudi 2 janvier 2020 20:06
> À : Jesse Tayler
> Cc : WO
> Objet : Re: WebObjects and Javascript Response Rewriter
> 
> Sounds like you have your feet straddling two different worlds. 
> 
> You could consider building parts of your app in pure JS while other parts in 
> WO. You could do persistence with REST for your pure JS apps that are served 
> by WORest. You could use JSON web tokens to have authentication that is 
> shared between the two worlds so that users don’t lose their authentication 
> as they hop back and forth. 
> AARON ROSENZWEIG / Chat 'n Bike
> e:  aa...@chatnbike.com  t:  (301) 956-2319 
> 
> 
> 
> 
> On Jan 2, 2020, at 1:47 PM, Jesse Tayler via Webobjects-dev 
>  wrote:
> 
> 
> I see.
> 
> Well, that’s a bit of a trick but of course, you can decide what you’d like 
> to do.
> 
> I once realized that my UI elements often needed settings, defaults and 
> configurations to exist in javascript — it seemed a waste and trouble to 
> create new components of course, in my case, I use a lot of D2W and did not 
> need programming outside the regular dev tools — but I did move the css and 
> javascript additions into D2W rules, which made the component reliable and 
> the programming of details often a matter of copying configurations you know 
> work and writing the rule to determine when that script should be placed into 
> the component.
> 
> In your case, it sounds like you might want a way they can write HTML / 
> javascript components that are pulled from your app and then vended from the 
> server.
&g

Re: WebObjects and Javascript Response Rewriter

2020-01-02 Thread Aaron Rosenzweig via Webobjects-dev
Sounds like you have your feet straddling two different worlds. 

You could consider building parts of your app in pure JS while other parts in 
WO. You could do persistence with REST for your pure JS apps that are served by 
WORest. You could use JSON web tokens to have authentication that is shared 
between the two worlds so that users don’t lose their authentication as they 
hop back and forth. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jan 2, 2020, at 1:47 PM, Jesse Tayler via Webobjects-dev 
>  wrote:
> 
> 
> I see.
> 
> Well, that’s a bit of a trick but of course, you can decide what you’d like 
> to do.
> 
> I once realized that my UI elements often needed settings, defaults and 
> configurations to exist in javascript — it seemed a waste and trouble to 
> create new components of course, in my case, I use a lot of D2W and did not 
> need programming outside the regular dev tools — but I did move the css and 
> javascript additions into D2W rules, which made the component reliable and 
> the programming of details often a matter of copying configurations you know 
> work and writing the rule to determine when that script should be placed into 
> the component.
> 
> In your case, it sounds like you might want a way they can write HTML / 
> javascript components that are pulled from your app and then vended from the 
> server.
> 
> Or better yet, a stub of your page with only the HTML required to jump off a 
> few queries to render the rest of the page using largely website type tools 
> with html segments deployed somewhere.
> 
> My sense is this would not be clean and likely won’t work out the way you’d 
> really like it to, but who knows! Your situation might lend itself to some 
> design choice like these and maybe that works for you.
> 
> 
> 
> 
> 
>> On Jan 2, 2020, at 1:40 PM, Jérémy DE ROYER > <mailto:jeremy.dero...@ingencys.net>> wrote:
>> 
>> Hi Jesse,
>> 
>> for the moment we are using jquery to modify the html code, but after 
>> rendering in the client browser and our front end designers don’t feel like 
>> « real » developpers.
>> 
>> I would like to give the possibility to our front-end (javascript) designers 
>> to add their custom js code without having to change the back end that is 
>> all written in java with webobjects
>> 
>> is this better explained ?
>> 
>> Jérémy
>> 
>>> Le 2 janv. 2020 à 19:33, Jesse Tayler >> <mailto:jtay...@oeinc.com>> a écrit :
>>> 
>>> I might be confused —
>>> 
>>> Don’t you already have control at both ends?
>>> 
>>> 
>>>> On Jan 2, 2020, at 1:31 PM, Jérémy DE ROYER via Webobjects-dev 
>>>> mailto:webobjects-dev@lists.apple.com>> 
>>>> wrote:
>>>> 
>>>> Hi all… and Happy New Year !
>>>> 
>>>> For this new year, I’de like to add a javascript postprocessor to the 
>>>> webobjects response.
>>>> 
>>>> I mean I would like to give our front-end developpers the possiblity to 
>>>> rewrite the reponse… before sending it to the customer.
>>>> 
>>>> Have any of you already done such a mechanism ?
>>>> 
>>>> Jérémy
>>>> ___
>>>> 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/jtayler%40oeinc.com 
>>>> <https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com>
>>>> 
>>>> This email sent to jtay...@oeinc.com <mailto:jtay...@oeinc.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/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: Binding to static vars?

2019-10-11 Thread Aaron Rosenzweig via Webobjects-dev
Touché herr Hugi,

Well done and well said. I didn’t know one could do that. 
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Oct 11, 2019, at 10:53 AM, Hugi Thordarson via Webobjects-dev 
>  wrote:
> 
> Well, it's *possible*…
> 
> 
> 
> https://wiki.wocommunity.org/display/documentation/WOOgnl+Framework
> 
> That being said, I've never actually used these more elaborate-y obscure-y 
> OGNL features. They just feel … wrong.
> 
> - hugi
> 
> 
> 
>> On 11 Oct 2019, at 14:26, Markus Ruggiero via Webobjects-dev 
>>  wrote:
>> 
>> Quick problem:
>> 
>> html/wod: Can I bind to a static variable (class property)? I think I 
>> remember having read once that this is possible but cannot remember where or 
>> how.
>> 
>> Thanks for any help
>> ---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/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/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: Binding to static vars?

2019-10-11 Thread Aaron Rosenzweig via Webobjects-dev
Hi Markus,

I don’t think it’s possible, but you can make a simple cover method in the 
WOComponent that simply returns the class property. 
AARON ROSENZWEIG / Chat 'n Bike 
<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.chatnbike.com_&d=DwIFaQ&c=Hw-EJUFt2_D9PK5csBJ29kRV40HqSDXWTLPyZ6W8u84&r=7HfFKYLGy6JUsVAPU3WxTfVie1cWFsdczD8_5y5GIaI&m=MBJCBn8K70VX8P6-NUEvhkjNNiBHy-SvIoYOIna4RXg&s=nu4FH_erncudxZdpPzDg_tse7n7guYpIw6dtfvapuC0&e=>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Oct 11, 2019, at 10:26 AM, Markus Ruggiero via Webobjects-dev 
>  wrote:
> 
> Quick problem:
> 
> html/wod: Can I bind to a static variable (class property)? I think I 
> remember having read once that this is possible but cannot remember where or 
> how.
> 
> Thanks for any help
> ---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: One to many not nullifying when reverse is not marked for in-class generation

2019-07-28 Thread Aaron Rosenzweig via Webobjects-dev
That’s a great point Samuel :-)
AARON ROSENZWEIG / Chat 'n Bike <http://www.chatnbike.com/>
e:  aa...@chatnbike.com <mailto:aa...@chatnbike.com>  t:  (301) 956-2319



> On Jul 28, 2019, at 8:08 PM, Samuel Pelletier  wrote:
> 
> Hi Aaron,
> 
> The nullify of the FK when a parent is deleted can be handled with Foreign 
> Key Constraint in the database if the relationship is not an attribute. 
> 
> This works if you use a "real" engine that support deferred constraint 
> checking like Oracle, Sql Server, FrontBase or PostgreSql at least. This is 
> not supported in MySQL.
> 
> ALTER TABLE "Employee" ADD CONSTRAINT 
> "FOREIGN_KEY_Employee_CompanyID_Company_id" FOREIGN KEY ("CompanyID") 
> REFERENCES "Company" ("ID") on delete set null DEFERRABLE INITIALLY DEFERRED;
> 
> You have basically the same option as in EOF, you can have the DB react to 
> delete of parent with these options:
>   - deny (default behaviour)
>   - set null (set the FK to null)
>   - cascade (cascade te delete to children)
> 
> The same options re allowed for update with the "on update xxx"
> 
> Regards,
> 
> Samuel
> 
>> Le 28 juill. 2019 à 18:08, Aaron Rosenzweig via Webobjects-dev 
>> mailto:webobjects-dev@lists.apple.com>> a 
>> écrit :
>> 
>> Hi Robert,
>> 
>> Alright it’s coming together but let’s make it concrete. Let’s make a 
>> complete story shall we?
>> 
>> “Employee” table has an FK to “Company”
>> 
>> “Company” has a conceptual “toMany” to “Employee.” You could model it, or 
>> not. If you model it, you could make it visible, or not (class property). 
>> This is the big part of the question, how to model this “convenience” 
>> relationship since it isn’t real, it raises questions. 
>> 
>> Given the above, we now delete a company object, what should happen? 
>> 
>> If you model the “Company.employees” to-many relationship and make it a 
>> class property you have a choice for the delete rule:
>> 
>> 1) Deny - if it finds at least one employee, it refuses the delete of the 
>> company
>> 
>> 2) Nullify - it goes out to find all the 5,000 employees and suddenly breaks 
>> their bond the company so that they are now without a job. 
>> 
>> 3) Cascade - it goes out and terminates, lethally, all 5,000 employees 
>> before destroying the company. 
>> 
>> I’m willing to bet, dollars to donuts, that 1/2/3 will be ignored if the 
>> “employees” to-many relationship is not a class property. It’s gotta be 
>> visible for it to do either of those things. That makes sense right? If the 
>> idea of making it invisible is to not take the hit for faulting in 5k 
>> employee objects, how could it possibly “nullify” (for example) without 
>> faulting them in? That’s why it would HAVE to be a class property if you 
>> want it to do that bookkeeping. 
>> 
>> Generally, you’d never delete a company unless you manually, through a 
>> clever UI, allowed the user to re-home all the employees. In this story 
>> line, I would not model the “Company.employees” to-many relationship at all. 
>> If I ever needed that info, I would fetch “Employee.fetch(ec, 
>> Employee.COMPANY.is 
>> <https://ving.apple.com/proxy?t2=dE3O0r2E9w&o=http%3A%2F%2FEmployee.COMPANY.is>(appleComputer).”
>>  That way I’m taking the hit only when it’s needed. I would also make a true 
>> FK constraint in the DB that would prevent Apple from being deleted so long 
>> as there was at least one employee. 
>> 
>> I realize your case is not Employee and Company… but any story that has so 
>> many objects that you feel bad about modeling the to-many I’d feel the same 
>> about. I wouldn’t want the deletion of the Company to automatically nullify 
>> the 5k places. That said, it appears you need this… and for that the best 
>> course of action would be either:
>> 
>> A) Manually fetch the Employee’s where their company relationship is equal 
>> to the one you are about to delete. Nullify all their relationships to 
>> company. Delete the company. Save changes. This will take a while if there 
>> is a plethora of employees. Might need a long running task so that the app 
>> doesn’t timeout or block other users. 
>> 
>> B) Let SQL nullify the FK and then delete the company. This would be fast 
>> and use little java memory. There are various helper methods to achieve this 
>> but here is one: ERXEOAccesUtilities.updateRowsDescribedByQualifier()
>> 
>> A and B could be encapsulated in

Re: One to many not nullifying when reverse is not marked for in-class generation

2019-07-28 Thread Aaron Rosenzweig via Webobjects-dev
Hi Robert,

Alright it’s coming together but let’s make it concrete. Let’s make a complete 
story shall we?

“Employee” table has an FK to “Company”

“Company” has a conceptual “toMany” to “Employee.” You could model it, or not. 
If you model it, you could make it visible, or not (class property). This is 
the big part of the question, how to model this “convenience” relationship 
since it isn’t real, it raises questions. 

Given the above, we now delete a company object, what should happen? 

If you model the “Company.employees” to-many relationship and make it a class 
property you have a choice for the delete rule:

1) Deny - if it finds at least one employee, it refuses the delete of the 
company

2) Nullify - it goes out to find all the 5,000 employees and suddenly breaks 
their bond the company so that they are now without a job. 

3) Cascade - it goes out and terminates, lethally, all 5,000 employees before 
destroying the company. 

I’m willing to bet, dollars to donuts, that 1/2/3 will be ignored if the 
“employees” to-many relationship is not a class property. It’s gotta be visible 
for it to do either of those things. That makes sense right? If the idea of 
making it invisible is to not take the hit for faulting in 5k employee objects, 
how could it possibly “nullify” (for example) without faulting them in? That’s 
why it would HAVE to be a class property if you want it to do that bookkeeping. 

Generally, you’d never delete a company unless you manually, through a clever 
UI, allowed the user to re-home all the employees. In this story line, I would 
not model the “Company.employees” to-many relationship at all. If I ever needed 
that info, I would fetch “Employee.fetch(ec, Employee.COMPANY.is 
<http://employee.company.is/>(appleComputer).” That way I’m taking the hit only 
when it’s needed. I would also make a true FK constraint in the DB that would 
prevent Apple from being deleted so long as there was at least one employee. 

I realize your case is not Employee and Company… but any story that has so many 
objects that you feel bad about modeling the to-many I’d feel the same about. I 
wouldn’t want the deletion of the Company to automatically nullify the 5k 
places. That said, it appears you need this… and for that the best course of 
action would be either:

A) Manually fetch the Employee’s where their company relationship is equal to 
the one you are about to delete. Nullify all their relationships to company. 
Delete the company. Save changes. This will take a while if there is a plethora 
of employees. Might need a long running task so that the app doesn’t timeout or 
block other users. 

B) Let SQL nullify the FK and then delete the company. This would be fast and 
use little java memory. There are various helper methods to achieve this but 
here is one: ERXEOAccesUtilities.updateRowsDescribedByQualifier()

A and B could be encapsulated in a method 
“Company.takeCareOfDependentsThenDelete()” that you create on Company. 


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



> On Jul 28, 2019, at 4:42 PM, Robert Hanviriyapunt  
> wrote:
> 
> Ok the root problem is that deleting records is leaving bad foreign keys.
> 
> The reason for the problem is that I made a decision long ago that in certain 
> circumstances I would model to-one relationships with a “hidden” to-many 
> reverse relationship, hopefully to help save memory or something.  The 
> “hiding” is done by turning off the “class property” on the reverse to-many 
> relationship but keep the nullify rule.  Now when I delete the to-one 
> relationship destination EO, it does not nullify, leaving bad foreign keys.

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