Re: Exception in saveChanges(): rowDiffsForAttributes - snapshot does not contain value

2007-02-24 Thread Wolfram Stebel
Am 24.02.2007 4:08 Uhr schrieb "Chuck Hill" unter
<[EMAIL PROTECTED]>:

> As it turns out, I am an idiot.
Well, I can't disprove this :-)


>I was running and rerunning a set of
> functional tests.  I was not stopping the app, but between each run I
> would run a script to reset the data.  Sigh.  And part of the script,
Don't you use WOUnitTest? It helps setting up and tearing down tests very
well, as far as i recall...

> which I have been watching scroll before my eyes and not reading, was
> reseting the primary key generators in the database.  Which led EOF
> to generate primary keys for new objects that matched those of
> objects already in the snapshots.  Chaos ensued.  Considering what I
> was doing, I am amazed at the very small bad effect that it had.
> 
> The offending bit of script moved, everything works as expected.
> 
> Now, without a doubt, it is time for beer.
Well, thats always a good idea :-)
Go and meet some WO-Specialists :-)
Sacha et al :-)

> 
> Chuck
Always enjoying your support

Wolfram 
> 
> On Feb 21, 2007, at 3:04 PM, Chuck Hill wrote:
> 
>> Hi,
>> 
>> Some of you will recognize this extremely fun exception:
>> 
>> java.lang.IllegalStateException: rowDiffsForAttributes: snapshot in
>> com.webobjects.eoaccess.EODatabaseOperation {
>> _dbSnapshot = {};
>> ...
>> this = "> [DownloadLog (java.lang.Long)0]>"; }";
>> _globalID = _EOIntegralKeyGlobalID[DownloadLog (java.lang.Long)0];
>> _databaseOperator = "EODatabaseUpdateOperator"; }
>> does not contain value for attribute named downloadDate with
>> snapshot key: downloadDate
>> 
>> The stack trace is:
>> at  
>> com.webobjects.eoaccess.EODatabaseOperation.rowDiffsForAttributes
>> (EODatabaseOperation.java:338)
>> at  
>> com.webobjects.eoaccess.EODatabaseContext.createAdaptorOperationsForDa
>> tabaseOperationAttributes(EODatabaseContext.java:5373)
>> at  
>> com.webobjects.eoaccess.EODatabaseContext.createAdaptorOperationsForDa
>> tabaseOperation(EODatabaseContext.java:5548)
>> at com.webobjects.eoaccess.EODatabaseContext.performChanges
>> (EODatabaseContext.java:6365)
>> at  
>> com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditing
>> Context(EOObjectStoreCoordinator.java:415)
>> at com.webobjects.eocontrol.EOEditingContext.saveChanges
>> (EOEditingContext.java:3226)
>> at net.global_village.eofextensions.ForgetfulEC.saveChanges
>> (ForgetfulEC.java:54)
>> at net.global_village.eofvalidation.EOEditingContext.saveChanges
>> (EOEditingContext.java:126)
>> at  
>> net.global_village.eofvalidation.NotifyingEditingContext.saveChanges
>> (NotifyingEditingContext.java:159)
>> 
>> 
>> The exception is correct, the snapshot _dbSnapshot = {}; does not
>> contain any values, let alone the one it is looking for.  I am not
>> completely sure of how this happens.  It is not consistent so I
>> believe it to be caused by concurrent threads sending EOF
>> notifications interacting with the locked / unlocked state of
>> editing contexts.
>> 
>> The situation that I have that causes this exception is this: I
>> have a page that starts an import process.  It spins off a thread
>> that handles the actual import. This  thread has its own EC.  The
>> first thing it does is to create a new DownloadLog to record the
>> start / status of the import process.  While it is processing, it
>> periodically unlocks and re-locks the EC and does a refreshing
>> fetch on the download log so that it can see changes made in other
>> editing contexts.
>> 
>> Once this thread is started, and concurrent with its processing,
>> the app goes to a page that monitors all the download logs.  This
>> was built using the AjaxGrid and refreshes every 30 seconds.  At
>> each refresh it does a refreshing fetch. Of course, its EC is
>> unlocked between requests.  It has a link to abort the import by
>> writing to the download log, though that is not being used when
>> this exception occurs.
>> 
>> Periodically the download processing thread will throw the above
>> exception while saving an update to the download log.  My guess is
>> that the refreshing fetch is invalidating the snapshot that the EC
>> was referring to and it gets a null / empty dictionary for it as it
>> is still locked.
>> 
>> I fixed this (or at least I can't reproduce it anymore) by doing
>> ec.unlock(); ec.lock(); immediately before ec.saveChanges();.  My
>> guess is that this allows the snapshot to get updated.  I suspect
>> there is still a r

Re: daylight saving time problem

2007-01-28 Thread Wolfram Stebel
Am 27.01.2007 2:47 Uhr schrieb "Pascal Robert" unter <[EMAIL PROTECTED]>:

> Well :
> 
> Code example and downloadable project corrected on > 2007/02/16
> <
> 
> It's not only WO who have a problem with time :-)

It starts in the morning and does not end in the evening...
It's simply not enough :-)


Wolfram


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

This email sent to archive@mail-archive.com


Re: ANN : WebObjects Dinner in Sydney

2007-01-25 Thread Wolfram Stebel
Am 25.01.2007 4:09 Uhr schrieb "Andrew Lindesay" unter <[EMAIL PROTECTED]>:

> Hello;
> 
> To coincide with Apple's "Leopard Tech Talk" in Sydney, Andrew
> Lindesay and Michelle Parker are organising a dinner for folk who are
> in Sydney at the time and are working with WebObjects application-
> server technology. This will be held at;
> 
> Redoak
> 21 Clarence Street
> Sydney, Australia
> http://www.redoak.com.au/
> 
> 22.Feb.2007 19:00
> 
> There will be dinner available and the cost is $23/pp with drinks
> being purchased separately. Please confirm (let me know of any
> allergies or dietary requirements) by 10.Feb to <[EMAIL PROTECTED]>.
I'll try to come if there is an empty seat on flight number 505.

:-))

Have a good time, I'd like to meet all of you...

Wolfram


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

This email sent to archive@mail-archive.com


WOLips and EOGenerator

2006-08-27 Thread Wolfram Stebel
Hi all,

I also try to make the great EOGenerator running with WOLips/Eclipse 3.2.
Are there any tips already posted or might somenone of you tell how to?
I know there is the button in the WOLips perspective and i can add my
EOModel, but where should the .eogen file be located, when is it
executed...?
Questions over questions :-)

Regards

Wolfram


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

This email sent to archive@mail-archive.com


Folder structure with Eclipse

2006-08-27 Thread Wolfram Stebel
Hi all,

My WO project has grown in the last years and it is not structured to well,
with packages etc.
I'm coming from a Xcode project with lots of nested folders for
WebComponents as well as for java files.

Now i want a clear folder structure in Eclipse too.

What is a clever "refactoring" for improving the project structure.
It is also not very clear, how to put EOGenerator files in their own folder
in the creation cycle (to keep the project folder content small).
I used to have a folders "EO's" and "Generated EO's" where i never needed to
look into the "Generated..." folder for obvious reasons :-)

Is there a how to on the web or will someone talk about his solution?

Thanks all

Wolfram 


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

This email sent to archive@mail-archive.com


Moved to WOLips, problem with CVS

2006-08-27 Thread Wolfram Stebel
Hi all,

i successfully moved to eclipse with wolips.
Thanks to mdimension for the tutorial how to do it!

Now i'm gona setup CVS.
I use it with CVL on localhost at the moment.

Now i tried the settings:
Eclipse preferences for CVS: Ext connection mode:CVS_RSH = ssh, CVS_SERVER
/usr/bin/cvs
CVS setting: 
Conection type: ext
User: {user}
pw: {pw}
Host: localhost
Repository path: /Users/CVS/Repositories/Project/
use default port.

The settings are accepted but i always get:

Aug 27 17:11:55 Erde sshd[3630]: error: PAM: Authentication failure for
Wolfram from localhost

or 
!ENTRY org.eclipse.team.cvs.ui 4 0 2006-08-27 17:36:39.076
!MESSAGE Unknown response received from cvs server:
!STACK 1
org.eclipse.team.internal.ccvs.core.CVSException: Unknown response received
from cvs server:  
at 
org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation.members
(CVSRepositoryLocation.java:664)
at 
org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager.getFoldersForTag(Re
positoryManager.java:199)
at 
org.eclipse.team.internal.ccvs.ui.model.VersionCategory.getProjectVersionChi
ldren(VersionCategory.java:85)
at 
org.eclipse.team.internal.ccvs.ui.model.VersionCategory.fetchChildren(Versio
nCategory.java:57)
at 
org.eclipse.team.internal.ccvs.ui.model.VersionCategory.fetchDeferredChildre
n(VersionCategory.java:140)
at 
org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContent
Manager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
!SUBENTRY 1 org.eclipse.team.cvs.core 4 -4 2006-08-27 17:36:39.079
!MESSAGE Unknown response received from cvs server:

I dont need user and password with CVL on my local machine.

Thanks for any idea how to get running.

Wolfram


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

This email sent to archive@mail-archive.com


Re: Thoughts on WOFoundation

2006-08-20 Thread Wolfram Stebel
Am 20.08.2006 9:18 Uhr schrieb "James M. Terry" unter <[EMAIL PROTECTED]>:

See also thread: Re: whywebobjects.org - WWDC followup [and URLs], Lets
Start doing it

Se also last mail from Don Guernsey <[EMAIL PROTECTED]> at "WebObjects
Foundation" thread.

James, would you tie all them together?

There seem to be a lot of avaliable resources :-)


Wolfram

> Hello Everyone!
> 
> I have been following the WOFoundation discussion on the list closely
> and find the enthusiasm refreshing.  I haven't been this excited
> about WO's future for years!  During WWDC & since, I have been
> talking with some of you about how we as a community can all start
> moving in a similar direction for a sustained period... the sustained
> part has historically been a problem.
> 
> The idea of forming a Foundation or some type of non-profit entity
> along the lines of what CalConnect (http://www.calconnect.org) is to
> iCalendar would be beneficial to the WO community.  WebObjects needs
> advocacy; as many of us have repeatedly pointed out over the years.
> A Foundation could provide that structure, and elements of CalConnect
> could be used as a model.
> 
> The Foundation could also serve as a focal point for the WO
> community, much like what Mac OS Forge (http://www.macosforge.org) is
> to Apple's open-source efforts, providing a common direction for all
> us renegades & loners.
> 
> My sense is that we need infrastructure to support & guide our efforts:
> 
> - content management on the front end (magnolia? http://
> www.magnolia.info)
> - source control, issue tracking, documentation & collaboration for
> each development project (trac? http://trac.edgewall.org)
> - a wiki for all other projects (eventually... http://www.apple.com/
> server/macosx/leopard/wikiserver.html ?)
> 
> We need a starting point...
> 
> I registered WOForge.com, .net, and .org, and would gladly donate the
> domains and hosting to such a Foundation.  We could use the domains
> now, while working towards formalizing the Foundation over the coming
> months.
> 
> Let me know what you think!
> 
> Thanks,
> Jim :)
> 
> James M. Terry
> raQ-it Hosting Services, Inc.
> 3551 South Monaco Parkway
> Suite 252
> Denver, CO  80237
> 
> 720-240-4685 Office
> 720-249-2480 Fax
> 
> http://www.raQ-it.net


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

This email sent to archive@mail-archive.com


Re: whywebobjects.org - WWDC followup [and URLs], Lets Start doing it

2006-08-19 Thread Wolfram Stebel
Hi list,

Sorry for ignoring the tons of mails that have been spend on this and
similar subjects since WWDC 2006 (i've read some of them, but the threads
got longer and longer..., and less interesting [sorry]).

I can see clearly that the community has to engage itself and i want to do
my part and offer the following:

1. I will support the website with my Xserve for free (10.4.7, mySQL
optional Frontbase, Mail..., still many gigs available)
2. I will give 2 or more dedicated admins of this project full admin access
to this server
3. If someone knows how to, set up a mailing list for our special interest
group (Off of apples lists) for internal communication
4. I will pay the transfer volume

Someone else should please get a domain (please stop discussing on this
minor problem, simply get all of the discussed domain names:-) ) and care
for routing to my server.

I expect that we are setting up a interest group that will structure the
content of the website, others defining the layout and corporate design
etc., a lot of them hacking
I expect that we will have a highend "web 2.0" webobjects website who's
sourcecode is free and downloadable from this site.
We should make it even more easy for WO interested developers to get
started.

Because i'm very busy in the moment, let me hear clearly if we will follow
this way, so i can arange to follow the regarding threads on this list and
do my part for it.

I have been developing for 1.5 years a realy nice web application
(www.webclubs.de) and i have been supported perfectly by this list.
I would be very glad to work together with you capacities :-)

Always enjoying your expertise...

Wolfram

P.S. We don't want the cake, we want the whole fucking bakery

> www.ReturnOfTheLivingWO.com/
> 
> On 18 Aug 2006, at 17:17, Sam Barnum wrote:
> 
>> I like it but it's a little long...
>> 
>> how about:
>> 
>> WayToWo (or Way2WO)
>> 
>> MoWo!  Forget about cowbell, what it really needs is some mo' wo
>> 
>> -Sam
>> 
>> On Aug 17, 2006, at 10:48 AM, lbland wrote:
>> 
>>> 
>>> On Aug 16, 2006, at 3:33 PM, Pascal Robert wrote:
>>> 
 That's a good name :-)  Or maybe "WebObjects' Not Rails" or
 "WND" ? :-P


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

This email sent to archive@mail-archive.com


Re: WWDC & XCode 3

2006-08-08 Thread Wolfram Stebel
Am 08.08.2006 0:57 Uhr schrieb "Randy Wigginton" unter
<[EMAIL PROTECTED]>:

> Not being at WWDC, I'm curious as to whether XCode 3 will support
> WebObjects?
> 
> Has anything at all been announced at WWDC, or are they maintaining
> the grand tradition of ignoring WO?  (Thinking of getting a WO AIMF
> shirt)

There is one more thing:
The new intel server on the website does not list webobjects as
preinstalled!

Wolfram


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

This email sent to archive@mail-archive.com


Re: WOFileUpload + WORepetition, how to?

2006-07-21 Thread Wolfram Stebel
Am 20.07.2006 18:43 Uhr schrieb "Miguel Arroz" unter <[EMAIL PROTECTED]>:

> Hi!
> 
>I have a WOrepetition on my page, that iterates and generates
> something like this:
> 
>--
> 
>Field 1:
>Field 2:
>File Upload:
> 
>--
> 
>Field 1:
>Field 2:
>File Upload:
> 
>-- (etc) -
> 
>I want to use the "streamFileToPath" binding. The problem is that
> it's not working, WO simply ignores the WOFileUpload when I submit,
> and no files appear on the /tmp directory, as I told it to! :) Also,
> i binded the filePath to a component variable, and I NSLogged the
> setFilePath method in my component, and nothing gets logged when I
> submit.
> 
>Can this be done? How? I find no example like this in FileUpload
> example app.
As far as i know (and was told by the list members) there are problems with
multiple wofileupload, so it would not work in a repetition.
I had problems with two fileuploads in one form long time ago...

Wolfram


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

This email sent to archive@mail-archive.com


Re: Stuck in chapter 3 of the Mendis book

2006-06-29 Thread Wolfram Stebel
Am 29.06.2006 8:57 Uhr schrieb "[EMAIL PROTECTED]" unter <[EMAIL PROTECTED]>:

Hi Janine,

(...removed some words about this book here...)

Drop this book. That helped me.
I used another beginners book instead, Visual Quickpro Guide WebObjects 5
(Josh Marker). It helped me a lot more.
After this try Practical WebObjects (Hill, Mallais), that's in depth...

Regards

Wolfram
> I'm not sure if the author is being unclear or if I'm being dense,
> but I'm stuck and hoping someone can help me out here:
> 
> First problem:
> 
> We created a new project, which is supposed to become the splash page
> for the Dynamic Movies app.  It has an image, and an image map hand-
> typed in to Main.html which looks like this:
> 
> 
> http://www.dell.com";>
> http://www.apple.com";>
> http://www.ibm.com";>
> http://www.sun.com";>
> 
> 
> Then we created a component called WOArea.
> 
> He lost me completely at the top of page 44:
> 
> "Now in the Main component, replace each of the image map area
> elements with WOArea dynamic elements."
> 
> I have no idea how to do that.  I can add four WOAreas to the page,
> of course, but how to make them replace the image map?  Not a clue.
> I tried looking at his source code but as usual all traces of this
> intermediate step are gone, so it didn't help.
> 
> Second problem:
> 
> I tried to keep going but got stuck again right away at the top of p.
> 45:
> 
> "So create a new component called WOMappedRollover.  Cut and paste
> the elements for the image map (that is the script, the image map
> itself, and the image) into the WOMappedRollover component."
> 
> Script?  Eh what?  I have no idea what he's talking about, and once
> again the sample code fails me because there doesn't seem to be any
> trace of this step left in it.  Or I'm just not seeing it because I
> don't know what he's referring to.
> 
> Has anyone before me figured these out? Or am I just showing my
> ignorance?
> 
> Thanks,
> 
> janine


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

This email sent to archive@mail-archive.com


Re: Relation oddity

2006-06-25 Thread Wolfram Stebel
Am 24.06.2006 19:41 Uhr schrieb "Ken Anderson" unter <[EMAIL PROTECTED]>:

Hi Ken,
thanks for this valuable tip.
> Wolfram,
> 
> Do you have an inverse relationship from division to event?  My guess
> is, the other side of the relationship is trumping the relationship
> from event to division.
Yes, I had a big problem a while ago NOT having some reverse relations, so i
always have reverse relations. It is absolutely unclear in which case they
are necessary... (or optional, or recommended, or superfluous...)

> 
> What Chuck recommends is absolutely right (IMHO).  The one issue of
> using the list box is, it only does a set to the object, not an
> 'addObjectToBothSidesOfRelationshipWithKey'.  So, when you were
> originally using the set both times (in the factory and with the list
> box), it never set the inverse relationship, so it always worked.
Yes

> 
> When I have situations like this, I usually implement a method on the
> component to do addObject...  So in the component, I would have:
> 
> public Division division() {
> return theEvent.division();
> }
> 
> public void setDivision() {
> theEvent.addObjectToBothSidesOfRelationshipWithKey
> (selectedDivisionFromListbox, "division");
> }
>
> Then, instead of the selection attribute being "theEvent.division",
> it would just be "division".
This seems to be a reasonable reason. I should have found this myself by
creating setters and overrides for addObject...
But i think it is both error prone, either forgetting to write the component
method, or using the set-Method instead of addObj... in the factory method.
One thing helps: always be aware of this pitfall.

> Of course, this code is all written by hand and not tested - but sans
> syntax errors, it should work OK.
> 
> I often consider writing a WOPopUpButton that does this (like with an
> extra attribute to say how to set the value), but I've never gotten
> to it.  This is also extremely useful when a related object iterates
> its relationships during a validation step - since you can be sure
> all the relationships are right...
> 
> Ken
Appreciate your help

Wolfram
> 
> 
> On Jun 24, 2006, at 6:19 AM, Wolfram Stebel wrote:
> 
>> Hi list,
>> 
>> i have a huge data modell and allways use factory methods to create
>> and init
>> EO's. I'm using the defaultEditingContext.
>> 
>> In some of the factory methods i assign a Division "d" to a (n:1)
>> relation
>> by the setter (Division is a derived class in a vertical
>> inheritance). "d"
>> is taken from person.defaultDivision, a parameter to the factory
>> method.
>> 
>> theEvent.setDivision ( d );
>> 
>> When i edit theEvent in a page, I'm able to set theEvent to another
>> divisione from a popup listbox. The Listbox is bound to a list from a
>> session EO, i.e. client.divisions. The data is saved correctly to the
>> database.
>> 
>> When i change the factory method to use
>> 
>> theEvent.addObjectToBothSidesOfRelationshipWithKey ( d,
>> "division" );
>> 
>> and continue doing the same (change the division via popup
>> listbox), on the
>> first save the wrong division is saved. I can see that the wrong fk is
>> written.
>> Tracing the values of the division in the save cycle shows the
>> correct value
>> before **and** after the saveChanges.
>> When i open theEvent again and change the list value and save
>> again, the fk
>> is saved to the correct value.
>> 
>> 
>> Anybody seen this?
>> I was told to use addObjectToBothSidesOfRelationshipWithKey
>> liberally (Hi
>> Chuck :-), Page 38 ).


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

This email sent to archive@mail-archive.com


Relation oddity

2006-06-24 Thread Wolfram Stebel
Hi list,

i have a huge data modell and allways use factory methods to create and init
EO's. I'm using the defaultEditingContext.

In some of the factory methods i assign a Division "d" to a (n:1) relation
by the setter (Division is a derived class in a vertical inheritance). "d"
is taken from person.defaultDivision, a parameter to the factory method.

theEvent.setDivision ( d );

When i edit theEvent in a page, I'm able to set theEvent to another
divisione from a popup listbox. The Listbox is bound to a list from a
session EO, i.e. client.divisions. The data is saved correctly to the
database.

When i change the factory method to use

theEvent.addObjectToBothSidesOfRelationshipWithKey ( d, "division" );

and continue doing the same (change the division via popup listbox), on the
first save the wrong division is saved. I can see that the wrong fk is
written.
Tracing the values of the division in the save cycle shows the correct value
before **and** after the saveChanges.
When i open theEvent again and change the list value and save again, the fk
is saved to the correct value.


Anybody seen this?
I was told to use addObjectToBothSidesOfRelationshipWithKey liberally (Hi
Chuck :-), Page 38 ).


Wolfram


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

This email sent to archive@mail-archive.com


Re: Problems with WOAction in WO 5.3.1

2006-05-26 Thread Wolfram Stebel
Am 25.05.2006 23:48 Uhr schrieb "David Haggerty" unter <[EMAIL PROTECTED]>:

> We recently upgraded to 5.3.1 from 5.2.4 and are having problems with
> WOActionURL.  We use WOActionURL for Ajax and the & is adding the HTML
> escape in 5.3.1 but never did this in 5.2.4.  This is causing it to not
> find the session and the URL is then invalid.
> 
> Any ideas?  Is this a bug in 5.3.1?
IIRC this was a bugfix in this version.
Did you program around it?

Wolfram
> 
> Thanks in advance,
> David
> 
> 5.3.1:
> .../wa/org.yfu.ui.announcement.ReminderDA/refreshReminder?id=46002395450
> 30766980&wosid=B6fPodDWHmwlDcUs54Uaj0
> 5.2.4:
> .../wa/org.yfu.ui.announcement.ReminderDA/refreshReminder?id=46002395450
> 30766980&wosid=B6fPodDWHmwlDcUs54Uaj0
> 
> 
> ActionURL1: WOActionURL {
> actionClass = "org.yfu.ui.announcement.ReminderDA";
> directActionName = "refreshReminder";
> queryDictionary = refreshQueryDictionary;
> }
> 
> public NSDictionary getRefreshQueryDictionary(){
> return new NSDictionary(getReminderIterator().getId(), "id");
> }
>  ___


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

This email sent to archive@mail-archive.com


Re: Need help building an EOQualifier with session values

2006-05-22 Thread Wolfram Stebel
Am 22.05.2006 21:51 Uhr schrieb "Mike Schrag" unter
<[EMAIL PROTECTED]>:

Hello Mike,

i dont think that that your arguments for "use always key path" are valid.
I think there is a difference in calling "length" as a method on String
instead of following a relation, a more important reason that
"valueForKeyPath" exists. I think, there will be a time difference too, when
you access an EO-member function instead of "length".
Though I never tested

Am I right?

Wolfram

> Technically speaking, you can ALWAYS use valueForKeyPath and it will
> work.  Obviously valueForKey does not have that attribute.
> 
> So the question is performance ... I've kind of wondered this before
> also.  So in the spirit of knowing-is-half-the-battle:
> 
> I have an object with one method "public String getName()" and ran
> one million iterations of the following:
> 
> NSKeyValueCoding.Utility.valueForKey "name": 935ms
> NSKeyValueCodingAdditions.Utility.valueForKeyPath "name": 992ms
> NSKeyValueCodingAdditions.Utility.valueForKeyPath "name.length": 2713ms
> 
> That's total time for all 1 million.  So basically no diff using
> keypath vs key -- i would say always use it.  I included the next one
> just because it was kind of interesting.  Obviously there aren't
> enough examples to know if that's a function of the performance
> of .length() on String or whether traversing multiple keypaths is nasty.


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

This email sent to archive@mail-archive.com


Re: method failed to update row

2006-05-20 Thread Wolfram Stebel
Am 19.05.2006 22:30 Uhr schrieb "Robert Walker" unter
<[EMAIL PROTECTED]>:

Thanks Robert,

i took a second look at the docs and found that TolerantSaver should do it.
So to answer my question: TolerantSaver is the correct Solution.
I made the following changes to the save method of TolerantSaver :

// improved exception handling for validation
// changed NSException to EOGeneralAdaptorException
// added catch of remaining Exception for debugging purpose
public static String save(EOEditingContext ec, boolean writeAnyWay, boolean
merge) {
System.out.println("TolerantSaver: save...");
try{
//System.out.println("about to save changes...");
ec.saveChanges();
}catch ( NSValidation.ValidationException ve ){
System.out.println("TolerantSaver: EO ValidationException");
throw ve;
}catch ( EOGeneralAdaptorException e ){

//}catch(NSException e){ // not thrown, EOGeneralAdaptorException
instead!
EOEnterpriseObject failedEO;
NSDictionary userInfo = (NSDictionary)e.userInfo();
// NSValidation.ValidationException catched above
//String eName = (String)e.name();
////System.out.println("TolerantSaver: Exception occurred name:
"+ eName);
////System.out.println("Exception occurred e:
-");
////System.out.println("Exception occurred e: "+e);
////System.out.println("Exception occurred userInfo: "+
userInfo);
////System.out.println("Exception occurred e:
^");
//if(eName.equals("EOValidationException")){
//System.out.println("TolerantSaver: This is
EOValidationException");
////throw e;
//}
...


Now it works like a charme.
Thanks dneumann!

Wolfram


> Take a look at "Update Strategies > Recovery" in the following document:
> 
> http://developer.apple.com/documentation/WebObjects/
> Enterprise_Objects/index.html
> 
> This gives a couple of solutions to these "Optimistic Locking"
> exceptions, including some sample code (note that there may be some
> errors in the sample code, but I think they are pretty easy to find
> and fix).
> 
> On May 19, 2006, at 4:02 PM, Wolfram Stebel wrote:
> 
>> Hi List,
>> 
>> another problem i encounter today:
>> 
>> i have two WO applications running, one uses objects from a
>> sharedEditingContext for display only.
>> In one method of this appication i added the following:
>> 
>> ...
>> EOEditingContext localEC = new EOEditingContext ();
>> localEC.setSharedEditingContext ( null );
>> // wcSponsor comes in a shared EC so get a modifyable copy in local EC
>> WCSponsor copiedSponsor = ( WCSponsor ) localEC.faultForGlobalID (
>> wcSponsor.editingContext ().globalIDForObject ( wcSponsor ),
>> localEC );
>> 
>> Integer hc = ( Integer ) copiedSponsor.hit_count();
>> copiedSponsor.setHit_count ( new Integer ( hc != null ? hc.intValue
>> () + 1 :
>> 1 ) );
>> localEC.saveChanges ();
>> ...
>> 
>> 
>> I get the following exception, when i try to save the same object
>> from the
>> second application after the above code updated the database:
>> 
>> com.webobjects.eoaccess.EOGeneralAdaptorException:
>> updateValuesInRowDescribedByQualifier --
>> com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in
>> database
>> 
>> As far as i can see, this is a standard concurrency problem.
>> Now i tried TolerantSaver from dneumann to get the data merged and
>> saved.
>> But now i wonder, that this exception is not catched in there.
>> 
>> Is TolerantSaver the wrong solution?
>> 
>> What could i do instead?


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

This email sent to archive@mail-archive.com


method failed to update row

2006-05-19 Thread Wolfram Stebel
Hi List,

another problem i encounter today:

i have two WO applications running, one uses objects from a
sharedEditingContext for display only.
In one method of this appication i added the following:

...
EOEditingContext localEC = new EOEditingContext ();
localEC.setSharedEditingContext ( null );
// wcSponsor comes in a shared EC so get a modifyable copy in local EC
WCSponsor copiedSponsor = ( WCSponsor ) localEC.faultForGlobalID (
wcSponsor.editingContext ().globalIDForObject ( wcSponsor ), localEC );

Integer hc = ( Integer ) copiedSponsor.hit_count();
copiedSponsor.setHit_count ( new Integer ( hc != null ? hc.intValue () + 1 :
1 ) );
localEC.saveChanges ();
...


I get the following exception, when i try to save the same object from the
second application after the above code updated the database:

com.webobjects.eoaccess.EOGeneralAdaptorException:
updateValuesInRowDescribedByQualifier --
com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in
database

As far as i can see, this is a standard concurrency problem.
Now i tried TolerantSaver from dneumann to get the data merged and saved.
But now i wonder, that this exception is not catched in there.

Is TolerantSaver the wrong solution?

What could i do instead?

Wolfram


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

This email sent to archive@mail-archive.com


Re: cant analyse illegalstateexception SOLVED

2006-05-19 Thread Wolfram Stebel
Am 17.05.2006 13:16 Uhr schrieb "David Avendasora" unter
<[EMAIL PROTECTED]>:

Thanks David!

I removed one flattened relationship that was a relict of a join in many to
many, which i afterwards changed to a real entity where i allocate rows
programmatically.
Solved!

Wolfram

> I have been getting this using flattened many-to-many relationships
> where my join-table has its own primary key (not compound of the two
> foreign keys). As soon as I quit using a flattened relationship, I
> quit getting the error.
> 
> I don't know if the independent primary key was actually causing the
> problem or not.
> 
> Dave
> 
> 
> On May 17, 2006, at 12:09 PM, Wolfram Stebel wrote:
> 
>> Hi List,
>> 
>> i have a problem to analyse the following error:
>> 
>> java.lang.IllegalStateException: A valid global ID could not be
>> obtained for
>> entity named Class_Hour, relationship named location_Rooms, primary
>> key
>> dictionary {fk_location_room = 5; fk_class = 26; }
>> 
>> Stack:
>> 
>> EODatabaseContext.java5062
>> databaseOperationForIntermediateRowFromSourceObject
>> com.webobjects.eoaccess
>> EODatabaseContext.java5086
>> recordDeleteForIntermediateRowFromSourceObjectRelationshipDestinationO
>> bject
>> com.webobjects.eoaccess
>> EODatabaseContext.java5139
>> nullifyAttributesInRelationshipSourceObjectDestinationObject
>> com.webobjects.eoaccess
>> EODatabaseContext.java5166
>> nullifyAttributesInRelationshipSourceObjectDestinationObjects
>> com.webobjects.eoaccess
>> EODatabaseContext.java6056recordChangesInEditingContext
>> com.webobjects.eoaccess
>> EOObjectStoreCoordinator.java412saveChangesInEditingContext
>> com.webobjects.eocontrol
>> EOEditingContext.java3187saveChanges
>> com.webobjects.eocontrol
>> OneClassPage.java166deleteClass
>> 
>> 
>> 
>> Code in deleteClass:
>> 
>> theClass.validateForDelete ();  // does not raise!
>> ec.deleteObject ( theClass );
>> ec.saveChanges ();
>> 
>> 
>> The entities are:
>> 
>> Relations:Class<-->>ClassHour<<-->location_Room<<-->Location
>>  <<>
>> 
>> Optional:   optopt  opt
>> opt
>> 
>> Delete Rule:   casc->  null   <-casc
>> null
>> 
>> "fk_location_room" and "fk_class" from the error primary key
>> dictionary are
>> both in "ClassHour".
>> The relation "location_Rooms" from the error message is from
>> "Class" to
>> "Class_Hours.location_Room", "Class_Hours" is from "Class" to
>> "ClassHours"
>> 
>> When i delete a "Class" with a "ClassHour" assigned, that points to a
>> "Location" and a "location_Room" i get the above mentioned error. (A
>> "location_Room" can only be assigned when a "Location" is assigned
>> before.)
>> 
>> Any ideas for a solution?
>> 
>> Wolfram


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

This email sent to archive@mail-archive.com


Re: Setting a Default toOne Relationship

2006-05-18 Thread Wolfram Stebel
Am 18.05.2006 23:06 Uhr schrieb "David Avendasora" unter
<[EMAIL PROTECTED]>:

> You see, I knew I was missing something obvious. And here I was
> trying to override the setter for the relationship. Nothing like
> trying to do it the hard way.
And after all this good tips, you might think about factory methods for each
class like this:

public static MyClass newMyClassForYourRelatedEOs ( EOEditingContext ec,
MultipleParameter myRelatedEOs )
{
MyClass newObject = new MyClass ( ec );
// set your initial relationships
newObject.addObjectToBothSidesOfRelationshipWithKey ( myRelatedEO1,
"myRelation1" );
newObject.addObjectToBothSidesOfRelationshipWithKey ( myRelatedEO2,
"myRelation2" );
//
return newObject;
}


The final setup can follow  here:

public void awakeFromInsertion ( EOEditingContext ec )
{
super.awakeFromInsertion ( ec );
// set your initial values
}


Validating might be a nice idea too:

public void validateForSave () throws NSValidation.ValidationException
{
// do your validation first (i prefer this, because super.validateForSave
returns always english error messages, so i try to validate before super and
display my own colloquial)
super.validateForSave ();
// or do your validation last for all remaining errors
}

HTH

Wolfram


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

This email sent to archive@mail-archive.com


Re: AJAX WebObjects Integration

2006-05-18 Thread Wolfram Stebel
Am 18.05.2006 14:23 Uhr schrieb "Tokalak, Ahmet. D-IT2" unter
<[EMAIL PROTECTED]>:

> Hi,
> 
> I want integrate AJAX in my WO apps, but i'm facing big problems. The
> biggest problems i see is the stucture of a WO application.
> 
> Has anybody gained experience of WO-AJAX integration  ?  (I wanna work with
> the DOJO Toolkit, but the tookit is not important)
Hi

there is a framework with samples from

Jean-François Veillette <[EMAIL PROTECTED]>

He mailed it to some people a while ago. Ask for a copy :-)

It simply works, but i didn't try to set up an own project with it.
This might be a small hurdle at all.

Wolfram


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

This email sent to archive@mail-archive.com


Re: SQL error on saving changes

2006-05-17 Thread Wolfram Stebel
Am 17.05.2006 16:15 Uhr schrieb "Anjo Krank" unter <[EMAIL PROTECTED]>:

>> INSERT INTO PHOTO(CREATION_DATE, USER_ID, UNIQUE_NUMBER, THUMBNAIL,
>> PHOTO_ID, IS_DELETED) VALUES (1.283486E+8, 2, 8, 'qraaa000', 16423, 0)
> 
> Your creationDate seems to be a BigDecimal? How about printing it out?
> 
> Cheers, Anjo
Yupp, looks like missing formatter/column specification for number or so.
IIRC there was a change in this behavior with java 5!?!?!

Wolfram


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

This email sent to archive@mail-archive.com


cant analyse illegalstateexception

2006-05-17 Thread Wolfram Stebel
Hi List,

i have a problem to analyse the following error:

java.lang.IllegalStateException: A valid global ID could not be obtained for
entity named Class_Hour, relationship named location_Rooms, primary key
dictionary {fk_location_room = 5; fk_class = 26; }

Stack:

EODatabaseContext.java5062
databaseOperationForIntermediateRowFromSourceObject
com.webobjects.eoaccess
EODatabaseContext.java5086
recordDeleteForIntermediateRowFromSourceObjectRelationshipDestinationObject
com.webobjects.eoaccess
EODatabaseContext.java5139
nullifyAttributesInRelationshipSourceObjectDestinationObject
com.webobjects.eoaccess
EODatabaseContext.java5166
nullifyAttributesInRelationshipSourceObjectDestinationObjects
com.webobjects.eoaccess
EODatabaseContext.java6056recordChangesInEditingContext
com.webobjects.eoaccess
EOObjectStoreCoordinator.java412saveChangesInEditingContext
com.webobjects.eocontrol
EOEditingContext.java3187saveChangescom.webobjects.eocontrol
OneClassPage.java166deleteClass



Code in deleteClass:

theClass.validateForDelete ();  // does not raise!
ec.deleteObject ( theClass );
ec.saveChanges ();


The entities are:

Relations:Class<-->>ClassHour<<-->location_Room<<-->Location
 <<>

Optional:   optopt  opt
opt

Delete Rule:   casc->  null   <-casc
null

"fk_location_room" and "fk_class" from the error primary key dictionary are
both in "ClassHour".
The relation "location_Rooms" from the error message is from "Class" to
"Class_Hours.location_Room", "Class_Hours" is from "Class" to "ClassHours"

When i delete a "Class" with a "ClassHour" assigned, that points to a
"Location" and a "location_Room" i get the above mentioned error. (A
"location_Room" can only be assigned when a "Location" is assigned before.)

Any ideas for a solution?

Wolfram


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

This email sent to archive@mail-archive.com


Re: NSTimestampFormatter DECREMENTING 'day' on each pass

2006-05-16 Thread Wolfram Stebel
Am 16.05.2006 0:37 Uhr schrieb "WebObjects" unter <[EMAIL PROTECTED]>:

> I did scour the archives before asking - all roads lead to the same
> unanswered question... How is an EOF attribute like " serverTimeZone = GMT;"
> set?
Doc of EOAttribute:

"
The handling of dates assumes by default that both the database server and
the client application are running in the local time zone. You can alter the
time zone that is assumed for the database server with the setServerTimeZone
method. If you alter the server time zone, the adaptor automatically
converts dates as they pass into and out of the server
"

This method seems to be a little expensive to use... i wonder it is not a
static method...


Wolfram


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

This email sent to archive@mail-archive.com


Re: WOUnitTest pattern?

2006-05-13 Thread Wolfram Stebel
Am 13.05.2006 16:54 Uhr schrieb "Anjo Krank" unter <[EMAIL PROTECTED]>:

> OTTOMH, either move the actual methods to test elsewhere ie, don't do
> nextPage.setValue(context().stringFormValueForKey("foo")) but instead
> create a method that takes all needed info as parameters and test
> this, or (preferably) create a request with the URL parameters you
> want and create the DA manually, then call the methods you want to test.
I intended to create requests and execute them.
But i dont know how...
pseudo code:

r = new WORequest
r.setDAParam (a)
r. perform

or the like...

Any snippet available?

> 
> It would greatly depend on your DAs (eg if they need a session etc)
> if you can really test them in a meaningful way, though... just out
> of curiosity, what *would* you want to test? I can hardly imagine
> what I had in a DA, short of if the parameter names were spelled
> correctly that would make a meaningful test.
- Most important to test that programm changes simply have the same result
afterwards
- Second to test variants of calls
- Third to test correct parameter supply
- Fourth to simplify testing of a set of DirectActions
- Fifth to test the robustnes of DA's to wrong input (When someone creates
it's DA-calls manually)

Am i wrong?

Regards
Wolfram
> 
> Cheers, Anjo
> 
> Am 13.05.2006 um 16:23 schrieb Wolfram Stebel:
> 
>> Hi all,
>> 
>> is there some nice pattern how to test DirectActions with unit
>> testing?
>> The "problem" starts with how to call the direct actions with
>> parameters
>> from unit test.
>> Any help is appreciated!
>> 
>> regards
>> 
>> Wolfram


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

This email sent to archive@mail-archive.com


WOUnitTest for relations

2006-05-13 Thread Wolfram Stebel
Hi again,

i try to create an object hierarchy in the test editing context.
the factory methods below set up the relations as required.
then i delete the root object from the ec. I want to see, that the delete
rule "cascade" realy does a cascaded delete!

i thought, i could test the remaining content like shown below in method
assertEditingContextRemovedInserted.

After creation there are 3 objects in ec.insertedObjects.
After deletion of "aPerson" there are 2 still objects in ec.insertedObjects.

This means, cascaded deletes are applied not earlier than on saveChanges?

How could i test the cascaded delete correct?

TIA

Wolfram

--


Code sample that creates the hierarchy:


...

EOEditingContext ec = this.editingContext ();   // from WOUTTestCase

CMandant m = CMandant.getMandantForAlias ( this.editingContext (),
NSProperties.getProperty ( "DefaultMandant", "pappnase" ) );

CPerson c = ( CPerson ) m.creator();

CPerson aPerson = CPerson.newPersonForMandantAndPerson ( ec, m, c );

CAddress theAddress =
CAddress.newAddressForMandantAndBusinesPartnerAndPerson ( ec, m, aPerson, c
);

CTelecom theTelecom =
CTelecom.newTelecomForMandantAndBusinesPartnerAndPerson ( ec, m, aPerson, c
);

// ec.saveChanges ();
ec.deleteObject ( aPerson );
// ec.saveChanges ();
// all objects should be deleted via delete rule
this.assertEditingContextRemovedInserted ();

...



public void assertEditingContextRemovedInserted ()
{
// test if content is unchanged, i.e. added eos and removed eos
->unchanged
NSSet inserted = new NSSet ( editingContext().insertedObjects () );
NSSet deleted = new NSSet ( editingContext().deletedObjects () );
NSSet remaining = inserted.setBySubtractingSet ( deleted );
try
{
assertTrue ( remaining.count () == 0 );
}
catch ( Exception exception )
{
fail ( "not all inserted objects are removed : " +
exception.getMessage() );
}
}


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

This email sent to archive@mail-archive.com


WOUnitTest pattern?

2006-05-13 Thread Wolfram Stebel
Hi all,

is there some nice pattern how to test DirectActions with unit testing?
The "problem" starts with how to call the direct actions with parameters
from unit test.
Any help is appreciated!

regards

Wolfram


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

This email sent to archive@mail-archive.com


Re: Help on big relationship

2006-05-12 Thread Wolfram Stebel
Am 12.05.2006 22:11 Uhr schrieb "Kieran Kelleher" unter
<[EMAIL PROTECTED]>:

> OK, I've seen how to deal with this in the past somewhere on a WWDC
> video or something, but for the life of me I cannot find the approach
> right now and I am under the crunch to get this done.
> 
> I have DataList objects with up to a million related DataRecord
> objects. DataList and DataRecord are related in a many-to-many join.
> Usually a DataRecord belongs to no more than 50 DataLists.
> 
> So regular dataList.dataRecords() obviously crashes my app when huge
> amount of data records in the relationship.
> 
> Am I understanding correctly in saying that fetching my one DataList
> with a million related DataRecords will create a million "faults"?
> 
> What is the strategy here?
> 
> Is it:
> - turn off the dataRecords class property visibility (diamond icon)?
> - kill the relationship to dataRecords in the DataList entity and
> work with qualifiers, fetchspecs and raw rows to grab dataRecords as
> needed? How does this affect creating relationships  just always
> add the DataList to the DataRecord's dataLists relationship?
> 
> Any best practice tips, pointers or links to same would be appreciated.
> 
Hi Kieran

you already received valuable input to this problem.
But let me try to explain a little different.
Always when you are aware of masses of data, you should never expect
automatisms to be the perfect solution.
This sounds a little of wrong planning. If you know you have masses of data,
there should be some very extraordinary reason to fetch them all at once,
automatically or not. I can't find a reason, while writing this :-) you
wouldn't create a report via EO this way, would you?

Based on your knowledge of quantities start planning another way.

Try to segment your data on secondary attributes so that you never have tons
of data.
I would recommend to use custom fetch specifications for this always, based
on primary criteria and restrictions from user input.
The user should be the limiting "entity" here. The user is never able to
review millions of datasets, nor to read a report of this size...

As you can see, i have no fast solution for you...

But THINK!

Kind regards


Wolfram


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

This email sent to archive@mail-archive.com


Re: Https post but a http response?

2006-05-05 Thread Wolfram Stebel
Am 05.05.2006 16:45 Uhr schrieb "James Cicenia" unter <[EMAIL PROTECTED]>:

> YES! That caused me a bit of embarrassment and a few hours of
> debugging... though I did learn a lot about Display Groups.
Sometimes the worst things are usefull...

> 
> Always last!!
That depends on the method you override :-)
Call super first in takeValuesFromRequest...

Wolfram


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

This email sent to archive@mail-archive.com


Re: Https post but a http response?

2006-05-05 Thread Wolfram Stebel
Am 05.05.2006 7:35 Uhr schrieb "Dave Elsner" unter <[EMAIL PROTECTED]>:

> Hi,
> 
> I'm trying to make a login form using HTTPS (from Chucks book page
> 102) So that the username and password are sent encrypted.
> I need the response page to be a normal HTTP page is this possible? how?
> 
> I've tried doing the code below but it still returns a HTTPS page.
> 
> public void appendToResponse(WOResponse aResponse, WOContext aContext)
> {
> super.appendToResponse(aResponse,aContext);
Always call super.appendToResponse last!


Wolfram


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

This email sent to archive@mail-archive.com


Re: EOModeler SQL generation

2006-05-04 Thread Wolfram Stebel
Am 04.05.2006 9:06 Uhr schrieb "Dave Elsner" unter <[EMAIL PROTECTED]>:

> Thanks Sacha and Art.
> 
> This is what I expected  (i.e copy EOModelers SQL, paste it into a
> text editor). I was just hoping there would be a nicer way incase I
> need to do it multiple times.
Use WODBUpdate, so you always have automatic update of of production
instance etc., and if your DBA ***realy*** needs "silly" things, order the
columns in the executeSQL...
WODBUpdate is a look worth anyway.

> The purpose of this "seriously silly requirement" is so that when the
> DBAs use their GUIs or SQL*Plus etc, they don't have to scroll


Wolfram


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

This email sent to archive@mail-archive.com


Re: What is the best way and where to create my array...

2006-05-03 Thread Wolfram Stebel
Am 03.05.2006 15:45 Uhr schrieb "James Cicenia" unter <[EMAIL PROTECTED]>:

Hi James,

> Hello -
> 
> Here is my issue with a new site I am developing.
> 
> I have multiple lists on a page. However, in the wrapper there is a pull
> down that can will act as a filter.
The pull down should be in a form.
Then your pull down should call onchange "javascript:form.submit()"

> 
> I had originally put my array creation in the constructor. However,
> when I
> click on my wrapper pull down, the page refreshes, but the
> constructor of the
> components is not called.
You should refresh your displayed lists in appendToResponse, filtering with
the selected entry from the pull down (the value is transfered with the
submit), either refetching or in memory filtering the corresponding
NSArrays.

> So, how do you guys solve this? Do I need to create a notification
> system or such?
Just try it this way. Be aware of the roundtripp and the computing power if
your lists are long.
This might be a nice application für ajax :-) but there is no ***short***
receipe for this...

> - James Cicenia
Wolfram


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

This email sent to archive@mail-archive.com


Re: Scheduled WOApps not scheduled, Barbarian Solution

2006-04-28 Thread Wolfram Stebel
Am 27.04.2006 19:05 Uhr schrieb "Chuck Hill" unter
<[EMAIL PROTECTED]>:

> 
> On Apr 27, 2006, at 12:37 AM, Wolfram Stebel wrote:
> 
>> Hi List,
>> 
>> i have a WOApp running in 7 instances. Each night i scheduled one
>> of them to
>> restart at 3AM.
>> When i come to the server in the morning, one instance (the
>> scheduled one)
>> shows "refuse new session=ON" but there is no new log for the instance
>> showing up after restart.
>> So i suspect that the restart failes, only the refuse is set and
>> nothing
>> more.
>> 
> I think you are probably mis-interpreting what is happening.  The
> application will not restart until all of the sessions have
> terminated (unless you have configured it to restart when there are
> some number of remaining sessions).  What are you describing is what
> happens when sessions get hung / deadlocked.  Sessions in this state
> are never checked back in and so never terminate.  As the sessions
> don't terminate,  neither does the app.  It just sits there in
> shutdown mode waiting for the sessions to terminate and they never
> will.  So the problem is not that your app is not restarting, but
> that it is not actually stopping!
> 
>   I would suggest getting a thread dump from the application when it
> is in this state, that should diagnose the problem.  In your code,
> the first thing to ensure is that the constructor, awake, sleep, and
> terminate methods of session can't throw an exception ever.
> 
> Chuck
Thanks Chuck and Jerry,

as you wrote (but how could you know? :-) ), there have been a lot open
sessions in each of the instances.
There has been another "infect" in my application, it always returned to the
previous page on a browser refresh...

The Barbarian solution: I simply restarted the server and everything seems
to be fine again, also the refresh problem.

But...

You can't do this too often on a production server :-)

Is there a simple way to monitor the sessions without coding tons of lines?
Is there a default set of information one should log in it's application, in
addition to the logs of the application logic?

As WO development is fairly documented (with Practical WebObjects :-) ),
deployment and maintenance of WO applications is not. Shure, most of us are
developers... :-) but shouldn't the applications run somewhere for profit
too?
Is it worth another book from Chuck and Sacha?

Regards and Thanks

Wolfram


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

This email sent to archive@mail-archive.com


Scheduled WOApps not scheduled

2006-04-27 Thread Wolfram Stebel
Hi List,

i have a WOApp running in 7 instances. Each night i scheduled one of them to
restart at 3AM.
When i come to the server in the morning, one instance (the scheduled one)
shows "refuse new session=ON" but there is no new log for the instance
showing up after restart.
So i suspect that the restart failes, only the refuse is set and nothing
more.

How can i find out more about the scheduling?
Did not find any log yet...

Wolfram


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

This email sent to archive@mail-archive.com


Re: Multiple relations for one foreign key?

2006-04-13 Thread Wolfram Stebel
Am 13.04.2006 15:35 Uhr schrieb "Ken Anderson" unter <[EMAIL PROTECTED]>:

Thanks, yes, i tried it, but there is a eof bug (know in radar) that
preventes the outer join with MySQL.
Bad luck!

Wolfram
> There's no restriction as to how many relationships can be based on
> an attribute.
> 
> On Apr 13, 2006, at 9:03 AM, Wolfram Stebel wrote:
> 
>> Hi list,
>> 
>> is it possible to define more than one relation on the same FK-PK
>> combination in EOModeller and will it work?
>> I need an inner and an outer joined relation between the same two
>> tables,
>> characterized by the same keys.
>> 
>> TIA
>> 
>> Wolfram


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

This email sent to archive@mail-archive.com


Multiple relations for one foreign key?

2006-04-13 Thread Wolfram Stebel
Hi list,

is it possible to define more than one relation on the same FK-PK
combination in EOModeller and will it work?
I need an inner and an outer joined relation between the same two tables,
characterized by the same keys.

TIA

Wolfram


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

This email sent to archive@mail-archive.com


Re: Download File Question for IE

2006-04-03 Thread Wolfram Stebel
Am 03.04.2006 4:38 Uhr schrieb "James Cicenia" unter <[EMAIL PROTECTED]>:

> Hello -
> 
> Anyone knows why IE brings up a viewer vs. the regular Microsoft
> Application?
> In other words instead of downloading the file and launching EXCEL it
> brings
> up the EXCEL viewer instead.
> 
> - James Cicenia
As far as i know, this is handled via the awfull registry.
Check your "file types" and the association to applications.
HTH
Wolfram


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

This email sent to archive@mail-archive.com


Re: URGENT issues with CLOSE_WAIT states

2006-04-03 Thread Wolfram Stebel
Am 03.04.2006 2:03 Uhr schrieb "Corin Lawson" unter
<[EMAIL PROTECTED]>:

> Thanks for the response... What major headache that bug is. I shall
> upgrade rather than coming up with a creative workaround (I'd love
> to, but I need a proper fix).
> 
> I would like to know what kinds of limits there are for load on WO.
> How many instances of an application could I run, has anyone much
> experience with high loads, say 1000's of requests in the space of a
> few minutes? Java Monitor seems cumbersome with 100 instances.
> 
> Cheers, Corin.
Hi Corin,
this has been discussed on the list some weeks ago.
100 instances seems to be too much at all.
As far as i remember, Chuck recommended something like running as few as
possible, adding instances if load is heavy, as long as the server can
handle the number of instances.
Instances need some (a lot) of RAM so you should understand that the number
of instances should be finite :-) (match your server outfit).

HTH

Wolfram


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

This email sent to archive@mail-archive.com


Re: WHChangeNotification Question

2006-03-31 Thread Wolfram Stebel
Am 31.03.2006 21:09 Uhr schrieb "Ken Anderson" unter <[EMAIL PROTECTED]>:

> No, not really.  I personally really like how lightweight
> WHChangeNotification is.  I'm using a modified version of it because
> I already have a pub/sub system that my apps are participating in.
> It really depends on your Wonder threshold :)
> 
> Ken
> 
I always wonder about my threshold :-)

Wolfram


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

This email sent to archive@mail-archive.com


Re: Passing values between elements

2006-03-29 Thread Wolfram Stebel
Am 29.03.2006 14:16 Uhr schrieb "Siegfried Makedanz" unter
<[EMAIL PROTECTED]>:

Besides all the good tips you already have:
You might have a "onchange" handler on the first WOPopUpButton doing a
"javascript:form.submit()", then updating the second listbox in the RR-loop
depending on the selected value of the first WOPopUpButton.

This is low-tech, not high-tech like AJAX etc. :-) and absolutely easy...


Wolfram
> Paul, thanks for the quick response, but my level of WO knowledge does
> not fit yours. My dynamic elements are both on the same page. What do
> you mean by page level component?
> 
> Thanks,
> Siegfried
> 
> Paul Lynch wrote:
>> 
>> On 29 Mar 2006, at 12:46, Siegfried Makedanz wrote:
>> 
>>> I have two dynamic elements (WOPopUpButton) named Locations and
>>> Buildings. Now I would like to set the list binding in the Buildings
>>> array based on the selection in Locations. Probably an easy one, but
>>> as a sporadic WO user I have no clue yet.
>> 
>> Set an instance variable in the page level component from one list,
>> use it to create the list for the other, possibly with a a method that
>> fetches the values.  You may want to mess with some javascript or css
>> depending on how you want your page to behave (if so, it's not really
>> a WebObjects question).
>> 
>> The reason we do it this way is to maintain separation between
>> controller and view layers in MVC.
>> 
>> 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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: EOKeyValueQualifier not resolving vertical inheritance?

2006-03-15 Thread Wolfram Stebel
Am 14.03.2006 14:18 Uhr schrieb "Kieran Kelleher" unter
<[EMAIL PROTECTED]>:

Hello Kieran,


> I had issues with EOQualifiers and inheritance hierarchies generating
> bad SQL a few weeks ago and the solution (Chuck Hill responded I think)
> was to stick with single table inheritance if you want reliable SQL
> generated from your EOQualifiers.
This is not a too good advice for a productive application...
Shouldn't WO use EOQualifiers in producing it's own fetches, that work well
with vertical inheritance?

Thanks anyway :-)

Wolfram

>> i create a complex query from user input via EOKeyValueQualifier and
>> other
>> EOQualifiers.
>> 
>> Absolutely fine is:
>> EOKeyValueQualifier ( myAttributeName, mySelector, myComparedEO );
>> 
>> Also OK is it for a keypath to a non flattened attribute (lets say:
>> "location.derivedClassAttribute", where location is a derived class):
>> EOKeyValueQualifier ( "location.derivedClassAttribute", mySelector,
>> myComparedValue );
>> (myComparedValue is a string in this case).
>> 
>> The above statement creates joins with aliases like:
>> 
>> ...FetchedClass t0, Location T1, LocationBaseClass T2...
>> 
>> and fetches the correct EOs.
>> 
>> When the left hand side points to an attribute of an inherited class it
>> evaluates to the wrong derived entity:
>> Compared to the above example:
>> EOKeyValueQualifier ( "location.baseClassAttribute", mySelector,
>> myComparedValue );
>> does not evaluate to table "Location". Instead it creates aliases like:
>> 
>> ... FetchedClass t0, Person T1, LocationBaseClass T2...
>> 
>> where "Person" is another derived class of the same base class.
>> 
>> This seems to be a bug, because the class information for
>> "location.baseClassAttribute" is available and correct for the relation
>> "location", but it does not create the correct SQL.


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

This email sent to archive@mail-archive.com


Re: EOKeyValueQualifier not resolving vertical inheritance?

2006-03-15 Thread Wolfram Stebel
Am 14.03.2006 11:30 Uhr schrieb "Lachlan Deck" unter
<[EMAIL PROTECTED]>:

Hi Lachlan,

Thanks a lot for your suggestions

> Hi Wolfram,
> 
> On 14/03/2006, at 7:11 PM, Wolfram Stebel wrote:
> 
>> i create a complex query from user input via EOKeyValueQualifier
>> and other
>> EOQualifiers.
>> <...>
>> When the left hand side points to an attribute of an inherited
>> class it
>> evaluates to the wrong derived entity:
>> 
>> Compared to the above example:
>> EOKeyValueQualifier ( "location.baseClassAttribute", mySelector,
>> myComparedValue );
>> does not evaluate to table "Location". Instead it creates aliases
>> like:
>> 
>> ... FetchedClass t0, Person T1, LocationBaseClass T2...
>> 
>> where "Person" is another derived class of the same base class.
> 
> That's unfortunate... it sounds like bug unless you've set your
> fetchSpec.setIsDeep(false); or something else is up.
It is deep is set to true!

> Does it still fail if doing the following?
> 
> StringBuffer format = new StringBuffer();
> NSArray args;
> EOQualifier qualifier;
> 
> format.append("%@  %@");
> format.insert(3, EOQualifier.stringForOperatorSelector(mySelector));
> args = new NSArray(new Object[] {"location.baseClassAttribute",
> myComparedValue });
> qualifier = EOQualifier.qualifierWithQualifierFormat(format.toString
> (), args);
It does simply the same, the Aliases show the same wrong entity.

Thanks anyway :-)

When i have a solution i will post it to the list


Wolfram


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

This email sent to archive@mail-archive.com


EOKeyValueQualifier not resolving vertical inheritance?

2006-03-14 Thread Wolfram Stebel
Hi List,

i create a complex query from user input via EOKeyValueQualifier and other
EOQualifiers.

Absolutely fine is:
EOKeyValueQualifier ( myAttributeName, mySelector, myComparedEO );

Also OK is it for a keypath to a non flattened attribute (lets say:
"location.derivedClassAttribute", where location is a derived class):
EOKeyValueQualifier ( "location.derivedClassAttribute", mySelector,
myComparedValue );
(myComparedValue is a string in this case).

The above statement creates joins with aliases like:

...FetchedClass t0, Location T1, LocationBaseClass T2...

and fetches the correct EOs.

When the left hand side points to an attribute of an inherited class it
evaluates to the wrong derived entity:
Compared to the above example:
EOKeyValueQualifier ( "location.baseClassAttribute", mySelector,
myComparedValue );
does not evaluate to table "Location". Instead it creates aliases like:

... FetchedClass t0, Person T1, LocationBaseClass T2...

where "Person" is another derived class of the same base class.

This seems to be a bug, because the class information for
"location.baseClassAttribute" is available and correct for the relation
"location", but it does not create the correct SQL.

Did someone see this behavior too?
Any tips for a workaround?

TIA

Wolfram


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

This email sent to archive@mail-archive.com


NSArray to NSData

2006-03-08 Thread Wolfram Stebel
Sorry for posting without ref.

Hi all,

i would like to store a NSArray with it's content into a blob (and restore
it back from there too) in the database.
I found that i need a NSData to put into the blob.
Is there a receipe around how to make a NSData out of the NSArray easily?

TIA

Wolfram


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

This email sent to archive@mail-archive.com


webobjects-dev@lists.apple.com

2006-03-08 Thread Wolfram Stebel
Hi all,

i would like to store a NSArray with it's content into a blob (and restore
it back from there too) in the database.
I found that i need a NSData to put into the blob.
Is there a receipe around how to make a NSData out of the NSArray easily?

TIA

Wolfram


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

This email sent to archive@mail-archive.com


Re: mod_proxy question

2006-03-03 Thread Wolfram Stebel
Am 03.03.2006 8:52 Uhr schrieb "Mark Morris" unter
<[EMAIL PROTECTED]>:

> I'm not sure if this was one of the things you were pointing out, but
> notice how the internetsports.de site uses frames to keep the
> WebObjects URL from appearing in the location bar (which I believe
> was part of your original question).
> 
> Regards,
> Mark
> 
> On Mar 3, 2006, at 1:42 AM, Wolfram Stebel wrote:
> 
>> Am 02.03.2006 23:25 Uhr schrieb "David Chaney" unter
>> <[EMAIL PROTECTED]>:
>> 
>>> Wolfam,
>>> 
>>> Check out this site... pretty useful for this sort of thing:
>>> http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/
>> Sorry for beeing rebellious:
Sorry not only for beeing rebellious, also for beeing dumb.
I never thought of something like a frame, wrapped around my own content by
someone.
So i never analysed the html.

Sorry again.

Wolfram


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

This email sent to archive@mail-archive.com


Re: mod_proxy question

2006-03-02 Thread Wolfram Stebel
Am 02.03.2006 23:25 Uhr schrieb "David Chaney" unter <[EMAIL PROTECTED]>:

> Wolfam,
> 
> Check out this site... pretty useful for this sort of thing:
> http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/
Sorry for beeing rebellious:
Open
www.webclubs.de
and
www.internetsports.de


It executes the completely same application, but internetsports is
redirected by another provider.
There must be some clever redirection used.

Who knows how?

Wolfram


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

This email sent to archive@mail-archive.com


mod_proxy question

2006-03-02 Thread Wolfram Stebel
Hi gents,

i already asked similar question to do a mod_rewrite...

I want any incoming URL like
"http://my.server.de/cgi-bin/WebObjects/myApp.woa/wa/myAction";
returned to the client as
"http://my.server.de/";

Can i do this with:

ProxyPassReversehttp://my.server.de/http://my.server.de/.*

???

Do i need to set "ProxyRequests On" if it works this way?

I looked into mod_rewrite and mod_proxy and cant find a solution.

Pleas help :-)

Wolfram


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

This email sent to archive@mail-archive.com


Re: Number

2006-02-21 Thread Wolfram Stebel
Am 21.02.2006 11:08 Uhr schrieb "Jim Wong" unter <[EMAIL PROTECTED]>:

> Hi:
> 
> In java and C++, there's the ++, += operations. But in WO, when i
> have a data type :
> 
> public Number tmpCode
> 
> how can i use tmpCode for things like tmpCode += 1; or tmpCode++ etc?
You can't.
Number is an Object and immutable.
You can do things like:

Number n = new Integer ( tmpCode.intValue () + 1 );

or better:

int i = tmpCode.intValue ();
... calculate something...

i++; i--; i=i*i;

... calculated something...
tmpCode = new Integer ( i );

You should have a look into the java tutorials.

Regards
> 
> 
> 
> Warmest Regards,
> Jim Wong
> [EMAIL PROTECTED]


Wolfram


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

This email sent to archive@mail-archive.com


Re: Problem with page encoding

2006-02-15 Thread Wolfram Stebel
Am 16.02.2006 6:06 Uhr schrieb "Peteris Krisjanis" unter
<[EMAIL PROTECTED]>:

> Hi!
> 
> I have rather strange problem - my WO app when launched doesn't show
> UTF-8 characters normally, except for those textual data who have been
> taken from database (Postgresql, UTF-8). HTML is itself utf-8 (At least
> it is how WOBuilder claims), class file too. But when launched in page
> instead of correct symbols I get question marks.
> 
> How do deal with this rather annoying problem? Is this problem on server
> side? I need solution for this ASAP, so, any clues would be very welcome,
> 
> Peter.
Open the Properties of the code files and set the file encoding to utf-8.
You can do this for all files at once. options are to convert or to
reinterpret, whatever might be the difference.

Wolfram


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

This email sent to archive@mail-archive.com


Re: Most efficient character parsing.

2006-02-15 Thread Wolfram Stebel
Am 15.02.2006 22:43 Uhr schrieb "Eric Stewart" unter
<[EMAIL PROTECTED]>:

> I've got a WOApp that needs to deal with 200 strings of approximately
> 250-500 characters per string.
> 
> I need to strip out all characters that are not ISO-8859-1 legal
> characters. So basically any character that is not decimal ascii
> character 9, 10, 13, 32-126, 160-255 need to be removed from the
> string. This process is happening roughly 2.5 million times a day and
> I'm trying to figure out what is the most efficient way to do it.
> 
> Right now I'm tearing the strings apart character-by-character and
> checking it's ascii decimal value against the values I know are good.
> Is there a more efficient way to do it?
There should be a regular expression for this to use it in
String.replaceAll.
 
Precompile it and reuse it for all of them lucky 2.5 millions of strings :-)

I can't write such an expression right from my head... sorry.

Regular Regards

Wolfram


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

This email sent to archive@mail-archive.com


Re: Quick Image scale down

2006-02-14 Thread Wolfram Stebel
Am 14.02.2006 16:20 Uhr schrieb "Kieran Kelleher" unter
<[EMAIL PROTECTED]>:

> Can someone recommend the quickest (free) java api to implement a few
> lines of code to just scale down an uploaded image to low
> resolution/smaller-size. Users upload JPG artwork (about 4MB) for
> postcard designs and I want to display a low-res scaled down version on
> the page after upload to show what they have uploaded. I need something
> quick and dirty and I know that ImageMagick has been talked about a
> lot, but I want something simple in Java that I can use in WebObjects
> and deploy to XServe (Panther).
Thats what i do (it's not simply java but...):

class Thumber extends Thread
{
private String source;
private String target;

public Thumber ( String aSource, String aTarget )
{
source = aSource;
target = aTarget;
}

public void run()
{
try
{
String command = "sips -Z 400 -s format jpeg -s
formatOptions low " + source + " --out " + target;
if ( NSLog.debugLoggingAllowedForLevel (
NSLog.DebugLevelDetailed  ) )
{
NSLog.out.appendln ( "Thumbing command : " + command );
}
Process p = Runtime.getRuntime ().exec ( command );
if ( NSLog.debugLoggingAllowedForLevel (
NSLog.DebugLevelDetailed  ) )
{
NSLog.out.appendln ( "Thumbing process waiting " );
}
new StreamGobbler ( p.getInputStream(), "Thumb-process
INPUT" ).start();
new StreamGobbler ( p.getErrorStream(), "Thumb-process
ERROR" ).start();

int terminated = p.waitFor ();
if ( NSLog.debugLoggingAllowedForLevel (
NSLog.DebugLevelDetailed  ) )
{
NSLog.out.appendln ( "Thumbing result: terminated (0=OK)
: " + terminated );
BufferedReader in = new BufferedReader( new
InputStreamReader ( p.getErrorStream () ) );
NSLog.out.appendln ( "Thumbing error : " + in.readLine
() );
}
}
catch ( Exception e )
{
if ( NSLog.debugLoggingAllowedForLevel (
NSLog.DebugLevelDetailed  ) )
{
// quiet error
NSLog.err.appendln ( "Error creating thumb file : " + e
);
e.printStackTrace();
}
}
}
}


"sips" is included in mac os x. As a result i have the uploaded file and for
display purpose i use the thumbed file.
As an automatism i try to show thumbed files first, taking the original if
no thumb exists. This will help also for cases where no thumb could be
created... as for Word-Documents :-)
You may set the target resolution and size as you need.

I tried ThumbsUp in the same manner as above with varying results...

HTH

Wolfram


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

This email sent to archive@mail-archive.com


How many E-mails maximum?

2006-02-10 Thread Wolfram Stebel
Hi List,

my WO-Application is able to send mails to an unrestricted amount of
persons.

It is not spamming i intent, but sometimes there are huge amounts of mails
requested... :-)


What is your experience how many mail recipients will pass through the
layers (java.mail, mail server)?

I have Odaiko mail framework from the net.

It creates a vector of recipients from a huge NSArray created from my data
and does it's magic passing this to java.mail.

I wonder if it would be more clever to send huge amounts of mails in bundles
of, lets say 100, recipients to prevent failures and rejection by "who
knows".

I modified Odaiko mail so that it uses flexible intervals sending mails to
prevent rejection of bulk mails, but this would not help with one mail to
1-3000 recipients, i think.

I want to be sure to deliver any number of mails.

Any hints?


Wolfram


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

This email sent to archive@mail-archive.com


Re: Many-to-Many inside same Entity

2006-02-07 Thread Wolfram Stebel
Am 07.02.2006 12:31 Uhr schrieb "Amedeo Mantica" unter
<[EMAIL PROTECTED]>:

> Hi, a question... how to implement this:
> 
> Products entity...
> 
> some product can be related to many other products...
> 
> then I need to join in many-to-many the same entity...
> 
> any suggestion?
> 
> thanks
> Amedeo
You can not "automagically" join this in.
But you can modify the relations after a join to another temporary table,
and it works.
I did this on the base class in an vertical inheritance to connect base and
derived objects, and it too works.
But one thing: you have to maintain the join table manually!

I will send you an extract of the data model with separata post.


Wolfram


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

This email sent to archive@mail-archive.com


Re: ChangeNotification from dneumann

2006-01-26 Thread Wolfram Stebel
Am 26.01.2006 14:44 Uhr schrieb "Jerry W. Walker" unter
<[EMAIL PROTECTED]>:

Oh hell,

Jerry, i'm so sorry, i was using the wrong link at wirehose, so that i only
found the old implementation.
Sometimes it helps reading...

Thanks

Wolfram

> Hi, Wolfram,
> 
> I was using Gary Teter's update to Dave Neumann's ChangeNotification
> framework successfully on two different projects while working at my
> last company.
> 
> You mentioned that you had downloaded the framework "once (when i was
> young :-)". Do you have the latest update from WireHose?
> 
> Regards,
> Jerry


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

This email sent to archive@mail-archive.com


ChangeNotification from dneumann

2006-01-26 Thread Wolfram Stebel
Hi List,

once (when i was young :-) ) i picked up the ChangeNotification framework
from dneumann (ChangeCathcer.java created by dneumann on Wed 21-Apr-1999
etc.)
It is not pure WebObjects, it uses also some other classes like
com.apple.cocoa.foundation.NSObject. Thats the easy case in porting it.
Has anybody replaced the code for NSArchiver and NSUnarchiver successfully?

The NSArchiver part i fixed by including
import com.apple.cocoa.foundation.NSArchiver;
import com.apple.cocoa.foundation.NSObject;
import com.apple.cocoa.foundation.NSData;
It compiles well then.
Is this working later on, not on a sun or windows machine, but on a mac?


But there is a dirty and not compiling part:

com.apple.cocoa.foundation.NSDictionary dict =
(com.apple.cocoa.foundation.NSDictionary)NSUnarchiver.unarchiveObjectWithDat
a(( com.apple.cocoa.foundation.NSData ) ( request().content() ));

which leads to a "inconvertible types" for the result of content () wich in
fact is a NSData, but from com.webobjects.foundation.

Any solution known?
dneumann, are you still on the list?

TIA

Wolfram


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

This email sent to archive@mail-archive.com


File upload as longresponse page

2006-01-21 Thread Wolfram Stebel
Hi list,

is there any known implementation for a file upload with a long reponse
page, giving feedback for the upload process?

The reason i ask (and correct me when i'm wrong!):

- browsers do not check the file size
- browsers will time out in normal WOFileUpload on files to big
- Sessions might time out, when the normal WOFileUpload takes tooo long
:-)
- Users get bored, uploading large files, getting told "file to big".

Before WO included WOFileUpload component, there must have been lots of
implementations for streaming. Would it help, doing it myself? Any code
snippets?
And (sorry for asking, might be very dumb :-) ) would i be able to check the
file size before streaming up, i.e. to provide progress information?


Thanks all!


Wolfram


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

This email sent to archive@mail-archive.com


Re: MySQL in TIGER

2006-01-20 Thread Wolfram Stebel
Am 20.01.2006 10:00 Uhr schrieb ".::welemski::." unter <[EMAIL PROTECTED]>:

> Hi,

I really had a big problem in MySQL.
Im running a Tiger server since it
> is built in from the time it was
installed I just
don't have any idea why
> myWebApp can't connect to mysql?

I search through the internet and I found
> many people complaining about
MySQL in Tiger.

Now I have no choice but to
> revert back to Panther. I still would like to go
in Tiger though.

Does anyone
> have a solution for MySQL in Tiger?

--
• -- -- -- -- -- -- -- -- -- -- --

> welemski
• -- -- -- -- -- -- --

Try the solution in the attached mail
It is a copy of from a thread two days ago.

Wolfram

--- Begin Message ---
Am 16.01.2006 15:02 Uhr schrieb "Ute Hoffmann" unter
<[EMAIL PROTECTED]>:

Hallo Ute,

nenn' mir deine Kontonummer! Du hast's mal wieder getroffen.

Continued in english!

As Ute mentioned, there was something on the list short before and i found
it by the magic words (mysql, network) Ute told me!
I should have recognized the tick mark in MySQLManager (Apple startup tool)!

To honor the man who solved it:

>Subject: 10.4.3, mysql, webobjects gotcha
>From: Graham J Lee <[EMAIL PROTECTED]>
>Date: Fri, 4 Nov 2005 18:29:09 +
>Hi all,

>just had a hairy half hour with a load of webobjects instances failing after

You must be glad, i was helpless for hours.

>upgrading to 10.4.3. The problem was that with the software update, rather than
>executing /usr/bin/mysqld_options the MySQL StartupItem now gets its options
>from /usr/bin/ mysqld_manager_options. Its default behaviour is just to
>disallow network connections (it appends the argument --skip-networking to the
>mysqld_safe invocation). JDBC connects over the network even on localhost, so
>none of the instances could connect to the database. To fix this (not sure why
>it was changed in the first place, frankly) edit /etc/mysqlManager.plist and
>change the "no" which appears there to a "yes", then restart MySQL.

>Hope that helps someone,
Indeed it did!!!

Thanks to:
>Graham.


--
Graham Lee   GPG Key ID: 01D5B9D8
UNIX Systems Manager,
Oxford Physics Practical Course
http://nextstep.sdf-eu.org   01865 273450



> Hallo Wolfram,
> war da nicht mal ein Thread über geänderte Mysql Privilegien und dass
> der Zugang über das Netz plötzlich inaktiv/aus war. Ich glaube man
> musste im config-File was Network Connection erlauben und mysql neu
> starten...
> 
> Vielleicht hilft das was...?
> 
> Viele Grüße
> 
> Ute
> 
> Am Montag, 16.01.06 um 14:27 Uhr schrieb Wolfram Stebel:
> 
>> Hi list,
>> 
>> i update server to 10.4.4.
>> 
>> Starting my applications in monitor results in :
>> 
>> ...
>> 
>> java.net.SocketException
>> MESSAGE: java.net.ConnectException: Connection refused
>> 
>> STACKTRACE:
>> 
>> java.net.SocketException: java.net.ConnectException: Connection refused
>> at com.mysql.jdbc.StandardSocketFactory.connect
>> (StandardSocketFactory.java:156)
>> at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
>> ...
>> 
>> 
>> Last packet sent to the server was 0 ms ago.
>> [2006-01-16 11:52:50 CET]  A fatal exception occurred:
>> _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
>> [EMAIL PROTECTED]: failed to open
>> database channel.  Check your connection dictionary, and ensure your
>> database is correctly configured.
>> [2006-01-16 11:52:50 CET]  java.lang.IllegalStateException:
>> _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
>> [EMAIL PROTECTED]: failed to open
>> database channel.  Check your connection dictionary, and ensure your
>> database is correctly configured.
>> at com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel
>> (EODatabaseContext.java:2131)
>> 
>> 
>> --
>> 
>> 
>> i'm able to connect with MySQLAdministrator and manually with the user
>> and
>> password the application uses.
>> i tried a new jdbc driver.
>> i have my.cnf in /etc/:
>> 
>> [mysqld]
>> datadir=/Volumes/Sonne-Data/mySQL-Data
>> pid-file=/Volumes/Sonne-Data/mySQL-Data/Sonne.local.pid
>> socket=/var/mysql/mysql.sock
>> port=3306
>> character-set-server=latin1
>> collation-server=latin1_german1_ci
>> 
>> 
>> [mysql.server]
>> basedir=/usr/bin
>> 
>> ---
>> 
>> Any tips?
>> 
>> Please hurry :-)
>> 
>> Wolfram


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

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

This email sent to archive@mail-archive.com

SOLVED: Re: Urgent: WO error after server update to 10.4.4

2006-01-16 Thread Wolfram Stebel
Am 16.01.2006 15:02 Uhr schrieb "Ute Hoffmann" unter
<[EMAIL PROTECTED]>:

Hallo Ute,

nenn' mir deine Kontonummer! Du hast's mal wieder getroffen.

Continued in english!

As Ute mentioned, there was something on the list short before and i found
it by the magic words (mysql, network) Ute told me!
I should have recognized the tick mark in MySQLManager (Apple startup tool)!

To honor the man who solved it:

>Subject: 10.4.3, mysql, webobjects gotcha
>From: Graham J Lee <[EMAIL PROTECTED]>
>Date: Fri, 4 Nov 2005 18:29:09 +
>Hi all,

>just had a hairy half hour with a load of webobjects instances failing after

You must be glad, i was helpless for hours.

>upgrading to 10.4.3. The problem was that with the software update, rather than
>executing /usr/bin/mysqld_options the MySQL StartupItem now gets its options
>from /usr/bin/ mysqld_manager_options. Its default behaviour is just to
>disallow network connections (it appends the argument --skip-networking to the
>mysqld_safe invocation). JDBC connects over the network even on localhost, so
>none of the instances could connect to the database. To fix this (not sure why
>it was changed in the first place, frankly) edit /etc/mysqlManager.plist and
>change the "no" which appears there to a "yes", then restart MySQL.

>Hope that helps someone,
Indeed it did!!!

Thanks to:
>Graham.


--
Graham Lee   GPG Key ID: 01D5B9D8
UNIX Systems Manager,
Oxford Physics Practical Course
http://nextstep.sdf-eu.org   01865 273450



> Hallo Wolfram,
> war da nicht mal ein Thread über geänderte Mysql Privilegien und dass
> der Zugang über das Netz plötzlich inaktiv/aus war. Ich glaube man
> musste im config-File was Network Connection erlauben und mysql neu
> starten...
> 
> Vielleicht hilft das was...?
> 
> Viele Grüße
> 
> Ute
> 
> Am Montag, 16.01.06 um 14:27 Uhr schrieb Wolfram Stebel:
> 
>> Hi list,
>> 
>> i update server to 10.4.4.
>> 
>> Starting my applications in monitor results in :
>> 
>> ...
>> 
>> java.net.SocketException
>> MESSAGE: java.net.ConnectException: Connection refused
>> 
>> STACKTRACE:
>> 
>> java.net.SocketException: java.net.ConnectException: Connection refused
>> at com.mysql.jdbc.StandardSocketFactory.connect
>> (StandardSocketFactory.java:156)
>> at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
>> ...
>> 
>> 
>> Last packet sent to the server was 0 ms ago.
>> [2006-01-16 11:52:50 CET]  A fatal exception occurred:
>> _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
>> [EMAIL PROTECTED]: failed to open
>> database channel.  Check your connection dictionary, and ensure your
>> database is correctly configured.
>> [2006-01-16 11:52:50 CET]  java.lang.IllegalStateException:
>> _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
>> [EMAIL PROTECTED]: failed to open
>> database channel.  Check your connection dictionary, and ensure your
>> database is correctly configured.
>> at com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel
>> (EODatabaseContext.java:2131)
>> 
>> 
>> --
>> 
>> 
>> i'm able to connect with MySQLAdministrator and manually with the user
>> and
>> password the application uses.
>> i tried a new jdbc driver.
>> i have my.cnf in /etc/:
>> 
>> [mysqld]
>> datadir=/Volumes/Sonne-Data/mySQL-Data
>> pid-file=/Volumes/Sonne-Data/mySQL-Data/Sonne.local.pid
>> socket=/var/mysql/mysql.sock
>> port=3306
>> character-set-server=latin1
>> collation-server=latin1_german1_ci
>> 
>> 
>> [mysql.server]
>> basedir=/usr/bin
>> 
>> ---
>> 
>> Any tips?
>> 
>> Please hurry :-)
>> 
>> Wolfram


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

This email sent to archive@mail-archive.com


Re: Urgent: WO error after server update to 10.4.4

2006-01-16 Thread Wolfram Stebel
Am 16.01.2006 14:41 Uhr schrieb "Dev WO" unter <[EMAIL PROTECTED]>:

Hi,

Thanks für your answer!

> Hi Wolfram,
> could you past your connection dictionnary so we can have a look at it?
>From the logs:

[2006-01-16 16:20:13 CET]  Didn't find any JNDI data source.
[2006-01-16 16:20:13 CET]  Using JDBCPlugIn
'com.webobjects.jdbcadaptor.MySQLPlugIn' for [EMAIL PROTECTED]
[2006-01-16 16:20:13 CET]   connecting with dictionary: {plugin
= ""; username = "webclubs"; driver = ""; password = ""; URL = "jdbc:mysql://localhost/WebClubs"; }
DriverManager.getConnection("jdbc:mysql://localhost/WebClubs")
 trying driver 
[className=com.mysql.jdbc.Driver,[EMAIL PROTECTED]
java.sql.SQLException: Unable to connect to any hosts due to
exception: java.net.ConnectException: Connection refused


> You said you can connect using MySQLAdministrator, on the local
> machine or remotely?
Yes
> Are you using localhost or 127.0.0.1 to connect using
> mySQLAdministrator?
Yes
127.0.0.1 does not work! looks like a problem.

> Xavier
> 
> 
> 
>> Hi list,
>> 
>> i update server to 10.4.4.
>> 
>> Starting my applications in monitor results in :
>> 
>> ...
>> 
>> java.net.SocketException
>> MESSAGE: java.net.ConnectException: Connection refused
>> 
>> STACKTRACE:
>> 
>> java.net.SocketException: java.net.ConnectException: Connection
>> refused
>> at com.mysql.jdbc.StandardSocketFactory.connect
>> (StandardSocketFactory.java:156)
>> at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
>> ...
>> 
>> 
>> Last packet sent to the server was 0 ms ago.
>> [2006-01-16 11:52:50 CET]  A fatal exception occurred:
>> _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
>> [EMAIL PROTECTED]: failed to open
>> database channel.  Check your connection dictionary, and ensure your
>> database is correctly configured.
>> [2006-01-16 11:52:50 CET]  java.lang.IllegalStateException:
>> _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
>> [EMAIL PROTECTED]: failed to open
>> database channel.  Check your connection dictionary, and ensure your
>> database is correctly configured.
>> at com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel
>> (EODatabaseContext.java:2131)
>> 
>> 
>> --
>> 
>> 
>> i'm able to connect with MySQLAdministrator and manually with the
>> user and
>> password the application uses.
>> i tried a new jdbc driver.
>> i have my.cnf in /etc/:
>> 
>> [mysqld]
>> datadir=/Volumes/Sonne-Data/mySQL-Data
>> pid-file=/Volumes/Sonne-Data/mySQL-Data/Sonne.local.pid
>> socket=/var/mysql/mysql.sock
>> port=3306
>> character-set-server=latin1
>> collation-server=latin1_german1_ci
>> 
>> 
>> [mysql.server]
>> basedir=/usr/bin
>> 
>> ---
>> 
>> Any tips?
>> 
>> Please hurry :-)
>> 
>> Wolfram


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

This email sent to archive@mail-archive.com


Re: Urgent: WO error after server update to 10.4.4

2006-01-16 Thread Wolfram Stebel
Am 16.01.2006 14:38 Uhr schrieb "Kieran Kelleher" unter
<[EMAIL PROTECTED]>:

Hi Kieran,

Thanks!!!
What i forgot before: the update included WO 5.3.1!

> Is the server on the same machine or a different machine to the WO
> application?
> What is your full connection URL?
> What is the IP address of the WO app machine?
> What is the IP address of the MySQL database server?
All on one server, same IP.

> 
> I am guessing your connection URL (perhaps host) is incorrect, or your
> privileges in MySQL (which include ALL OF user, password and client
> host) are not set to match the client IP where the WO app is connecting
> from.
>From the logs:

[2006-01-16 16:20:13 CET]  Didn't find any JNDI data source.
[2006-01-16 16:20:13 CET]  Using JDBCPlugIn
'com.webobjects.jdbcadaptor.MySQLPlugIn' for [EMAIL PROTECTED]
[2006-01-16 16:20:13 CET]   connecting with dictionary: {plugin
= ""; username = "webclubs"; driver = ""; password = ""; URL = "jdbc:mysql://localhost/WebClubs"; }
DriverManager.getConnection("jdbc:mysql://localhost/WebClubs")
 trying driver 
[className=com.mysql.jdbc.Driver,[EMAIL PROTECTED]
java.sql.SQLException: Unable to connect to any hosts due to
exception: java.net.ConnectException: Connection refused


this used to work until today!

Wolfram


>> Hi list,
>> 
>> i update server to 10.4.4.
>> 
>> Starting my applications in monitor results in :
>> 
>> ...
>> 
>> java.net.SocketException
>> MESSAGE: java.net.ConnectException: Connection refused
>> 
>> STACKTRACE:
>> 
>> java.net.SocketException: java.net.ConnectException: Connection refused
>> at com.mysql.jdbc.StandardSocketFactory.connect
>> (StandardSocketFactory.java:156)
>> at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
>> ...
>> 
>> 
>> Last packet sent to the server was 0 ms ago.
>> [2006-01-16 11:52:50 CET]  A fatal exception occurred:
>> _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
>> [EMAIL PROTECTED]: failed to open
>> database channel.  Check your connection dictionary, and ensure your
>> database is correctly configured.
>> [2006-01-16 11:52:50 CET]  java.lang.IllegalStateException:
>> _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
>> [EMAIL PROTECTED]: failed to open
>> database channel.  Check your connection dictionary, and ensure your
>> database is correctly configured.
>> at com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel
>> (EODatabaseContext.java:2131)
>> 
>> 
>> --
>> 
>> 
>> i'm able to connect with MySQLAdministrator and manually with the user
>> and
>> password the application uses.
>> i tried a new jdbc driver.
>> i have my.cnf in /etc/:
>> 
>> [mysqld]
>> datadir=/Volumes/Sonne-Data/mySQL-Data
>> pid-file=/Volumes/Sonne-Data/mySQL-Data/Sonne.local.pid
>> socket=/var/mysql/mysql.sock
>> port=3306
>> character-set-server=latin1
>> collation-server=latin1_german1_ci
>> 
>> 
>> [mysql.server]
>> basedir=/usr/bin
>> 
>> ---
>> 
>> Any tips?
>> 
>> Please hurry :-)
>> 
>> Wolfram
>> 
>> 
>>  ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/
>> kieran_lists%40mac.com
>> 
>> This email sent to [EMAIL PROTECTED]
>> 
> 

Dipl. Inform. Wolfram Stebel, bugs&errors
Flutgrabenstr. 19, 35576 Wetzlar
Tel. 06441/47633
Mailto:[EMAIL PROTECTED]
Web: www.bugs-and-errors.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Urgent: WO error after server update to 10.4.4

2006-01-16 Thread Wolfram Stebel
Hi list,

i update server to 10.4.4.

Starting my applications in monitor results in :

...

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused
at com.mysql.jdbc.StandardSocketFactory.connect
(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
...


Last packet sent to the server was 0 ms ago.
[2006-01-16 11:52:50 CET]  A fatal exception occurred:
_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
[EMAIL PROTECTED]: failed to open
database channel.  Check your connection dictionary, and ensure your
database is correctly configured.
[2006-01-16 11:52:50 CET]  java.lang.IllegalStateException:
_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
[EMAIL PROTECTED]: failed to open
database channel.  Check your connection dictionary, and ensure your
database is correctly configured.
at com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel
(EODatabaseContext.java:2131)


--


i'm able to connect with MySQLAdministrator and manually with the user and
password the application uses.
i tried a new jdbc driver.
i have my.cnf in /etc/:

[mysqld]
datadir=/Volumes/Sonne-Data/mySQL-Data
pid-file=/Volumes/Sonne-Data/mySQL-Data/Sonne.local.pid
socket=/var/mysql/mysql.sock
port=3306
character-set-server=latin1
collation-server=latin1_german1_ci


[mysql.server]
basedir=/usr/bin

---

Any tips?

Please hurry :-)

Wolfram


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

This email sent to archive@mail-archive.com


Urgent: WO error after server update to 10.4.4

2006-01-16 Thread Wolfram Stebel
Hi list,

i update server to 10.4.4.

Starting my applications in monitor results in :

...

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused
at com.mysql.jdbc.StandardSocketFactory.connect
(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
...


Last packet sent to the server was 0 ms ago.
[2006-01-16 11:52:50 CET]  A fatal exception occurred:
_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
[EMAIL PROTECTED]: failed to open
database channel.  Check your connection dictionary, and ensure your
database is correctly configured.
[2006-01-16 11:52:50 CET]  java.lang.IllegalStateException:
_obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext
[EMAIL PROTECTED]: failed to open
database channel.  Check your connection dictionary, and ensure your
database is correctly configured.
at com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel
(EODatabaseContext.java:2131)


--


i'm able to connect with MySQLAdministrator and manually with the user and
password the application uses.
i tried a new jdbc driver.
i have my.cnf in /etc/:

[mysqld]
datadir=/Volumes/Sonne-Data/mySQL-Data
pid-file=/Volumes/Sonne-Data/mySQL-Data/Sonne.local.pid
socket=/var/mysql/mysql.sock
port=3306
character-set-server=latin1
collation-server=latin1_german1_ci


[mysql.server]
basedir=/usr/bin

---

Any tips?

Please hurry :-)

Wolfram


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

This email sent to archive@mail-archive.com


google component

2006-01-13 Thread Wolfram Stebel
Hi List,

i have a small google search component that should crawl my website:


http://www.google.com/search"; target="_blank">




http://www.webclubs.de";>
http://www. webclubs.de" checked>




The search component is only available and executed in my local environment
but points to the live website.
In fact this session based WO application is at "http://www.
webclubs.de/cgi-bin/WebObjects/WebClubs.woa"
and google does not show any results from this site via my search component.


What are the reasons:
- site not indexed by google?
- does not follow hyperlinks to content pages?
- wrong understanding of how to search a WO site?

or whatever?

TIA

Wolfram


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

This email sent to archive@mail-archive.com


Re: Custom type EOModeler issue

2005-12-29 Thread Wolfram Stebel
Am 28.12.2005 19:23 Uhr schrieb "Chuck Hill" unter
<[EMAIL PROTECTED]>:

Hi Chuck,

thanks for this perfect support.
Practical WO has been a little incomplete on this to get it working :-)

> I think  you are slightly mistaken.  The stack trace indicates that
> the problem happens during the takeValues phase, which occurs before
> invokeAction and the code tied to the Submit button.
I'll practice reading stack traces, i promise

> 
>> java.lang.IllegalArgumentException: While trying to invoke the set
>> method
>> "public void CSampleTable.setAvalue(MyType)" on an object of type
>> CSampleTable we received an argument of type java.lang.String. This
>> often
>> happens if you forget to use a formatter.
I was told about the formatter...

>
...

>> What am i missing?
>> 
> There are a few things you can do.  One is to follow EOF's suggestion
> and add a formatter that can format (convert between) MyType and
> String.  Given a String s, it will return new MyType(s).  Given a
> MyType t, it will return t.getValue().
...
> 
> I'd prefer a formatter: it keeps the code all in one place and is
> easy to reuse.  I'd avoid adding code to CSampleTable as you would
> have to do this in every object that used MyType.
I followed your recommendations regarding the implementation of the MyType
class (immutable etc.).
Further i implemented a formatter "MyTypeFormatter" which i use for data
exchange in my component.
Works like a charme!!!

One question remains:

I allocate the formatter as a public final member in my application at the
moment. Is it a reasonable place or should i allocate it in session or
component context?

I would say, session is best for speed, resources and safety, do you agree?

Thanks

Wolfram

P.S. In a short while i will publish my "BaseWOApp" with several interesting
solutions (MyType EO data type, timertask for property update [from
PropDemo.zip, www.bugs-and-errors.de], page member pushing and popping for
correct forward and backward navigation, standard error handling pages...)
That's something for beginners :-)


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

This email sent to archive@mail-archive.com


Custom type EOModeler issue

2005-12-27 Thread Wolfram Stebel
Hi list,

Nice christmas? Hopefully.

As a training session i created a custom data type " MyType":
I created my own class MyType with the recommended methods (see below).
In EOModeler i map MyType to:
External type: varchar
Type: Custom
Width: 3
class: MyType
factory method: valueOf: (see below!)
conversion method: toString ( see below!)
Init Arguments: NSString

Getting values from the DB works like a charme.
Save.Changes leads to:

java.lang.IllegalArgumentException: While trying to invoke the set method
"public void CSampleTable.setAvalue(MyType)" on an object of type
CSampleTable we received an argument of type java.lang.String. This often
happens if you forget to use a formatter.
at 
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.throwMethodExcepti
onWithDescription(NSKeyValueCoding.java:1155)
at 
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.setValueInObject(N
SKeyValueCoding.java:1177)
at 
com.webobjects.eocontrol.EOCustomObject.takeValueForKey(EOCustomObject.java:
1601)
at 
com.webobjects.foundation.NSKeyValueCoding$Utility.takeValueForKey(NSKeyValu
eCoding.java:519)
at 
com.webobjects.foundation.NSValidation$DefaultImplementation.validateTakeVal
ueForKeyPath(NSValidation.java:733)
at 
com.webobjects.eocontrol.EOCustomObject.validateTakeValueForKeyPath(EOCustom
Object.java:1363)
at 
com.webobjects.foundation.NSValidation$Utility.validateTakeValueForKeyPath(N
SValidation.java:551)
at 
com.webobjects.foundation.NSValidation$DefaultImplementation.validateTakeVal
ueForKeyPath(NSValidation.java:741)
at 
com.webobjects.appserver.WOComponent.validateTakeValueForKeyPath(WOComponent
.java:1273)
at 
com.webobjects.appserver._private.WOKeyValueAssociation.setValue(WOKeyValueA
ssociation.java:71)
at 
com.webobjects.appserver._private.WOTextField.takeValuesFromRequest(WOTextFi
eld.java:81)
at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromReque
st(WODynamicGroup.java:81)
at 
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODyn
amicGroup.java:89)
at 
com.webobjects.appserver._private.WORepetition.takeValuesFromRequest(WORepet
ition.java:124)
at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromReque
st(WODynamicGroup.java:81)
at 
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODyn
amicGroup.java:89)
at 
com.webobjects.appserver._private.WOForm.takeValuesFromRequest(WOForm.java:7
0)
at 
com.webobjects.appserver._private.WOComponentContent.takeValuesFromRequest(W
OComponentContent.java:20)
at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromReque
st(WODynamicGroup.java:81)
at 
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODyn
amicGroup.java:89)
at 
com.webobjects.appserver.WOComponent.takeValuesFromRequest(WOComponent.java:
914)
at 
com.webobjects.appserver._private.WOComponentReference.takeValuesFromRequest
(WOComponentReference.java:97)
at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromReque
st(WODynamicGroup.java:81)
at 
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODyn
amicGroup.java:89)
at 
com.webobjects.appserver.WOComponent.takeValuesFromRequest(WOComponent.java:
914)
at 
com.webobjects.appserver.WOSession.takeValuesFromRequest(WOSession.java:1139
)
at 
com.webobjects.appserver.WOApplication.takeValuesFromRequest(WOApplication.j
ava:1350)
...


--

I tried to follow "Practical WebObjects" but without success!

What am i missing?
It seems to me, that one or more additional methods are required, to convert
objects correctly for this purpose.

In comparison: i have the sample Boolean class of Practical WO, it works!

TIA

Wolfram



public class MyType {

private String value;

public MyType ( String v )
{
this.setValue ( v );
}

public void setValue ( String v )
{
value = v;
}

public String getValue ()
{
return value;
}

public static MyType valueOf ( String v )
{
return new MyType ( v );
}

public String toString ()
{
return value;
}

public Object clone () throws CloneNotSupportedException
{
return ( ( MyType ) super.clone () );
}

public boolean equals ( Object obj )
{
return ( ( ( MyType ) obj ).getValue ().equals ( this.getValue() )
);
}


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

This email sent to archive@mail-archive.com


Re: Overriding WODisplayGroup methods

2005-12-15 Thread Wolfram Stebel
Am 15.12.2005 21:19 Uhr schrieb "[EMAIL PROTECTED]" unter <[EMAIL PROTECTED]>:

> Hi Art,
> 
> Thanks.
> 
> I tried changing the .woo file from
> 
> class=MyDisplayGroup
> 
> to
> class=LocalizationCodePage.MyDisplayGroup
> 
> as you mentioned, and my page still would not load.
> 
> The error I received this time was
> 
> Error:  com.webobjects.foundation.NSForwardException
> [java.lang.IllegalArgumentException] Attempt to insert null object
> into an com.webobjects.foundation.NSMutableDictionary.
> Reason: Attempt to insert null object into an
> com.webobjects.foundation.NSMutableDictionary
> 
> So still no luck overriding some of the methods in the WODisplayGroup
> by extending my own class (MyDisplayGroup).
> 
> Any other suggestions?
Yeah,

Art's idea with
> class=LocalizationCodePage.MyDisplayGroup
is not bad, but i dont think that WO can resolve anonymous classes (it can
not deal with static methods, so that makes me cautious).

try it with a MyDisplayGroup in it's own class file.

then try again with: class=MyDisplayGroup

Let me hear if it helps!

regards

Wolfram


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

This email sent to archive@mail-archive.com


Re: WOConditional and WOCheckbox Display Problems

2005-12-13 Thread Wolfram Stebel
Am 13.12.2005 15:48 Uhr schrieb "[EMAIL PROTECTED]" unter
<[EMAIL PROTECTED]>:

> 
> Hi All -
> 
> I have a form that contains a wopopup that uses on change to submit the
> form.  The form is refreshed and depending on the value of the wopopoup,
> some wocheckboxes (wrapped in a woconditional) are displayed.
> 
> Example:
> If 'number' is selected in the wopopup, a Is Zero Filled? checkbox is
> displayed using the woconditional.
> 
> I have set the checkbox boolean to true in the objects constructor, but
> since the checkboxes are not displayed initially (a null value is initially
> displayed in the wopopup), the checkboxes remain unchecked when they are
> finally displayed.
> 
> When I move the checkboxes out of the woconditional (so that they are
> always displayed) the checkboxes are displayed correctly.
> 
> Has anyone experienced this before or have pointers towards a solution?
Are you sure, you have the checkboxes etc. inside the form?
Otherwise no data transfer will occur!

Wolfram


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

This email sent to archive@mail-archive.com


Re: Fun with Primitives

2005-12-12 Thread Wolfram Stebel
Am 13.12.2005 6:00 Uhr schrieb "Owen McKerrow" unter <[EMAIL PROTECTED]>:

> Hi All,
> 
> I have a method that loops over a NSMutableDictionary by keyword, and
> then uses that keyword as a key value path to set the value of an
> object for another page to the value stored in the dictionary.
> 
> For example we have the key value pair in the dictionary of
> "personName", "Bob".
> So I set the value in the next page with the following call
> 
> nextPage.takeValueForKeyPath(dictionary.objectForKey(keyName),keyName);
> 
> So in this case we set the valueForKeyPath "personName" on the next
> page to the value found in the dictionary which matches the same key,
> in this case that value would be Bob.
> 
> However this breaks down when I have to deal with primitives. A
> NSMutableDictionary won't take a primitive ( e.g. an int) as a
> possible object, so we cast it to an Integer. However when you then
> try and assign this to the int on the next page it of course doesn't
> work as the int can't be assigned to an Integer.
> 
> So we could check what class type we have for dictionary.objectForKey
> (keyName) and if its an Integer, use .intValue(), but that means ALL
> Integers would be cast back and this is not what we would want.
> 
> Taking that one step further you can check  if
> nextPage.valueForKeyPath(keyName).getClass().isInstance
> (Integer.TYPE), that is checking if you are about to set an int or
> not on the nextPage and if so cast the object to an Integer ( Integer
> value = (Integer) dictionary.objectForKey(keyName))  and then
> use .intValue() for the ones which pass this test However this also
> breaks as nextPage.takeValueForKeyPath() needs an Object not a
> primitive.
> 
> I know I could just write a method that takes an Integer and assign's
> it to the int :
> 
> setNumber (Integer newNum) {
> setNumber(newNum.intValue());
> }
> 
> But I was hoping to make the method generic enough that it could just
> do it, otherwise I would have to write this extra method every-time I
> wanted to use it ( which may be the only way to go ).
> 
> But before I headed down this path I thought I would ask and see if
> anyone has any ideas or suggestions ?

Hi Owen,

this is a part of code from a component, where i buffer some values of the
component in the session:

// return parameters for BAETable
// + personBatch.numberOfObjectsPerBatch
public int selectedPage;
public boolean initialSortAscending = true;
public String initialSortKey = "name";

public NSMutableDictionary getReturnParameters ()
{
NSMutableDictionary result = new NSMutableDictionary ();
result.takeValueForKey ( this.getNumberOfObjectsPerBatch (),
"numberOfObjectsPerBatch" );
result.takeValueForKey ( Boolean.valueOf ( initialSortAscending ),
"initialSortAscending" );
result.takeValueForKey ( initialSortKey, "initialSortKey" );
result.takeValueForKey ( new Integer ( selectedPage ),
"selectedPage" );
return result;
}

As you can see, the primitives are stored via the wrapper classes in a dict
too.

This is the method in session, that pops the values from a "stack" and sets
the values in any of my components.


public void popReturnParameters ( String theCalledPage, WOComponent
nextPage ) throws NSValidation.ValidationException
{
NSMutableDictionary result = ( NSMutableDictionary )
returnParameters.valueForKey ( theCalledPage );
if ( result == null )
{
// return parameters have not been pushed
// could log
return;
}
returnParameters.removeObjectForKey ( theCalledPage );
NSArray allKeys = result.allKeys ();
for ( int i = 0; i < allKeys.count (); i++ )
{
String key = ( String ) allKeys.objectAtIndex ( i );
nextPage.takeValueForKey ( result.objectForKey ( key ), key );
}
}

The values from the wrapper classes are restored perfectly into the
primitives.
I think, thats exactly what you described as not working, but it works
great!

Wolfram


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

This email sent to archive@mail-archive.com


Re: Storing tables in Application

2005-12-07 Thread Wolfram Stebel
Am 06.12.2005 22:48 Uhr schrieb "Jan Verrept" unter <[EMAIL PROTECTED]>:

> In the Quickstart manual the Session is used to manage tables that
> are more or less global to each session.
> I have a few table's in my dbase that are global to the application.
> They are used to populate WOPopupButtons and get changed maybe once
> each year.
> Would it  be possible to manage these tables in in the Application
> rather then in the Session.
Indeed, but keep in mind: every running instance will keep it's own lists.
On the other hand, if the tables do not depend on a users preferences (i.e.
language) keep them in the application, that's sufficient!

Oh: one thing more, fetch those tables via the same EOEditingContext as the
one you use for other entities you want to relate to this values! Otherwise
you will get error messages on saving.

Wolfram


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

This email sent to archive@mail-archive.com


Re: CSV problem

2005-12-01 Thread Wolfram Stebel
Am 02.12.2005 0:48 Uhr schrieb "[EMAIL PROTECTED]" unter <[EMAIL PROTECTED]>:

> My app generates CSV files from WORepetitions which open well via Excel
> on the Mac but in Windows Excel it shows the source instead of opening
> properly.
> 
> On each string I set the escape HTML to NO and used the following code:
> 
> public void appendToResponse (WOResponse aResponse, WOContext aContext)
> {
> super.appendToResponse(aResponse, aContext);
> 
> aResponse.setHeader ("application/csv", "content-type");
> aResponse.setHeader ("filename=excel_file.csv", "content-disposition");
> }
> 
> Has anyone had this problem and or does anyone have a suggested
> solution?
Try doing super.appendToResponse last!

{
aResponse.setHeader ("application/csv", "content-type");
aResponse.setHeader ("filename=excel_file.csv", "content-disposition");

super.appendToResponse(aResponse, aContext);
}

I think your code snippet can't work.

Wolfram


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

This email sent to archive@mail-archive.com


Re: WO and Javascript

2005-11-29 Thread Wolfram Stebel
>Am 29.11.2005 18:21 Uhr schrieb "Ute Hoffmann" unter
><[EMAIL PROTECTED]>:

Hello all,

for all of you not reading german too good:
Ute recommended to use JSConfirmPanel from Javascript Palette.
Best tip for a long time :-)
Enclosed you can find a component that i use on all places where i want to
have a confirmation on a submit.
The component has three bindings:
1. the action to invoke on confirm
2. the message to display for confirmation
3. a flag, if confirmation is necessary (i bind it usually to a flag of the
users settings (yes, please confirm all deletes))

For useage i embed a button inside the Component and bind the action of the
button to the components action.
Realy easy, you all will understand :-)
One pitfall: not all browser display the component absolutely perfect, some
might show an underline above or beside the button (as i use it) because it
is in fact a hyperlink.
So far i used it only for confirmation of deletes and probably the hyperlink
will not result in a full RR-loop, so it will not work for data updates, i
expect...

HTH

Wolfram

P.S. I don't need to do all this javascript stuff to transfer values myself,
so i still dont know how it realy works :--)))
P.P.S. Please apologize for beeing proud of such a simple hack

> Hallo Wolfram,
> Ich benutze für die Bestätigung, dass ein Datensatz gelöscht werden
> soll, JSConfirmPanel aus der WebObjects Javascript Palette.
> 
> Du kannst dort
> eine Action anbinden, was passieren soll, wenn Ja geklickt wird und
> eine Bestätigungsnachricht.
> 
> Ich habe das allerdings nie in einem Formular mit einem Submit-Button
> eingesetzt, sondern eher in Repetitions mit Datensätzen.
> 
> Wenn Du keine Formwerte übergeben musst, dann kannst Du ja anstelle des
> Submit-Buttons ein Bild verwenden. Dann geht es mit dem JSConfirmPanel
> (Name aus dem Gedächtnis, kann etwas anders heissen). Ansonsten kannst
> Du den Code dieser Komponente als Ausgangspunkt nehmen für eine eigene
> Komponente...
> 
> Wenn Du eine Action in einem Javascript aufrufen möchtest ist
> WOActionURL Dein Freund. Du definierst die Action, die Du möchtest im
> .wod und setzt die ActionURL an der Stelle in das Javascript, wo die
> URL gebraucht wird. Muss man, glaube ich, im Source machen,
> funktioniert aber gut.
> 
> Ich hoffe das hilft Dir weiter,
> 
> Viele Grüße
> 
> Ute
> 
> Am Dienstag, 29.11.05 um 16:42 Uhr schrieb Wolfram Stebel:
> 
>> Hi list,
>> 
>> after searching and testing a lot, i finaly have to ask:
>> 
>> I have normal WOComponents using submit buttons for saving data etc.
>> I want to validate via javascript that the user is sure to DELETE data.
>> For this i created a javascript funtion that is bound to a delete
>> buttons
>> "onclick".
>> So far OK. But now i need the value of the confirm ( "are you sure?" )
>> inside my WOComponent.
>> I tried several thousand permutations of bindings, code etc.
>> At the moment i have a variable "confirmed" in my component.
>> I bound it to a hidden WOTextField with ID "confirmed" and try to get
>> the
>> value with
>> 
>> aVar = this.document.Form1.getElementID("confirmed").value;
>> 
>> where Form1 is a binding "name" i attached to my WOForm.
>> It does not seem to execute this code correct, i do not reach another
>> alert
>> ("did it") after this code.
>> 
>> At last i wont to return the value with:
>> 
>> if ( check )
>> this.document.Form1.getElementById("confirmed").value = "true";
>> else
>> this.document.Form1.getElementById("confirmed").value =
>> "false";
>> 
>> which doesnt work either.
>> 
>> I expected the binding "confirmed" to be synchronized on the way back
>> to the
>> server.
>> 
>> Any straight receipes how to return values from javascripts into a
>> component?
>> 
>> One thing i found searching the web is, that Chuck has a chapter on
>> javascript in his next book. Should i wait for it? :-)



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

This email sent to archive@mail-archive.com

Re: WO and Javascript

2005-11-29 Thread Wolfram Stebel
Am 29.11.2005 17:58 Uhr schrieb "Joseph Leo Moreno" unter
<[EMAIL PROTECTED]>:

Thanks for your input.
Thats what i'm gonna do, well, trying to do...
Instead of "alert" i need a "confirm" for the decision.
depending on the return value on the client side i need either the
clientside decision to submit or not, or on the clientside any binding set
to the result of the confirm so that i can discontinue deleting data.
Sounds easy.. but i'm missing the details.

Wolfram

P.S. To submit or not to submit, thats the question... :-)
P.P.S. Well: i submit, therefore i am :-))
P.P.P.S. Cogito, ergo submittum

> Wolfram,
> 
> I realize that I'm probably oversimplifying your problem here. But,
> couldn't you just bind a JavaScript alert function to your Delete
> button (client side) and bind your Delete button to your delete
> action (sever side). When the user clicks on the Delete button, the
> JavaScript alert pops up. If the User clicks Yes, the server side
> Delete action is called. If the user clicks No then nothing happens -
> hence, the Delete action isn't called.
> 
> Would that solutions solve your problem?
> 
> - Joe
> 
> On Nov 29, 2005, at 07:42, Wolfram Stebel wrote:
> 
>> Hi list,
>> 
>> after searching and testing a lot, i finaly have to ask:
>> 
>> I have normal WOComponents using submit buttons for saving data etc.
>> I want to validate via javascript that the user is sure to DELETE
>> data.
>> For this i created a javascript funtion that is bound to a delete
>> buttons
>> "onclick".
>> So far OK. But now i need the value of the confirm ( "are you sure?" )
>> inside my WOComponent.
>> I tried several thousand permutations of bindings, code etc.
>> At the moment i have a variable "confirmed" in my component.
>> I bound it to a hidden WOTextField with ID "confirmed" and try to
>> get the
>> value with
>> 
>> aVar = this.document.Form1.getElementID("confirmed").value;
>> 
>> where Form1 is a binding "name" i attached to my WOForm.
>> It does not seem to execute this code correct, i do not reach
>> another alert
>> ("did it") after this code.
>> 
>> At last i wont to return the value with:
>> 
>> if ( check )
>> this.document.Form1.getElementById("confirmed").value =
>> "true";
>> else
>> this.document.Form1.getElementById("confirmed").value =
>> "false";
>> 
>> which doesnt work either.
>> 
>> I expected the binding "confirmed" to be synchronized on the way
>> back to the
>> server.
>> 
>> Any straight receipes how to return values from javascripts into a
>> component?
>> 
>> One thing i found searching the web is, that Chuck has a chapter on
>> javascript in his next book. Should i wait for it? :-)


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

This email sent to archive@mail-archive.com


WO and Javascript

2005-11-29 Thread Wolfram Stebel
Hi list,

after searching and testing a lot, i finaly have to ask:

I have normal WOComponents using submit buttons for saving data etc.
I want to validate via javascript that the user is sure to DELETE data.
For this i created a javascript funtion that is bound to a delete buttons
"onclick".
So far OK. But now i need the value of the confirm ( "are you sure?" )
inside my WOComponent.
I tried several thousand permutations of bindings, code etc.
At the moment i have a variable "confirmed" in my component.
I bound it to a hidden WOTextField with ID "confirmed" and try to get the
value with

aVar = this.document.Form1.getElementID("confirmed").value;

where Form1 is a binding "name" i attached to my WOForm.
It does not seem to execute this code correct, i do not reach another alert
("did it") after this code.

At last i wont to return the value with:

if ( check )
this.document.Form1.getElementById("confirmed").value = "true";
else
this.document.Form1.getElementById("confirmed").value = "false";

which doesnt work either.

I expected the binding "confirmed" to be synchronized on the way back to the
server.

Any straight receipes how to return values from javascripts into a
component?

One thing i found searching the web is, that Chuck has a chapter on
javascript in his next book. Should i wait for it? :-)


TIA

Wolfram


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

This email sent to archive@mail-archive.com


Re: NSProperties order of priority (app/framework/command line)?

2005-11-29 Thread Wolfram Stebel
Am 29.11.2005 1:59 Uhr schrieb "Alan Ward" unter <[EMAIL PROTECTED]>:

> 
> I thought it was 1, 4, 2, 3 (i.e. ~/WebObjects.properties has higher
> precedence than
> everything other than command line?
> 
> No?
> 
> Alan
> 
> On Nov 28, 2005, at 5:53 PM, Chuck Hill wrote:
> 
>> I have never used the last two.  They can be overridden in code.
>> Other than that, this is my understanding as well.
>> 
>> Chuck
>> 
>> 
>> On Nov 28, 2005, at 3:57 PM, Lachlan Deck wrote:
>> 
>> 
>>> Hi all,
>>> 
>>> My reading of the NSProperties API leads me to believe that the
>>> order of priority for preferences are as follows (but it's not
>>> explicitly stated)...
>>> 
>>> 1) Command line args
>>> 2) Application Properties file
>>> 3) Framework Properties file
>>> 4) ~/WebObjects.properties
>>> 
>>> i.e., I assume that the ones higher up the chain (e.g., command
>>> line args) take priority over the others and so on. Is that correct?
>>> 
>>> Thanks.
>>> 
>>> with regards,
>>> --
>>> 
>>> Lachlan Deck
I'm not sure about the above, but there is still a way to merge additional
properties into the already loaded properties via
NSProperties.setPropertiesFromArgv ( String args [] );
as i showed in my PropDemo WOApp, dowloadable from
http://www.bugs-and-errors.de/
This allows also updating of properties at runtime.

If this helps.. :-)

regards

Wolfram


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

This email sent to archive@mail-archive.com


Re: SubComponents and Submits

2005-11-29 Thread Wolfram Stebel
Am 29.11.2005 1:50 Uhr schrieb "Chuck Hill" unter
<[EMAIL PROTECTED]>:

> 
> On Nov 28, 2005, at 3:08 PM, Baiss Eric Magnusson wrote:
> 
>> I have been unable to get the action method of a WOSubmitButton
>> inside a SubComponent to get called.
>> 
>> All I can get calls to in a SubComponent so far is  and
>> .
>> 
> It sounds like something above it is responding to invokeAction.
> 
> 
>> I have a WOForm inside the SubComponent and  is true.
>> 
>> 
> Have you looked at the HTML?  Is the submit inside of ... form> tags?
> 
> So you have a page and in that page is a sub-component and in that
> sub-component is a WOForm and in that WOForm is a WOSubmit button?
> Does that describe it correctly?
> 
> Chuck

As far as i can recall, it is not good to have nested forms.
So check first if the component is nested in another component, where
another form wraps the sub-component.
As Guido mentioned in his mail, i think that in D2W there is a form around
generated html and when you knit something into it, you may have also the
problem with nested forms.

Let me hear if thats correct!

Wolfram


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

This email sent to archive@mail-archive.com


Re: XServer TIger

2005-11-25 Thread Wolfram Stebel
Am 25.11.2005 14:58 Uhr schrieb "Helge Staedtler" unter <[EMAIL PROTECTED]>:

> Try to have a closer look at /var/log /webobjects.log
> this one should have perhaps some more useful information.
> 
> perhaps it is just a problem with the user-rights. if you start it at the
> command line is it the same user as if it gets started by the server?
I listened to your mails and searched on my xserve on this directory.
There is no webobjects.log.
On my local development machine there is.

So: where is it on xserve tiger?

Wolfram


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

This email sent to archive@mail-archive.com


Re: WODisplayGroup advice needed

2005-11-24 Thread Wolfram Stebel
Am 24.11.2005 18:55 Uhr schrieb "David LeBer" unter <[EMAIL PROTECTED]>:

> 
> On 24-Nov-05, at 12:43 PM, Rick Innis wrote:
> 
>> 
>> On Nov 24, 2005, at 12:19, David LeBer wrote:
>> 
>>> Because you are using a WORepetion you really don't need to worry
>>> about he WODisplayGroup at all at this point. You should already
>>> have a reference to the Object you need.
>>> 
>>> Assuming the 'item' binding of your WORepetition is bound to
>>> 'recordItem'
>>> 
>>> Wrap a WOHyper link around some attribute in the WORepetition (ie:
>>> recordItem.recordNumber) and bind it's action binding to something
>>> like this:
>>> 
>>> public WOComponent editInFullForm() {
>>> FullForm nextPage = (FullForm)pageWithName("FullForm");
>>> nextPage.setRecord(recordItem);
>>> return nextPage;
>>> }
>> 
>> 
>> That's something I expected would work, but the item binding was
>> null when the action method is called.
>> 
>> That apparently was happening because I was refetching the objects
>> in awake() to ensure that the group was properly redisplayed when
>> the user came back it after reviewing the form, because when I take
>> that code out of awake this approach works. Thanks.
>> 
>> And I guess I now need to know how to properly refresh a display
>> group :-)
> 
> I usually just use WODisplayGroups for batching and sorting.
> 
> I fetch my own objects and set them manually
> (displayGroup.setObjectArray(myArrayOfObjects)).
>
Do something like this:

 
public void appendToResponse ( WOResponse aResponse, WOContext aContext
)
{
personBatch.queryBindings().takeValueForKey ( myBinding,
"myAttribute" );
personBatch.qualifyDataSource ();
super.appendToResponse ( aResponse, aContext );
}

The WODisplayGroup should have a FetchSpec correctly set.

HTH   

Wolfram


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

This email sent to archive@mail-archive.com


CORRECTION: Re: More newbie questions

2005-11-16 Thread Wolfram Stebel
Am 15.11.2005 23:46 Uhr schrieb "Randy Becker" unter <[EMAIL PROTECTED]>:

You already received valuable information on the other topics.

> And finally, how can I do something like the WOExamples
> WXCheckBoxList - I tried importing some of the frameworks in the
> examples project, but couldn't get it to work - what I want to do is
> present a list of checkboxes with a single submit button that will
> perform an action on all of the objects represented by the selected
> boxes.
You probably get a NSArray as the result (i.e. selectedObjects of a ***NOT
WORepetition*** *WODisplayGroup instead*!) of a multiple select.
You should be able to perform an action with
NSArray.makeObjectsPerformSelector on each object, or i.e. drop all of them
from the current EC. What else would you need?

HTH

Wolfram


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

This email sent to archive@mail-archive.com


Re: More newbie questions

2005-11-16 Thread Wolfram Stebel
Am 15.11.2005 23:46 Uhr schrieb "Randy Becker" unter <[EMAIL PROTECTED]>:

You already received valuable information on the other topics.

> And finally, how can I do something like the WOExamples
> WXCheckBoxList - I tried importing some of the frameworks in the
> examples project, but couldn't get it to work - what I want to do is
> present a list of checkboxes with a single submit button that will
> perform an action on all of the objects represented by the selected
> boxes.
You probably get a NSArray as the result (selectedObjects of a
WORepetition!) of a multiple select.
You should be able to perform an action with
NSArray.makeObjectsPerformSelector on each object, or i.e. drop all of them
from the current EC. What else would you need?

HTH

Wolfram


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

This email sent to archive@mail-archive.com


Correction to: using relations in repetitions

2005-11-10 Thread Wolfram Stebel
Correction to problem description:

Hi all of you,

i stepped into a problem more than once:

I have a relation (  WRONG*** one-to-many ) many-to-many (maintained
manually, not a join table) from A to B, called "Bs".
I have an A in a component already shown.
When i assign the relation "Bs" to the list property of a repetition, it
does not automatically feetch the values. Instead i have to do an A.Bs
().count () or something else to get the data loaded.
The repetition otherwise does not iterate over the Bs!

This should be working nice and easy, i expect, so please someone tell me
how to do it properly!

TIA

Wolfram


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

This email sent to archive@mail-archive.com


using relations in repetitions

2005-11-10 Thread Wolfram Stebel
Hi all of you,

i stepped into a problem more than once:

I have a relation one-to-many from A to B, called Bs.
I have an A in a component already shown.
When i assign Bs to the list property of a repetition, it does not
automatically feetch the values. Instead i have to do an A.Bs ().count () or
something else to get the data loaded.
The repetition otherwise does not iterate over the Bs!

This should be working nice and easy, i expect, so please someone tell me
how to do it properly!

TIA

Wolfram


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

This email sent to archive@mail-archive.com


Re: Configuring ERChangeNotification/JMS Help needed

2005-10-27 Thread Wolfram Stebel
Hi Chuck and all other responders,


Am 26.10.2005 17:06 Uhr schrieb "Chuck Hill" unter
<[EMAIL PROTECTED]>:

> 
> On Oct 26, 2005, at 5:13 AM, Wolfram Stebel wrote:
...
As a result of all mails, i removed JMS and ERChangeNotification very fast
from my project.

>> But thats a minor reason!
> 
> See David's comment, "If you ever use a lot of instances it will slow
> down everything".  This might not be the best way to get you where
> you want to go.

JMS was announced to be fast...

>> 2. I have 3 Applications working on the same database, i.e. they might
>> change the same data entries concurrently.
> 
> So deal with it.  This framework will _not_ eliminate the need to
> handle concurrent editing issues.  It will just _reduce_ the
> frequency of occurrence.  ChangeNotification framework or not, you
> still have to code for these.

I have one critical point in the moment, which i reprogrammed now. I thougt
of a general and final solution, but it seems to be a little, h,
optimistic (locking)...

> 
...
>> locations. When those change, the customer needs direct feedback of
>> the
>> change.
> 
> What does direct feedback mean?  They need a message to popup?  An e-
> mail?  Or just that they need to see fresh data.
Data should be updated in the second application, so that a refresh in the
browser will reflect the change...
For now i have to re-login, thats semi-optimal.

>> 3. I asked on this list how to handle this issue, and i was told to
>> do what
>> i'm now implementing.
>> 
>> So, what other tips do you have?
>> 
> 
> 1. Implement code to handle optimistic locking failures
So, why turn optimistic locking into pessimistic?

> 2. Determine the data freshness requirements and implement refreshing
> fetches and new EC creation to meet those needs.
Normaly i (re)fetch depending on current application state, but some basic
data like a logged in client and person...

Thanks to all of you.

Wolfram


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

This email sent to archive@mail-archive.com


Re: Configuring ERChangeNotification/JMS Help needed

2005-10-26 Thread Wolfram Stebel
Am 26.10.2005 14:03 Uhr schrieb "Jean-François Veillette" unter
<[EMAIL PROTECTED]>:

> I think the problem is with the configuration file.
Yes
> Somewhere under the ERChangeNotification directory, you should see a
> sample configuration file that you should use (at least as a starting
> point).
They are in the text below, only a little changed, to match my setup
> One important point is the topic name as it has to match the topic used
> by the app (as defined in the er framework).
> There is a default property defined in the Properties file of the
> framework, make sure it match whatever the openjms server is defined to
> serve.
As you will see, there are "MyTopic" entries below, where i dont know if
they are correct.

> You can customize both (server config to serve more than one topic, and
> each app so that not all woapp talk to each other).  For example, we
Thats why i chose my own topic
> have a training system (3 apps, training bd) with a staging system (3
> apps, staging bd), both on the same server, but we do not want those
> apps to share notifications, so each have his own 'topic', as defined
> as a property at the application level.
Right, thats what i thought it would do.

But what about:



See below, search for  and you will meet the problem-points!

As one more problem, there are failures in the demo files. See below under
"startjms.sh".

Thanks for your help

Wolfram


>> Hi list,
>> 
>> i have three apps i want to talk between using ERChangeNotification
>> via jms.
>> i already got jms installed (0.7.6.1 on OSX 10.4.2) and linked the
>> framework
>> into my apps.
>> i have a startupitem and can do the administrative start/stop via "sudo
>> SystemStarter start OpenJMS" etc. without any error messages in
>> console.
>> The service seems to run after machine restart too, so i expect
>> everything
>> is well at first glance!
>> 
>> Now i just wonder how to configure jms :-)
>> i tried googling but found no essentials on it.
>> 
>> My setup is:
>> 
>> 1.
>> 
>> In "Properties" file of all applications i have (as recommended):
>> 
>> er.changenotification.entitiesNotToSynchronize = ()
>> er.changenotification.changeTypesToTrack = (inserted, updated, deleted)
>> er.changenotification.jms.topicName = MyTopic
>> er.changenotification.jms.durableSubscribers = false
>> 
>> 
>> 2.
>> 
>> In openjms.xml i have:
>> 
>> 
>>   
>>   
>> 
>>   
>> 
>> 
>>   
>> 
>>   
>>   
>>   
>> 
>>   
>>   
>> 
>>  in the following line there was "startjms.sh" wich does not exist
>> and i
>> replaced it by "startup.sh"
>> 
>>   
>> 
>>  and i wonder if the following block is correct or required anyway
>>   
>> 
>>   
>>   
>>   
>> 
>> 
>> 
>> 
>>   
>> 
>>  and i wonder if i can delete the following block or does someone
>> need a
>> user?
>> 
>>   
>> 
>>   
>> 
>> 
>> 
>> 3.
>> 
>> In "rmi_jms_jdbm.xml" i have:
>> 
>> 
>>   
>>   
>> 
>>   
>> 
>> 
>>   
>> 
>>   
>>   
>>   
>> 
>>   
>>   
>>   > 
>>  in the following line there was "startjms.sh" wich does not exist
>> and i
>> replaced it by "startup.sh"
>> 
>> script="${openjms.home}/bin/startup.sh"
>> config="${openjms.home}/config/rmi_jms_jdbm.xml" />
>>   
>> 
>>  and i wonder if the following block is correct
>>   
>> 
>>   
>> 


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

This email sent to archive@mail-archive.com


Re: Configuring ERChangeNotification/JMS Help needed

2005-10-26 Thread Wolfram Stebel
Am 26.10.2005 12:11 Uhr schrieb "David Teran" unter
<[EMAIL PROTECTED]>:

Hi David,

Thanks for your hints.
1. The reason why i do this is, that i hopefully will have a site with high
traffic in the future, where i will need load balancing.
But thats a minor reason!
2. I have 3 Applications working on the same database, i.e. they might
change the same data entries concurrently.
One of the applications is an administrators app, two others are customers
applications. The admin might change some values, that are very important
for the customers, i.e. client aliases, which are also used for directory
locations. When those change, the customer needs direct feedback of the
change.
3. I asked on this list how to handle this issue, and i was told to do what
i'm now implementing.

So, what other tips do you have?

TIA

Wolfram

> Just a simple question:
> 
> why do you want to use this framework? Is it really important for
> you? It cannot handle a lot of load, others mentioned to have strange
> deadlocks when using it and the best approach is:
> 
> build your application in a way it does not need change notification
> as its error prone (imho). If you ever use a lot of instances it will
> slow down everything. If you ever have other applications which use
> the database (non WO apps) it will break your WO apps. If you ever
> use more than on EOF stack it will lead to unexpected results as
> change notification framework is only for one EOF stack.
> 
> maybe there is another solution than using this framework. Explain a
> little bit why you want to use it, whats the problem with your
> current app?
> 
> regards, David
> 
> 
> Am 26.10.2005 um 11:49 schrieb Wolfram Stebel:
> 
>> Hi list,
>> 
>> i have three apps i want to talk between using ERChangeNotification
>> via jms.
>> i already got jms installed (0.7.6.1 on OSX 10.4.2) and linked the
>> framework
>> into my apps.
>> i have a startupitem and can do the administrative start/stop via
>> "sudo
>> SystemStarter start OpenJMS" etc. without any error messages in
>> console.
>> The service seems to run after machine restart too, so i expect
>> everything
>> is well at first glance!
>> 
>> Now i just wonder how to configure jms :-)
>> i tried googling but found no essentials on it.
>> 
>> My setup is:
>> 
>> 1.
>> 
>> In "Properties" file of all applications i have (as recommended):
>> 
>> er.changenotification.entitiesNotToSynchronize = ()
>> er.changenotification.changeTypesToTrack = (inserted, updated,
>> deleted)
>> er.changenotification.jms.topicName = MyTopic
>> er.changenotification.jms.durableSubscribers = false
>> 
>> 
>> 2.
>> 
>> In openjms.xml i have:
>> 
>> 
>>   
>>   
>> 
>>   
>> 
>> 
>>   
>> 
>>   
>>   
>>   
>> 
>>   
>>   
>> 
>>  in the following line there was "startjms.sh" wich does not
>> exist and i
>> replaced it by "startup.sh"
>> 
>>   
>> 
>>  and i wonder if the following block is correct or required anyway
>>   
>> 
>>   
>>   
>>   
>> 
>> 
>> 
>> 
>>   
>> 
>>  and i wonder if i can delete the following block or does
>> someone need a
>> user?
>> 
>>   
>> 
>>   
>> 
>> 
>> 
>> 3.
>> 
>> In "rmi_jms_jdbm.xml" i have:
>> 
>> 
>>   
>>   
>> 
>>   
>> 
>> 
>>   
>> 
>>   
>>   
>>   
>> 
>>   
>>   
>>   > 
>>  in the following line there was "startjms.sh" wich does not
>> exist and i
>> replaced it by "startup.sh"
>> 
>> script="${openjms.home}/bin/startup.sh"
>> config="${openjms.home}/config/rmi_jms_jdbm.xml" />
>>   
>> 
>>  and i wonder if the following block is correct
>>   
>> 
>>   
>> 
>> 
>> 
>> 
>> I hope, you gurus can help me :-)
>> 
>> TIA
>> 


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

This email sent to archive@mail-archive.com


Configuring ERChangeNotification/JMS Help needed

2005-10-26 Thread Wolfram Stebel
Hi list,

i have three apps i want to talk between using ERChangeNotification via jms.
i already got jms installed (0.7.6.1 on OSX 10.4.2) and linked the framework
into my apps.
i have a startupitem and can do the administrative start/stop via "sudo
SystemStarter start OpenJMS" etc. without any error messages in console.
The service seems to run after machine restart too, so i expect everything
is well at first glance!

Now i just wonder how to configure jms :-)
i tried googling but found no essentials on it.

My setup is:

1. 

In "Properties" file of all applications i have (as recommended):

er.changenotification.entitiesNotToSynchronize = ()
er.changenotification.changeTypesToTrack = (inserted, updated, deleted)
er.changenotification.jms.topicName = MyTopic
er.changenotification.jms.durableSubscribers = false


2.

In openjms.xml i have:


  
  

  


  

  
  
  

  
  

 in the following line there was "startjms.sh" wich does not exist and i
replaced it by "startup.sh"

  

 and i wonder if the following block is correct or required anyway
  

  
  
  




  

 and i wonder if i can delete the following block or does someone need a
user?

  

  



3.

In "rmi_jms_jdbm.xml" i have:


  
  

  


  

  
  
  

  
  
  
  

 and i wonder if the following block is correct
  

  




I hope, you gurus can help me :-)

TIA

Wolfram


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

This email sent to archive@mail-archive.com


Re: where to download ERChangeNotificationJMS

2005-10-25 Thread Wolfram Stebel
Am 25.10.2005 13:08 Uhr schrieb "Ralph Scheuer" unter
<[EMAIL PROTECTED]>:

> Hallo,
> 
> sorry, aber ich habe gerade testweise die Sourcen runtergeladen und
> das Framework IST drin, nämlich im Ordner WONDER / Common /
> Frameworks...
> 
> Link:
> 
> http://prdownloads.sourceforge.net/wonder/Wonder-src-2.0.zip?download
> 
> Mirror: Düsseldorf
> 
> HTH
> 
> Ralph
Whatever i downloaded before, it did not contain the source.
Thanks to your link, i have them now!

Wolfram
Dipl. Inform. Wolfram Stebel, bugs&errors
Flutgrabenstr. 19, 35576 Wetzlar
Tel. 06441/47633
Mailto:[EMAIL PROTECTED]
Web: www.bugs-and-errors.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: where to download ERChangeNotificationJMS

2005-10-25 Thread Wolfram Stebel
Am 25.10.2005 12:16 Uhr schrieb "Ralph Scheuer" unter
<[EMAIL PROTECTED]>:

> Hi,
> 
> Am 25.10.2005 um 11:39 schrieb Wolfram Stebel:
> 
>> try to find and download ERChangeNotificationJMS, no luck yet.
>> Can't get it from sourceforge because it is not declared as a
>> module...
>> 
>> Any tips how and where to download?
> 
> Isn't that ER* stuff part of WONDER? Maybe you should look there...
> 
> Ralph
Yes i did! But the source is not included in Wonder-2 downlad and i cant
find it at sourceforge anywhere...

Wolfram


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

This email sent to archive@mail-archive.com


where to download ERChangeNotificationJMS

2005-10-25 Thread Wolfram Stebel
Hi list,

try to find and download ERChangeNotificationJMS, no luck yet.
Can't get it from sourceforge because it is not declared as a module...

Any tips how and where to download?

Wolfram


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

This email sent to archive@mail-archive.com


Re: Data inconsistency between WOApps

2005-10-17 Thread Wolfram Stebel
Am 17.10.2005 13:10 Uhr schrieb "Ken Anderson" unter <[EMAIL PROTECTED]>:

Thanks to both of you!!!
Is this necessary between instances of the same application too?
Do they share the object store?
Wolfram

> There is another option - use one of the available tools that
> notifies other instances of changed data.  I've used the one from
> Wirehose (http://www.wirehose.com/download) - but I believe there's
> one in Project Wonder also.
> 
> Ken
> 
> On Oct 17, 2005, at 6:08 AM, Gennady Kushnir wrote:
> 
>> Hi, Wolfram
>> WebObjects apps cache data when first fetched from database. There
>> are several ways for data cache to be updated.
>> 1) restart application as you already mentioned.
>> 2) perform objects refresh on editingContext used in your user
>> application. I do it with this:
>> EOSharedEditingContext.defaultSharedEditingContext
>> ().rootObjectStore().invalidateAllObjects();
>> 3) refresh objects in user application every time they are fetched.
>> It means fetchSpecification used to present data should be set to
>> refresh objects. If this fetchSpecification is defined in model -
>> you should set this option. If you define this programmatically:
>> fetchSpec.setRefreshesRefetchedObjects(true);
>> 
>> Regards,
>> Gennady
>> On 17.10.2005, at 13:09, Wolfram Stebel wrote:
>> 
>>> Hi List,
>>> 
>>> i have two WOApps running on the same server.
>>> They access the same data base. One is the user application, the
>>> other is a
>>> admin application.


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

This email sent to archive@mail-archive.com


Data inconsistency between WOApps

2005-10-17 Thread Wolfram Stebel
Hi List,

i have two WOApps running on the same server.
They access the same data base. One is the user application, the other is a
admin application.
When i change essential data in the admin application and do a saveChanges()
on this data, it is not updated in the user application and the userapp
tries to access data under the old value (a directory name).

I restarted the user application, and everything is fine, but i can't
restart the user application after each change of a dataset :-)


What is the reason:
- a time gap?
- do i need a refresh of the data in the user app?
- any other (which) reason?

TIA

Wolfram


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

This email sent to archive@mail-archive.com


url issue on deployed WOApp

2005-10-16 Thread Wolfram Stebel
Hi list,

i have one WOApp running under, lets say "http://www.a.de/";, which i drive
on my xserve with a setup of the site:
domain name = "www.a.de"
ip="my.very.own.ip"
port=80
w/o any special settings like aliases etc..

When i use the App it changes to something like
"http://my.very.own.ip/cgi-bin/WebObjects/myFantasticApp...";
Thats, i think, because of the "index.html", where i have a redirect to:
http://my.very.own.ip/cgi-bin/WebObjects/myFantasticApp";>


I created a redirection at a providers place, lets say the url is
"http://www.b.de/";, that redirects to "http://www.a.de/";.
When i use the App starting it via the redirect url, it keeps always the
"www.b.de" in the url of the browser, and i cant understand why.

I would like to have my "www.a.de" behave the same, so someone of you might
enlight me, what the difference is between the handling of those two urls by
the webserver.
Probably it has to do something with rewrite rules or something similar...

Thanks for any tip, except "read the apache doc", i tried reading apache
docs more than once, but fell asleep soon :-)

sincerely your's,
poor lonesome developer

Wolfram


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

This email sent to archive@mail-archive.com