[OT] WebObjects Job near Sydney Australia

2009-02-22 Thread Owen McKerrow

Hi All,

We're looking for a WebObjects developer to join us down here in  
beautiful Wollongong Australia.


Check out the following site for details and make sure you download  
the position description.


http://employment.uow.edu.au/cgi-bin/job_details.cgi?id=23292

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces
___
Do not 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 arch...@mail-archive.com


Re: displayGroup questions

2009-01-28 Thread Owen McKerrow



On 29/01/2009, at 2:50 PM, Theodore Petrosky wrote:

I am using some of the ajax examples as a starting template for a  
project. I have used the DependentListsExample. My 'list' is an  
array from a postgresql db and it is working almost perfectly. I  
have not been able to figure out how to get the table to update  
after I insert a new row in the database.


I am examining the different examples and the answer eludes me. How  
can I get the displayGroup to refresh the screen after an insert?

dg.refresh would be nice but doesn't exist...

Ted


Hi Ted,

Couple of ways depending on how you are inserting the row into the  
database. Check the doco on each of these methods and see which one  
suits you best :


displayGroup.updateDisplayedObjects();
displayGroup.qualifyDataSource();
displayGroup.qualifyDisplayGroup();


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"
___
Do not 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 arch...@mail-archive.com


Re: captcha ???

2008-12-03 Thread Owen McKerrow



On 04/12/2008, at 8:03 AM, Mike Schrag wrote:

I like it ... Just committed ERXSimpleSpamCheck.  Implements this  
wrapped in a display: none span so the user doesn't see it.  Just  
drop it in your form and it will generate a validation failure when  
the values don't match.


ms


Well Im glad my lack of google-foo yesterday morning resulted in  
something more useful than another email cluttering up peoples inbox's.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,

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

This email sent to [EMAIL PROTECTED]


Re: captcha ???

2008-12-02 Thread Owen McKerrow

Hi Guys,

Ummm yeah. So I forgot to look in wonder. Sorry. I did do a java  
captcha search under google shoudl have stuck Webobjects in there as  
well.


Sorry all.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


On 03/12/2008, at 11:11 AM, Chuck Hill wrote:



On Dec 2, 2008, at 4:04 PM, Owen McKerrow wrote:


Hi All,

Does anyone have a suggestion regarding a free captcha generator,  
that works well with WO ? We wouldn't complain at all if there was  
some code you could throw our way in regards to implementing it  
to. In fact we woudl be most grateful.


Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au



http://www.google.com/search?client=safari&rls=en-us&q=webobjects 
+captcha+wonder&ie=UTF-8&oe=UTF-8


The first one?


Chuck


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects








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

This email sent to [EMAIL PROTECTED]


captcha ???

2008-12-02 Thread Owen McKerrow

Hi All,

Does anyone have a suggestion regarding a free captcha generator,  
that works well with WO ? We wouldn't complain at all if there was  
some code you could throw our way in regards to implementing it to.  
In fact we woudl be most grateful.


Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


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

This email sent to [EMAIL PROTECTED]


Re: [OT] Thanks for the memories …

2008-10-12 Thread Owen McKerrow

Hi Art,

As a long time list member I can't thank you enough for the support  
and help you have provided on over the years. And Im sure that  
thought would be echoed by many who have benefited from your insights.


So Thanks for everything, and I hope you find retirement as enjoyable  
as I hear it is : )


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 12/10/2008, at 6:42 AM, Art Isbell wrote:

	It is with some excitement, both of the positive and negative  
sorts, that I am ending my 18-year career as a software developer.   
I attended NeXT Developer Camp in May, 1990.  However, I was unable  
to find work using this incredible technology until late 1991 when  
I quit my Unix programming job to take a 6-week contract  
programming job with NeXT working at Informix to port WINGZ to  
NeXTSTEP 2.0 (or was that NeXTstep 2.0? :-).  From there, I spent 5  
or so years developing and maintaining a large NeXTSTEP/OPENSTEP  
desktop application that, in its inception, used beta versions of  
DBKit, then moved on to ever-increasing versions of EOF.  With NeXT  
apparently heading toward oblivion, I decided that I had better  
move to their only technology that might have a future, WebObjects,  
if I wanted software development to remain fun.


	Fortunately, NeXT saved Apple (or was it the other way  
around? :-)  As a result, WebObjects has had more lives than a  
cat.  I have stuck with it through thick and thin, eventually  
crossing over to the mother ship in 2001 where I continued with  
WebObjects development internally while providing WebObjects  
support for organizations under contract.


	I have been extremely fortunate to have been able to develop  
applications using NeXT's and now Apple's technologies.  I have not  
had to deal with the drudgery that most developers face using other  
technologies.  I'm sure that most of you understand.


	But the time has now come to move on to the next phase of my life:  
retirement!  I have been living in Honolulu since 1997, finally  
being able to return after 2 wonderful years in the early 1970's.   
But life in Honolulu and the U.S. in general has deteriorated  
considerably during my lifetime (and especially during the past few  
weeks :-( so I have decided to give Sweden a try.  My Swedish-born  
wife and I moved to Uppsala on 22 September and are starting our  
lives anew.  But this time without WebObjects … and without  
software development of any kind.  Time to learn Svenska.


	So I am signing off webobjects-dev and webobjects-deploy.  It has  
been a genuine pleasure to associate virtually with so many truly  
talented and generous people.  Few outside this community can  
really appreciate the experience.


Lycka till!

Aloha and hej då,
Art Isbell

 ___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Do DA's add a page to the app's cache ?

2008-09-04 Thread Owen McKerrow

Hi Chuck,

On 05/09/2008, at 10:39 AM, Chuck Hill wrote:


protected void savePageInPageCache(WOComponent aPage)
{
if (aPage.context().request().requestHandlerKey().equals("wa") {
   super.savePageInPageCache(aPage);
}
}



I can see a savePage(WOComponent aPage) and a savePageInPermanentCache 
(WOComponent aPageComponent) in session, but no savePageInPageCache 
(WOComponent aPage). Im assuming you mean savePageInPermanentCache ?


If so how does it work ? That is from the doco "The permanent page  
cache is designed to hold components which are frequently accessed."  
is there only one "copy" of the component within the cache no matter  
how many times its called ? Otherwise I would have thought you would  
have run into the same problem i.e. the other part of doco says  
"Objects can fall out of the permanent page cache if the permanent  
page cache's size is exceeded."


Or is it just a matter of the DA's being cached in the permantCache  
while the other pages are going into the normal cache so they  
frequent AJAX calls to the DA don't effect the cache's of the rest of  
the pages ?


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

This email sent to [EMAIL PROTECTED]


Do DA's add a page to the app's cache ?

2008-09-04 Thread Owen McKerrow

Hi All,

We have an app that has some small hand made AJAX on it  (not the  
cool stuff from project wonder) and we're having an issue with page  
cacheing on the Applications side.


I had set the AJAX action up as a call to a DA which I had though did  
not add to/effect the sessions page cache. So either that assumption  
is wrong or I haven't made a clean break between the DA and the  
session after all.


Anyways heres the error we're getting...

"The application backtracking limit of 30 has been exceeded."

Any suggestions ? Is turning off caching an option ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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

This email sent to [EMAIL PROTECTED]


Strange SQL Statement generated....

2008-09-03 Thread Owen McKerrow

Hi All,

Updating an old application and have come across a very weird  
situation. Code which was working fine 2 days ago now produces an  
error. So I made the simplest test case I could and yet I still get  
the error.


GeneralInfo gi = (GeneralInfo) 
EOUtilities.objectWithFetchSpecificationAndBindings(ec,  
"GeneralInfo", "find", new NSDictionary());

gi.setUpdaterRunning(new Integer(3));
ec.saveChanges();

which produces the following SQL and error message


 11:58:39,855 DEBUG [Thread-1] (Log.NSLogDebug:1546 appendln) -   
evaluateExpression: $OracleExpression: "SELECT t0.client_id, t0.common_rules,  
t0.general_info, t0.menu_Message, t0.updater_running FROM  
GENERAL_INFO t0 WHERE t0.client_id = ?" withBindings: 1:2(client_id)>
 11:58:39,863 DEBUG [Thread-1] (Log.NSLogDebug:1546 appendln) - 1 row 
(s) processed
 11:58:39,864 DEBUG [Thread-1] (Log.NSLogDebug:1546 appendln) -  ===  
Commit Internal Transaction


 11:58:39,881 DEBUG [Thread-1] (Log.NSLogDebug:1546 appendln) -  ===  
Begin Internal Transaction
 11:58:39,881 DEBUG [Thread-1] (Log.NSLogDebug:1546 appendln) -   
evaluateExpression: $OracleExpression: "SELECT t0.client_id, t0.common_rules,  
t0.general_info, t0.menu_Message, t0.updater_running FROM  
GENERAL_INFO t0 WHERE t0.client_id = ? FOR UPDATE" withBindings: 1:2 
(client_id)>
 11:58:39,893 DEBUG [Thread-1] (Log.NSLogDebug:1546 appendln) - 1 row 
(s) processed
 11:58:39,898 DEBUG [Thread-1] (Log.NSLogDebug:1546 appendln) -  ===  
Rollback Internal Transaction
 11:58:39,898 DEBUG [Thread-1] (Main:187  doUpdate) -  
updateStatementForRow: qualifier may not be null
 11:58:39,934   OFF [Thread-1] (Log.NSLogErr:1546 appendln) -  
EXCEPTION:

updateStatementForRow: qualifier may not be null

DATE/TIME:
2008-09-04 01:58:39 Etc/GMT

null

STACK TRACE:
at _exceptionWithDatabaseContextInformationAdded 
(EODatabaseContext.java:4685)

at performChanges(EODatabaseContext.java:6393)
at saveChangesInEditingContext(EOObjectStoreCoordinator.java:415)
at saveChanges(EOEditingContext.java:3226)
at doUpdate(SyncUtil.java:114)
at run(SyncUtil.java:81)

I don't understand why it wants to fetch the GeneralInfo object from  
the database again?  And I don't think I have ever seen SQL "FOR  
UPDATE" which is tacked onto the end of the second select statement.


Can anyone suggest what may be going on and why ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


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

This email sent to [EMAIL PROTECTED]


Re: Issues Deploying from WOLips

2008-08-28 Thread Owen McKerrow

Hi Chuck,

Just in relation to embedding the frameworks. I followed the  
instructions on the wikki, setting




but the frameworks still aren't copied across. Any suggestions ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 29/08/2008, at 2:17 PM, Chuck Hill wrote:



On Aug 28, 2008, at 9:06 PM, Owen McKerrow wrote:


Hi All,

Converting an xCode project over to WOLips. We made a new  
WOApplication project, copied acrosss all the Java files and  
components etc etc and its all working great. Until we get to  
deployment.


To make my deployment build I right clicked on the projects name,  
and then selected "Install" from the WOLips Ant Tools option,  
which made me a nice .woa file  in /Library/WebObjects/ 
Applications ( by the way is there any easy way to get this build  
to include copies of the frameworks it needs inside itself ? )


Documented and everything:
http://wiki.objectstyle.org/confluence/display/WOL/Embedding 
+WOFrameworks




Anyways so far so good. I've copied the .woa up to the server  
where Im running it against a DEV database, most of the site works  
fine however when I to some pages I get these sorts of errors  
( note the prod version built from xCode is still on the same  
machine and its not having any issues )



12:52:21,297	 
:  
Exception occurred while handling request:
com.webobjects.foundation.NSForwardException  
[java.lang.ClassNotFoundException] Cannot find class or component  
named JSConfirmPanel in runtime or in a loadable bundle:  
parsing template for Component : 'file:/Library/WebObjects/ 
Applications/Dev/EePortfolio.woa/Contents/Resources/ 
ExistingReports.wo/':
java.lang.ClassNotFoundException: Cannot find class or component  
named JSConfirmPanel in runtime or in a loadable bundle


Closely followed by

12:52:21,299	 Throwable occurred:  
java.lang.NoClassDefFoundError: com/webobjects/woextensions/ 
WOExceptionParser
12:52:21,299	 Workerthread  
exiting due to error, respawning with ID 10005...
Exception in thread "WorkerThread5"  
com.webobjects.foundation.NSForwardException for  
java.lang.NoClassDefFoundError: com/webobjects/woextensions/ 
WOExceptionParser
	at  
edu.uow.emlab.eportfolio.ExceptionHelper.retrieveExceptionInformation 
(ExceptionHelper.java:128)
	at edu.uow.emlab.eportfolio.ExceptionHelper.emailException 
(ExceptionHelper.java:94)
	at edu.uow.emlab.eportfolio.Application.emailException 
(Application.java:575)
	at edu.uow.emlab.eportfolio.Application.handleException 
(Application.java:508)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._handleRe 
quest(WOComponentRequestHandler.java:379)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler.handleReq 
uest(WOComponentRequestHandler.java:435)
	at com.webobjects.appserver.WOApplication.dispatchRequest 
(WOApplication.java:1306)
	at edu.uow.emlab.eportfolio.Application.dispatchRequest 
(Application.java:469)
	at com.webobjects.appserver._private.WOWorkerThread.runOnce 
(WOWorkerThread.java:173)
	at com.webobjects.appserver._private.WOWorkerThread.run 
(WOWorkerThread.java:254)

at java.lang.Thread.run(Thread.java:613)


So what have I done wrong ? Any ideas as to why it can't find  
JSConfirmPanel and WOExceptionParser ? As I said the prod version  
is running just fine. Going to these same pages when its running  
from Eclipse on my machine also works fine.



Might be worth doing an opendiff on the .woa directories.

It sounds like you don't have JavaWOExtensions.framework on the  
classpath.  I don't know what you did in Eclipse to make that be  
the case when it still runs.  Make sure this is in the WebObjects  
Libraries under the project's build path.  Take a look in App.woa/ 
Contents/MacOS/MacOSClassPath.txt to see if it is missing or  
present with the wrong path.



Chuck

--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects








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

This email sent to [EMAIL PROTECTED]


Re: Issues Deploying from WOLips

2008-08-28 Thread Owen McKerrow

Thanks Chuck.

That was it. I some how had a copy of JavaWOExtensions.framework in / 
Library/Frameworks so my local copy of Eclipse was using that. When I  
made the deploy build, it had JavaWOExtensions.framework belonging to  
LOCALROOT instead of WOROOT.



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


On 29/08/2008, at 2:17 PM, Chuck Hill wrote:



On Aug 28, 2008, at 9:06 PM, Owen McKerrow wrote:


Hi All,

Converting an xCode project over to WOLips. We made a new  
WOApplication project, copied acrosss all the Java files and  
components etc etc and its all working great. Until we get to  
deployment.


To make my deployment build I right clicked on the projects name,  
and then selected "Install" from the WOLips Ant Tools option,  
which made me a nice .woa file  in /Library/WebObjects/ 
Applications ( by the way is there any easy way to get this build  
to include copies of the frameworks it needs inside itself ? )


Documented and everything:
http://wiki.objectstyle.org/confluence/display/WOL/Embedding 
+WOFrameworks




Anyways so far so good. I've copied the .woa up to the server  
where Im running it against a DEV database, most of the site works  
fine however when I to some pages I get these sorts of errors  
( note the prod version built from xCode is still on the same  
machine and its not having any issues )



12:52:21,297	 
:  
Exception occurred while handling request:
com.webobjects.foundation.NSForwardException  
[java.lang.ClassNotFoundException] Cannot find class or component  
named JSConfirmPanel in runtime or in a loadable bundle:  
parsing template for Component : 'file:/Library/WebObjects/ 
Applications/Dev/EePortfolio.woa/Contents/Resources/ 
ExistingReports.wo/':
java.lang.ClassNotFoundException: Cannot find class or component  
named JSConfirmPanel in runtime or in a loadable bundle


Closely followed by

12:52:21,299	 Throwable occurred:  
java.lang.NoClassDefFoundError: com/webobjects/woextensions/ 
WOExceptionParser
12:52:21,299	 Workerthread  
exiting due to error, respawning with ID 10005...
Exception in thread "WorkerThread5"  
com.webobjects.foundation.NSForwardException for  
java.lang.NoClassDefFoundError: com/webobjects/woextensions/ 
WOExceptionParser
	at  
edu.uow.emlab.eportfolio.ExceptionHelper.retrieveExceptionInformation 
(ExceptionHelper.java:128)
	at edu.uow.emlab.eportfolio.ExceptionHelper.emailException 
(ExceptionHelper.java:94)
	at edu.uow.emlab.eportfolio.Application.emailException 
(Application.java:575)
	at edu.uow.emlab.eportfolio.Application.handleException 
(Application.java:508)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._handleRe 
quest(WOComponentRequestHandler.java:379)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler.handleReq 
uest(WOComponentRequestHandler.java:435)
	at com.webobjects.appserver.WOApplication.dispatchRequest 
(WOApplication.java:1306)
	at edu.uow.emlab.eportfolio.Application.dispatchRequest 
(Application.java:469)
	at com.webobjects.appserver._private.WOWorkerThread.runOnce 
(WOWorkerThread.java:173)
	at com.webobjects.appserver._private.WOWorkerThread.run 
(WOWorkerThread.java:254)

at java.lang.Thread.run(Thread.java:613)


So what have I done wrong ? Any ideas as to why it can't find  
JSConfirmPanel and WOExceptionParser ? As I said the prod version  
is running just fine. Going to these same pages when its running  
from Eclipse on my machine also works fine.



Might be worth doing an opendiff on the .woa directories.

It sounds like you don't have JavaWOExtensions.framework on the  
classpath.  I don't know what you did in Eclipse to make that be  
the case when it still runs.  Make sure this is in the WebObjects  
Libraries under the project's build path.  Take a look in App.woa/ 
Contents/MacOS/MacOSClassPath.txt to see if it is missing or  
present with the wrong path.



Chuck

--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects








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

This email sent to [EMAIL PROTECTED]


Issues Deploying from WOLips

2008-08-28 Thread Owen McKerrow

Hi All,

Converting an xCode project over to WOLips. We made a new  
WOApplication project, copied acrosss all the Java files and  
components etc etc and its all working great. Until we get to  
deployment.


To make my deployment build I right clicked on the projects name, and  
then selected "Install" from the WOLips Ant Tools option, which made  
me a nice .woa file  in /Library/WebObjects/Applications ( by the way  
is there any easy way to get this build to include copies of the  
frameworks it needs inside itself ? )
Anyways so far so good. I've copied the .woa up to the server where  
Im running it against a DEV database, most of the site works fine  
however when I to some pages I get these sorts of errors ( note the  
prod version built from xCode is still on the same machine and its  
not having any issues )



 12:52:21,297	 
:  
Exception occurred while handling request:
com.webobjects.foundation.NSForwardException  
[java.lang.ClassNotFoundException] Cannot find class or component  
named JSConfirmPanel in runtime or in a loadable bundle:  
parsing template for Component : 'file:/Library/WebObjects/ 
Applications/Dev/EePortfolio.woa/Contents/Resources/ 
ExistingReports.wo/':
java.lang.ClassNotFoundException: Cannot find class or component  
named JSConfirmPanel in runtime or in a loadable bundle


Closely followed by

 12:52:21,299	 Throwable occurred:  
java.lang.NoClassDefFoundError: com/webobjects/woextensions/ 
WOExceptionParser
 12:52:21,299	 Workerthread exiting  
due to error, respawning with ID 10005...
Exception in thread "WorkerThread5"  
com.webobjects.foundation.NSForwardException for  
java.lang.NoClassDefFoundError: com/webobjects/woextensions/ 
WOExceptionParser
	at  
edu.uow.emlab.eportfolio.ExceptionHelper.retrieveExceptionInformation 
(ExceptionHelper.java:128)
	at edu.uow.emlab.eportfolio.ExceptionHelper.emailException 
(ExceptionHelper.java:94)
	at edu.uow.emlab.eportfolio.Application.emailException 
(Application.java:575)
	at edu.uow.emlab.eportfolio.Application.handleException 
(Application.java:508)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._handleReque 
st(WOComponentRequestHandler.java:379)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler.handleReques 
t(WOComponentRequestHandler.java:435)
	at com.webobjects.appserver.WOApplication.dispatchRequest 
(WOApplication.java:1306)
	at edu.uow.emlab.eportfolio.Application.dispatchRequest 
(Application.java:469)
	at com.webobjects.appserver._private.WOWorkerThread.runOnce 
(WOWorkerThread.java:173)
	at com.webobjects.appserver._private.WOWorkerThread.run 
(WOWorkerThread.java:254)

at java.lang.Thread.run(Thread.java:613)


So what have I done wrong ? Any ideas as to why it can't find  
JSConfirmPanel and WOExceptionParser ? As I said the prod version is  
running just fine. Going to these same pages when its running from  
Eclipse on my machine also works fine.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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

This email sent to [EMAIL PROTECTED]


Re: WODisplayGroup + qualifyDisplayGroup() + mutators = FAIL

2008-08-27 Thread Owen McKerrow



On 27/08/2008, at 2:19 PM, Q wrote:

Has anyone else noticed that if you use qualifyDisplayGroup() on a  
WODisplayGroup to restrict displayedObjects() with a qualifier and  
then try to use insertNewObjectAtIndex, indexOfLastDisplayedObject  
or insertObjectAtIndex, they are all broken because the  
displayedObjects and allObjects arrays are no longer the same size.


Hmmm it may just be that its late at night, but aren't  
displayedObjects and allObjects almost always different in size ? I  
mean isn't that the point of having teh two of them, you have 30  
objects in the all array of which you want to show 10 ( the display  
array).


Anyways doesn't help at all with your bug, but just curious as to  
what it was you meant. Is it that you have qualified the displayed  
objects so its now say 8 objects instead of 10, which would stuff up  
your batching as the batching is based of the allObjects array ?


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

This email sent to [EMAIL PROTECTED]


Re: OT : Broken xCode Debugger

2008-08-05 Thread Owen McKerrow

Thanks Art, that did it !

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 06/08/2008, at 11:04 AM, Art Isbell wrote:


On Aug 5, 2008, at 2:53 PM, Owen McKerrow wrote:


Under that Targets Settings Expert View I have

JAVA_DEBUGGER = jdb

I believe thats right, is it ?



	That part's correct, but when you double-click the executable in  
the Executables section of Groups & Files, you should see a pop-up  
button set to "Java Debugger" under the Debugging tab (for Xcode  
3.1; not sure where this is under Xcode 2.3).  Seems like this pop- 
up button defaults to "AppleScript Debugger" which won't work, of  
course.


Aloha,
Art

___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: OT : Broken xCode Debugger

2008-08-05 Thread Owen McKerrow

Hi Art,

Under that Targets Settings Expert View I have

JAVA_DEBUGGER = jdb

I believe thats right, is it ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


On 06/08/2008, at 10:47 AM, Art Isbell wrote:


On Aug 5, 2008, at 2:40 PM, Owen McKerrow wrote:

Upon launching my Project today the debugger has stopped working  
as it should. As in it is ignoring break-points, only for one  
project and only for one target ( the project has several for  
doing different builds for different clients ). I can't see any  
reason why this would be.


Any suggestions ? ( and no taking this one to Eclipse is not at an  
option at this stage ).



	Check the Xcode debugger setting for that project and target.   
When it's not set to the Java debugger, the symptoms that you  
describe occur.


Aloha,
Art

___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


OT : Broken xCode Debugger

2008-08-05 Thread Owen McKerrow

Hi All,

Upon launching my Project today the debugger has stopped working as  
it should. As in it is ignoring break-points, only for one project  
and only for one target ( the project has several for doing different  
builds for different clients ). I can't see any reason why this would  
be.


Any suggestions ? ( and no taking this one to Eclipse is not at an  
option at this stage ).


xCode 2.3 for those playing along at home.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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

This email sent to [EMAIL PROTECTED]


Re: Copying An EO Values

2008-08-03 Thread Owen McKerrow

Hey,

Ondra's suggestion is the a good idea. Or you could have a look at  
Chapter 9 of Chucks "Practical WebObjects" book, which is a whole  
chapter on this very topic :)


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 04/08/2008, at 5:52 AM, Gino Pacitti wrote:


Well what I mean is that  instead of

neweo.setValue(existingeo.someValue());

for every value in the existingeo which I want to transpose to the  
neweo.

Is there a operation like -

neweo = existineo.clone();

So all the values in the new eo are the same as existingeo but  
obvioulsy with a new PK..


GIno



On 3 Aug 2008, at 20:41, Ondřej Čada wrote:


Gino,

On Aug 3, 2008, at 9:27 PM, Gino Pacitti wrote:

Has anyone had experience copying an EO values fetched and in and  
EditingContext to a new EO in an atomic action?


"Atomic" in what sense?

Myself, I've always combined valuesForKeys and  
takeValuesFromDictionary, but YMMV :)


Best,
---
Ondra Čada
OCSoftware: [EMAIL PROTECTED]   http://www.ocs.cz
private [EMAIL PROTECTED] http://www.ocs.cz/oc





-
Gino L. Pacitti   Base Enterprise UK
email: [EMAIL PROTECTED]
phone:  sales: 0845 094 9784
mob: 07980 851 953

Aol: kris121
Msn: [EMAIL PROTECTED]
Skype: ginkris
Mac.com: [EMAIL PROTECTED]

http://www.base-enterprise.co.uk

mail: Base Enterprise
PO BOX 674
East Grinstead
West Sussex
RH19 3ZG

Base Enterprise LTD
Company Number 04339224
Registered in England & Wales

Registered Member of the UK Web Design Association.
Accredited by Business Link and a member of the FSB.

Web Design, coding and information architect
Web Objects and Database Developer
HTML, XML, Javascript and WAP technologies.
-

This email and any attachments is confidential and may be legally
privileged and protected from disclosure. It is intended solely for
the use of the individual or entity to whom it is addressed and
others authorized to receive it.

If you are not the intended recipient of this e-mail of any parts of
it please telephone +44 845 094 9784 immediately upon receipt
or contact [EMAIL PROTECTED]

No other person is authorized to copy, forward or disclose,
distribute or retain this e-mail in any form.



___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Back To Basics : Databases Active Editing Context

2008-07-06 Thread Owen McKerrow

Nope, no Wonder on this one.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 07/07/2008, at 12:09 PM, Lachlan Deck wrote:


On 07/07/2008, at 11:49 AM, Owen McKerrow wrote:

OK so we think we probably screwed up implementing  
MultiLockManager somehow, so heres a couple of more questions to  
make sure all of our bases are covered :


In Session's sleep we have ( terminate looks exactly the same  
except of course its for terminate )


public void sleep()
try {
synchronized (ecLockManager) {
if (ecLockManager().isLocked()) {
ecLockManager().unlock();
}
}
}
finally {
super.sleep();
}
}

Should we be using unregisterEditingContext instead of unlock() ?  
If not why/when should you use unregisterEditingContext ?


Not familiar with the MultiECLockManager, so Chuck (or someone  
else) will need to chime i here.

I assume you're not using Wonder for this project.

with regards,
--

Lachlan Deck



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

This email sent to [EMAIL PROTECTED]


Re: Back To Basics : Databases Active Editing Context

2008-07-06 Thread Owen McKerrow
OK so we think we probably screwed up implementing MultiLockManager  
somehow, so heres a couple of more questions to make sure all of our  
bases are covered :


In Session's sleep we have ( terminate looks exactly the same except  
of course its for terminate )


public void sleep()

   try {
synchronized (ecLockManager) {
if (ecLockManager().isLocked()) {
ecLockManager().unlock();
}
}
   }
finally {
super.sleep();
}
}

Should we be using unregisterEditingContext instead of unlock() ? If  
not why/when should you use unregisterEditingContext ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 04/07/2008, at 3:53 PM, Lachlan Deck wrote:


On 04/07/2008, at 2:54 PM, Chuck Hill wrote:


On Jul 3, 2008, at 9:30 PM, Lachlan Deck wrote:


Perhaps a parent ec? Is there any child ecs involved here?

I don't recall terribly clearly now as it's been a while... but I  
remember that for some strange reason an object that I had in the  
shared editing context didn't localize into the ec that I wanted  
when attempting to set the relationship - but there was no  
exception until saveChanges. It might have been when said ec  
didn't have its sharedEc == null, or invalid locking or something.


I recall, when trying to track it down, mucking around with  
temporarily unlocking shared ec locks and stuff. But I think it  
turned out to be ensuring that the ec in question didn't properly  
set its shared ec to null (I think).


Sorry I don't recall much more than that.


Ah, there you go on about the shared EC again.  :-P


Someone says it can't/shouldn't be used... just can't help  
myself...   Shared ec, VI, ... I'm just waiting for the next  
suggestion :-)


I had not considered the SEC being involved. That puts a new twist  
on things.


Owen, are you using the SEC?


Bear in mind that you *might* be using it unintentionally. e.g.,  
you've declared in your model 'share objects' and/or you're not  
nullifying your ec's shared ec (which is the usual for your default  
session context IIRC).


with regards,
--

Lachlan Deck

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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Back To Basics : Databases Active Editing Context

2008-07-03 Thread Owen McKerrow

On 04/07/2008, at 1:00 PM, Lachlan Deck wrote:


On 04/07/2008, at 11:54 AM, Chuck Hill wrote:


On Jul 3, 2008, at 6:37 PM, M.Y. Tjoe wrote:


Hi Chunk and Owen,


Chunk?


Might be colloquial for something down in Wollongong or maybe  
something from that 3rd world you mentioned before ;-)


Nope nothing like that. English is not Harvey's first language and  
when I explained to him what he had done he was very apologetic.


Owen

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

This email sent to [EMAIL PROTECTED]


Re: Back To Basics : Databases Active Editing Context

2008-07-03 Thread Owen McKerrow

Hi Chuck,

Thanks for the quick response and all your answers matched up with my  
understanding, which is both a good and a bad thing. ( As in Im glad  
I know this stuff but it sucks I still have the problem ).


See below for more

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


On 04/07/2008, at 9:23 AM, Chuck Hill wrote:



On Jul 3, 2008, at 4:05 PM, Owen McKerrow wrote:


So Im going back to basics, just in case I missed something or my  
understanding of these things is flawed :


1) What exactly is the Databases active editing context ?


The editing context that is executing saveChanges() and has the  
database (EODatabaseContext) locked


Does the EC lock the EODatabaseContext when you call lock() on the  
EC ? If not what does lock() on the EC actually lock ?





2) How/When does a EC become the databases active editing context ?


Someplace inside of saveChanges() after / when it locks the DBContext


3) How/When is it no longer considered the databases active  
editing context ?


When the save finished (with or without error) and the EC unlocks  
the DBContext



4) Should it be possible for an EC to be the active one across  
multiple RR Loops ? And if so why ?


No.


Dam cause this the behavior we are defiantly seeing. We are now  
logging out the creation of all EC's with the application. So for  
example the EC that was considered the active EC in the error I sent  
through was created 6 minutes before it caused the error and had  
successfully saved etc etc in between times. And when you thrown in  
the fact that this will only occasionally happen and only when there  
is more than 1 person on the site at a time, it becomes more  
confusing still ( and a pain in the butt to produce and track down  
the cause ).





5) Is there only one databases active editing context for each  
instance of the application or is it one per session ?



There will be zero or one per EOF stack.  Usually there is one EOF  
stack per instance.


Yup thats what I thought. So any other EC's that call save changes at  
this time will sit in a que I assume and be executed when the lock is  
released ?




Pierre Frisch and I were looking at this during WWDC.  We came to  
the conclusion that the error you are seeing is not possible :-)


Yeah I sat down with Daryl Lee at one of the hands on labs and he  
also said something similar.


except when you form relationships across editing contexts.  I  
recall that you have checked this and verified that you are not  
doing this.
Well, not quite not possible.  The only thing we could come up with  
is that Java is running out of memory during saveChanges() and  
leaving EOF in an insane state.  Your description above fits this  
theory exactly.  It does not at all fit the "relationships across  
editing contexts" theory.  Have you checked the app logs of  
OutOfMemory and message about heap space?


Yup logs checked. When have no messages about being out of memory or  
anything regarding the heap space ( the app has around 500 Meg  
assigned to it I believe )


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

This email sent to [EMAIL PROTECTED]


Back To Basics : Databases Active Editing Context

2008-07-03 Thread Owen McKerrow

Hi All,

We're still trying to track down the issue with one Editing Context  
somehow getting itself permanently attached as the Databases Active  
Editing Context. In fact we have an instance of it where it produces  
this error :


Cannot obtain globalId for an object which is registered in an other  
than the databaseContext's active editingContext, object: Researcher: 
(Active_Name=Peter Newnam {rowID=28082;}, databaseContext:  
[EMAIL PROTECTED], object's  
editingContext:  
[EMAIL PROTECTED],  
databaseContext's active editingContext:  
[EMAIL PROTECTED]


And then keept the session alive for 24 hours ( at which point we  
restarted Tomcat)  and was considered the active editing context for  
that whole time, which meant that no one else could log into the  
system, thankfully this was on our Test Server.


So Im going back to basics, just in case I missed something or my  
understanding of these things is flawed :


1) What exactly is the Databases active editing context ?
2) How/When does a EC become the databases active editing context ?
3) How/When is it no longer considered the databases active editing  
context ?
4) Should it be possible for an EC to be the active one across  
multiple RR Loops ? And if so why ?
5) Is there only one databases active editing context for each  
instance of the application or is it one per session ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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

This email sent to [EMAIL PROTECTED]


Getting Docs out of EOModel with WOLips

2008-05-27 Thread Owen McKerrow

Hi All,

I was wondering if there is any way to get the documentation that one  
writes into the Doc's area of Entities, Attributes and Relationships  
inside Entity Modeler to be included in the java files that it spits  
out ?
Im currently using _WonderEntity.java and WonderEntity.java as my  
template files. Is it a setting/change I need to make in these to get  
it to happen ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


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

This email sent to [EMAIL PROTECTED]


Re: WOLips : Display Group Component ?

2008-05-22 Thread Owen McKerrow

Thanks David and Louis,

Yeah I found this before, it was more the auto-generation of the  
pages html and wod file with bindings hooked up to already use the  
display-group that I was after. Its OK will do by hand.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


On 23/05/2008, at 12:11 PM, David Holt wrote:


No "wizard" but this is what we've got:

http://wiki.objectstyle.org/confluence/display/WO/Web+Applications- 
Development-WODisplayGroup


David


On 22-May-08, at 6:51 PM, Owen McKerrow wrote:


Hi All,

Is there an equivalent "wizard" to xCodes Display Group Component  
under eclipse/wolips ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - -
 'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


___
Do not 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/ 
programmingosx%40mac.com


This email sent to [EMAIL PROTECTED]




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

This email sent to [EMAIL PROTECTED]


WOLips : Display Group Component ?

2008-05-22 Thread Owen McKerrow

Hi All,

Is there an equivalent "wizard" to xCodes Display Group Component  
under eclipse/wolips ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


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

This email sent to [EMAIL PROTECTED]


Re: Tracking EC Locking Issues when using MultiECLockManager and LockErrorScreamerEditingContext

2008-05-20 Thread Owen McKerrow

Hi Chuck,

The extra lock is coming from the _awakeInContext of the session.

java.lang.Throwable
	at edu.uow.ris.framework.LockErrorScreamerEditingContext._trace 
(LockErrorScreamerEditingContext.java:117)
	at edu.uow.ris.framework.LockErrorScreamerEditingContext.lock 
(LockErrorScreamerEditingContext.java:59)
	at com.webobjects.appserver.WOSession._awakeInContext(WOSession.java: 
717)
	at com.webobjects.appserver.WOApplication.restoreSessionWithID 
(WOApplication.java:1550)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit 
hPreparedApplication(WOComponentRequestHandler.java:314)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._handleReque 
st(WOComponentRequestHandler.java:358)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler.handleReques 
t(WOComponentRequestHandler.java:435)
	at com.webobjects.appserver.WOApplication.dispatchRequest 
(WOApplication.java:1306)

at Application.dispatchRequest(Application.java:353)
	at com.webobjects.appserver._private.WOWorkerThread.runOnce 
(WOWorkerThread.java:173)
	at com.webobjects.appserver._private.WOWorkerThread.run 
(WOWorkerThread.java:254)

at java.lang.Thread.run(Thread.java:613)


And the ec is trying to be disposed of from the _sleepInContext

java.lang.Throwable
	at edu.uow.ris.framework.LockErrorScreamerEditingContext._trace 
(LockErrorScreamerEditingContext.java:117)
	at edu.uow.ris.framework.LockErrorScreamerEditingContext.goodbye 
(LockErrorScreamerEditingContext.java:93)
	at edu.uow.ris.framework.LockErrorScreamerEditingContext.dispose 
(LockErrorScreamerEditingContext.java:100)
	at com.webobjects.appserver.WOSession._sleepInContext(WOSession.java: 
729)
	at com.webobjects.appserver.WOApplication.saveSessionForContext 
(WOApplication.java:1514)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit 
hPreparedApplication(WOComponentRequestHandler.java:329)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._handleReque 
st(WOComponentRequestHandler.java:358)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler.handleReques 
t(WOComponentRequestHandler.java:435)
	at com.webobjects.appserver.WOApplication.dispatchRequest 
(WOApplication.java:1306)

at Application.dispatchRequest(Application.java:353)
	at com.webobjects.appserver._private.WOWorkerThread.runOnce 
(WOWorkerThread.java:173)
	at com.webobjects.appserver._private.WOWorkerThread.run 
(WOWorkerThread.java:254)

at java.lang.Thread.run(Thread.java:613)

Here is my Session's sleep and terminate methods :

public void sleep()
{
		// Need to check as this gets called after terminate() when logging  
out

   try {
synchronized (ecLockManager)
{
if (ecLockManager().isLocked())
{
ecLockManager().unlock();
}
}
   }
finally {
super.sleep();
}
}


/**
 * Unlock lock manager and diagnostic messages.
 */
public void terminate()
{
		// Need to make sure this is unlocked so that editing contexts  
nested in the defaultEditingContext

// don't hold locks on it when it gets disposed
try {
synchronized (ecLockManager) {
if (ecLockManager().isLocked())
{
ecLockManager().unlock();
}
}
}
finally {
super.terminate();
}
}

And just for good measure heres the constructor :

public Session() throws Exception
{
super();
log.info("\tSession has been created.\t"  + sessionID());
numAccessInLastMinute = 1;
timeSinceLastCalled = new NSTimestamp();
ecLockManager = new MultiECLockManager();
setDefaultEditingContext(new LockErrorScreamerEditingContext());
}

I don't understand why the _sleepInContext is disposing of the ec  
without the call to unlock it.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 21/05/2008, at 8:08 AM, Chuck Hill wrote:



On May 18, 2008, at 8:41 PM, Owen McKerrow wrote:


Hi All,

In an effort to track down my locking issues I implemented the  
LockErrorScreamerEditingContext but unfortunately its not going to  
be as useful as I had hope

Re: Tracking EC Locking Issues when using MultiECLockManager and LockErrorScreamerEditingContext

2008-05-19 Thread Owen McKerrow


In an effort to track down my locking issues I implemented the  
LockErrorScreamerEditingContext but unfortunately its not going to  
be as useful as I had hoped. I changed my MultiECLockManager to  
use a LockErrorScreamerEditingContext but of course this means  
that every lock will come from it, so when I get errors like the  
one below, the original stack trace that it prints out will always  
be from WOSession._awakeInContext.


So does anyone have any other suggestions as to how I go about  
tracking down where this mismatched lock is coming from ?


A bit of a tangent, but I believe you mentioned that you're  
migrating to Wonder recently. So, as ERXEC handles locking  
automatically (with the correct properties defined) you might want  
to limit your manual locking/unlocking to background/long-response  
threads. ERXEC prints out an error log if an ec locking mismatch  
occurred.


with regards,
--

Lachlan Deck

er.extensions.ERXApplication.useEditingContextUnlocker=true
er.extensions.ERXEC.defaultAutomaticLockUnlock=true
er.extensions.ERXEC.useSharedEditingContext=false
er.extensions.ERXEC.defaultCoalesceAutoLocks=true


Hi Lachlan,

Unfortunately its not this project thats going to Wonder ( it is in  
fact a brand new project that we are starting to use wonder on).  
Currently is not an option to convert the current project which is  
causing the problem over to Wonder. Although I  do have to ask, how  
much "wonderizing" would I have to do to just get the ERXEC portion  
of Wonder into a non wonder app ?


As part of implementing the LockErrorScreamerEditingContext I went  
back through and removed all manual locks() and unlocks(). So in  
theory the MultiECLockManager is now managing all the locks, with  
every EC being created through the MultiECLockManager  
newEditingContext method. So its somewhat worrying that any problems  
with locking are occuring, but I'll keep digging.


Any other ideas out there ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces

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

This email sent to [EMAIL PROTECTED]


Re: [OT] Mikes Magic Click

2008-05-18 Thread Owen McKerrow

Hi Jake,

Yup thats the trick. Hold down the Command Key and it works !

Thanks!

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 19/05/2008, at 4:22 PM, Jake MacMullin wrote:

I think you need to hold down 'command' when you click... (but it  
is only in recent builds)


Cheers,

Jake

On 19/05/2008, at 4:17 PM, Owen McKerrow wrote:


( NOTE : This is referring to eclipse )

Hi All,

I was just watching Mikes Ajax movie ( http:// 
webobjects.mdimension.com/wonder/screencasts/TinyAjaxApp.mov ) and  
noticed that at around the 1 min 30 sec mark he creates a new  
WOString in the .wod file  with a value of currentTime and then  
clicks on it which brings up a floating window which allows him to  
add it as a key to the java class. Now Im wondering is there a  
preference I have to turn on somewhere to get this feature or is  
it something that one gets if there brave enough to go with the  
nightly builds ? Im currently using WOLips 3.3.5 under eclipse 3.3.2


Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms  
to save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


___
Do not 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/jmacmullin% 
40mac.com


This email sent to [EMAIL PROTECTED]




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

This email sent to [EMAIL PROTECTED]


[OT] Mikes Magic Click

2008-05-18 Thread Owen McKerrow

( NOTE : This is referring to eclipse )

Hi All,

I was just watching Mikes Ajax movie ( http:// 
webobjects.mdimension.com/wonder/screencasts/TinyAjaxApp.mov ) and  
noticed that at around the 1 min 30 sec mark he creates a new  
WOString in the .wod file  with a value of currentTime and then  
clicks on it which brings up a floating window which allows him to  
add it as a key to the java class. Now Im wondering is there a  
preference I have to turn on somewhere to get this feature or is it  
something that one gets if there brave enough to go with the nightly  
builds ? Im currently using WOLips 3.3.5 under eclipse 3.3.2


Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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

This email sent to [EMAIL PROTECTED]


Tracking EC Locking Issues when using MultiECLockManager and LockErrorScreamerEditingContext

2008-05-18 Thread Owen McKerrow

Hi All,

In an effort to track down my locking issues I implemented the  
LockErrorScreamerEditingContext but unfortunately its not going to be  
as useful as I had hoped. I changed my MultiECLockManager to use a  
LockErrorScreamerEditingContext but of course this means that every  
lock will come from it, so when I get errors like the one below, the  
original stack trace that it prints out will always be from  
WOSession._awakeInContext.


So does anyone have any other suggestions as to how I go about  
tracking down where this mismatched lock is coming from ?



 13:26:40,676	!!! EC HashCode :13694334 editing context being  
disposed with 1 locks.

 13:26:40,677   !!! Most recently locked by:
java.lang.Throwable
	at edu.uow.ris.framework.LockErrorScreamerEditingContext._trace 
(LockErrorScreamerEditingContext.java:114)
	at edu.uow.ris.framework.LockErrorScreamerEditingContext.lock 
(LockErrorScreamerEditingContext.java:57)
	at com.webobjects.appserver.WOSession._awakeInContext(WOSession.java: 
717)
	at com.webobjects.appserver.WOApplication.restoreSessionWithID 
(WOApplication.java:1550)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit 
hPreparedApplication(WOComponentRequestHandler.java:314)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler._handleReque 
st(WOComponentRequestHandler.java:358)
	at  
com.webobjects.appserver._private.WOComponentRequestHandler.handleReques 
t(WOComponentRequestHandler.java:435)
	at com.webobjects.appserver.WOApplication.dispatchRequest 
(WOApplication.java:1306)

at Application.dispatchRequest(Application.java:353)
	at com.webobjects.appserver._private.WOWorkerThread.runOnce 
(WOWorkerThread.java:173)
	at com.webobjects.appserver._private.WOWorkerThread.run 
(WOWorkerThread.java:254)

at java.lang.Thread.run(Thread.java:613)

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


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

This email sent to [EMAIL PROTECTED]


Strange Red X's in Eclipse

2008-05-14 Thread Owen McKerrow

Hi All,

Well I've finally jumped ship and am starting to use Eclipse/WOLips,  
and yes even Wonder :)


So heres my first question. Anyone know what the little red x ( see  
pic ) means thats appeared on top of everyone of my model java files ?


Steps before this happened ( never mind why I did these steps, its  
slightly crazy, wanted fresh copy of the files )

1) Committed all changes to SVN ( using Subclipse )
2) Trashed all the files
3) Saved the Model again, which re auto generated all the files.

Using Eclipse 3.2.2
Subclipse 1.2.4
WOLips 3.3.5
Wonder 5.3

<>


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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

This email sent to [EMAIL PROTECTED]

Re: Suggestions for Best Practices session at WOWODC?

2008-05-13 Thread Owen McKerrow

What about something on WOOgnl ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 14/05/2008, at 1:59 PM, Chuck Hill wrote:


Hi All,

I wanted to solicit some ideas and suggestions for this session.   
My current thought is to have a selection of practices which I will  
present and then get comments (debate) from the other members of  
the panel.  The idea being that we don't all see them with the same  
eyes and some of them are likely to provoke some spirited  
discussion (not to mention the obligatory "If you are using  
Wonder..." comments).  I'd like to think of them as "Quite Good"  
rather than "Best" practices.  I'll leave some time at the end for  
audience questions.


Some ideas for inclusion are:
- using EOPrototypes
- use of peer and nested editing contexts and the then needed  
locking of editing contexts
- generate your EOs and  use the Generation gap pattern (though  
with Entity modeler, you have to fight to not do this)

- use generation to create common worker methods
- generate String constants to avoid hard coding attribute and  
relationship names

- use qualifiers objects rather than qualifierWithFormat
- check for null in awakeFromInsertion (mostly a JavaClient issue)
- avoid EOAccess classes in your EO methods
- use stateless components and store state in the page
- handling checked exceptions with NSForwardException
- keep WOComponent Java files focused on the UI
- watch the generated SQL (for batch fetching and optimization  
index needs)

- using formatters for reusability
- don't repeat yourself, use common build files
- block direct page requests
- use class name to create component
- plan to handle errors from saveChanges()
- use custom EOGenericRecord subclass
- use embedded frameworks


Things that are best practices, but can't be covered properly:
- use Wonder
- use source control
- use log4j
- unit testing (TestNG or JUnit)
- functional testing (Selenium)


Chuck


--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects





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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Unable to release locks when using MultiECLockManager

2008-04-30 Thread Owen McKerrow


On 01/05/2008, at 1:27 PM, Chuck Hill wrote:



Im willing to "donate" this problem to your "Best pratices"  
session at WOWODC Chuck, so that you can give us a real life  
example ; )



:-)

Chuck


So I take it from that smile then that you would be happy to. Great  
I'll start taring up the project straight away. : P


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,

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

This email sent to [EMAIL PROTECTED]


Re: Unable to release locks when using MultiECLockManager

2008-04-30 Thread Owen McKerrow

Hi Again,

Please see below

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 30/04/2008, at 3:05 PM, Chuck Hill wrote:


On Apr 29, 2008, at 6:25 PM, Owen McKerrow wrote:


Hi Art,

Thats sounds like word for word the practices that we follow.  
Although I did just double check the code to make sure and I found  
a couple of places which had manual lock/unlock's in them which  
should not have.


From Session.java

public void awake()
{
ecLockManager().lock();
super.awake();
.


public void sleep()
{
		// Need to check as this gets called after terminate() when  
logging out

   synchronized (ecLockManager)
   {
   if (ecLockManager().isLocked())
   {
   ecLockManager().unlock();
   }
   }
super.sleep();
}


I wrap anything other than super in try...catch(Throwable),  
just in case.


Now this may be a basic Java question and I tried to ask it  
yesterday, but probably in a very poor fashion.


When your dealing with overriding a method and the original method  
does not throw an exception, but you do in your over-ride you receive  
a compile error something like


 "terminate() in Session cannot override terminate() in Session;  
overridden method does not throw java.lang.Exception"


 Which means that any exceptions that are thrown you need to deal  
with them at this methods level, correct ? Or is there a way to throw  
them without this message appearing


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

This email sent to [EMAIL PROTECTED]


Re: Unable to decrement snapshot count ....count is already 0 or does not exist

2008-04-30 Thread Owen McKerrow

Hi Chuck,

Thanks for the reply. For some strange reason a number of your emails  
( including this one ) have been flagged as spam by our filter so  
this has just arrived after sitting in quarantine.


Anyways see below


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 25/04/2008, at 9:27 AM, Chuck Hill wrote:

Hi Owen,

On Apr 23, 2008, at 4:16 PM, Owen McKerrow wrote:

Hi All,

One of our apps when down yesterday and on trawling through the  
log files I found 8 instances of the error : is unable to  
decrement snapshot count for object with global ID  
_EOIntegralKeyGlobalID[PublicationKeyword (java.lang.Long)151400]  
- count is already 0 or this snapshot doesn't exist ( see full  
stack trace below ). All appear to have come from the same  
saveChanges() call. Also note each time it occurred it was for a  
separate object.


Each of the objects had been created about 13 minutes before the  
errors e.g.


2008,04.23 15:	:56,420  "INSERT INTO PUB_KEYWORD(pub_keyword,  
KEYWORD, pub) VALUES (?, ?, ?)" withBindings: 1:151400 
(publicationKeyWordID), 2:"proteins"(keyword), 3:23092 
(publicationID)>


Anyone have any suggestions as to what may have caused this ? i.e.  
what sort of things I should be looking for in the code. The app  
has been running for almost 2 years now and this is the first time  
we've had this problem  ( in fact its the first time I have seen  
it in 10 years of WO development ).


As always all comments/questions/feedback welcome.



No specific suggestions.  Are you synchronizing EOs across instances?


No. Single instance, deployed under Tomcat.


 Are you using multiple EOF stacks within one instance?


No.

  Improper locking might cause this.  Running out of memory could  
too.  Nothing else comes to mind other than some sort of horrible  
EOF abuse like trying to use a disposed EC.


Possible, but I would not have done that intentionally.

  I don't know if that would cause this, but maybe something like  
that.  I _have_ seen this before, but not recently.


A search of the lists makes reference to this back in the days of 5.2.2
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Unable to release locks when using MultiECLockManager

2008-04-29 Thread Owen McKerrow


On 30/04/2008, at 3:09 PM, Chuck Hill wrote:


On Apr 29, 2008, at 8:08 PM, Art Isbell wrote:


On Apr 29, 2008, at 4:47 PM, Owen McKerrow wrote:

I remember discussing MultiECLockManager on list last year with  
chuck Hill ( http://lists.apple.com/archives/Webobjects-dev/2007/ 
Apr/msg00609.html ) who pointed out that he'd tweaked   
MultiECLockManager inside his GVCWOExtensions framework. So thats  
where this version comes from.


	Ah, well it's not identical to the original version which is what  
I'm using, so I'll let Chuck comment.


Jon and I had different ideas on how we wanted to integrate this  
functionality into our applications.  I made some changes to  
support what I wanted.  The basic code should be the same.  We have  
used this class in all of the apps we have written for some years  
now.  We never see the error that Owen is seeing.  Thus, I suspect  
the origin of the problem lies in his code.


I have no doubt it is : )

	Theoretically, the condition that would result in unlock() being  
invoked should be prevented by the isLocked() test, so an uncaught  
exception may be unlikely.  But I always include super.terminate()  
in a finally clause because of the importance of it being invoked.


Amen.  A better approach than my try...catch (Throwable).


OK how do I add this then ? i.e. how do I deal with any exceptions  
that may be caused inside the try. My initial approach ( see below )  
has the obvious  problem ( ohh for some sleep and its only 3:30 in  
the afternoon ) of "Unreported exception java.lang.Exception; must be  
caught or declared to be thrown".


public void terminate()
{
		// Need to make sure this is unlocked so that editing contexts  
nested in the defaultEditingContext

// don't hold locks on it when it gets disposed
try {
synchronized (ecLockManager) {
if (ecLockManager().isLocked())
{
ecLockManager().unlock();
}
}
} catch ( Exception ex ) {
throw ex;
}
finally {
super.terminate();
}
}

	Your original problem appears to be caused by your code not  
unlocking an editing context somehow.  You've found a couple of  
editing contexts that weren't being manually locked/unlocked  
inappropriately.  Might this have caused the Finalizer problem?



That is my suspicion also.  Some other, previous exception left a  
locked EC hanging around.  When it got garbage collected, the  
errors that Owen is seeing are the result.


So I take it from that statement that I will need to track down any  
exceptions that are being made and not handled correctly ?


Im willing to "donate" this problem to your "Best pratices" session  
at WOWODC Chuck, so that you can give us a real life example ; )



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

This email sent to [EMAIL PROTECTED]


Re: Unable to release locks when using MultiECLockManager

2008-04-29 Thread Owen McKerrow

The were only 2 of them.
One was .
ec.lock();
ec.revert();
ec.unlock();

The Other was making a display group ( all be it my tweaked version  
of one ).

getEc().lock();
rfcdDisplayGroup = new OMDisplayGroup( 10, 1, "RFCD", getEc 
(), null, null );
	EODatabaseDataSource dataSource = (EODatabaseDataSource)  
rfcdDisplayGroup.dataSource( );

dataSource.setFetchSpecificationByName( "getAll" );
rfcdDisplayGroup.qualifyDataSource( );
getEc().unlock();

So no I don't think either of these would cause an issue.

There is one method in the app that creates its own EOEditingContext  
which is not registered with the MultiECLockManager, but it a  
ec.unlock() in the finallly() section of its try catch block.


finally{
if ( ec != null ) {
ec.unlock();
ec.dispose();
}   
}


I checked yesterdays logs and it occurred 31 times and in fact in a  
couple of places its closely followed by a 


 2008,04.29 15:54:14,768 DEBUG [Finalizer] (Log.NSLogDebug:1546  
appendln) - decrementSnapshotCountForGlobalID:  
com.webobjects.eoaccess.EODatabase  
[EMAIL PROTECTED] -- is unable to decrement  
snapshot count for object with global ID _EOIntegralKeyGlobalID 
[External (java.lang.Long)10194] - count is already 0 or this  
snapshot doesn't exist
2008,04.29 15:54:14,769 DEBUG [Finalizer] (Log.NSLogDebug:1546  
appendln) -
java.lang.RuntimeException: Unable to decrement snapshot count for  
object with global ID _EOIntegralKeyGlobalID[External (java.lang.Long) 
10194] - count is already 0 or this snapshot doesn't exist
at  
com.webobjects.eoaccess.EODatabase.decrementSnapshotCountForGlobalID 
(EODatabase.java:1150)
at  
com.webobjects.eoaccess.EODatabaseContext.editingContextDidForgetObjectW 
ithGlobalID(EODatabaseContext.java:3752)
at  
com.webobjects.eocontrol.EOObjectStoreCoordinator.editingContextDidForge 
tObjectWithGlobalID(EOObjectStoreCoordinator.java:665)
at  
com.webobjects.eocontrol.EOEditingContext.editingContextDidForgetObjectW 
ithGlobalID(EOEditingContext.java:3921)
at com.webobjects.eocontrol.EOEditingContext._forgetObject 
(EOEditingContext.java:1536)	at  
com.webobjects.eocontrol.EOEditingContext._dispose 
(EOEditingContext.java:1123)
at com.webobjects.eocontrol.EOEditingContext.finalize 
(EOEditingContext.java:1178)

at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

This concerns me, as from the stack trace both problems occur deep in  
the bowls of webobjects, which from the looks of things is inside a  
try/catch block, which logs out the error but doesn't then throw it.  
It seems to me that its almost treating these errors as warnings, not  
real exceptions. Or am I misunderstanding what's going on here ?



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


On 30/04/2008, at 1:08 PM, Art Isbell wrote:

On Apr 29, 2008, at 4:47 PM, Owen McKerrow wrote:

I remember discussing MultiECLockManager on list last year with  
chuck Hill ( http://lists.apple.com/archives/Webobjects-dev/2007/ 
Apr/msg00609.html ) who pointed out that he'd tweaked   
MultiECLockManager inside his GVCWOExtensions framework. So thats  
where this version comes from.


	Ah, well it's not identical to the original version which is what  
I'm using, so I'll let Chuck comment.


	The header in my version of MultiECLockManager makes no mention  
of sending a MultiECLockManager object an unlock() message in  
Session.terminate(), so I don't do this.  However, if you do this  
and there's no matching lock() invocation, MultiECLockManager  
will throw an exception (maybe MultiECLockManager.isLocked()  
would prevent this from occurring).  You're not catching this  
exception in terminate() and aren't invoking super.terminate() in  
a finally block, so if an exception is thrown, super.terminate()  
won't be invoked which can cause nasty problems.


So at minimum I should shift this into a try{} catch{} block ?



	Theoretically, the condition that would result in unlock() being  
invoked should be prevented by the isLocked() test, so an uncaught  
exception may be unlikely.  But I always include super.terminate()  
in a finally clause because of the importance of it being invoked.


	Your original problem appears to be caused by your code not  
unlocking an editing context somehow.  You've found a couple of  
editing contexts that weren't being manually locked/unlocked  
inappropriately.  Might this hav

Re: Unable to release locks when using MultiECLockManager

2008-04-29 Thread Owen McKerrow

On 30/04/2008, at 12:07 PM, Art Isbell wrote:

On Apr 29, 2008, at 3:25 PM, Owen McKerrow wrote:


public void sleep()
{
		// Need to check as this gets called after terminate() when  
logging out

   synchronized (ecLockManager)
   {
   if (ecLockManager().isLocked())
   {
   ecLockManager().unlock();
   }
   }
super.sleep();
}


	Hmm, the version of MultiECLockManager that I use doesn't  
implement isLocked(), so I don't know what isLocked()  
accomplishes.  The only public methods are lock(), unlock(),  
registerEditingContext(), and unregisterEditingContext(), and I  
never send a MultiECLockManager object an unregisterEditingContext 
() message (it's not necessary).


I remember discussing MultiECLockManager on list last year with chuck  
Hill ( http://lists.apple.com/archives/Webobjects-dev/2007/Apr/ 
msg00609.html ) who pointed out that he'd tweaked  MultiECLockManager  
inside his GVCWOExtensions framework. So thats where this version  
comes from.


	Also, in the MultiECLockManager that I use, lock() and unlock()  
are synchronized methods, so I don't understand why you are  
invoking unlock() in a synchronized block.



public void terminate()
   {
   // Need to make sure this is unlocked so that editing  
contexts nested in the defaultEditingContext

   // don't hold locks on it when it gets disposed
   synchronized (ecLockManager)
   {
   if (ecLockManager().isLocked())
   {
   ecLockManager().unlock();
   }
   }
   super.terminate();
}



	The header in my version of MultiECLockManager makes no mention of  
sending a MultiECLockManager object an unlock() message in  
Session.terminate(), so I don't do this.  However, if you do this  
and there's no matching lock() invocation, MultiECLockManager will  
throw an exception (maybe MultiECLockManager.isLocked() would  
prevent this from occurring).  You're not catching this exception  
in terminate() and aren't invoking super.terminate() in a finally  
block, so if an exception is thrown, super.terminate() won't be  
invoked which can cause nasty problems.


So at minimum I should shift this into a try{} catch{} block ?



Aloha,
Art



Here is a copy of the MultiECLockManager.java file



MultiECLockManager.java
Description: Binary data



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

This email sent to [EMAIL PROTECTED]

Re: Unable to release locks when using MultiECLockManager

2008-04-29 Thread Owen McKerrow

Hi Art,

Thats sounds like word for word the practices that we follow.  
Although I did just double check the code to make sure and I found a  
couple of places which had manual lock/unlock's in them which should  
not have.


From Session.java

public void awake()
{
ecLockManager().lock();
super.awake();
.


public void sleep()
{
		// Need to check as this gets called after terminate() when logging  
out

synchronized (ecLockManager)
{
if (ecLockManager().isLocked())
{
ecLockManager().unlock();
}
}
super.sleep();
}


public void terminate()
{
// Need to make sure this is unlocked so that editing  
contexts nested in the defaultEditingContext

// don't hold locks on it when it gets disposed
synchronized (ecLockManager)
{
if (ecLockManager().isLocked())
{
ecLockManager().unlock();
}
}
super.terminate();
}




Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 30/04/2008, at 10:56 AM, Art Isbell wrote:

On Apr 29, 2008, at 2:24 PM, Owen McKerrow wrote:

Sorry all, I should have specified that further. Has anyone seen  
it whilst using MultiECLockManager ?



	No, but you must use MultiECLockManager correctly.  Are you  
invoking MultiECLockManager.unlock() in Session.sleep() before any  
statement that might throw an exception that would result in  
MultiECLockManager.unlock() not being invoked?


	I let MultiECLockManager handle the locking/unlocking of all  
editing contexts that aren't WOSession's defaultEditingContext()  
and that aren't stored in a local variable (i.e., the scope editing  
context is limited to the method in which it is created).  I lock/ 
unlock local editing contexts myself ensuring that they're unlocked:


EOEditingContext ec = new EOEditingContext();
ec.lock();
try {
// Do stuff
}
finally {
ec.unlock();
}

This approach hasn't resulted in any illegal lock usage exceptions.

Aloha,
Art

___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Unable to release locks when using MultiECLockManager

2008-04-29 Thread Owen McKerrow
Sorry all, I should have specified that further. Has anyone seen it  
whilst using MultiECLockManager ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 30/04/2008, at 10:13 AM, Owen McKerrow wrote:

Hi All,

Trawling through my log files I have found a number of instances of  
the following


 2008,04.29 06:12:47,595   OFF [Finalizer] (Log.NSLogErr:1546  
appendln) - Unable to release locks held by a deallocated  
EOEditingContext. 2008,04.29 06:12:47,596 DEBUG [Finalizer]  
(Log.NSLogDebug:1546 appendln) - java.lang.IllegalStateException:  
Illegal Lock usage: unlocking thread not owner.	at  
com.webobjects.foundation.NSRecursiveLock.unlock 
(NSRecursiveLock.java:207)	at  
com.webobjects.eocontrol.EOEditingContext.unlock 
(EOEditingContext.java:4720)	at  
com.webobjects.eocontrol.EOEditingContext._dispose 
(EOEditingContext.java:1158)	at  
com.webobjects.eocontrol.EOEditingContext.finalize 
(EOEditingContext.java:1178)	at  
java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)	at  
java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)	at  
java.lang.ref.Finalizer.access$100(Finalizer.java:14)	at  
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)


Im using MultiECLockManager to handle all the locking and  
unlocking, so Im wondering if anyone else has seen this kind of  
error and what I can do to chase it up.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms  
to save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Unable to release locks when using MultiECLockManager

2008-04-29 Thread Owen McKerrow

Hi All,

Trawling through my log files I have found a number of instances of  
the following


 2008,04.29 06:12:47,595   OFF [Finalizer] (Log.NSLogErr:1546  
appendln) - Unable to release locks held by a deallocated  
EOEditingContext. 2008,04.29 06:12:47,596 DEBUG [Finalizer]  
(Log.NSLogDebug:1546 appendln) - java.lang.IllegalStateException:  
Illegal Lock usage: unlocking thread not owner.	at  
com.webobjects.foundation.NSRecursiveLock.unlock(NSRecursiveLock.java: 
207)	at com.webobjects.eocontrol.EOEditingContext.unlock 
(EOEditingContext.java:4720)	at  
com.webobjects.eocontrol.EOEditingContext._dispose 
(EOEditingContext.java:1158)	at  
com.webobjects.eocontrol.EOEditingContext.finalize 
(EOEditingContext.java:1178)	at  
java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)	at  
java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)	at  
java.lang.ref.Finalizer.access$100(Finalizer.java:14)	at  
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)


Im using MultiECLockManager to handle all the locking and unlocking,  
so Im wondering if anyone else has seen this kind of error and what I  
can do to chase it up.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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

This email sent to [EMAIL PROTECTED]


Getting all Session Objects From Application

2008-04-23 Thread Owen McKerrow

Hi All,

I have an app that needs to display all of the people who are  
currently logged in. Session has an instance of Person in it, which  
represents who's logged into that session.
Now what I wanted to do was have a method in Application which  
returned an array of the people it gathered from each of its sessions.


Now the thing I can't figure out is how to get an array of Sessions  
from Application. I can ask the Application for its WOSessionStore,  
but I can't seem to get a Session out of this without either a  
Session ID or a WORequest.


Is there anyway to do what Im after ?

Another approach would be to manually keep a "static" list of people  
who have logged in inside Application, which is updated on Log-In and  
again on Log Out or session.terminate(). But it would be quite easy  
to get into a situation where this list gets out of sync ( say if  
someone doesn't log out, and logs in again a second time, you may end  
up with 2 of the person in the list, or just one, but it disappears  
when their first session times out ). Anyways thats why I wanted to  
go with a "dynamic" listing from Application itself.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


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

This email sent to [EMAIL PROTECTED]


Unable to decrement snapshot count ....count is already 0 or does not exist

2008-04-23 Thread Owen McKerrow


Hi All,

One of our apps when down yesterday and on trawling through the log  
files I found 8 instances of the error : is unable to decrement  
snapshot count for object with global ID _EOIntegralKeyGlobalID 
[PublicationKeyword (java.lang.Long)151400] - count is already 0 or  
this snapshot doesn't exist ( see full stack trace below ). All  
appear to have come from the same saveChanges() call. Also note each  
time it occurred it was for a separate object.


Each of the objects had been created about 13 minutes before the  
errors e.g.


2008,04.23 15:	:56,420  "INSERT INTO PUB_KEYWORD(pub_keyword,  
KEYWORD, pub) VALUES (?, ?, ?)" withBindings: 1:151400 
(publicationKeyWordID), 2:"proteins"(keyword), 3:23092(publicationID)>


Anyone have any suggestions as to what may have caused this ? i.e.  
what sort of things I should be looking for in the code. The app has  
been running for almost 2 years now and this is the first time we've  
had this problem  ( in fact its the first time I have seen it in 10  
years of WO development ).


As always all comments/questions/feedback welcome.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


decrementSnapshotCountForGlobalID: com.webobjects.eoaccess.EODatabase  
[EMAIL PROTECTED] -- is unable to decrement  
snapshot count for object with global ID _EOIntegralKeyGlobalID 
[PublicationKeyword (java.lang.Long)151400] - count is already 0 or  
this snapshot doesn't exist


2008,04.23 15:43:37,825 DEBUG [http-8968-Processor2] (Log.NSLogDebug: 
1546 appendln) - java.lang.RuntimeException: Unable to decrement  
snapshot count for object with global ID _EOIntegralKeyGlobalID 
[PublicationKeyword (java.lang.Long)151400] - count is already 0 or  
this snapshot doesn't exist	at  
com.webobjects.eoaccess.EODatabase.decrementSnapshotCountForGlobalID 
(EODatabase.java:1150)	at  
com.webobjects.eoaccess.EODatabaseContext.editingContextDidForgetObjectW 
ithGlobalID(EODatabaseContext.java:3752)	at  
com.webobjects.eocontrol.EOObjectStoreCoordinator.editingContextDidForge 
tObjectWithGlobalID(EOObjectStoreCoordinator.java:665)	at  
com.webobjects.eocontrol.EOEditingContext.editingContextDidForgetObjectW 
ithGlobalID(EOEditingContext.java:3921)	at  
com.webobjects.eocontrol.EOEditingContext._processReferenceQueue 
(EOEditingContext.java:4833)	at  
com.webobjects.eocontrol.EOEditingContext.unlockObjectStore 
(EOEditingContext.java:4751)	at  
com.webobjects.eocontrol.EOEditingContext.editingContextDidForgetObjectW 
ithGlobalID(EOEditingContext.java:3923)	at  
com.webobjects.eocontrol.EOEditingContext.editingContextDidForgetObjectW 
ithGlobalID(EOEditingContext.java:3921)	at  
com.webobjects.eocontrol.EOEditingContext._processReferenceQueue 
(EOEditingContext.java:4833)	at  
com.webobjects.eocontrol.EOEditingContext._sendOrEnqueueNotification 
(EOEditingContext.java:4786)	at  
com.webobjects.eocontrol.EOEditingContext._globalIDChanged 
(EOEditingContext.java:2024)	at  
sun.reflect.GeneratedMethodAccessor215.invoke(Unknown Source)	at  
sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)	at  
java.lang.reflect.Method.invoke(Method.java:585)	at  
com.webobjects.foundation.NSSelector._safeInvokeMethod 
(NSSelector.java:120)	at  
com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod 
(NSNotificationCenter.java:601)	at  
com.webobjects.foundation.NSNotificationCenter.postNotification 
(NSNotificationCenter.java:545)	at  
com.webobjects.foundation.NSNotificationCenter.postNotification 
(NSNotificationCenter.java:575)	at  
com.webobjects.eocontrol.EOEditingContext._processGlobalIDChanges 
(EOEditingContext.java:2020)	at  
sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source)	at  
sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)	at  
java.lang.reflect.Method.invoke(Method.java:585)	at  
com.webobjects.foundation.NSSelector.invoke(NSSelector.java:354)	at  
com.webobjects.foundation.NSSelector._safeInvokeSelector 
(NSSelector.java:108)	at  
com.webobjects.eocontrol.EOEditingContext._sendOrEnqueueNotification 
(EOEditingContext.java:4784)	at  
com.webobjects.eocontrol.EOEditingContext._globalIDChanged 
(EOEditingContext.java:2024)	at  
sun.reflect.GeneratedMethodAccessor215.invoke(Unknown Source)	at  
sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)	at  
java.lang.reflect.Method.invoke(Method.java:585)	at  
com.webobjects.foundation.NSSelector._safeInvokeMethod 
(NSSelector.java:120)	at  
com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod 
(NSNotificationCenter.java:601)	at  
com.webobjects.foundation.NSNotificationCenter.postNotif

Re: The sky is falling! The world is ending! WebObjects is Dead!

2008-04-02 Thread Owen McKerrow




On 03/04/2008, at 10:03 AM, David Holt wrote:

Darn, you beat me to it!

David

:-)


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

This email sent to [EMAIL PROTECTED]


Re: [OT] Limiting File Upload Sizes

2008-04-01 Thread Owen McKerrow

Hi Guys,

Thanks for the suggestions. I was after something specifically that  
stopped the user even trying to upload something so they don't waste  
time sitting around waiting for something to upload only have it to  
fail half way through.


I will check out Joshua's implementation.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 01/04/2008, at 3:01 PM, Chuck Hill wrote:


On Mar 31, 2008, at 6:46 PM, Miguel Arroz wrote:


Hi!

 The KISS solution: configure the maximum size of a request in  
Apache itself, using the LimitRequestBody option in the  
configuration.


 You should find a way to handle nicely the error pages the user  
will see when submitting a file too large. This of course depends  
on your setup, if you are doing the upload using some Ajax  
trickery or not, etc.


If you don't want to use the Apache thing, you should be able to do  
a streaming upload (stream it to disk) and cut off the copying  
after a certain point.  It should be straightforward to return an  
error message.


Chuck




On 2008/04/01, at 02:04, Owen McKerrow wrote:


Hi All,

Just wondering if anyone has any recommendations on what to use  
to limit the size of files uses upload.
Im currently looking at http://swfupload.org/. has anyone had any  
experience with it, in particular getting it to play nice with a  
WOApp ?


Or is there something better out there ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - -
"As of tomorrow, employees will only be able to access the  
building using individual security cards. Pictures will be taken  
next Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


___
Do not 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/arroz% 
40guiamac.com


This email sent to [EMAIL PROTECTED]


Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com



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


This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







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

This email sent to [EMAIL PROTECTED]


[OT] Limiting File Upload Sizes

2008-03-31 Thread Owen McKerrow

Hi All,

Just wondering if anyone has any recommendations on what to use to  
limit the size of files uses upload.
Im currently looking at http://swfupload.org/. has anyone had any  
experience with it, in particular getting it to play nice with a WOApp ?


Or is there something better out there ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


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

This email sent to [EMAIL PROTECTED]


[OT] "...creation and use of Objective-C objects in Java."

2008-02-27 Thread Owen McKerrow

Hi All,

My father just sent me the following email which came across on the  
Quicktime for Java mailing list. I thought some of you may be  
interested.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


Begin forwarded message:


Today's Topics:

  1. Announce: Rococoa (Duncan McGregor)


- 
-


Message: 1
Date: Mon, 25 Feb 2008 13:05:21 +
From: "Duncan McGregor" <[EMAIL PROTECTED]>
Subject: Announce: Rococoa
To: [EMAIL PROTECTED]
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1

I think that I hinted a while back that I was working on a Java
wrapper for QTKit on the Mac. I'm now pleased to announce that  
Rococoa

has been released as an open source project under LGPL.

"Rococoa is a generic Java binding to the Mac Objective-C object
system. It allows the creation and use of Objective-C objects in  
Java,

and the implementation of Objective-C interfaces in Java."

As part of the Rococoa distribution we wrap some of the QTKit
essentials, allowing Mac users to display a movie in a frame, play  
it,

get at its tracks and media etc.
Everything is at a very early stage, but it seems solid enough to  
play
with. If you've a Mac and an hour free please do give it a go, as  
what

it needs most is feedback.

Rococoa can be found on java.net, here:
   https://rococoa.dev.java.net

Please provide feedback on the user or dev mailing lists,  
accessible here:

   https://rococoa.dev.java.net/servlets/ProjectMailingListList

Enjoy

Duncan


--

___
QuickTime-java mailing list
[EMAIL PROTECTED]
http://lists.apple.com/mailman/listinfo/quicktime-java

End of QuickTime-java Digest, Vol 5, Issue 22
*


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

This email sent to [EMAIL PROTECTED]


Illegal State Exceptions when using MultiECLockManager

2008-02-27 Thread Owen McKerrow

Hi All,

Over the past couple of days I have received some emails from one of  
my apps which is using the MultiECLockManager() to manage its  
EditingContexts


EXCEPTION:
java.lang.IllegalStateException: prepareForSaveWithCoordinator:  
[EMAIL PROTECTED] is currently saving  
for [EMAIL PROTECTED] so it cannot  
prepare to save for  
[EMAIL PROTECTED]   
[EMAIL PROTECTED] has sources  
([EMAIL PROTECTED])
prepareForSaveWithCoordinator:  
[EMAIL PROTECTED] is currently saving  
for [EMAIL PROTECTED] so it cannot  
prepare to save for  
[EMAIL PROTECTED]   
[EMAIL PROTECTED] has sources  
([EMAIL PROTECTED])


STACK TRACE:
at prepareForSaveWithCoordinator(EODatabaseContext.java:5790)
at saveChangesInEditingContext(EOObjectStoreCoordinator.java:409)
at saveChanges(EOEditingContext.java:3226)
at writeToAccessLog(LogHelper.java:101)
at appendToResponse(RISFPageComponent.java:47)
at appendToResponse(RISPageComponent.java:217)
at appendToResponse(WOSession.java:1200)
at appendToResponse(Session.java:64)
at appendToResponse(WOApplication.java:1418)
at appendToResponse(RISApplication.java:286)
at appendToResponse(Application.java:96)
at _dispatchWithPreparedPage(WOComponentRequestHandler.java:230)
at _dispatchWithPreparedSession(WOComponentRequestHandler.java:287)
at _dispatchWithPreparedApplication(WOComponentRequestHandler.java:322)
at _handleRequest(WOComponentRequestHandler.java:358)


What Im not sure of is how it gets into this state if  
MultiECLockManager() is managing the locks. What sort of thing could  
cause this message ? What sort of things should I be looking for in  
my code which might cause this ? Maybe Im over thinking it and its  
quite simple but at the moment Im drawing a blank and not quite sure  
where to start.


Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


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

This email sent to [EMAIL PROTECTED]


Re: The EOF How-Do-I-Get-There-From-Here Diagram

2008-02-04 Thread Owen McKerrow

Thanks Mike thats great !

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 05/02/2008, at 11:32 AM, Mike Schrag wrote:

I ALWAYS forget how to get, say, an adaptor channel when I have an  
EOModel, or a JDBCPlugIn when I have an EODatabaseContext (or  
whatever it might be), so here is the official unofficial graph of  
interesting EOF classes and how you navigate between them:



 ___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Problems with xcodebuild

2008-01-24 Thread Owen McKerrow

Hi All,

We're having a problem with a project that build fine from with in  
xCode itself. However when we do a xcodebuild from the command line  
things go a little haywire. That is it can' find any of the classes.  
Here's and example of the output.


Any ideas on why we get different behavior from the 2 build methods ?  
And how/what do I need to fix so it works from the command line again.


symbol  : class Person
location: class edu.uow.emlab.time2bhealthy.Session
protected Person currentPerson;
  ^
entities/edu/uow/emlab/time2bhealthy/Session.java:23: cannot resolve  
symbol

symbol  : class Person
location: class edu.uow.emlab.time2bhealthy.Session
protected Person adminPerson; //used to store an admin's  
person object if

logged in as a general user
  ^
entities/edu/uow/emlab/time2bhealthy/Session.java:82: cannot resolve  
symbol

symbol  : class Person
location: class edu.uow.emlab.time2bhealthy.Session
public Person currentPerson()

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


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

This email sent to [EMAIL PROTECTED]


Further Info : Flattened Many To Many grabbing all objects

2008-01-17 Thread Owen McKerrow

Hi All,


I've done some more digging. We recently update our project to use  
EOGenerator ( using the standard Template files that come with it )  
which as Im sure you all know changes the behavior of adding an  
object from a method that looks like this :


public void addToAssociatedWebsiteDisplays 
(edu.uow.ris.framework.eo.Publication object) {
includeObjectIntoPropertyWithKey(object,  
"associatedWebsiteDisplays");

}

to one that looks like this :

public void addToAssociatedWebsiteDisplaysRelationship 
(edu.uow.ris.framework.eo.Group object) {
addObjectToBothSidesOfRelationshipWithKey( object,  
"associatedWebsiteDisplays" );

}

which is another place where Im seeing the behavior I described in my  
first email. If I change the method back to use  
includeObjectIntoPropertyWithKey instead of  
addObjectToBothSidesOfRelationshipWithKey the load of all the related  
objects goes away. So at this stage it seems (?) to be a better  
option. However I have always been told use  
addObjectToBothSidesOfRelationshipWithKey its better, it knows how to  
handle the relationships and sets the reverse one for you, which is  
why I assume the standard EOGeneartor template uses it. But is it  
worth it with such a performance hit ? Not only do I have 17,000  
objects loaded, it also causes about a 30 second slow down when doing  
a save.


Anyways just some late Friday afternoon ramblings. Any and all help  
would be most appreciated.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


On 18/01/2008, at 2:56 PM, Owen McKerrow wrote:


Hi All,

I have a flattened many to many relationship between two table  
Group and Publication, called AssociatedWebsites. Now when I call


thePublication.addObjectToBothSidesOfRelationshipWithKey 
(aGroup,"associatedWebsiteDisplays");


or

aGroup.addObjectToBothSidesOfRelationshipWithKey 
(thePublication,"associatedWebsiteDisplays");


and watch the SQL it its loading all of the objects  currently  
related between the two. ie. whe I have SQL debugging turned on I  
see the following SQL straight after either of the previous lines  
of code ( I of course put in the ... etc etc ) :


 14:40:27,552 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln)  
-  === Begin Internal Transaction
 14:40:27,553 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln)  
-  evaluateExpression: $OracleExpression: "SELECT t0.category_for_other, t0.chapter_title,  
etc etc  FROM PUB t0, ASS_WEB_DISP T1, GRP T2 WHERE T2.grp = ?  
AND t0.pub = T1.pub AND T1.grp = T2.grp" withBindings: 1:30(groupID)>
 14:40:34,648 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln)  
- 17481 row(s) processed
 14:40:34,650 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln)  
-  === Commit Internal Transaction


Is this standard behaviour for flattened relationships ? Is there  
any way to stop this from happening ? Do I need to model the  
relationships differently ? I don't want to have to load all 17,000  
just to add an extra one.


Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Flattened Many To Many grabbing all objects

2008-01-17 Thread Owen McKerrow

Hi All,

I have a flattened many to many relationship between two table Group  
and Publication, called AssociatedWebsites. Now when I call


thePublication.addObjectToBothSidesOfRelationshipWithKey 
(aGroup,"associatedWebsiteDisplays");


or

aGroup.addObjectToBothSidesOfRelationshipWithKey 
(thePublication,"associatedWebsiteDisplays");


and watch the SQL it its loading all of the objects  currently  
related between the two. ie. whe I have SQL debugging turned on I see  
the following SQL straight after either of the previous lines of code  
( I of course put in the ... etc etc ) :


 14:40:27,552 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln)  
-  === Begin Internal Transaction
 14:40:27,553 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln)  
-  evaluateExpression: $OracleExpression: "SELECT t0.category_for_other, t0.chapter_title,  
etc etc  FROM PUB t0, ASS_WEB_DISP T1, GRP T2 WHERE T2.grp = ?  
AND t0.pub = T1.pub AND T1.grp = T2.grp" withBindings: 1:30(groupID)>
 14:40:34,648 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln) -  
17481 row(s) processed
 14:40:34,650 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln)  
-  === Commit Internal Transaction


Is this standard behaviour for flattened relationships ? Is there any  
way to stop this from happening ? Do I need to model the  
relationships differently ? I don't want to have to load all 17,000  
just to add an extra one.


Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


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

This email sent to [EMAIL PROTECTED]


Setting Applications Package under XCode

2007-12-20 Thread Owen McKerrow

Hi All,

Where do I ( assuming i can ) tell xCode that it shoudl be using my  
packaged version of Application, not plain old Application for when  
it runs. Cause after I added application to the package I get the  
following error when the app starts up :


Can't load Application class, exiting...
java.lang.ClassNotFoundException: Application
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:68)

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


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

This email sent to [EMAIL PROTECTED]


Re: Non Compulsory toOne Relationships, Propergating Primary Key

2007-12-12 Thread Owen McKerrow



On 08/12/2007, at 7:02 AM, Art Isbell wrote:


On Dec 7, 2007, at 8:51 AM, Chuck Hill wrote:


On Dec 6, 2007, at 11:50 PM, Art Isbell wrote:



A to-one relationship from one foreign key to a primary key


Typo: should read "from a primary key to a primary key"

must always have exactly one row in the destination entity—if  
this isn’t guaranteed to be the case, use a to-many relationship.  
This rule doesn’t apply to a foreign key to primary key  
relationship where a null value for the foreign key in the source  
row indicates that no row exists in the destination.


	I copied and pasted the above, so it's not a typo in the general  
case.  However, in this specific case, the foreign key is the  
primary key, so "from a primary key to a primary key" applies.


Aloha,
Art



So what this seems to be saying is that WebObjects supports 0..X or  
1..1 relationships but not 0..1 ?



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"

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

This email sent to [EMAIL PROTECTED]


Re: [OT] Wheres the WebObjects API gone ??

2007-12-11 Thread Owen McKerrow


On 12/12/2007, at 11:18 AM, Chuck Hill wrote:



On Dec 11, 2007, at 4:13 PM, Owen McKerrow wrote:


Hi All,

Anyone know what happened to the API ?


http://developer.apple.com/documentation/MacOSXServer/Reference/ 
WO54_Reference/index.html


http://developer.apple.com/documentation/WebObjects/Reference/API/ 
index.html is a dead link and there is no mention of the API on  
http://developer.apple.com/referencelibrary/DeveloperTools/ 
idxWebObjects-date.html


Check the filter, change it from Guide to Reference.  :-)

Chuck



Hmm I was looking for the word API in there somewhere, so I skimmed  
over that one. Sorry all for another useless email in your inbox.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp

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

This email sent to [EMAIL PROTECTED]


[OT] Wheres the WebObjects API gone ??

2007-12-11 Thread Owen McKerrow

Hi All,

Anyone know what happened to the API ?

http://developer.apple.com/documentation/WebObjects/Reference/API/ 
index.html is a dead link and there is no mention of the API on  
http://developer.apple.com/referencelibrary/DeveloperTools/ 
idxWebObjects-date.html


http://developer.apple.com/documentation/WebObjects/Reference/ 
API5.2.4/index.html still works but is a little out of date.



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


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

This email sent to [EMAIL PROTECTED]


Non Compulsory toOne Relationships, Propergating Primary Key

2007-12-06 Thread Owen McKerrow

Hi All,

I have the following relationship :

GROUP <-- --> RQF_GROUP

where a group may have a RQF Group object, but the RQF Group object  
must belong to a group.


As its a to one I want it to propagate its primary key across,  
however when I tick this box WO is nice and helpful and inserts a new  
RQFGroup object every-time I make a new Group, even thought I have  
specified that the relationship is optional. Is there any way to stop  
this from happening ?


I have tried to turn off the Propagates Primary Key section, however  
this then leads to the situation where if I DO want and RQFGroup to  
be created ( which I do by hand ) and then save both of the new  
objects to the DB I get the following error ...


EvaluateExpression failed: $OracleExpression: "SELECT RQF_GRP_SEQ.NEXTVAL FROM DUAL">: Next  
exception:SQL State:42000 -- error code: 2289 -- msg: ORA-02289:  
sequence does not exist


Which makes sense when you read the doc ...

"The Propagate Primary Key option lets you specify that the primary  
key of the source entity should be propagated to newly inserted  
objects in the destination of the relationship. That is, when  
inserting objects that are the destination of the relationship, this  
option suppresses primary key generation for the destination entity  
and instead uses the source object’s primary key as the primary key  
for the newly inserted destination object."


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


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

This email sent to [EMAIL PROTECTED]

Re: Java Packages for Dummies

2007-12-04 Thread Owen McKerrow

Hi Chuck, Miguel and Art,

Yup I see what your saying. I think the light just switched on, in  
fact it did Art's email confirmed it.


As all the way through out the old projects we never had a method  
called setPersonRelationship, just setPerson we dropped the word  
Relationship from the template. Doh ! Ohh well looks like its time to  
hunt down all the cases where we did it the old way and change them  
to use setAttributeNameRelationship instead.


Thanks guys, I couldn't see the wood for the trees.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 05/12/2007, at 10:19 AM, Chuck Hill wrote:



On Dec 4, 2007, at 3:09 PM, Owen McKerrow wrote:


Hi All,

As part of preparing to move to Eclipse we are going back and  
updating our projects so they are using packages ( this is the bit  
where I run and hide in shame as I have to admit we never used  
them before ) and EOGenerator if they weren't already. Anyways.



We're having some issues, lots of issues so I think we've done  
something dumb.


Yes.  :-P


The first issue is that addbjectToBothSidesOfRelationship is now  
causing a StackOverflow error as it keeps calling itself. In the  
example below its for the AuditLog class. First up is the old  
code, then the new code ( thanks to EOGenerator ) and then the  
error message (I haven't included all of the stack trace as its  
the same thing over and over again ).


So as a newbie to packages I can't see any rules that we're  
breaking ( although we probably are ). Any advise/suggestions/ 
fixes would be most appreciated.


---Old

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

/**
Log trail of each time a page is accessed/viewed on the website.
*/
public class AccessLog extends OMGenericRecord {

public AccessLog() {
super();
}


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

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



New-

package edu.uow.ris.framework.eo;

import edu.uow.ris.framework.*;
import edu.uow.emlab.omframework.*;
import com.webobjects.eoaccess.*;
import com.webobjects.eocontrol.*;
import com.webobjects.foundation.*;
import java.math.BigDecimal;
import java.util.*;
import org.apache.log4j.Logger;

public abstract class _AccessLog extends OMGenericRecord {
private static Logger log = Logger.getLogger( _AccessLog.class );

public _AccessLog() {
super();
}

  public void setPerson(edu.uow.ris.framework.eo.Person aValue) {
if( aValue == null ) {
edu.uow.ris.framework.eo.Person object = person();
if( object != null )
removeObjectFromBothSidesOfRelationshipWithKey 
( object, "person" );

} else
addObjectToBothSidesOfRelationshipWithKey( aValue,  
"person" );

}



This method should be exactly the same as the original method  
(other than the signature).  Adding packages changes nothing.   
addObjectToBothSidesOfRelationshipWithKey will result in a call to  
setPerson.  In your case, setPerson then calls  
addObjectToBothSidesOfRelationshipWithKey which calls setPerson,  
which calls addObjectToBothSidesOfRelationshipWithKey etc. etc.



public void setPerson(edu.uow.ris.framework.eo.Person value) {
takeStoredValueForKey(value, "person");
}


Chuck
--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







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

This email sent to [EMAIL PROTECTED]


Java Packages for Dummies

2007-12-04 Thread Owen McKerrow

Hi All,

As part of preparing to move to Eclipse we are going back and  
updating our projects so they are using packages ( this is the bit  
where I run and hide in shame as I have to admit we never used them  
before ) and EOGenerator if they weren't already. Anyways.



We're having some issues, lots of issues so I think we've done  
something dumb. The first issue is that  
addbjectToBothSidesOfRelationship is now causing a StackOverflow  
error as it keeps calling itself. In the example below its for the  
AuditLog class. First up is the old code, then the new code ( thanks  
to EOGenerator ) and then the error message (I haven't included all  
of the stack trace as its the same thing over and over again ).


So as a newbie to packages I can't see any rules that we're breaking  
( although we probably are ). Any advise/suggestions/fixes would be  
most appreciated.


---Old

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

/**
Log trail of each time a page is accessed/viewed on the website.
*/
public class AccessLog extends OMGenericRecord {

public AccessLog() {
super();
}


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

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



New-

package edu.uow.ris.framework.eo;

import edu.uow.ris.framework.*;
import edu.uow.emlab.omframework.*;
import com.webobjects.eoaccess.*;
import com.webobjects.eocontrol.*;
import com.webobjects.foundation.*;
import java.math.BigDecimal;
import java.util.*;
import org.apache.log4j.Logger;

public abstract class _AccessLog extends OMGenericRecord {
private static Logger log = Logger.getLogger( _AccessLog.class );

public _AccessLog() {
super();
}

  public void setPerson(edu.uow.ris.framework.eo.Person aValue) {
if( aValue == null ) {
edu.uow.ris.framework.eo.Person object = person();
if( object != null )
removeObjectFromBothSidesOfRelationshipWithKey 
( object, "person" );

} else
addObjectToBothSidesOfRelationshipWithKey( aValue,  
"person" );

}






Error:	 com.webobjects.foundation.NSForwardException  
[java.lang.StackOverflowError] null


InvocationTargetException.java  54  java.lang.reflect
GeneratedMethodAccessor8.java   NA  invoke  sun.reflect
DelegatingMethodAccessorImpl.java   25  invoke  sun.reflect
Method.java 585 invoke  java.lang.reflect
NSKeyValueCoding.java   688 setMethodValue  com.webobjects.foundation
NSKeyValueCoding.java   1175setValueInObject
com.webobjects.foundation
EOCustomObject.java 1601takeValueForKey com.webobjects.eocontrol
EOCustomObject.java	1078	addObjectToBothSidesOfRelationshipWithKey	 
com.webobjects.eocontrol

_AccessLog.java 83  setPerson   edu.uow.ris.framework.eo
GeneratedMethodAccessor8.java   NA  invoke  sun.reflect
DelegatingMethodAccessorImpl.java   25  invoke  sun.reflect
Method.java 585 invoke  java.lang.reflect
NSKeyValueCoding.java   688 setMethodValue  com.webobjects.foundation
NSKeyValueCoding.java   1175setValueInObject
com.webobjects.foundation
EOCustomObject.java 1601takeValueForKey com.webobjects.eocontrol
EOCustomObject.java	1078	addObjectToBothSidesOfRelationshipWithKey	 
com.webobjects.eocontrol

_AccessLog.java 83  setPerson   edu.uow.ris.framework.eo
GeneratedMethodAccessor8.java   NA  invoke  sun.reflect
DelegatingMethodAccessorImpl.java   25  invoke  sun.reflect
Method.java 585 invoke  java.lang.reflect
NSKeyValueCoding.java   688 setMethodValue  com.webobjects.foundation
NSKeyValueCoding.java   1175setValueInObject
com.webobjects.foundation
EOCustomObject.java 1601takeValueForKey com.webobjects.eocontrol
EOCustomObject.java	1078	addObjectToBothSidesOfRelationshipWithKey	 
com.webobjects.eocontrol

_AccessLog.java 83  setPerson   edu.uow.ris.framework.eo



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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

This email sent to [EMAIL PROTECTED]


OT : Steve Jobs Interviewed about WebObjects

2007-12-04 Thread Owen McKerrow

Hi All,

Was cleaning up some old book marks and came across this old  
( 1996 )  interview with Steve when he was back at NeXT. Thought I  
would pass it along in case anyone was interested.


http://www.wired.com/wired/archive/4.02/jobs.html

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


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

This email sent to [EMAIL PROTECTED]


Re: Object with globalID could not be found in the database, when it is there ??

2007-11-28 Thread Owen McKerrow



On 29/11/2007, at 7:06 AM, Mr. Pierre Frisch wrote:

Guys I need the bug reports. It may be easier to fix EOF than  
implement some bizarre workaround rule.


Pierre
--
Pierre Frisch
[EMAIL PROTECTED]



Hi Pierre,

If joining the entities back into one model doesn't fix the issue  
then you'll probably be getting a Support Incident request as well as  
a bug report :D


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"

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

This email sent to [EMAIL PROTECTED]


Re: Object with globalID could not be found in the database, when it is there ??

2007-11-27 Thread Owen McKerrow



On 28/11/2007, at 4:18 PM, Mike Schrag wrote:

Now... about those partial entities. What funky stuff could be  
done with 'em? ;-)
You know, when I was writing this stuff earlier today, I actually  
thought at one point "I'm going to wake up tomorrow and Lachlan's  
going to use partial entities with vertical inheritance and I'm  
going to get some CRAZY bug reports" :)


ms


So if I understand you correctly what you saying is that Lachlan is  
know a long standing bug with EOGenerator ?


: P

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"

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

This email sent to [EMAIL PROTECTED]


Re: Object with globalID could not be found in the database, when it is there ??

2007-11-27 Thread Owen McKerrow


On 28/11/2007, at 12:04 PM, Lachlan Deck wrote:


Hi there,

On 28/11/2007, at 11:35 AM, Owen McKerrow wrote:


Hmm nope we don't have any that are cache'd in memory.

We do however have cross model relationships that involved  
entities that use inheritance ( thanks for the tip Lachlan ).


Yay!

So I have merged the models back into 1 ( was only for conceptual  
reasons they were two) and am going to do a patch release to see  
if that fixes the issue.


Well... next question was going to be, given that you'd chosen door  
'A':
- have you marked all foreign keys inherited in sub-entities as  
class properties? (hint: eof bug work-a-round)


i.e., if you have a foreign key in super-entity which will  
obviously not be a class property ... you have to mark it as a  
class property in your sub-entities in order to allow EOF to save  
the records properly etc.


It'll be a modelling issue, but sure if it solves your problem by  
putting them into the one model, great.




We'll wait and see if it does :) If not I will try what you suggest.  
Should I be dong that anyways even with all Entities within the one  
model ? Or is it only the case for cross model relationships. In  
either case sounds like something that should be added to the wikki  
( if its not there already ).


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,

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

This email sent to [EMAIL PROTECTED]


Re: Object with globalID could not be found in the database, when it is there ??

2007-11-27 Thread Owen McKerrow

Hmm nope we don't have any that are cache'd in memory.

We do however have cross model relationships that involved entities  
that use inheritance ( thanks for the tip Lachlan ). So I have merged  
the models back into 1 ( was only for conceptual reasons they were  
two) and am going to do a patch release to see if that fixes the issue.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 28/11/2007, at 9:53 AM, Simon McLean wrote:


Hi Xavier -

I think you might have solved our problem. We have recently  
introduced JGroupSynchronizer and the entities that are affected by  
the "Object with globalID could not be found" problem are indeed  
flagged as "cache in memory".


Many thanks for the tip.

Simon

On 27 Nov 2007, at 14:50, Xavier Destombes wrote:


Hello Owen,

I don't know if it helps, but we got the same behavior from time  
to time when we tried to both have "JGroupSynchronizer" and "cache  
in memory" checked in the eomodel.

Do you have the same setup?

Xavier




Hi Anjo,

On 27/11/2007, at 6:01 PM, Anjo Krank wrote:



Am 27.11.2007 um 00:39 schrieb Owen McKerrow:

The object with globalID _EOIntegralKeyGlobalID[Person  
(java.lang.Long)8917] could not be found in the database. This  
could be result of a referential integrity problem with the  
database. An empty fault could not be created because the  
object's class could not be determined (e.g. the GID is  
temporary or it is for an abstract entity).


Did you check if you *do* have this object with GID 8917 in the  
prod DB?


Also, it's been a longstanding bug in WO that non-existant EOs  
would get some sort of dummy-fault in some cases, leading to  
erratic behaviour later on. Wonder fixed this years ago...


Cheers, Anjo


Yes that object defiantly does exist, an it sometimes does in  
fact fire correctly.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - -
 'The test of a first-rate intelligence is the ability to hold  
two opposed ideas in the mind at the same time and still be able  
to function.'

-F.Scott Fitzgerald,

___
Do not 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/webobjects% 
40anazys.com


This email sent to [EMAIL PROTECTED]



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


This email sent to [EMAIL PROTECTED]




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

This email sent to [EMAIL PROTECTED]


Re: Object with globalID could not be found in the database, when it is there ??

2007-11-27 Thread Owen McKerrow

Hi Anjo,

On 27/11/2007, at 6:01 PM, Anjo Krank wrote:



Am 27.11.2007 um 00:39 schrieb Owen McKerrow:

The object with globalID _EOIntegralKeyGlobalID[Person  
(java.lang.Long)8917] could not be found in the database. This  
could be result of a referential integrity problem with the  
database. An empty fault could not be created because the object's  
class could not be determined (e.g. the GID is temporary or it is  
for an abstract entity).


Did you check if you *do* have this object with GID 8917 in the  
prod DB?


Also, it's been a longstanding bug in WO that non-existant EOs  
would get some sort of dummy-fault in some cases, leading to  
erratic behaviour later on. Wonder fixed this years ago...


Cheers, Anjo


Yes that object defiantly does exist, an it sometimes does in fact  
fire correctly.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,

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

This email sent to [EMAIL PROTECTED]


Re: Object with globalID could not be found in the database, when it is there ??

2007-11-26 Thread Owen McKerrow

Nope, not using Wonder.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 27/11/2007, at 10:43 AM, Simon McLean wrote:


Owen -

We are experiencing the exact same random problem. I've noticed it  
cropping up in the logs but not had time to look into it yet, but  
it's definitely the same problem. Are you using Wonder ?


Simon

On 26 Nov 2007, at 23:39, Owen McKerrow wrote:


Hi All,

Im having a strange error occur randomly only on the Production  
version of the website ( we'll Im having 2 occur, but I'll deal  
with the other in another email after I have investigated it some  
more ). Anyways as I was saying the error only occurs on the  
Production version of the website and not on the Test or Dev  
servers or on the Dev Machines. To make matters worse it only  
occurs sometimes.


The error and the stack trace are listed below. From my  
understanding it appears to be trying to fault and object and  
claims that it can't be found in the database. In all instances of  
this bug I have done a manual check of the database and the data  
does exist and all the PK's and FK's are correct. Then as I said  
you'll come back to teh same page a little later and it will work  
i.e the fault will fire correctly.


OK here are some stats :

Dev Machines (Works Fine):
OS X 10.4.11
1.5.0_07
WO 5.3.3

We then do a servlet  build  for deployment running under Tomcat.

Dev Server (Works Fine):
Sun E250
Solaris 9
Java 1.4.2
Tomcat 5.5.7

Test Server  (Works Fine)
Sun T1000
Solaris 10
Java 1.5.0_06
Tomcat 5.5.7

Prod Server  (Does Not Work)
Sun V210
Solaris 9
Java 1.5.0_06
Tomcat 5.5.7

( Yes I know the Test and Prod should be the same, believe me I  
know. We won't go into the reasons why they are not, or why Test  
is on a more powerful server than Prod).


The site has been running for more than a year with this set up  
and no such problem have occurred, until the latest release. The  
main difference with this release is that there are now 2 models  
with relationships between the two.


Has anyone see this type of behavior before ? Any suggestions on a  
way forward ?


EXCEPTION:
java.lang.IllegalStateException: The object with globalID  
_EOIntegralKeyGlobalID[Person (java.lang.Long)8917] could not be  
found in the database. This could be result of a referential  
integrity problem with the database. An empty fault could not be  
created because the object's class could not be determined (e.g.  
the GID is temporary or it is for an abstract entity).
The object with globalID _EOIntegralKeyGlobalID[Person  
(java.lang.Long)8917] could not be found in the database. This  
could be result of a referential integrity problem with the  
database. An empty fault could not be created because the object's  
class could not be determined (e.g. the GID is temporary or it is  
for an abstract entity).


STACK TRACE:
at _fetchSingleObject(EODatabaseContext.java:3583)
at _objectFaultWithSnapshotRelationshipEditingContext 
(EODatabaseContext.java:2532)

at _fireDeferredFaultWithSourceObject(EODatabaseContext.java:2575)
at createFaultForDeferredFault(EOAccessDeferredFaultHandler.java:45)
at willReadRelationship(EOCustomObject.java:1302)
at valueInObject(_EOMutableKnownKeyDictionary.java:560)
at storedValueForKey(EOCustomObject.java:1736)
at person(_RQFGroupPersonPub.java:30)
at invoke(GeneratedMethodAccessor476.java:NA)
at invoke(DelegatingMethodAccessorImpl.java:25)
at invoke(Method.java:585)
at methodValue(KeyValueCodingProtectedAccessor.java:54)
at valueInObject(NSKeyValueCoding.java:1160)
at valueForKey(EOCustomObject.java:1559)
at valueForKey(NSKeyValueCoding.java:498)
at valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at valueForKeyPath(EOCustomObject.java:1675)
at valueForKeyPath(NSKeyValueCodingAdditions.java:149)
at valueForKey(NSArray.java:1229)
at personDetailsForPub(RQFPub.java:192)
at hasSelectedPublicationAsBOW(Publication.java:2366)
at isAbleToSelect(RQFBOWSelection.java:303)



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold  
two opposed ideas in the mind at the same time and still be able  
to function.'

-F.Scott Fitzgerald,


___
Do not 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/

Object with globalID could not be found in the database, when it is there ??

2007-11-26 Thread Owen McKerrow

Hi All,

Im having a strange error occur randomly only on the Production  
version of the website ( we'll Im having 2 occur, but I'll deal with  
the other in another email after I have investigated it some more ).  
Anyways as I was saying the error only occurs on the Production  
version of the website and not on the Test or Dev servers or on the  
Dev Machines. To make matters worse it only occurs sometimes.


The error and the stack trace are listed below. From my understanding  
it appears to be trying to fault and object and claims that it can't  
be found in the database. In all instances of this bug I have done a  
manual check of the database and the data does exist and all the PK's  
and FK's are correct. Then as I said you'll come back to teh same  
page a little later and it will work i.e the fault will fire correctly.


OK here are some stats :

Dev Machines (Works Fine):
OS X 10.4.11
1.5.0_07
WO 5.3.3

We then do a servlet  build  for deployment running under Tomcat.

Dev Server (Works Fine):
Sun E250
Solaris 9
Java 1.4.2
Tomcat 5.5.7

Test Server  (Works Fine)
Sun T1000
Solaris 10
Java 1.5.0_06
Tomcat 5.5.7

Prod Server  (Does Not Work)
Sun V210
Solaris 9
Java 1.5.0_06
Tomcat 5.5.7

( Yes I know the Test and Prod should be the same, believe me I know.  
We won't go into the reasons why they are not, or why Test is on a  
more powerful server than Prod).


The site has been running for more than a year with this set up and  
no such problem have occurred, until the latest release. The main  
difference with this release is that there are now 2 models with  
relationships between the two.


Has anyone see this type of behavior before ? Any suggestions on a  
way forward ?


EXCEPTION:
java.lang.IllegalStateException: The object with globalID  
_EOIntegralKeyGlobalID[Person (java.lang.Long)8917] could not be  
found in the database. This could be result of a referential  
integrity problem with the database. An empty fault could not be  
created because the object's class could not be determined (e.g. the  
GID is temporary or it is for an abstract entity).
The object with globalID _EOIntegralKeyGlobalID[Person  
(java.lang.Long)8917] could not be found in the database. This could  
be result of a referential integrity problem with the database. An  
empty fault could not be created because the object's class could not  
be determined (e.g. the GID is temporary or it is for an abstract  
entity).


STACK TRACE:
at _fetchSingleObject(EODatabaseContext.java:3583)
at _objectFaultWithSnapshotRelationshipEditingContext 
(EODatabaseContext.java:2532)

at _fireDeferredFaultWithSourceObject(EODatabaseContext.java:2575)
at createFaultForDeferredFault(EOAccessDeferredFaultHandler.java:45)
at willReadRelationship(EOCustomObject.java:1302)
at valueInObject(_EOMutableKnownKeyDictionary.java:560)
at storedValueForKey(EOCustomObject.java:1736)
at person(_RQFGroupPersonPub.java:30)
at invoke(GeneratedMethodAccessor476.java:NA)
at invoke(DelegatingMethodAccessorImpl.java:25)
at invoke(Method.java:585)
at methodValue(KeyValueCodingProtectedAccessor.java:54)
at valueInObject(NSKeyValueCoding.java:1160)
at valueForKey(EOCustomObject.java:1559)
at valueForKey(NSKeyValueCoding.java:498)
at valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at valueForKeyPath(EOCustomObject.java:1675)
at valueForKeyPath(NSKeyValueCodingAdditions.java:149)
at valueForKey(NSArray.java:1229)
at personDetailsForPub(RQFPub.java:192)
at hasSelectedPublicationAsBOW(Publication.java:2366)
at isAbleToSelect(RQFBOWSelection.java:303)



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


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

This email sent to [EMAIL PROTECTED]


Re: Array of Objects to Array of Global IDs ?

2007-11-05 Thread Owen McKerrow

Hmmm.

Someone will correct me if Im wrong, but I had thought that  
globalID's were not persistent. i.e. your not guaranteed that the  
same object will get the same global ID the next time you restart  
your app ? In which case you would need the objects Primary Key.


Why do you want to store the query ? Is there some reason you can't  
make a relationship between the user and the objects that they have  
selected ? In what format are you storing the queries ? Can you send  
an example of what you would see in the database.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 06/11/2007, at 12:22 PM, James Cicenia wrote:

Well I have a query and reporting system. The user can select  
multiple eos from a list, etc., a query is then created, but now I  
have to store the query into a database. So.. don't I need to store  
the users eo selection via the global ids?


I realize I could model the reports differently but I have been  
saving all the queries in a archivable mutable array or dict. These  
new custom query components need to be saved too, so I figure the  
global ids and the dictionaries to keep in consistent.


James

On Nov 5, 2007, at 6:57 PM, Owen McKerrow wrote:


Hi James

I think you'll find you don't need to touch the global ID's at  
all. Yes there is a way you could extract them, but I wasn't going  
to tell you until we'd determined that you really really need to  
do it. However Chuck explained how :D
Can you explain what exactly it is you are trying to do. Such as  
how is the list of object being selected in the first place ? What  
are the objects ? Im assuming they are EO's ?



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - -
"As of tomorrow, employees will only be able to access the  
building using individual security cards. Pictures will be taken  
next Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 06/11/2007, at 11:49 AM, James Cicenia wrote:


Hello -

I need to save selection of objects in my database. In order for  
me to do that

do I have to first extract their global ids and then store those?

If so is there a magic one line of WebObjects code that gives me  
the ids?


Thanks
James Cicenia

___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]






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

This email sent to [EMAIL PROTECTED]


Re: Array of Objects to Array of Global IDs ?

2007-11-05 Thread Owen McKerrow

Hi James

I think you'll find you don't need to touch the global ID's at all.  
Yes there is a way you could extract them, but I wasn't going to tell  
you until we'd determined that you really really need to do it.  
However Chuck explained how :D
Can you explain what exactly it is you are trying to do. Such as how  
is the list of object being selected in the first place ? What are  
the objects ? Im assuming they are EO's ?



Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 06/11/2007, at 11:49 AM, James Cicenia wrote:


Hello -

I need to save selection of objects in my database. In order for me  
to do that

do I have to first extract their global ids and then store those?

If so is there a magic one line of WebObjects code that gives me  
the ids?


Thanks
James Cicenia

___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Are Batch Sequences Possible ?

2007-10-30 Thread Owen McKerrow

Hi Chuck,

I'm looking over your FBIntegerPrimaryKeyGenerator and  
IntegerPrimaryKeyGenerator classes from GVCFrameworks and was just  
wondering if my understanding of it is correct. Basiaclly you will  
have to make a new instance of the FBIntegerPrimaryKeyGenerator at  
some point and then ask it to create a bunch of new PK's for you for  
a specific entity, lets say Person. These are then cached. So then  
when I make a new instance Person, it will be given one of these  
caches PK's stright away ( i.e. no extra code required ) or is there  
another step to request one of these PK's from the cache ? If it  
happens automatically will it be before the editingContext saves it  
changes ?


I could see this potentially being "dangerous" ( not deadly or  
anything ) if you don't end up using all your primary keys ( at least  
with Orcale sequences ) in that you would ask for 100 new PK's, the  
sequence is incremented 100 times, you only use 50 of them and you  
would have a missing 50 values from your PK coloum. Anyways just a  
random though.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 30/10/2007, at 3:52 PM, Chuck Hill wrote:


Short answer: yes.

Mike recently added something to the FrontBase plugin(?) in Wonder  
to do this.  I imagine that the same thing could be done for  
Oracle.  There are primary key generators in GVCEOFExtensions that  
also do this (get a batch from the DB and allocate them locally).


The method we used was  in EODatabaseContext's delegate interface,
databaseContextNewPrimaryKey(EODatabaseContext dbCtxt, Object  
object, EOEntity entity)


I'm not sure what Mike did for his.

Chuck


On Oct 29, 2007, at 8:49 PM, Owen McKerrow wrote:


Hi All,

Im currently developing an app against a Oracle databas, which  
uses sequence for generating its Primary Keys.


Is there a way to get WO to request a batch of sequences instead  
of doing it one at a time ( which is what it appears to be doing  
when you output the SQL ). For example I am doing 1 save to the  
database that is inserting 142 rows into 1 table, 142 into a  
second and 711 into a third. Each of the 142 row table inserts  
takes 2 seconds to return all of the sequence while the 711  
inserts take's 8 seconds to get the sequences. Thats 12 seconds  
used before it even starts the INSERT statements, which take  
another 2, 2 and 8 respectively. Meaning the total save time is 24  
seconds ( with SQL debugging turned on, its a little quicker with  
it turned off ).


Please someone tell me Im doing something dumb, or that there is a  
better way.


Heres a cut down version of the SQL output..

14:22:44,154 DEBUG [WorkerThread2] (RQFBOWSelection:286   
setUpPublicationsList) - Save Start.
14:22:44,415 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  === Begin Internal Transaction
14:22:44,416 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  evaluateExpression: $OracleExpression: "SELECT t0.pub, t0.ABSTRACT FROM PUB_ABSTRACT  
t0 WHERE t0.pub = ?" withBindings: 1:8657(pubID)>


Repeated 141 for 2 secconds

14:22:46,521 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  === Begin Internal Transaction
14:22:46,522 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  evaluateExpression: $OracleExpression: "SELECT RQF_GRP_PSN_PUB_SEQ.NEXTVAL FROM DUAL">


Repated 142 for  2 seconds

14:22:48,045 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  === Begin Internal Transaction
14:22:48,046 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  evaluateExpression: $OracleExpression: "SELECT AUDIT_LOG_SEQ.NEXTVAL FROM DUAL">


Repeated 711 for  8 seconds

14:22:56,928 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  === Begin Internal Transaction
14:22:56,929 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  evaluateExpression: $OracleExpression: "SELECT RQF_PUB_SEQ.NEXTVAL FROM DUAL">

Repeated 141 for . 2 seconds
14:22:58,782 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  === Begin Internal Transaction
14:22:58,783 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln)  
-  evaluateExpression: $OracleExpression: "INSERT INTO RQF_PUB(NOTES,  
OUTLET_ANGLICISED_TITLE, LANGUAGE_OF_TITLE, LOCKED,  
TYPE_OTHER_DESCRIPTION, METRICS_IDENTIFIER, OUTPUT_IDENTIFIER,  
RQF_PUB, ENGLISH_TITLE, PUB, IS_REPRINT, SENSITIVITY_EXPLAINATION,  
AVALIABLE_YEAR, ANGLICISED_TITLE, IS_COMMERCIAL_SENSITIVE,  
TYPE_CODE, IS_CULTURALSENSITIVE, OUTLET_RANKING_IDENTIFIER,  
AVAILABILITY_FORM, OUTLET_ENGLISH_TITLE, AVAIL_STATUS_CODE,  
NON_REPOSITORY_JUSTIFICATION, YEAR_VAR

Are Batch Sequences Possible ?

2007-10-29 Thread Owen McKerrow
tusCode = "R"; nonRepositoryJustification =  
;  
yearVariationJustification =  
; }; this = "10347e 1 21 -18 -19 -49 65 -71 -42 -47 95>>"; }){null}"(newValue), 7:1324858 
(audit_log_pk), 8:"/130.130.72.73"(ipAddress), 9:2007-10-30 14:22:44 
(when), 10:10988(objectsPK)>


Repeated 717 for 8 seconds

14:23:08,538 DEBUG [WorkerThread2] (Log.NSLogDebug:1546 appendln) -   
=== Commit Internal Transaction
14:23:08,575 DEBUG [WorkerThread2] (RQFBOWSelection:289   
setUpPublicationsList) - Save End.




Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


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

This email sent to [EMAIL PROTECTED]


Re: Many-to-many question ...

2007-10-25 Thread Owen McKerrow

We use approach 2, works fine for us. Others may have other ideas.

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 25/10/2007, at 4:58 PM, Johann Werner wrote:


Related to join tables containing additional attributes:

In a relation A<-->>AB<<-->B with a specific A1 that can have more  
than one relation to a specific B1 (thus only differing in the  
additional attributes) the standard primary key as a compound of  
the primary keys of A1 and B1 would not be unique any more.


What is the best practice in this case:

1) adding a third id field to AB and add it to the compound key  
using the option "use as primary key"


or

2) adding an additional id field that is solely used as primary key  
and using the former compound key only as foreign key for the  
relationships (in that case the table would be more like a "normal"  
table than a many-2-many table)


or

3) leaving the AB table as it is and praying that no user will ever  
want several A1<->B1 relations ;-)


jw

Am 25.10.2007 um 04:07 schrieb Lachlan Deck:


On 25/10/2007, at 11:17 AM, Shagor Ghani wrote:

Have a quick question around join tables storing M2M  
relationships.  I need
to store a M2M relationship and created a table for it using  
Property>Join
in Many-to-Many option from within EOModeler itself.  This table  
has two
columns, id1 and id2, both of which are primary and which  
together produce a
unique record.  In my code, I've been doing creating new rows  
into this
table using the standard  
object.addObjectToBothSidesOfRelationshipWithKey(
object, key ) call.  Now, though, I also need to store additional  
values
within this record, for example a boolean bit indicating whether  
the record
is active or not.  How is this done?  If I manually add a 3rd  
attribute

column, what call is then used to update/create new  record(s)?


You have two choices with M2M Join tables.
A<-->>AB<<-->B

1) flatten the relationships... so that you're adding to both  
sides of relationship two records on either side of the join. Join  
records using EOGenericRecord and don't have any logic in them.


A myA = (A)EOUtilties.createAndInsertInstance(ec, "A");
B myB = (B)EOUtilties.createAndInsertInstance(ec, "B");
myA.addObjectToBothSidesOfRelationshipWithKey(myB, "bs");

2) don't flatten the relationships
A myA = (A)EOUtilties.createAndInsertInstance(ec, "A");
AB myAB = (AB)EOUtilties.createAndInsertInstance(ec, "AB");
B myB = (B)EOUtilties.createAndInsertInstance(ec, "B");

myAB.setSomeOtherKey(...);
myA.addObjectToBothSidesOfRelationshipWithKey(myAB, "abs");
myAB.addObjectToBothSidesOfRelationshipWithKey(myB, "abs");

with regards,
--

Lachlan Deck

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


This email sent to [EMAIL PROTECTED]


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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Owen McKerrow

Further information

When I try and print out the revrse relationship from AuthorPub back  
to Person I get null. i.e. EOF can't find the reverse relationship  
back to the Person from the join.


log.debug("The relationship going back the other way is " +  
tempRec.inverseForRelationshipKey(relationshipName));


give us

The relationship going back the other way is null

Which to me means I don't have the relationships inside EOModel set  
up correctly ?? What are other peoples take on this ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 19/10/2007, at 12:04 PM, Owen McKerrow wrote:


Hi Lachlan,

Nope that didn't fix it either :(

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 19/10/2007, at 11:36 AM, Lachlan Deck wrote:


Hi Owen,

On 19/10/2007, at 11:24 AM, Owen McKerrow wrote:

Im having a problem with  
addObjectToBothSidesOfRelationshipWithKey, either that or I don't  
understand how its meant to work correctly. That is when you use  
addObjectToBothSidesOfRelationshipWithKey the relationships  
between both objects should be updated. So if you have a  
relationship between a dog and a cat, when you use  
addObjectToBothSidesOfRelationshipWithKey to set the dog's  
relationship to cat, its should auto set the cat's relationship  
back to the dog.


Try the ol' removeObjectFromBothSidesForKey on objects you're re- 
pointing elsewhere.


with regards,
--

Lachlan Deck


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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Owen McKerrow

Hi Lachlan,

Nope that didn't fix it either :(

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 19/10/2007, at 11:36 AM, Lachlan Deck wrote:


Hi Owen,

On 19/10/2007, at 11:24 AM, Owen McKerrow wrote:

Im having a problem with  
addObjectToBothSidesOfRelationshipWithKey, either that or I don't  
understand how its meant to work correctly. That is when you use  
addObjectToBothSidesOfRelationshipWithKey the relationships  
between both objects should be updated. So if you have a  
relationship between a dog and a cat, when you use  
addObjectToBothSidesOfRelationshipWithKey to set the dog's  
relationship to cat, its should auto set the cat's relationship  
back to the dog.


Try the ol' removeObjectFromBothSidesForKey on objects you're re- 
pointing elsewhere.


with regards,
--

Lachlan Deck


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

This email sent to [EMAIL PROTECTED]


Re: Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Owen McKerrow
Upon double checking personID was, yes. I change it so it wasn't but  
that didn't help the problem.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 19/10/2007, at 11:32 AM, Simon McLean wrote:


is either rowID or personID set as a class property in EOModeler ?

Simon


On 19 Oct 2007, at 02:24, Owen McKerrow wrote:


Hi All,

Im having a problem with  
addObjectToBothSidesOfRelationshipWithKey, either that or I don't  
understand how its meant to work correctly. That is when you use  
addObjectToBothSidesOfRelationshipWithKey the relationships  
between both objects should be updated. So if you have a  
relationship between a dog and a cat, when you use  
addObjectToBothSidesOfRelationshipWithKey to set the dog's  
relationship to cat, its should auto set the cat's relationship  
back to the dog.


Im writing some code for my Person class, which when given another  
person "merges" them into itself. That is sets all of the given  
persons relationships to the first person.
Now Person has a toMany relationship with AuthorPubs and  
AuthorPubs has a toOne relationship back to Person. Set up like  
this inside EOModler :


Table : Person
Relationship : publicationsAuthorOf, toMany, optional
Destination : AuthorPubs
Source Att : rowID
Dest Att : personID

Table : AuthorPubs
Relationship : person, toOne, mandetory
Destination : Person
Source Att : personID
Dest Att : rowID


Now here's the code inside the Person class that does the "merging" :


public void mergePersonIntoMe(Person person, boolean delete)  
throws Exception

{
.
	swaptoMe(person.publicationsAuthorOf(),inverseForRelationshipKey 
("publicationsAuthorOf"));


}

/**
		Given an array of objects and a relationship name, change all  
the objects so that they belong to this person

*/
	public void swaptoMe(NSArray theItems, String relationshipName)  
throws Exception

{
int i;
log.debug("Reverse relationship is : " + relationshipName);
if (theItems != null ) {
for (i=0;i	OMGenericRecord tempRec = (OMGenericRecord)  
theItems.objectAtIndex(i);
	tempRec.addObjectToBothSidesOfRelationshipWithKey 
(this,relationshipName);
	//Check if we are copying across author/editors, if so we nee  
to update their name

if (tempRec instanceof AuthorPubs ) {
		log.debug("Person for publication : " + tempRec.valueForKey 
(relationshipName));

if 
(publicationsAuthorOf().containsObject(tempRec) ) {
log.debug("Person is 
author.");
} else if 
(publicationsEditorOf().containsObject(tempRec)){
log.debug("Person is 
editor.");
} else {
log.debug("Person is not 
associated with the publication");
}
		tempRec.takeValueForKey(firstNameToUseForPublications 
(),"firstName");
		tempRec.takeValueForKey(lastNameToUseForPublications 
(),"lastName");
		tempRec.takeValueForKey(middleNameToUseForPublications 
(),"middleName");

}
} catch ( Exception ex) {
throw ex;
}
}
}
}

OK so I go to merge the person S Anderson into Sharon Anderson.

Now heres the output from those debug statements :

11:18:40,038 DEBUG [WorkerThread3] (Person:2284 swaptoMe) -  
Reverse relationship is : person
11:18:40,039 DEBUG [WorkerThread3] (Person:2290 swaptoMe) - Person  
for publication before swap : External:(Active_Name=S Anderson) 
{rowID=11477;}
11:18:40,046 DEBUG [WorkerThread3] (Person:2295 swaptoMe) - Person  
for publication after swap : Researcher:(Active_Name=Sharon  
Anderson, Staff_Number=xxx){rowID=1;}
11:18:40,047 DEBUG [WorkerThread3] (Person:2301 swaptoMe) - Person  
is not associated with the publication
11:18:40,049 DEBUG [WorkerThread3] (Person:2290 swaptoMe) - Person  
for publication before swap : External:(Active_Name=S Anderson) 
{rowID=11477;}
11:18:40,050 DEBUG [WorkerThread3] (Person:2295 swaptoMe) - Person  
for publication aft

Problems with addObjectToBothSidesOfRelationshipWithKey

2007-10-18 Thread Owen McKerrow
the AuthorPub added back to them.


The changes are made in the database and if I log out and log back in  
its all nice and happy.


Can someone see something dumb Im doing ? Am I not understanding the  
behavior of addObjectToBothSidesOfRelationshipWithKey  correctly ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


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

This email sent to [EMAIL PROTECTED]


takeValuesFromForm Validation

2007-07-31 Thread Owen McKerrow

Hi All,

I have an attribute in an entity that has a width of 1500 char. I  
have over ridden the validate method for it inside the entities java  
class.


	public String validateRqfJustification(String newState) throws  
NSValidation.ValidationException

{
if ( newState != null ) {
if (newState.length() > 1500) {
throw new NSValidation.ValidationException("The RQF Justification  
can not be longer than 1500 characters");

}
}
return newState;
}

This gets called fine when I try to save it.

However if I submit the form and the text field contains more than  
1500 chars, a validation error is thrown, without going into this  
method because it checks it against the width inside the model.


I catch this exception inside the component  
validationFailedWithException() method, the page gets return I  
display the error message ( not the nicely formatted one form above,  
but the default one ). BUT the value of the form in the feild has  
been reset to what it was before they click the button. This is not  
what I want. I want to tell them they can't save but the value in the  
field should stay the same as what they just typed.


So 2 questions :
1) When a form is submitted why doesn't it use my validation method  
for that attribute ? What validation is it calling ? i.e.  
validateforUpdate() ?
2)  How can I get the value the user typed to stay in the form,  
instead of being truncated back ?


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


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

This email sent to [EMAIL PROTECTED]


Re: WWDC photos (WebObjects Lab + Bash)

2007-06-17 Thread Owen McKerrow

Moscone North.

Moscone West( where its held at the moemnt ) is the smallest of the  
Moscone Centers I believe.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


On 18/06/2007, at 1:51 PM, Miguel Arroz wrote:


Hi!

  I didn't like it very much. The music was really bad. The place  
is cool, but it's not Mac-related. I live in Portugal, far far away  
from the "mother-ship". Last year it was great to see it, be there,  
notice the small details, like the pixelized fonts and Cairo icons  
around, etc. There's obviously something special about that place  
(at least for non-Apple employees!). Yerba buena is a really cool  
garden, but it's that kind of place that could be there, or  
anywhere else, and it wouldn't make a difference...


  I actually sent an email before to ADC asking why there was no  
Apple Campus Bash this year, and asking if I could grab a car and  
go there. They only said the campus was closed to visitors, but  
they did not say why there was no bash there. I think the +5000  
attendees is the answer. BTW, Moscone is getting a little too small  
for all this people... where will the WWDC be in three or four  
years, if they continue to grow up in a 2000 attendee/year ratio!?


  Yours

Miguel Arroz


On 2007/06/17, at 07:10, Alexander Spohr wrote:


Cliff,

any info on why there is no more Campus Bash?
To many busses needed? (Environment)
Bad behavior of guests? (Lurking for Prototypes)

How was the SF Bash compared to the Campus Bash?

atze


Am 16.06.2007 um 22:57 schrieb Cliff Tuel:

WWDC was a great success this year!  Thanks to everyone who  
came.  Here's
some photos of the packed WebObjects Lab, and Thursday's bash.   
Sorry I

couldn't take more -- I was supposed to be working. :-)

 <http://www.flickr.com/photos/[EMAIL PROTECTED]>

--
Cliff Tuel . http://apple.com/services/technicalsupport


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


This email sent to [EMAIL PROTECTED]


Freeport & Soliversum
Alexander Spohr
[EMAIL PROTECTED]
www.freeport.de


___
Do not 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/arroz% 
40guiamac.com


This email sent to [EMAIL PROTECTED]


Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com



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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Post WWDC Plans for Monday Night?

2007-06-11 Thread Owen McKerrow

Hi All,

Speaking of ber

Im not at WWDC but thought I woudl hijack this thread for a second.  
From reading the WWDC site it looks like that the Apple Campus Beer  
Bash isn't happening this year i.e. its changing venue. they describe  
it as...


WWDC Bash in San Francisco

You’ve been hard at work all week, and now it’s time to unwind and  
have some fun in downtown San Francisco. Spend the evening with us  
enjoying great food and drinks, and mingling with your peers and  
Apple’s engineering teams.


Can anyone there confirm if this is the case ? If so its the end of a  
long tradition.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 12/06/2007, at 11:58 AM, Alan Ward wrote:



I suggest you all come down to Cupertino so that I don't have drive  
up to the city ;-)


Alan

On Jun 11, 2007, at 7:35 PM, Guido Neitzer wrote:


Am 11.06.2007 um 13:14 schrieb Chuck Hill:

Any plans for tonight?  The welcome event is usually over (out of  
beer ;-) quickly.


Make a suggestion ... ;-)

cug
___
Do not 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/award% 
40apple.com


This email sent to [EMAIL PROTECTED]


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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


MultiECLockManager. Set and forget ?

2007-04-25 Thread Owen McKerrow

Hi All,

Im looking at cleaning up our locking procedures on some of our  
projects. Looking over past emails and on the wiki the most commons  
suggestions are either MultiECLockManager or Project Wonders ERXEC.  
We're not using Wonder at the moment so Im thinking  
MultiECLockManager. I seem to remember Chuck once implying that it  
was basically a set and forget sort of thing, that once you had  
registered you EC with it you didn't need to worry about locking  
anymore. Is this really the case ?


What we have on the current project is a base component that all of  
our other components extend from. This base component contains a  
variation of Chucks CoOperatingEditingContext (thanks Chuck), so each  
of our pages has their own EC with session wide variables, like who's  
currently logged in, being stored in the default editing context.


What Im wondering is if I was to use MultiECLockManager and it is as  
simple as it seems, all I should need to do is in my base component  
when the EC is created, register it with the Manager and then go back  
through all of my code and find any ec.lock(), ec.unlock() and remove  
them.


Am I understanding this correctly ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


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

This email sent to [EMAIL PROTECTED]


WebObjects URL Decoding

2007-02-20 Thread Owen McKerrow

Hi All,

Is there any way to track back from a WO url what the link/button  
pressed was ?


i.e. for the following URL WebObjects/RIS.woa/wo/ 
LaxPpG24nbtqCjH1sZbfUw/110.0.11.5.5.1 how can I map back the  
110.0.11.5.5.1 to a page and a link inside my app ?


Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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


Adding Objects To Relationships

2007-02-20 Thread Owen McKerrow
orrect)
Active Element Experiences : 2 ( count has gone down by 1, correct)

Navigate to the Experience :

Experience : My first prac experience
Element Experinces count : 4 ( count has gone up by 1, correct)
Active Element Experinces : 4( count has gone up by 1, correct)

Shift the entry back to "My Portfolio" :

Experince : My first prac experience
Element Experinces count : 3 ( count has gone down by 1, correct)
Active Element Experinces : 3 ( count has gone down by 1, correct)

Navigate back to first experience :

Experince : My Portfolio
Element Experinces count : 11 ( count has gone up by 1, correct)
Active Element Experinces : 2 ( count has stayed the same, incorrect)

So we can see from the last 2 lines that the element is being  
correctly re-assigned back to the first experience ( count goes back  
up to 11 ) but the activeElements() filter is getting it wrong, even  
though the filter is based upon the active status of the element  
itself, which is never touched. And as I said, it you log out and  
then come back in with a fresh session, its sitting there like its  
meant to be.


So the suspect code I believe is this bit from activeElements()

if ( elementExperiences() != null ) {
NSMutableArray qualData = new NSMutableArray(new Integer(1));
	EOQualifier qual = EOQualifier.qualifierWithQualifierFormat 
("element.active = %@",qualData);
	activeElements = (NSMutableArray)  
EOQualifier.filteredArrayWithQualifier(elementExperiences(),qual);

}

Does anyone one have any suggestions or see anything I've done wrong ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


___
Do not 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: Suggestions for handling DoS attack, well kind of

2007-01-31 Thread Owen McKerrow

Sorry slow brain day, I do of course mean a DoS attack. Thanks Kevin :)

I realize that you can do things at the firewall router level, just  
wondering if there is any tricks people have used in there WO apps  
directly.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 01/02/2007, at 11:00 AM, Owen McKerrow wrote:


Hi All,

On Tuesday afternoon one of our apps received over 10,000 requests  
for the 1 page, by the same user in under 1 hour. The site kept  
running ( it got slower and slower ) with one out of memory  
exception for another user. There was only a very small chance it  
was a real DoS attack, what I assumed had happened ( I have heard  
stories of this happening from other people ) is that something  
fell onto his keyboard on the "F5" refresh key after he had walked  
out of his office.
What actually happened was that Firefox locked up his whole machine  
( the power button didn't even work ) and in the end he just got up  
and walked away in frustration.


So what Im wondering is does anybody have any suggestions on what  
to do about DoS attacks be they accidental or on purpose.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to archive@mail-archive.com


Suggestions for handling DNS attack, well kind of

2007-01-31 Thread Owen McKerrow

Hi All,

On Tuesday afternoon one of our apps received over 10,000 requests  
for the 1 page, by the same user in under 1 hour. The site kept  
running ( it got slower and slower ) with one out of memory exception  
for another user. There was only a very small chance it was a real  
DNS attack, what I assumed had happened ( I have heard stories of  
this happening from other people ) is that something fell onto his  
keyboard on the "F5" refresh key after he had walked out of his office.
What actually happened was that Firefox locked up his whole machine  
( the power button didn't even work ) and in the end he just got up  
and walked away in frustration.


So what Im wondering is does anybody have any suggestions on what to  
do about DNS attacks be they accidental or on purpose.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


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


xCode 2.4.1

2007-01-28 Thread Owen McKerrow

Hi All,

I just noticed that xCode is up to 2.4.1 and was wondering how people  
are finding it WO wise. Im still on 2.3 so am wondering if there are  
any major WebObjects changes between the 2.3 and 2.4 versions. I  
remember 2.4 coming out, but not the reason why I didn't upgrade :(


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


People who prefer typing to pointing then seem to prefer acronyms to  
save typing  :-)

-Denis Stanton, On people using Command Line Interfaces


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


Unable to release locks held by a deallocated EOEditingContext.

2006-09-28 Thread Owen McKerrow

Hi All,

Was browsing over my logs from the latest build on our test server  
and noticed this error repeated over and over again :


2006,09.28 13:06:33,970 DEBUG [Finalizer] (Log.NSLogErr:1546  
appendln) - Unable to release locks held by a deallocated  
EOEditingContext.
2006,09.28 13:06:33,971 DEBUG [Finalizer] (Log.NSLogDebug:1546  
appendln) - java.lang.IllegalStateException: Illegal Lock usage:  
unlocking thread not owner.
	at com.webobjects.foundation.NSRecursiveLock.unlock 
(NSRecursiveLock.java:207)
	at com.webobjects.eocontrol.EOEditingContext.unlock 
(EOEditingContext.java:4720)
	at com.webobjects.eocontrol.EOEditingContext._dispose 
(EOEditingContext.java:1158)
	at com.webobjects.eocontrol.EOEditingContext.finalize 
(EOEditingContext.java:1178)

at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

Any ideas on how to track down where this one is coming from ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


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


Monitoring RAM

2006-09-21 Thread Owen McKerrow
NSLog.out.appendln("Error occured during the Memory 
Watch");
}
}

}




Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


___
Do not 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: Session timeout and memory

2006-09-19 Thread Owen McKerrow

Hi All,

Interesting thread ! And its very similar to a problem Im having.

We are deploying our App under Tomcat and after several days of  
running we get and out of memory exception. so we increased the heap  
size. We got a couple more days out of the app. So we increased it  
again, this time we last 2 weeks, but once again we have run out of  
memory.


This leads to a couple of questions :

1) Does anyone know if there is a memory handling issue of WOApps  
under Tomcat ? i.e. it never lets the memory go.


2) When we deploy under JavaMonitor we set our apps to restart  
themselves regularly. Why's this ? I had thought it may have been a  
carry over from Object-C days just to make sure we clean up any  
memory leaks. But under Java, one would image it should be all  
garbage collected, so why do we still recommend nightly/weekly  
restarts ?


3) Can someone point me at some good doc for learning about memory  
profiling of Java app's. Specifically over a long period of time.  
Even to figure out how much ram each session is taking and when that  
is being garbage collected as per Tom's example below.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 19/09/2006, at 6:29 PM, Tom M. Blenko wrote:



What you are seeing is almost certainly just the way garbage  
collection works.  When the session times out, the objects it  
allocated are available for garbage collection.  They are not  
collected at that time, just made available for collection.  The  
garbage collector won't run until it needs to.


The latter is not correct. The garbage collector on HotSpot runs  
frequently and a common occasion is when a response has been  
returned by a WO application. It appears that it collects on these  
occasions against the local store. This makes sense in the  
immediate context, you'd probably have to test it against you own  
applications to determine whether it makes sense on balance. (I  
don't believe you can control this behavior in any case).


The garbage collector doesn't collect all available memory on these  
occasions, however. I had a disagreement with someone once about  
whether the garbage collector would collect a cycle, which it isn't  
difficult to create, e.g., off of a session. We put up a minimal  
application on a quiet machine, instrumented the VM, set the  
session to timeout after 1 minute, requested one page (which  
created the cycle), and waited. The garbage collector ran many  
times but it took 10 minutes before the cycle was collected.


Behavior of the garbage collector isn't an issue most of the time.  
If the working set is close to the VM memory size, however, it can  
cause the VM to thrash and the solution is (usually) to increase  
the size of VM memory. It can also happen that you know when a  
sizable chunk of memory is being freed and forcing the gc to run  
amounts to an optimization, e.g., to reduce paging or total memory  
use. You can call gc() to advise the garbage collector to run. You  
can call gc() three times in succession to advise it more strongly  
to run. Running, in this circumstance, will only cause it to  
collect what it chooses, it won't necessarily collect all the  
memory available.


Tom




Chuck


On Sep 11, 2006, at 11:18 PM, Ute Hoffmann wrote:

Ok, perhaps I'm looking at the wrong thing. This is the piece of  
code which I use to determine the used memory:


Runtime runtime = Runtime.getRuntime();
double nochVoranden = new Double(runtime.totalMemory () -  
runtime.freeMemory ()).doubleValue();


So this happens to the logs:
The memory goes up inside of the session. It sometimes drops a  
bit but it mainly goes up. So there seems to be a memory leak  
somewhere...


Ok, but then the session is terminated or times out. So I would  
assume that then the memory is returned as free memory.

So the next session should again show used memory lets say 6 MB.

But when the previous session had a used memory of lets say 50 MB  
the next session (created well after the first session is timed  
out or terminated) will show 50MB + of used memory.


And yes: There was only one session present in the testcase and  
it clearly went up after the first session was timed out without  
releasing this used memory.


Do I have to schedule the instances to get rid of this (as it  
happens by design) or does it point me to a memory leak in my  
code which means whatever holds the memory cannot be released  
even after the session is terminated.


Regards

Ute

Anfang der weitergeleiteten E-Mail:


Von: Q <[EMAIL PROTECTED]>
Datum: Di, 12. Sep 2006  01:43:35 Europe/Berlin
An: Chuck Hill <[E

Concurrent Request Handling Under Tomcat 5

2006-08-27 Thread Owen McKerrow

Hi All,

Does anyone have any experience running a WO App under Tomcat 5 with  
concurrent request handling turned on ? Is Tomcat's request handling  
compatible with WO's ? Is there any trick to getting them to play  
nice together ? Should it just work out of the box or is there some  
config changes I would need to make ?


Thanks in Advance

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


___
Do not 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: [SOLVED] Method Being called Twice

2006-08-16 Thread Owen McKerrow
Sorry forgot to mention, link was the culprit. That is we had link  
set up as a WOGenericElement and it should have been a style as a  
WOGenericContainer.


So what I said below is wrong. To reproduce the behaviour in Safari  
try this


@import "http:// 
somefile";


Want we wanted ( and fixed the problem ). Is this

@import "http:// 
</tt><tt>somefile";


Owen

On 17/08/2006, at 1:54 PM, Owen McKerrow wrote:


Hi All,

We had a WOGenericElement used for a dynamic style include, where  
it should have been a WOGenericContainer, difference being that the  
container adds the close tag. i.e. in this case 


Seems if the close tag is missing Safari calls the page twice.

Owen

On 17/08/2006, at 1:40 PM, Owen McKerrow wrote:


Well Im gonna hang my head in shame on this one.
I stuck a break point in session's awake method and its being  
invoked twice for EVERY page !
So Im guess its a problem with my template component that all the  
other pages sit inside of.
Stranger still is that I tested it under Safari 2.0.4 and Firefox  
1.5.04. It only does the double call under Safari.


Ok Im off to track down what's doing it.

Any suggestions of things to look for ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - -
"As of tomorrow, employees will only be able to access the  
building using individual security cards. Pictures will be taken  
next Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 17/08/2006, at 1:28 PM, Chuck Hill wrote:


Now that is a good one...

Both are from invokeAction.  Any custom component here?  Calling  
valueForBinding("action") can trip the action.


Have you verified that the app is only receiving a single  
request?  Does it do this in all browsers?  I am just wondering  
if bad HTML or something is making the app think it is getting  
two requests.


Other than that, no...  nothing is coming to mind.

Chuck


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


This email sent to [EMAIL PROTECTED]


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

This email sent to archive@mail-archive.com


Re: [SOLVED] Method Being called Twice

2006-08-16 Thread Owen McKerrow

Hi All,

We had a WOGenericElement used for a dynamic style include, where it  
should have been a WOGenericContainer, difference being that the  
container adds the close tag. i.e. in this case 


Seems if the close tag is missing Safari calls the page twice.

Owen

On 17/08/2006, at 1:40 PM, Owen McKerrow wrote:


Well Im gonna hang my head in shame on this one.
I stuck a break point in session's awake method and its being  
invoked twice for EVERY page !
So Im guess its a problem with my template component that all the  
other pages sit inside of.
Stranger still is that I tested it under Safari 2.0.4 and Firefox  
1.5.04. It only does the double call under Safari.


Ok Im off to track down what's doing it.

Any suggestions of things to look for ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 17/08/2006, at 1:28 PM, Chuck Hill wrote:


Now that is a good one...

Both are from invokeAction.  Any custom component here?  Calling  
valueForBinding("action") can trip the action.


Have you verified that the app is only receiving a single  
request?  Does it do this in all browsers?  I am just wondering if  
bad HTML or something is making the app think it is getting two  
requests.


Other than that, no...  nothing is coming to mind.

Chuck


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

This email sent to archive@mail-archive.com


Re: Method Being called Twice

2006-08-16 Thread Owen McKerrow

Well Im gonna hang my head in shame on this one.
I stuck a break point in session's awake method and its being invoked  
twice for EVERY page !
So Im guess its a problem with my template component that all the  
other pages sit inside of.
Stranger still is that I tested it under Safari 2.0.4 and Firefox  
1.5.04. It only does the double call under Safari.


Ok Im off to track down what's doing it.

Any suggestions of things to look for ?

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
"As of tomorrow, employees will only be able to access the building  
using individual security cards. Pictures will be taken next  
Wednesday employees will receive their cards in two weeks."

- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


On 17/08/2006, at 1:28 PM, Chuck Hill wrote:


Now that is a good one...

Both are from invokeAction.  Any custom component here?  Calling  
valueForBinding("action") can trip the action.


Have you verified that the app is only receiving a single request?   
Does it do this in all browsers?  I am just wondering if bad HTML  
or something is making the app think it is getting two requests.


Other than that, no...  nothing is coming to mind.

Chuck


On Aug 16, 2006, at 8:14 PM, Owen McKerrow wrote:


Hi All,

I'm having a problem with a method thats being called twice when  
it should only be called once.


I have a form, with one submit button, whose action is bound to  
the method typeSelectedGoToDetails(). Now I have done search  
through the whole project and this method is only lised twice,  
once inside the wod file as bound to the submit button and the  
second time is its own declaration in the java file.

However upon clicking the submit button it is being called twice.


Listed below are the stack traces from each of the times it is  
called, and a copy of the code itself.


Can anyone see what dumb thing i am doing this time ? Or explain  
why the method is being called twice.


Thanks
Owen


Code :

/**
		Check that the required info has been given, if so check if the  
publication title is simialr to any found in the DB.

*/
public WOComponent typeSelectedGoToDetails() throws Exception
{
WOComponent nextPage = null;
int i;
boolean rightToGo = true;
if ( newTitle != null ) { //THE BREAK POINT IS ON THIS LINE
if (!newTitle.trim().equals("") ) {
if ( thePublication.publicationType() == null) {
setMessage("Please select a valid 
Publication Type.");
} else {
//Check if there is more than 1 author
	if ( thePublication.publicationType().hasAuthors().intValue()  
== 1 && numNewAuthors < 1 ) {

rightToGo = false;
setMessage("There must be at least 1 
Author.");
}
	if ( thePublication.publicationType().hasEditors().intValue()  
== 1 && numNewEditors < 1 ) {

rightToGo = false;
setMessage("There must be at 
least 1 Editor.");
}
//Check if they need editors and if so 
that there is more than 1
if ( rightToGo ) {
setMessage("");
		//*** FIX ME *** Need to update so only asks for pubs who's  
status is not = to new.

similarPublications = 
(NSArray)searchForSimilarItems(newTitle);
}
}
} else {
setMessage("You must enter a title for the 
Publication.");
}
} else {
setMessage("You must enter a title for the 
Publication.");
}
if ( !similarPublicationsFound && rightToGo ) {
//No similar items found, just go stright to the 
details.
setupNewPublication();
			PublicationDetails newPage = (PublicationDetails) pageWithName 
("PublicationDetails");

newPage.setEc(getEc());
newPage.setThePublication(thePublication);
newPage.setUp();
newPage.setAddingNew(true);
newPage.setValideS

Method Being called Twice

2006-08-16 Thread Owen McKerrow

Hi All,

I'm having a problem with a method thats being called twice when it  
should only be called once.


I have a form, with one submit button, whose action is bound to the  
method typeSelectedGoToDetails(). Now I have done search through the  
whole project and this method is only lised twice, once inside the  
wod file as bound to the submit button and the second time is its own  
declaration in the java file.

However upon clicking the submit button it is being called twice.


Listed below are the stack traces from each of the times it is  
called, and a copy of the code itself.


Can anyone see what dumb thing i am doing this time ? Or explain why  
the method is being called twice.


Thanks
Owen


Code :

/**
		Check that the required info has been given, if so check if the  
publication title is simialr to any found in the DB.

*/
public WOComponent typeSelectedGoToDetails() throws Exception
{
WOComponent nextPage = null;
int i;
boolean rightToGo = true;
if ( newTitle != null ) { //THE BREAK POINT IS ON THIS LINE
if (!newTitle.trim().equals("") ) {
if ( thePublication.publicationType() == null) {
setMessage("Please select a valid 
Publication Type.");
} else {
//Check if there is more than 1 author
	if ( thePublication.publicationType().hasAuthors().intValue() ==  
1 && numNewAuthors < 1 ) {

rightToGo = false;
setMessage("There must be at least 1 
Author.");
}
	if ( thePublication.publicationType().hasEditors().intValue() ==  
1 && numNewEditors < 1 ) {

rightToGo = false;
setMessage("There must be at 
least 1 Editor.");
}
//Check if they need editors and if so 
that there is more than 1
if ( rightToGo ) {
setMessage("");
		//*** FIX ME *** Need to update so only asks for pubs who's  
status is not = to new.

similarPublications = 
(NSArray)searchForSimilarItems(newTitle);
}
}
} else {
setMessage("You must enter a title for the 
Publication.");
}
} else {
setMessage("You must enter a title for the 
Publication.");
}
if ( !similarPublicationsFound && rightToGo ) {
//No similar items found, just go stright to the 
details.
setupNewPublication();
			PublicationDetails newPage = (PublicationDetails) pageWithName 
("PublicationDetails");

newPage.setEc(getEc());
newPage.setThePublication(thePublication);
newPage.setUp();
newPage.setAddingNew(true);
newPage.setValideState(false);
nextPage = newPage;
			mySession().replaceLastCookie("PublicationDetails","Publication  
Details",newPage.pagesState(),true);


} else {
nextPage = context().page();
}

return nextPage;
}


First Time :
#0	0x0004 in addPublication.typeSelectedGoToDetails() at  
addPublication.java:131

#1  sun.reflect.NativeMethodAccessorImpl.invoke0()
#2	0x0057 in sun.reflect.NativeMethodAccessorImpl.invoke() at  
NativeMethodAccessorImpl.java:39
#3	0x0006 in sun.reflect.DelegatingMethodAccessorImpl.invoke() at  
DelegatingMethodAccessorImpl.java:25

#4  0x006f in java.lang.reflect.Method.invoke() at Method.java:324
#5	0x0003 in KeyValueCodingProtectedAccessor.methodValue() at  
KeyValueCodingProtectedAccessor.java:54
#6	0x0009 in com.webobjects.foundation.NSKeyValueCoding 
$_MethodBinding.valueInObject() at NSKeyValueCoding.java:1160
#7	0x0022 in com.webobjects.foundation.NSKeyValueCoding 
$DefaultImplementation.valueForKey() at NSKeyValueCoding.java:1268
#8	0x0002 in com.webobjects.appserver.WOComponent.valueForKey()  
at WOComponent.java:1539
#9	0x001a in com.webobjects.foundation.NSKeyValueCoding 
$Utility.valueForKey() at NSKeyValueCoding.java:498
#10	0x0013 in com.webobjects.foundation.NSKeyValueCodingAdditions 
$DefaultImplementation.valueForKeyPath() at  
NSKeyValueCodingAdditions.java:212
#11	0x0002 in com.webobjects.appserver.WOComponent.valueForKeyPa

Re: Mysterious EditingContext Swap

2006-08-01 Thread Owen McKerrow
	System.out.println("new : " + r.surname() + r.logonIdentifier()  
+ r.editingContext());

save(); 
}
}
System.out.println("editing Context : " + ec);
			((Session)session()).setCurrentUser((Recipient)  
EOUtilities.localInstanceOfObject(((Session)session 
()).defaultEditingContext(),r));

}
catch (java.lang.IllegalArgumentException ex) {
}
catch (Exception e)
{
throw e;
}   

}
private void save() throws Exception
{
try {
  //  ec.lock();
ec.saveChanges();
//  ec.unlock();
} catch (Exception exception) {
			app.setErrorMessage("Error when trying to add a new recipient. save 
() menu.java\n");

throw exception;
}
}   



}


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


On 02/08/2006, at 1:09 PM, Ken Anderson wrote:


Owen,

Are you paraphrasing the error message?  I have to admit, I've  
never heard of a database context's "active" editing context.  Is  
there other code besides this?  Have you isolated this code out in  
a separate project?


Ken

On Aug 1, 2006, at 10:42 PM, Owen McKerrow wrote:


Hi All,

Im having issues with an editing context that seems to somehow be  
switching behind my back.


Vitals :  OS X 10.4.7 WO 5.3 Java 1.4.2

OK first an explaination :

On our login in page we check if the user already has an account,  
if so log them in, if not make them one attach them to an instance  
of company and then log them in. From a clean DB i.e. no users in  
it I can log in as user one and it makes the user fine. I can then  
re-log in as this user. If I log in as another user I get a error  
saying that the company object is in another editing context.

So I added in debug statements to check what was happening with it.

And it seems between grabbing the company, creating a new user and  
then doing addObjectToBothSidesOfRelationship, my active editing  
context changes.



Short Version ( debug statements spaced in-between the  lines of  
code ) :


//Editing Context just been made :  
[EMAIL PROTECTED]


	Company theCompany = (Company)  
com.webobjects.eoaccess.EOUtilities.objectMatchingKeyAndValue 
(ec,"Company","logonIdentifier","UOW");

System.out.println("Company : " + theCompany.editingContext());

//Company : [EMAIL PROTECTED]

if( theCompany != null ) {
		r = ( Recipient) 
com.webobjects.eoaccess.EOUtilities.createAndInsertInstance 
(ec,"Recipient");

System.out.println("New Recipient : " + r.editingContext());

//New Recipient : [EMAIL PROTECTED]

r.setLogonIdentifier(userName);
		r.addObjectToBothSidesOfRelationshipWithKey 
(theCompany,"company"); //Error is thrown on this line


Short error ( referring to theCompany ):

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

databaseContext: [EMAIL PROTECTED]
object's editingContext:  
[EMAIL PROTECTED]
databaseContext's active editingContext:  
[EMAIL PROTECTED]



As you can see the Company's editing context is aab7d, however  
when I call addObjectToBothSidesOfRelationshipWithKey the active  
editing context is apparently 883540.


How is the active editing context "swapping" ? In fact where is if  
getting this active editing context from ?


Anyone have any ideas ?

Thanks
Owen



PS Heres the "fuller" version

Long Version :
The code :

ec = new EOEditingContext();
try {   
//search the recipient table for the username
Recipient r = null;
NSMutableDictionary dic = new NSMutableDictionary();
dic.setObjectForKey(userName,"logon");
			NSArray temp =  
EOUtilities.objectsWithFetchSpecificationAndBindings 
(ec,"Recipient","RecipSearch",dic);

if( temp.count() > 0 ) {
r = (Recipient)temp.lastObject();
System.out.println("Old : " + r.surname() + r.logonIdentifier 
() + r.editingContext());

}
System.out.println("Editing after search for old : " + 
ec);
//insert new row in da

Mysterious EditingContext Swap

2006-08-01 Thread Owen McKerrow

Hi All,

Im having issues with an editing context that seems to somehow be  
switching behind my back.


Vitals :  OS X 10.4.7 WO 5.3 Java 1.4.2

OK first an explaination :

On our login in page we check if the user already has an account, if  
so log them in, if not make them one attach them to an instance of  
company and then log them in. From a clean DB i.e. no users in it I  
can log in as user one and it makes the user fine. I can then re-log  
in as this user. If I log in as another user I get a error saying  
that the company object is in another editing context.

So I added in debug statements to check what was happening with it.

And it seems between grabbing the company, creating a new user and  
then doing addObjectToBothSidesOfRelationship, my active editing  
context changes.



Short Version ( debug statements spaced in-between the  lines of  
code ) :


//Editing Context just been made :  
[EMAIL PROTECTED]


	Company theCompany = (Company)  
com.webobjects.eoaccess.EOUtilities.objectMatchingKeyAndValue 
(ec,"Company","logonIdentifier","UOW");

System.out.println("Company : " + theCompany.editingContext());

//Company : [EMAIL PROTECTED]

if( theCompany != null ) {
		r = ( Recipient) 
com.webobjects.eoaccess.EOUtilities.createAndInsertInstance 
(ec,"Recipient");

System.out.println("New Recipient : " + r.editingContext());

//New Recipient : [EMAIL PROTECTED]

r.setLogonIdentifier(userName);
		r.addObjectToBothSidesOfRelationshipWithKey 
(theCompany,"company"); //Error is thrown on this line


Short error ( referring to theCompany ):

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

databaseContext: [EMAIL PROTECTED]
object's editingContext: [EMAIL PROTECTED]
databaseContext's active editingContext:  
[EMAIL PROTECTED]



As you can see the Company's editing context is aab7d, however when I  
call addObjectToBothSidesOfRelationshipWithKey the active editing  
context is apparently 883540.


How is the active editing context "swapping" ? In fact where is if  
getting this active editing context from ?


Anyone have any ideas ?

Thanks
Owen



PS Heres the "fuller" version

Long Version :
The code :

ec = new EOEditingContext();
try {   
//search the recipient table for the username
Recipient r = null;
NSMutableDictionary dic = new NSMutableDictionary();
dic.setObjectForKey(userName,"logon");
			NSArray temp = EOUtilities.objectsWithFetchSpecificationAndBindings 
(ec,"Recipient","RecipSearch",dic);

if( temp.count() > 0 ) {
r = (Recipient)temp.lastObject();
System.out.println("Old : " + r.surname() + r.logonIdentifier() +  
r.editingContext());

}
System.out.println("Editing after search for old : " + 
ec);
//insert new row in database if recipient does not exist
if (r==null) {
System.out.println("Editin Context at start of 
create : " + ec);
Company theCompany = (Company)  
com.webobjects.eoaccess.EOUtilities.objectMatchingKeyAndValue 
(ec,"Company","logonIdentifier","UOW");

System.out.println("Company : " + 
theCompany.editingContext());
if( theCompany != null ) {
	r = ( Recipient) 
com.webobjects.eoaccess.EOUtilities.createAndInsertInstance 
(ec,"Recipient");

System.out.println("New Recipient : " + 
r.editingContext());
r.setLogonIdentifier(userName);

r.addObjectToBothSidesOfRelationshipWithKey(theCompany,"company");


The Debug Statements :

Logged in as user  1  ( all works fine ) :
Editing Context just been made :  
[EMAIL PROTECTED]

Session has been created.
Editing Context at start of checkRecipient :  
[EMAIL PROTECTED]
Editing after search for old :  
[EMAIL PROTECTED]
Editin Context at start of create :  
[EMAIL PROTECTED]

Company : [EMAIL PROTECTED]
New Recipient : [EMAIL PROTECTED]
new : [EMAIL PROTECTED]
editing Context : [EMAIL PROTECTED]
Session Terminate

Log in for second time as user 1 ( all works fine ) :
Editing Context just been made :  
[EMAIL PROTECTED]

Session has been created.
Editing Context at start of checkRecipient :  
[EMAIL PROTECTED]

Old : [EMAIL PROTECTED]
Editing after search for old :  
[EMAIL PROTECTED]

editing Context : [EMAIL PROTECTED]
Session Terminate

Log in As User 2 :
Editing Context just been made :  
[EMAIL PROTECTED]

Session has been created.
Editing Context at start of checkRecipient :  
[EMAIL PROTECTED]
Editing after search for old :  
[EMAIL PROTECTED]
Editin Context at start of create :  
[EMAIL PROTECTED]

Company : [EMAI

Help : Null in _globalIDForObject()

2006-07-24 Thread Owen McKerrow

Hi All,

We were about to release an app to our client for final approvals and  
this strange error just popped up.


We are using WO 5.3 build, on a 5.2.4 Deployment, OS X Server,  
talking to an Oracle 9 database.


Any ideas ?


EXCEPTION:
null

DATE/TIME:
2006-07-24 23:44:02 Etc/GMT

STACK TRACE:
at _globalIDForObject(EODatabaseContext.java:4838)
at databaseOperationForObject(EODatabaseContext.java:4955)
at valuesForKeys(EODatabaseContext.java:6692)
at valuesForKeys(EOObjectStoreCoordinator.java:341)
at schemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java:418)
at _schemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java: 
165)

at selectObjectsWithFetchSpecification(EODatabaseChannel.java:210)
at _objectsWithFetchSpecificationEditingContext 
(EODatabaseContext.java:3196)

at objectsWithFetchSpecification(EODatabaseContext.java:3337)
at objectsWithFetchSpecification(EOObjectStoreCoordinator.java:539)
at objectsWithFetchSpecification(EOEditingContext.java:4053)
at objectsForSourceGlobalID(EODatabaseContext.java:4251)
at objectsForSourceGlobalID(EOObjectStoreCoordinator.java:682)
at objectsForSourceGlobalID(EOEditingContext.java:3904)
at _fireArrayFault(EODatabaseContext.java:4418)
at completeInitializationOfObject(EOAccessArrayFaultHandler.java:70)
at willRead(_EOCheapCopyMutableArray.java:38)
at objectsNoCopy(_EOCheapCopyMutableArray.java:87)
at (NSArray.java:393)
at setUp(PerformanceComponent.java:49)
at (Expectations.java:21)
at newInstance0(NativeConstructorAccessorImpl.java:NA)
at newInstance(NativeConstructorAccessorImpl.java:39)


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -
  'The test of a first-rate intelligence is the ability to hold two  
opposed ideas in the mind at the same time and still be able to  
function.'

-F.Scott Fitzgerald,


___
Do not 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: WOCheckBox woes.

2006-07-20 Thread Owen McKerrow

That is the correct understanding.

Is your checkbox inside a form ? If so are you submitting the form  
via a button or a link ? Remember that hyper-links don't submit  
changes in form values.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 21/07/2006, at 9:27 AM, Zac Konopa wrote:


Okay all,

I'm having a weird problem and I think it's a result of not having  
a clear understanding of the working of all the bindings involved.   
I've got a WOCheckBox.  I have bound to it's checked attribute a  
primitive boolean value.  Said boolean is set to "true" when the  
page is instantiated.  The page is accurately displayed with the  
check box checked.  If I leave the boxes alone the boolean variable  
retains it's "true" state.  When I uncheck the box as I understand  
it the boolean should be assigned the value "false".  Instead I'm  
getting a null value in my boolean.  Am I misunderstanding the use  
of the checked binding for WOCheckBox or do I need to look  
elsewhere in my code?


Thanks,

Zac
___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to archive@mail-archive.com


Re: Simple Search

2006-07-16 Thread Owen McKerrow

Hi David,

What kind of search are you trying to do ? Is the display group using  
a fetch spec you built in modler ? Is it using bindings one of the  
query methods ? From your error statment it looks like your using key  
value coding. Basically the issue is that you entity Document doe not  
have an attribute in it called simpleSearch. So when it try's to ask  
for the value of "simpleString" it says I don't know anything about a  
simple string.


As author and title are different attributes in your Document, you  
don't join them together to search over them. You use a "AND" or an  
"OR" search.


And this is where its important to know what kind of search you are  
doing.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 15/07/2006, at 10:03 AM, David Holt wrote:

I am using DisplayGroups which make queries on individual  
attributes very easy.


I would like to provide a simple search where one text field  
returns a search on a concatenation of several attributes of the  
entity. I just tried putting the following code in my EO to try  
this concept out (title and author are attributes in the entity):


public String simpleSearch() {
  String author = author();
String title = title();

String simpleSearch;

if ((author != null) && (!author.equals(""))) {
simpleSearch = author + " " + title;
}
else {
simpleSearch = title;
}

return simpleSearch;
}

When I try and do a queryMatch on the simpleSearch field I get an  
error:
java.lang.IllegalStateException: sqlStringForKeyValueQualifier:  
attempt to generate SQL for  
com.webobjects.eocontrol.EOKeyValueQualifier (simpleSearch  
caseinsensitivelike '*test*') failed because attribute identified  
by key 'simpleSearch' was not reachable from from entity 'Document'


I assume this is because the attribute "simpleSearch" is not  
actually in the database. Is there a better strategy for searching  
concatenated fields using DisplayGroups?


Thanks,
David


 ___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to archive@mail-archive.com


Re: WO and Memory Management

2006-07-13 Thread Owen McKerrow

Yes a couple of days ago we were.

Although we seem to be past them now and are dealing with the issue  
of WO not appearing to let go of the memory it uses and it having  
"broken pipe" issues.


Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - -


"I like the way this project has somehow, against all common sense,  
got itself made."

- Peter Jackson,  "The Lord of The Rings"


On 14/07/2006, at 3:33 PM, [EMAIL PROTECTED] wrote:


Hello Owen;

its better to explicitly call System.gc() in WO App's. Whats the  
rule of thumb here in terms of how often, is there a better spot  
than others etc etc ?


It is only ever a hint, never a demand. I have resorted to this  
infrequently.


That's correct, but I think the problem arises that if it does  
decide to do a full-on garbage collect then it has a tendency to  
freeze all of the threads for a bit while it does it.  This can  
lead to jittery responses from the application.


Are you actually getting "OutOfMemoryException"-s logged?

cheers.

___
Andrew Lindesay
www.lindesay.co.nz
___
Do not 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/owen% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


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

This email sent to archive@mail-archive.com


Re: WO and Memory Management

2006-07-13 Thread Owen McKerrow

Hi Chuck

Again see comments below.



Hi All,

We are setting up an application of ours on a clients server,  
they did some stress testing to see if they needed a bigger box  
and discovered something strange.

Their comments 

The webobjects versions have been stress tested further, we are  
getting ok
results but far worse then I was hoping. RIS Public faired  
worse the RIS
with it starting to get error with only 5 simultaneous users  
making simple
request 5 seconds apart (running with 2 instances each with - 
mx512M.


That is odd.  Are you dispatching requests concurrently?


No, getting them to retest with it on.


That should make a considerable difference, unless the app is doing  
a lot of EOF activity.



A major point of interest is that garbage collection does not  
appear to be

active for these instances.


 Check for I/O and DB usage.  How long does the average request  
take to process?


From the stats page :
Transactions 691
Active Session   0  
Average transactions 5.031  
Averegae idle131.627


Five seconds on average is, IMHO, way too long.


Mine 2 :)

Either all of your actions are a little slow or some are very  
slow.  Sight unseen, my money is on the latter.  Usually this is  
the result of DB access,

either queries that are slow to evaluate due to missing indexes


DOH ! **Hits self in the head** Thats one thing I need to do when  
there DBA gets back from holidays :) We moved the DB from OpenBase to  
Oracle and we haven't been back an applied indexing yet : )


or lots of single row queries due to a lack of batch faulting and  
pre-fetching in the application.


I have fiddled with it today. At the beginning of the day it looked  
like (Note this a request for a page that  loads a displaygroup to  
display every publication I have in the DB and the stats before are  
for the first time it is accessed for the app ) :


09:45:42,150 DEBUG [WorkerThread0] (PublicationsList:48   ) -  
Publication Constructor
09:45:43,188 DEBUG [WorkerThread0] (PublicationsList:149   
updatePublicationListing) - Update Pubs
09:45:45,001 DEBUG [WorkerThread0] (PublicationsList:208   
updatePublicationListing) - End Update Pubs.762 total Pubs
09:45:48,257   OFF [WorkerThread0] (Log.NSLogOut:1546 appendln) - Now  
asleep


After my tweaks ( the biggest time saver here was changing to use  
EOSharedEditingContext, as its a read only ap ) :


13:32:53,295 DEBUG [WorkerThread0] (PublicationsList:48   ) -  
Publication Constructor
13:32:54,174 DEBUG [WorkerThread0] (PublicationsList:143   
updatePublicationListing) - Update Pubs for Faculty of Education
13:32:54,920 DEBUG [WorkerThread0] (PublicationsList:196   
updatePublicationListing) - End Update Pubs.762 total Pubs
13:32:58,467   OFF [WorkerThread0] (Log.NSLogOut:1546 appendln) - Now  
asleep


So between the constructor ( line 1 ) and the time the Pubs have been  
loaded (line 3) went from 2.8 seconds to 1.6 ( and will hopefully get  
faster once I index **Hits self in the head again**)
But the biggest time is between the end of the updatePublicationsList 
() and sleep(). I need to do some further testing to see if Im  
grabbing more objects from the DB ( as you said "lots of single row  
queries.") or its because of the actual page itself. The site has a  
quotation style engine in it which basically on the fly changes the  
way in which a publication is displayed. This is what suspect is  
chewing up time. The other reason I think this may be the case is the  
time between line 3 and line 4 doesn't change when I come back to the  
page i.e. the EO's should be in memory, but the time to "render" the  
page seems to be the same.




Are you a Project Wonder user?


Nope, always wonder, never plunged. It may be my pet project while Im  
at WWDC this year.


Any volunteer tutors  ? :)

There is a class in there that will log out all queries that take  
longer than X seconds to return.  That is a good way of finding  
slow queries.  If not, I can dig out a similar class.  I thought it  
was in Practical WebObjects, but I can't find it now.


If you remember where it is I would love a copy.

For lots of single queries, the best way I have found is to just  
turn on SQL logging and look at what is spit out.  If you see reams  
of queries one after the other, each returning a single row, that  
is your problem.


I will also suggest that you add this to Application or modify what  
is there:


/**
 * Overidden to log RR loop and gather statistics.
 */
public WOResponse dispatchRequest(WORequest request) {

NSLog.out.appendln("=== New Request: " + request.uri 
());

NSLog.out.appendln("Headers: " + request.headers());

long startTime = System.currentTimeMillis();
WOResponse response = super.dispatchRequest(request);
long endTime = System.currentTimeMillis();

NSLog.out.appendln("Elapsed Time," + (endTime -  
startTime) / 1000.0 + "," 

  1   2   >