Re: install with embedded frameworks

2011-02-28 Thread John Baldwin
I think I understand better now.

The frameworks exist, and the WebServerResources are there for javaclient, so 
they're included.

I added this to the copy section of the split target of my build.xml file 

exclude 
name=Frameworks/*.framework/WebServerResources/Java/**/

And it looks like that will do what I want (getting rid of the java files, but 
including the images). Does anyone know a reason that's a bad idea (This is a 
plain old web app).

John

On Sunday Feb 27  2:18 PM, at 2:18 PM, Chuck Hill wrote:

 The frameworks you mention below are part of WO, there is only one flavor, 
 WOLips does not build them.
 
 
 On Feb 27, 2011, at 2:16 PM, John Baldwin wrote:
 
 Thanks. That makes sense to me. Is that normal, then, for them to be there?
 
 This isn't a Java Client application. It's a plain old web app.
 
 I looked in the WOLips Deployment section of the project settings, and Java 
 Client is not checked. I do have checks next to all the Framework locations 
 (Project, User, Local, System, Network).
 
 I'm using WOLips 3.6.6218.
 
 John
 
 On Sunday Feb 27  1:54 PM, at 1:54 PM, David LeBer wrote:
 
 John,
 
 I may be wrong, but I think those may be the client side classes for Java 
 Client.
 
 On 2011-02-27, at 4:44 PM, John Baldwin wrote:
 
 Well, that makes sense. And it's what I expected. But I'm getting .class 
 files in there as well (which I'm not expecting). A few examples selected 
 arbitrarily from the list:
 
 Frameworks/JavaXML.framework/WebServerResources/Java/org/xml/sax/helpers/XMLReaderFactory.class
 Frameworks/JavaFoundation.framework/WebServerResources/Java/com/webobjects/foundation/_NSStringUtilities.class
 Frameworks/JavaEOControl.framework/WebServerResources/Java/com/webobjects/eocontrol/EOKeyValueCoding$_BestBindingCreation$_ForwardingBindingCheck.class
 
 In addition, I'm seeing the image files I expected:
 
 Frameworks/ERExtensions.framework/WebServerResources/folders.gif
 
 Is there something I've messed up somewhere? Am I not understanding 
 something?
 
 John
 
 On Saturday Feb 26  2:44 PM, at 2:44 PM, David LeBer wrote:
 
 The WebServerResources.tar.gz archive should only contain the static web 
 resources from the frameworks.
 
 See:
 
 http://wiki.objectstyle.org/confluence/display/WO/Split+Deployments
 
 On 2011-02-26, at 5:32 PM, John Baldwin wrote:
 
 I am building my application and embedding frameworks.
 
 From what I see, all the frameworks are indeed embedded in the 
 application.
 
 But core frameworks also are embedded in the WebServerResources bundle.  
 Right now, in my project, the WebServerResources folder is empty.
 
 I'm confused about the WebServerResources.tar.gz bundle, and what its 
 purpose is. 
 
 My goal is to embed all the frameworks within the app and not have WO 
 installed on the server. I have deployed wotaskd and JavaMonitor as 
 embedded applications successfully.
 
 Sorry if I'm missing the right wiki page. Trying to ramp back up quickly 
 here.
 
 John
 
 ___
 
 ;david
 
 --
 David LeBer
 Codeferous Software
 'co-def-er-ous' adj. Literally 'code-bearing'
 site:   http://codeferous.com
 blog:   http://davidleber.net
 profile:http://www.linkedin.com/in/davidleber
 twitter:http://twitter.com/rebeld
 --
 Toronto Area Cocoa / WebObjects developers group:
 http://tacow.org
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 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 arch...@mail-archive.com


IllegalStateException in _beginTransaction()

2011-02-28 Thread Paul Hoadley
Hello,

I got an exception stack trace from a production app, the start of which looks 
like this:

---
java.lang.IllegalStateException: _beginTransaction(): 
com.webobjects.eoaccess.EODatabaseContext 
com.webobjects.eoaccess.EODatabaseContext@1162212 Transactions cannot be nested
at 
com.webobjects.eoaccess.EODatabaseContext._beginTransaction(EODatabaseContext.java:1988)
at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at 
com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:122)
at 
com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(NSNotificationCenter.java:588)
at 
com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:532)
at 
com.webobjects.foundation.NSNotificationCenter.postNotification(NSNotificationCenter.java:546)
at 
com.webobjects.eoaccess.EOAdaptorContext.transactionDidBegin(EOAdaptorContext.java:371)
at 
com.webobjects.jdbcadaptor.JDBCContext.beginTransaction(JDBCContext.java:426)
at 
com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:326)
at 
com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java:296)
at 
com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes(JDBCChannel.java:220)
at 
com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationEditingContext(EODatabaseChannel.java:897)
at 
com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:234)
at 
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3055)
at 
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195)
at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
at 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
at 
er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1206)
---

ERXApplication.extraInformationForExceptionInContext() tells me that it 
occurred in a component that basically just lists some EOs.  User feedback is a 
dead end, so I wouldn't even know where to start to reproduce this.  I know I'm 
not giving much to go on here, but can anyone give me any background on how 
such an exception might be thrown at that point?

(I'm using WO 5.4.3, and a fairly recent Wonder.)


-- 
Paul.

http://logicsquad.net/


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

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


Programmatically changing database configuration on startup

2011-02-28 Thread Paul Dunkler
Hi all,

we are currently trying to make our deployment work nice.

A problem we currently have is, that we have different database connection 
configurations in the EOModel of our Application (one for deployment and one 
for local testing).
Now the question is if it is possible to change these configuration 
automatically on startup of our application instead of activating/deactivating 
the profiles through WOLips. Or maybe Deployment Profile would help us on 
this way?

Please share your experiences about changing from local to deployment 
environments with your WO-Applications.


--
Best Regards

Paul Dunkler
 ___
Do not 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: Programmatically changing database configuration on startup

2011-02-28 Thread David LeBer
Yes,

If you are using Wonder you can configure your db connection dictionaries in 
properties:

http://wiki.objectstyle.org/confluence/display/WO/Project+Wonder+Properties+Files

Look at the source for 
http://wonder.sourceforge.net/javadoc/er/extensions/ERXConfigurationManager.html
 if you want to see how it's done.

On 2011-02-28, at 9:12 AM, Paul Dunkler wrote:

 Hi all,
 
 we are currently trying to make our deployment work nice.
 
 A problem we currently have is, that we have different database connection 
 configurations in the EOModel of our Application (one for deployment and one 
 for local testing).
 Now the question is if it is possible to change these configuration 
 automatically on startup of our application instead of 
 activating/deactivating the profiles through WOLips. Or maybe Deployment 
 Profile would help us on this way?
 
 Please share your experiences about changing from local to deployment 
 environments with your WO-Applications.
 
 
 --
 Best Regards
 
 Paul Dunkler
 ___
 Do not 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/dleber_wodev%40codeferous.com
 
 This email sent to dleber_wo...@codeferous.com

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:http://www.linkedin.com/in/davidleber
twitter:http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




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

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


Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]

2011-02-28 Thread Jon Nolan

Hi Kieran,

I have a multi-threaded app and I'm starting to run into deadlock issues on EC 
locking/unlocking (OSC really).  After a weekend of digging and researching I 
think your solution is the answer.

Question #1:  Is this the final, dust-settled version?

Question #2:  Do you always use a new EOObjectStore in your threads?  It seems 
your implementation depends upon it.  If so, what's your philosophy on how many 
you create and how long they live?  I have tens of thousands of threads running 
per instance per day (only a few at a time) and something tells me creating a 
new OS for each is a bad idea.

Thanks,
Jon


On 12/3/09 1:31 PM, Kieran Kelleher wrote:

OK, this is the final concurrent utility code to provide manual locking ec's in 
a app with safeLocking on. And just for fun and Ricardo's enjoyment of 
anonymous classes ;-), the factory is an anonymous static class and its _create 
method returns anonymous ERXEC's with the two methods over-riden as per Anjo's 
suggestion.

/**
*AnonymousERXECfactorythatcreatesmanuallockingec'sinanappwheresafeLockingisonbydefault
*/
private static ERXEC.Factory manualLockingEditingContextFactory = new 
ERXEC.DefaultFactory() {

@Override
protected EOEditingContext _createEditingContext(EOObjectStore parent) {
return new ERXEC(parent == null ? EOEditingContext.defaultParentObjectStore() : 
parent) {
@Override
public boolean useAutoLock() {return false;}

@Override
public boolean coalesceAutoLocks() {return false;}
};
}
};

/**
*@returnaregularERXECwithnoauto-lockingfeatures
*/
public static EOEditingContext newManualLockingEditingContext() {
returnmanualLockingEditingContextFactory._newEditingContext();
}


/**
*Idonotwantautolockinginnon-requestthreads
*
*@paramparent
*@returnanERXECwithsafeLockingpropertiesturnedOFF.
*/
public static EOEditingContext newManualLockingEditingContext(EOObjectStore 
parent) {
returnmanualLockingEditingContextFactory._newEditingContext(parent);
}


On Dec 3, 2009, at 2:54 PM, Mike Schrag wrote:


i think we're talking two different things ... if you have an empty superclass 
constructor and you don't declare any constructors, then yes, there is an 
implicit constructor created in your subclass that calls super (as well, if you 
DO declare a constructor and there is an empty super constructor, implicitly a 
super() is added to the top of your constructor). in this case, because the 
anonymous subclass is declared as new ERXEC(os), it's actually calling the 
ERXEC(ObjectStore) constructor (which I PRESUME java secretly added into your 
subclass with a super(os) call -- this is a little different than a normal 
class). However, Kieran's specifically talking about the 
ERXEC.newEditingContext() factory method, which you're bypassing here by 
explicitly subclassing ERXEC and instantiating the class directly.

ms

On Dec 3, 2009, at 2:45 PM, Ricardo J. Parada wrote:


Don't subclasses have an implicit super() to invoke the super class constructor?


On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote:


True, but then I would be bypassing the EC factory, which just seems dirty, but 
yes, this very good suggestion is an elegant way to do it for sure.

On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote:


PS. And even the above is not perfect protection against an autolock if a 
thread gets cpu execution delay between construction statement and the 
ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to 
false, I should really check if the ec was autolocked and unlock it before 
returning  or even have an ERXEC constructor that takes a safeLocking 
boolean param, but that would be two more undesired constructors ... so 
probably making isLockedInThread public (or accessible using reflection) should 
do the trick.


In that case, you'd be better with

return new ERXEC(os) {
 public boolean useAutoLock() {return false;}

 public boolean coalesceAutoLocks() {return false;}
};

Cheers, Anjo


___






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

This email sent to li...@lochgarman.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/archive%40mail-archive.com

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


Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]

2011-02-28 Thread Kieran Kelleher
Hi Jon,

On Feb 28, 2011, at 10:28 AM, Jon Nolan wrote:

 Hi Kieran,
 
 I have a multi-threaded app and I'm starting to run into deadlock issues on 
 EC locking/unlocking (OSC really).  After a weekend of digging and 
 researching I think your solution is the answer.
 
 Question #1:  Is this the final, dust-settled version?

Yes, I always use the manual locking anonymous subclass in the background. I 
think dust will be settled when I can have a cleaner version of this 
functionality in Wonder without distastefully dirtying the ERXEC factory.


 
 Question #2:  Do you always use a new EOObjectStore in your threads?

No. In have a pool of OSC's dedicated to background threads. Usually 4 to 12 in 
the pool, depending on the application's needs and functionality.


WKTaskObjectStoreCoordinatorPool.java
Description: Binary data


WKObjectStoreCoordinator is just a simple subclass that allows me to give the 
OSC a name for debugging/logging purposes, so you don't have to use that in the 
pool. Just use the regular Wonder ERXOSC.


WKObjectStoreCoordinator.java
Description: Binary data


Since using this approach I have not experienced any EC deadlocks in 
production. Need to decide how to implement this cleanly in Wonder some day.

Regards, Kieran


 It seems your implementation depends upon it.  If so, what's your philosophy 
 on how many you create and how long they live?  I have tens of thousands of 
 threads running per instance per day (only a few at a time) and something 
 tells me creating a new OS for each is a bad idea.
 
 Thanks,
 Jon
 
 
 On 12/3/09 1:31 PM, Kieran Kelleher wrote:
 OK, this is the final concurrent utility code to provide manual locking ec's 
 in a app with safeLocking on. And just for fun and Ricardo's enjoyment of 
 anonymous classes ;-), the factory is an anonymous static class and its 
 _create method returns anonymous ERXEC's with the two methods over-riden as 
 per Anjo's suggestion.
 
 /**
 *AnonymousERXECfactorythatcreatesmanuallockingec'sinanappwheresafeLockingisonbydefault
 */
 private static ERXEC.Factory manualLockingEditingContextFactory = new 
 ERXEC.DefaultFactory() {
 
 @Override
 protected EOEditingContext _createEditingContext(EOObjectStore parent) {
 return new ERXEC(parent == null ? 
 EOEditingContext.defaultParentObjectStore() : parent) {
 @Override
 public boolean useAutoLock() {return false;}
 
 @Override
 public boolean coalesceAutoLocks() {return false;}
 };
 }
 };
 
 /**
 *@returnaregularERXECwithnoauto-lockingfeatures
 */
 public static EOEditingContext newManualLockingEditingContext() {
 returnmanualLockingEditingContextFactory._newEditingContext();
 }
 
 
 /**
 *Idonotwantautolockinginnon-requestthreads
 *
 *@paramparent
 *@returnanERXECwithsafeLockingpropertiesturnedOFF.
 */
 public static EOEditingContext newManualLockingEditingContext(EOObjectStore 
 parent) {
 returnmanualLockingEditingContextFactory._newEditingContext(parent);
 }
 
 
 On Dec 3, 2009, at 2:54 PM, Mike Schrag wrote:
 
 i think we're talking two different things ... if you have an empty 
 superclass constructor and you don't declare any constructors, then yes, 
 there is an implicit constructor created in your subclass that calls super 
 (as well, if you DO declare a constructor and there is an empty super 
 constructor, implicitly a super() is added to the top of your constructor). 
 in this case, because the anonymous subclass is declared as new ERXEC(os), 
 it's actually calling the ERXEC(ObjectStore) constructor (which I PRESUME 
 java secretly added into your subclass with a super(os) call -- this is a 
 little different than a normal class). However, Kieran's specifically 
 talking about the ERXEC.newEditingContext() factory method, which you're 
 bypassing here by explicitly subclassing ERXEC and instantiating the class 
 directly.
 
 ms
 
 On Dec 3, 2009, at 2:45 PM, Ricardo J. Parada wrote:
 
 Don't subclasses have an implicit super() to invoke the super class 
 constructor?
 
 
 On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote:
 
 True, but then I would be bypassing the EC factory, which just seems 
 dirty, but yes, this very good suggestion is an elegant way to do it for 
 sure.
 
 On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote:
 
 PS. And even the above is not perfect protection against an autolock if 
 a thread gets cpu execution delay between construction statement and 
 the ec.setCoalesceAutoLocks(false) statement. After setting safelocking 
 props to false, I should really check if the ec was autolocked and 
 unlock it before returning  or even have an ERXEC constructor that 
 takes a safeLocking boolean param, but that would be two more undesired 
 constructors ... so probably making isLockedInThread public (or 
 accessible using reflection) should do the trick.
 
 In that case, you'd be better with
 
 return new ERXEC(os) {
 public boolean useAutoLock() {return false;}
 
 public boolean coalesceAutoLocks() {return false;}
 };
 
 Cheers, Anjo
 
 
 

Fwd: Programmatically changing database configuration on startup

2011-02-28 Thread Paul Dunkler
Sorry, but i forgot to forward the answer on my past question to the whole 
mailing list.

Here is my answer again for all other people which are investigating the same 
issue.

 Thank you for the quick help.
 
 I'm ended up with using the wonder property dbConfigNameGLOBAL. By doing 
 that i can use the connection profiles i've configured before in the 
 EOModeler and don't have to configure the connection parameters in another 
 property-file.
 
 For all other people who are currently investigating about deployment 
 configurations, this wiki entry may be interesting:
 http://wiki.objectstyle.org/confluence/display/WONDER/Best+Practices-Properties+Files
 
 
 Am 28.02.2011 um 15:21 schrieb David LeBer:
 
 Yes,
 
 If you are using Wonder you can configure your db connection dictionaries in 
 properties:
 
 http://wiki.objectstyle.org/confluence/display/WO/Project+Wonder+Properties+Files
 
 Look at the source for 
 http://wonder.sourceforge.net/javadoc/er/extensions/ERXConfigurationManager.html
  if you want to see how it's done.
 
 On 2011-02-28, at 9:12 AM, Paul Dunkler wrote:
 
 Hi all,
 
 we are currently trying to make our deployment work nice.
 
 A problem we currently have is, that we have different database connection 
 configurations in the EOModel of our Application (one for deployment and 
 one for local testing).
 Now the question is if it is possible to change these configuration 
 automatically on startup of our application instead of 
 activating/deactivating the profiles through WOLips. Or maybe Deployment 
 Profile would help us on this way?
 
 Please share your experiences about changing from local to deployment 
 environments with your WO-Applications.
 
 
 --
 Best Regards
 
 Paul Dunkler
 ___
 Do not 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/dleber_wodev%40codeferous.com
 
 This email sent to dleber_wo...@codeferous.com
 
 ;david
 
 --
 David LeBer
 Codeferous Software
 'co-def-er-ous' adj. Literally 'code-bearing'
 site:http://codeferous.com
 blog:http://davidleber.net
 profile: http://www.linkedin.com/in/davidleber
 twitter: http://twitter.com/rebeld
 --
 Toronto Area Cocoa / WebObjects developers group:
 http://tacow.org
 
 
 
 
 
 Mit freundlichen Grüßen
 
 Paul Dunkler
 
 
inline: xyrality_logo_medium.png 
 
 -
 XYRALITY GmbH • Lerchenstraße 28a • 22767 Hamburg
 Paul Dunkler • Softwareentwickler
 Mail: paul.dunk...@xyrality.com   
 Tel: +49 (0) 40 23 51 78 97
 Mobil: +49 (0) 151 11624143
 Fax: +49 (0) 40 23 51 78 98
 Web: http://www.xyrality.com/
 Registergericht: Hamburg HRB 115332
 Geschäftsführer: Sven Ossenbrüggen  Alexander Spohr
 -
 

Mit freundlichen Grüßen

Paul Dunkler


inline: xyrality_logo_medium.png

-
XYRALITY GmbH • Lerchenstraße 28a • 22767 Hamburg
Paul Dunkler • Softwareentwickler
Mail: paul.dunk...@xyrality.com 
Tel: +49 (0) 40 23 51 78 97
Mobil: +49 (0) 151 11624143
Fax: +49 (0) 40 23 51 78 98
Web: http://www.xyrality.com/
Registergericht: Hamburg HRB 115332
Geschäftsführer: Sven Ossenbrüggen  Alexander Spohr
-

 ___
Do not 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: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]

2011-02-28 Thread Jon Nolan

Thanks Kieran.  I've implemented your solution and will roll it through to prod 
within a couple of days.  I have deadlocks on at least a daily basis so if 
those disappear it will be another validation of your work... not to mention 
once again earning my gratitude.

Slán,
Jon

On 2/28/11 8:50 AM, Kieran Kelleher wrote:

Hi Jon,

On Feb 28, 2011, at 10:28 AM, Jon Nolan wrote:


Hi Kieran,

I have a multi-threaded app and I'm starting to run into deadlock issues on EC 
locking/unlocking (OSC really).  After a weekend of digging and researching I 
think your solution is the answer.

Question #1:  Is this the final, dust-settled version?


Yes, I always use the manual locking anonymous subclass in the background. I 
think dust will be settled when I can have a cleaner version of this functionality in 
Wonder without distastefully dirtying the ERXEC factory.




Question #2:  Do you always use a new EOObjectStore in your threads?


No. In have a pool of OSC's dedicated to background threads. Usually 4 to 12 in 
the pool, depending on the application's needs and functionality.




WKObjectStoreCoordinator is just a simple subclass that allows me to give the 
OSC a name for debugging/logging purposes, so you don't have to use that in the 
pool. Just use the regular Wonder ERXOSC.




Since using this approach I have not experienced any EC deadlocks in 
production. Need to decide how to implement this cleanly in Wonder some day.

Regards, Kieran



It seems your implementation depends upon it.  If so, what's your philosophy on 
how many you create and how long they live?  I have tens of thousands of 
threads running per instance per day (only a few at a time) and something tells 
me creating a new OS for each is a bad idea.

Thanks,
Jon


On 12/3/09 1:31 PM, Kieran Kelleher wrote:

OK, this is the final concurrent utility code to provide manual locking ec's in 
a app with safeLocking on. And just for fun and Ricardo's enjoyment of 
anonymous classes ;-), the factory is an anonymous static class and its _create 
method returns anonymous ERXEC's with the two methods over-riden as per Anjo's 
suggestion.

/**
*AnonymousERXECfactorythatcreatesmanuallockingec'sinanappwheresafeLockingisonbydefault
*/
private static ERXEC.Factory manualLockingEditingContextFactory = new 
ERXEC.DefaultFactory() {

@Override
protected EOEditingContext _createEditingContext(EOObjectStore parent) {
return new ERXEC(parent == null ? EOEditingContext.defaultParentObjectStore() : 
parent) {
@Override
public boolean useAutoLock() {return false;}

@Override
public boolean coalesceAutoLocks() {return false;}
};
}
};

/**
*@returnaregularERXECwithnoauto-lockingfeatures
*/
public static EOEditingContext newManualLockingEditingContext() {
returnmanualLockingEditingContextFactory._newEditingContext();
}


/**
*Idonotwantautolockinginnon-requestthreads
*
*@paramparent
*@returnanERXECwithsafeLockingpropertiesturnedOFF.
*/
public static EOEditingContext newManualLockingEditingContext(EOObjectStore 
parent) {
returnmanualLockingEditingContextFactory._newEditingContext(parent);
}


On Dec 3, 2009, at 2:54 PM, Mike Schrag wrote:


i think we're talking two different things ... if you have an empty superclass 
constructor and you don't declare any constructors, then yes, there is an 
implicit constructor created in your subclass that calls super (as well, if you 
DO declare a constructor and there is an empty super constructor, implicitly a 
super() is added to the top of your constructor). in this case, because the 
anonymous subclass is declared as new ERXEC(os), it's actually calling the 
ERXEC(ObjectStore) constructor (which I PRESUME java secretly added into your 
subclass with a super(os) call -- this is a little different than a normal 
class). However, Kieran's specifically talking about the 
ERXEC.newEditingContext() factory method, which you're bypassing here by 
explicitly subclassing ERXEC and instantiating the class directly.

ms

On Dec 3, 2009, at 2:45 PM, Ricardo J. Parada wrote:


Don't subclasses have an implicit super() to invoke the super class constructor?


On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote:


True, but then I would be bypassing the EC factory, which just seems dirty, but 
yes, this very good suggestion is an elegant way to do it for sure.

On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote:


PS. And even the above is not perfect protection against an autolock if a 
thread gets cpu execution delay between construction statement and the 
ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to 
false, I should really check if the ec was autolocked and unlock it before 
returning  or even have an ERXEC constructor that takes a safeLocking 
boolean param, but that would be two more undesired constructors ... so 
probably making isLockedInThread public (or accessible using reflection) should 
do the trick.


In that case, you'd be better with

return new ERXEC(os) {
public boolean useAutoLock() 

Re: install with embedded frameworks

2011-02-28 Thread Chuck Hill

On Feb 28, 2011, at 12:26 AM, John Baldwin wrote:

 I think I understand better now.
 
 The frameworks exist, and the WebServerResources are there for javaclient, so 
 they're included.
 
 I added this to the copy section of the split target of my build.xml file 
 
   exclude 
 name=Frameworks/*.framework/WebServerResources/Java/**/
 
 And it looks like that will do what I want (getting rid of the java files, 
 but including the images). Does anyone know a reason that's a bad idea (This 
 is a plain old web app).
 
 John

That should be fine if you are not using JavaClient.


Chuck


 
 On Sunday Feb 27  2:18 PM, at 2:18 PM, Chuck Hill wrote:
 
 The frameworks you mention below are part of WO, there is only one flavor, 
 WOLips does not build them.
 
 
 On Feb 27, 2011, at 2:16 PM, John Baldwin wrote:
 
 Thanks. That makes sense to me. Is that normal, then, for them to be there?
 
 This isn't a Java Client application. It's a plain old web app.
 
 I looked in the WOLips Deployment section of the project settings, and Java 
 Client is not checked. I do have checks next to all the Framework locations 
 (Project, User, Local, System, Network).
 
 I'm using WOLips 3.6.6218.
 
 John
 
 On Sunday Feb 27  1:54 PM, at 1:54 PM, David LeBer wrote:
 
 John,
 
 I may be wrong, but I think those may be the client side classes for Java 
 Client.
 
 On 2011-02-27, at 4:44 PM, John Baldwin wrote:
 
 Well, that makes sense. And it's what I expected. But I'm getting .class 
 files in there as well (which I'm not expecting). A few examples selected 
 arbitrarily from the list:
 
 Frameworks/JavaXML.framework/WebServerResources/Java/org/xml/sax/helpers/XMLReaderFactory.class
 Frameworks/JavaFoundation.framework/WebServerResources/Java/com/webobjects/foundation/_NSStringUtilities.class
 Frameworks/JavaEOControl.framework/WebServerResources/Java/com/webobjects/eocontrol/EOKeyValueCoding$_BestBindingCreation$_ForwardingBindingCheck.class
 
 In addition, I'm seeing the image files I expected:
 
 Frameworks/ERExtensions.framework/WebServerResources/folders.gif
 
 Is there something I've messed up somewhere? Am I not understanding 
 something?
 
 John
 
 On Saturday Feb 26  2:44 PM, at 2:44 PM, David LeBer wrote:
 
 The WebServerResources.tar.gz archive should only contain the static web 
 resources from the frameworks.
 
 See:
 
 http://wiki.objectstyle.org/confluence/display/WO/Split+Deployments
 
 On 2011-02-26, at 5:32 PM, John Baldwin wrote:
 
 I am building my application and embedding frameworks.
 
 From what I see, all the frameworks are indeed embedded in the 
 application.
 
 But core frameworks also are embedded in the WebServerResources bundle. 
  Right now, in my project, the WebServerResources folder is empty.
 
 I'm confused about the WebServerResources.tar.gz bundle, and what its 
 purpose is. 
 
 My goal is to embed all the frameworks within the app and not have WO 
 installed on the server. I have deployed wotaskd and JavaMonitor as 
 embedded applications successfully.
 
 Sorry if I'm missing the right wiki page. Trying to ramp back up 
 quickly here.
 
 John
 
 ___
 
 ;david
 
 --
 David LeBer
 Codeferous Software
 'co-def-er-ous' adj. Literally 'code-bearing'
 site:  http://codeferous.com
 blog:  http://davidleber.net
 profile:   http://www.linkedin.com/in/davidleber
 twitter:   http://twitter.com/rebeld
 --
 Toronto Area Cocoa / WebObjects developers group:
 http://tacow.org
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 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
 

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









smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not 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: install with embedded frameworks

2011-02-28 Thread John Baldwin
Great, thanks.

John

On Monday Feb 28  12:00 PM, at 12:00 PM, Chuck Hill wrote:

 
 On Feb 28, 2011, at 12:26 AM, John Baldwin wrote:
 
 I think I understand better now.
 
 The frameworks exist, and the WebServerResources are there for javaclient, 
 so they're included.
 
 I added this to the copy section of the split target of my build.xml file 
 
  exclude 
 name=Frameworks/*.framework/WebServerResources/Java/**/
 
 And it looks like that will do what I want (getting rid of the java files, 
 but including the images). Does anyone know a reason that's a bad idea (This 
 is a plain old web app).
 
 John
 
 That should be fine if you are not using JavaClient.
 
 
 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 arch...@mail-archive.com


Re: IllegalStateException in _beginTransaction()

2011-02-28 Thread Paul Hoadley
Hi Chuck,

On 01/03/2011, at 4:38 AM, Chuck Hill wrote:

 It is possible  that some prior transaction had an error and left the DBC 
 transaction open?

Actually, yes, I think I can see a couple of candidates.  A user can initiate a 
long-running background task from the page in question, which does touch EOF to 
create some data for download relating to a chosen EO.  (I'm reasonably sure 
those background tasks are well-behaved, in that they use their own ERXEC to do 
their work, and the EO is passed in using its EOGlobalID.)

1.  Just prior to the IllegalStateException, there's an Exception while 
sending response: java.net.SocketException: Broken pipe.  I know users get 
bored and navigate away before the background task completes.  Would this cause 
any problems?

2.  I've been tuning the RAM available to the instance, and sometimes it runs 
short.  Just after the IllegalStateException (which presumably rules it out as 
a cause) there's an OutOfMemoryError when the JVM ran out of heap space.

Are either of these potential causes?


-- 
Paul.

http://logicsquad.net/


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

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


Re: IllegalStateException in _beginTransaction()

2011-02-28 Thread Chuck Hill
Hi Paul,


On Feb 28, 2011, at 8:51 PM, Paul Hoadley wrote:

 Hi Chuck,
 
 On 01/03/2011, at 4:38 AM, Chuck Hill wrote:
 
 It is possible  that some prior transaction had an error and left the DBC 
 transaction open?
 
 Actually, yes, I think I can see a couple of candidates.  A user can initiate 
 a long-running background task from the page in question, which does touch 
 EOF to create some data for download relating to a chosen EO.  (I'm 
 reasonably sure those background tasks are well-behaved, in that they use 
 their own ERXEC to do their work, and the EO is passed in using its 
 EOGlobalID.)

Do you create an EOF stack for these long running tasks?I would suggest 
doing that.


 1.  Just prior to the IllegalStateException, there's an Exception while 
 sending response: java.net.SocketException: Broken pipe.  I know users get 
 bored and navigate away before the background task completes.  Would this 
 cause any problems?

I don't think so.  This should not affect what work EOF does.



 2.  I've been tuning the RAM available to the instance, and sometimes it runs 
 short.  Just after the IllegalStateException (which presumably rules it out 
 as a cause) there's an OutOfMemoryError when the JVM ran out of heap space.
 
 Are either of these potential causes?


Yes!  Run out of memory and all bets are off.All kinds of things can happen 
in this case, the JVM is often insane.  Likely the IllegalStateException 
resulted from running out of memory.

Where possible (sometimes it can't recover enough memory to even properly throw 
the exception) I try to catch this in the Application's handleException and 
then System.getRuntime.exit(1)


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









smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not 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: IllegalStateException in _beginTransaction()

2011-02-28 Thread Paul Hoadley
Hi Chuck,

On 01/03/2011, at 3:32 PM, Chuck Hill wrote:

 On Feb 28, 2011, at 8:51 PM, Paul Hoadley wrote:
 
 On 01/03/2011, at 4:38 AM, Chuck Hill wrote:
 
 It is possible  that some prior transaction had an error and left the DBC 
 transaction open?
 
 Actually, yes, I think I can see a couple of candidates.  A user can 
 initiate a long-running background task from the page in question, which 
 does touch EOF to create some data for download relating to a chosen EO.  
 (I'm reasonably sure those background tasks are well-behaved, in that they 
 use their own ERXEC to do their work, and the EO is passed in using its 
 EOGlobalID.)
 
 Do you create an EOF stack for these long running tasks?I would suggest 
 doing that.

I'm not currently, but I'll change it to do so.  Tell me, is the difference 
between just doing ERXEC.newEditingContext(new EOObjectStoreCoordinator()) and 
using an OSC pool approach just that the latter ensures an upper limit on how 
many stacks the app creates?  Or are there significant setup/teardown costs 
involved in the former every time a user starts a background task?  (Or both?)

 2.  I've been tuning the RAM available to the instance, and sometimes it 
 runs short.  Just after the IllegalStateException (which presumably rules it 
 out as a cause) there's an OutOfMemoryError when the JVM ran out of heap 
 space.
 
 Are either of these potential causes?
 
 Yes!  Run out of memory and all bets are off.All kinds of things can 
 happen in this case, the JVM is often insane.  Likely the 
 IllegalStateException resulted from running out of memory.
 
 Where possible (sometimes it can't recover enough memory to even properly 
 throw the exception) I try to catch this in the Application's handleException 
 and then System.getRuntime.exit(1)

Thanks.  So the fact that the OutOfMemoryError was logged _after_ the 
IllegalStateException doesn't preclude it from being the cause?


-- 
Paul.

http://logicsquad.net/


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

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


Re: IllegalStateException in _beginTransaction()

2011-02-28 Thread Chuck Hill
Hi Paul,


On Feb 28, 2011, at 9:38 PM, Paul Hoadley wrote:

 Hi Chuck,
 
 On 01/03/2011, at 3:32 PM, Chuck Hill wrote:
 
 On Feb 28, 2011, at 8:51 PM, Paul Hoadley wrote:
 
 On 01/03/2011, at 4:38 AM, Chuck Hill wrote:
 
 It is possible  that some prior transaction had an error and left the DBC 
 transaction open?
 
 Actually, yes, I think I can see a couple of candidates.  A user can 
 initiate a long-running background task from the page in question, which 
 does touch EOF to create some data for download relating to a chosen EO.  
 (I'm reasonably sure those background tasks are well-behaved, in that they 
 use their own ERXEC to do their work, and the EO is passed in using its 
 EOGlobalID.)
 
 Do you create an EOF stack for these long running tasks?I would suggest 
 doing that.
 
 I'm not currently, but I'll change it to do so.  Tell me, is the difference 
 between just doing ERXEC.newEditingContext(new EOObjectStoreCoordinator()) 
 and using an OSC pool approach just that the latter ensures an upper limit on 
 how many stacks the app creates?  Or are there significant setup/teardown 
 costs involved in the former every time a user starts a background task?  (Or 
 both?)

IIRC, they don't get torn down.  Or not easily.  Pools are much better unless 
you create one and use it for the lifetime of the app.


 2.  I've been tuning the RAM available to the instance, and sometimes it 
 runs short.  Just after the IllegalStateException (which presumably rules 
 it out as a cause) there's an OutOfMemoryError when the JVM ran out of heap 
 space.
 
 Are either of these potential causes?
 
 Yes!  Run out of memory and all bets are off.All kinds of things can 
 happen in this case, the JVM is often insane.  Likely the 
 IllegalStateException resulted from running out of memory.
 
 Where possible (sometimes it can't recover enough memory to even properly 
 throw the exception) I try to catch this in the Application's 
 handleException and then System.getRuntime.exit(1)
 
 Thanks.  So the fact that the OutOfMemoryError was logged _after_ the 
 IllegalStateException doesn't preclude it from being the cause?


No.  All.  Bets.  Off.   :-)


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









smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not 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

Issue With the Eclipse

2011-02-28 Thread pavan.jayam

Dear List,

I am facing a problem with eclipse, i developed an application with 
Eclipse3.2 and now upgraded my eclipse to 3.6 with compatible WOLips, 
but it is giving lot of errors, and i added all related libraries and 
jar files to the project.


ThanksRegards,
*Pavan Jayam
*


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