[OT] Leaving WO
Hi all, I am leaving my current job, and consequently WebObjects. I am writing just to say bye to the community :) My first programming job was with WebObjects, so this community is also special to me in the sense that I learned a lot about how cooperative programming can be, and how much fun interacting with other engineers is. So, kudos to you all :) As for JBND, John Ours will be taking the lead in it, though we have not discussed yet if the website and the resources will be moved to a different location or not. I will of course continue supporting it as much as possible. As for me, I plan to study computer sciences in Zagreb, Croatia, where I am from. As far as I know there is little or none Apple based dev there, so I guess I will just have to build something up from scratch. In the meanwhile I am focusing on Cocoa programming, bass playing, and whatever else comes my way. So, the best of regards to you all, it's been damn good. And if you're ever in Zagreb, the beer's on me. F http://web.mac.com/flor385/when/ http://web.mac.com/flor385/notesmack/ ___ Do not 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: [JC] update conflict handling
On Jul 20, 2009, at 23:59, John Ours wrote: On Jul 14, 2009, at 11:48 AM, Chuck Hill wrote: On Jul 14, 2009, at 7:29 AM, David Avendasora wrote: Wouldn't calling clientSideRequestGetNotifications() on the client trigger an automatic copying of the client-side EditingContext back to the server, which would then cause the server side to sync up the server-side EditingContexts and return the Notifications (if any). You could then process those notifications on the client and only _then_ call saveChanges()? I'm just guessing... I know nothing of JC, but if that functionality is available on the client, doing this should avoid the exception. It does mean that you will have to handle whatever clientSideRequestGetNotifications() returns / does to process the optimistic locking problem on the client. I've been working through this problem with Flor and was able to confirm tonight that adding this code: EODistributedObjectStore dos = (EODistributedObjectStore) (EOEditingContext.defaultParentObjectStore()); Object o = dos.invokeStatelessRemoteMethodWithKeyPath(null, clientSideRequestGetNotifications, new Class[] {_EONotificationRequest._CLASS}, new Object[] {null}); System.out.println(o); to his test app before the saveChanges call does in fact avoid the exception. Object o in the above code appears to be an EOObjectsChangedInStoreNotification inside of an EONotificationCarrier as Chuck said it would be, and I can deal with that or squash it as necessary. Yep, I tested this and it performs... Thanks! Now, my concern is that making this call from the client pops the notification so the server doesn't see it, and for this very controlled scenario that works fine. But I'd need to call it before every save to deal with the concurrency issue, so what if I get some other type of notification in there? This appears to be the same call EODistributedObjectStore makes in its _send routine, and I'd hate to pop a notification that it really does need to see. The cleanest solution, I would think, would be to either peek at the notification or be able to push it back if it's not one I'm interested in. Is either possible? Barring that, does anyone know what other types of notifications might come from that GetNotifications() call? I don't know what you are asking... But I think though that if it was somehow possible to handle this on the server, perhaps by manually filtering out the object change notifications directly from where they are retained, this would not be an issue. Ideally this would be synchronized with the saveChanges() call, server side, thus also avoiding the (minimal) race condition that the current workaround introduces. Also, it would reduce network traffic because the object change notifications (which could get numerous) would not have to be transmitted to the client. I am not sure if it is possible though, I have no idea where those notifications are kept, nor do I know if the server side process of saving changes can be injected with this procedure early enough (as without the workaround the exception gets thrown before the ec saveChanges is ever reached) to ensure the OL exception does not get thrown. Just thinking out loud, I have some other things to work on right now, so I will stick to the above described solution for the time being. Also, as this exception is reproducible in a minimal test case, it still seems to be a bug, and as such should be reported... The process of 1. fetching a record 2. updating it 3. saving it 4. re-fetching should not throw an OL exception, considering that none of the attributes involved are locked on... Right? F ___ Do not 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: [JC] update conflict handling
On Jul 21, 2009, at 13:03, Chuck Hill wrote: On Jul 20, 2009, at 8:59 PM, John Ours wrote: On Jul 14, 2009, at 11:48 AM, Chuck Hill wrote: On Jul 14, 2009, at 7:29 AM, David Avendasora wrote: Wouldn't calling clientSideRequestGetNotifications() on the client trigger an automatic copying of the client-side EditingContext back to the server, which would then cause the server side to sync up the server-side EditingContexts and return the Notifications (if any). You could then process those notifications on the client and only _then_ call saveChanges()? I'm just guessing... I know nothing of JC, but if that functionality is available on the client, doing this should avoid the exception. It does mean that you will have to handle whatever clientSideRequestGetNotifications() returns / does to process the optimistic locking problem on the client. I've been working through this problem with Flor and was able to confirm tonight that adding this code: EODistributedObjectStore dos = (EODistributedObjectStore) (EOEditingContext.defaultParentObjectStore()); Object o = dos.invokeStatelessRemoteMethodWithKeyPath(null, clientSideRequestGetNotifications, new Class[] {_EONotificationRequest._CLASS}, new Object[] {null}); System.out.println(o); to his test app before the saveChanges call does in fact avoid the exception. Object o in the above code appears to be an EOObjectsChangedInStoreNotification inside of an EONotificationCarrier as Chuck said it would be, and I can deal with that or squash it as necessary. Now, my concern is that making this call from the client pops the notification so the server doesn't see it, and for this very controlled scenario that works fine. But I'd need to call it before every save to deal with the concurrency issue, And you would still need to handle the exception in the race condition where you called this, and another client saved, before your save was processed. I don't think there is any way to handle this exception properly. The server side stack trace does not imply (at least not to me) any exposed / overrideable / injectable API that could be modified to gracefully deal with the exception, once it's thrown. On the client the exception is only represented through it's message, making it impossible to determine what record is in conflict, thus rendering all the changes in the EC unusable. It's a pretty grim scenario... The exception really needs to be prevented. so what if I get some other type of notification in there? This appears to be the same call EODistributedObjectStore makes in its _send routine, and I'd hate to pop a notification that it really does need to see. I think these notifications are just for the client. EOF should have already done whatever it needs to do. It looks to me like these are just saved up and the client is expected to fetch and process them. It would explain why they are explicitly exposed to the client. This however would imply an intention behind this. The intention being that one *should* obtain these, client side, and process (or ignore) them before saving. There are two arguments against that: 1. In all the JC documentation I've seen there is absolutely no mention of this (but OK, maybe I just missed it). 2. It is a fairly apparent race condition. Based on that, I do not believe this is the way they are meant to be used. And while I pretty much have to try this out because otherwise I get a guaranteed exception on every concurrent update, it does not look clean at all. The cleanest solution, I would think, would be to either peek at the notification Hm, and then what? Since we are ignoring the notifications in the test, apparently we are just using the popping side-effect to prevent the conflict. Just looking at them won't do any good. However, if you do have something in mind, it should be possible to maintain our own server side cache of only those notifications relevant to the problem, and expose them to the client through our own API, allowing the client to get them, but without using the method we are using now, the popping one. Does not solve the race condition though. or be able to push it back if it's not one I'm interested in. Is either possible? Well, peeking is, or at least obtaining the same notifications (the EO update ones at least), but I highly doubt there is a way to push anything back in there. Re-notifying should be possible, but I have no idea what that could do. Barring that, does anyone know what other types of notifications might come from that GetNotifications() call? Nope. :-) I also would not rely on this too much. It seems to me that clientSideRequestGetNotifications() is a security flaw that we are misusing. Well, I am speculating on that. But, it seems that the method is meant to be used by client side EOF, and we
Re: [JC] update conflict handling
On Jul 21, 2009, at 13:50, Chuck Hill wrote: On Jul 21, 2009, at 10:42 AM, Stamenkovic Florijan wrote: On Jul 21, 2009, at 13:03, Chuck Hill wrote: On Jul 20, 2009, at 8:59 PM, John Ours wrote: On Jul 14, 2009, at 11:48 AM, Chuck Hill wrote: On Jul 14, 2009, at 7:29 AM, David Avendasora wrote: Wouldn't calling clientSideRequestGetNotifications() on the client trigger an automatic copying of the client-side EditingContext back to the server, which would then cause the server side to sync up the server-side EditingContexts and return the Notifications (if any). You could then process those notifications on the client and only _then_ call saveChanges()? I'm just guessing... I know nothing of JC, but if that functionality is available on the client, doing this should avoid the exception. It does mean that you will have to handle whatever clientSideRequestGetNotifications() returns / does to process the optimistic locking problem on the client. I've been working through this problem with Flor and was able to confirm tonight that adding this code: EODistributedObjectStore dos = (EODistributedObjectStore) (EOEditingContext.defaultParentObjectStore()); Object o = dos.invokeStatelessRemoteMethodWithKeyPath(null, clientSideRequestGetNotifications, new Class[] {_EONotificationRequest._CLASS}, new Object[] {null}); System.out.println(o); to his test app before the saveChanges call does in fact avoid the exception. Object o in the above code appears to be an EOObjectsChangedInStoreNotification inside of an EONotificationCarrier as Chuck said it would be, and I can deal with that or squash it as necessary. Now, my concern is that making this call from the client pops the notification so the server doesn't see it, and for this very controlled scenario that works fine. But I'd need to call it before every save to deal with the concurrency issue, And you would still need to handle the exception in the race condition where you called this, and another client saved, before your save was processed. I don't think there is any way to handle this exception properly. The server side stack trace does not imply (at least not to me) any exposed / overrideable / injectable API that could be modified to gracefully deal with the exception, once it's thrown. No. That exception is not meant to be handled. It is meant to indicate that the client failed in its responsibility to retrieve and handle the notifications. Right, this makes sense. On the client the exception is only represented through it's message, making it impossible to determine what record is in conflict, thus rendering all the changes in the EC unusable. It's a pretty grim scenario... The exception really needs to be prevented. Which is done by retrieving and handling the notifications. so what if I get some other type of notification in there? This appears to be the same call EODistributedObjectStore makes in its _send routine, and I'd hate to pop a notification that it really does need to see. I think these notifications are just for the client. EOF should have already done whatever it needs to do. It looks to me like these are just saved up and the client is expected to fetch and process them. It would explain why they are explicitly exposed to the client. This however would imply an intention behind this. The intention being that one *should* obtain these, client side, and process (or ignore) them before saving. There are two arguments against that: 1. In all the JC documentation I've seen there is absolutely no mention of this (but OK, maybe I just missed it). I can't really consider this an argument against this. The docs are not exactly extensive... True. Still, update conflicts are a common problem. We aren't talking about something really obscure here. The docs are extensive enough to mention something like if saving changes be sure to do X, otherwise you crash and burn. 2. It is a fairly apparent race condition. It always is. Well, it makes no sense to me that a race condition is introduced (even if the functionality, which would allow clients to deal with update conflicts, makes sense), there is no way to deal with one of the possible (though less probable) outcomes. Based on that, I do not believe this is the way they are meant to be used. And while I pretty much have to try this out because otherwise I get a guaranteed exception on every concurrent update, it does not look clean at all. I am just guessing. The cleanest solution, I would think, would be to either peek at the notification Hm, and then what? Since we are ignoring the notifications in the test, apparently we are just using the popping side-effect to prevent the conflict. Just looking at them won't do any good. However, if you do have something in mind, it should be possible
Re: JavaClient update conflicts
Hey John, On Jul 15, 2009, at 00:38, John Ours wrote: I am not able to reproduce this problem unless I push the EC to the server without saving it to the database (RMI for example). Baring that though I cannot reproduce the concurrency issue with either two copies of the client on one machine or two separate machines. With locking off on all the attributes I'm getting last-in-wins behavior as expected. Interesting... Is this the scenario in your app, ECs being pushed to the server dirty and uncommitted? No, the error occurs on calling save changes on the second client (after the first client has successfully saved changes)... Even when I simulated that, I was able to catch the exception from saveChanges in client2, revert that context, and client1 was able to save as expected. Argh, so things are working as expected for you... Hm, I do some fussing with session's default context, replacing it with my custom EC, perhaps that is causing this to happen. I will try this out again using the standard setup. Also, what is your setup? I am on 5.4.2, no Wonder. Thanks for trying this out, this helps a lot, now I know I should focus on my stuff instead of the frameworks! F ___ Do not 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: JavaClient update conflicts
On Jul 15, 2009, at 10:48, David Avendasora wrote: On Jul 15, 2009, at 10:44 AM, Stamenkovic Florijan wrote: I am on 5.4.2, ¿Por qué no 5.4.3? I am not really actively developing with WO anymore. Just patching stuff up for the company I am soon leaving. So I am not up to date. F ___ Do not 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: [JC] update conflict handling
On Jul 13, 2009, at 14:04, Chuck Hill wrote: On Jul 13, 2009, at 10:46 AM, Stamenkovic Florijan wrote: On Jul 11, 2009, at 10:13, Stamenkovic Florijan wrote: Bummer. I was kind of hoping you'd come up with something involving parts of the EOF that I am not that familiar with. Hm, do you know perhaps of a way to simply turn optimistic locking off in EOF, so that last write always wins? Of course, the obvious solution to this would be to turn off locking on all database columns in EOModeler, but with JC this does not help. It seems that the locking column is simply ignored, and the column values are checked anyway (well, I am not sure what is happening, but I have a test case in which an update conflict exception is thrown when editing a record whose entity has no columns marked as locked). I forgot to mention that before, sorry. Yeah, this error you are getting is notification based. Sorry if I am being slow, I have not been working with WO and Java in the past few months, but I don't see what you mean here. The stack trace of the exception does not indicate that it is a notification that triggers this, but a response to a request. It is detecting a change in another EC as an OL exception. This makes sense. Which is how (IMHO) it ought to work for web apps too, rather than the silent merge. You could try the documentation. :-P Did that already... Since it is the EODistributionContext that throws the exception, that is where I started. However, even though it deals with this, it's public API and docs don't even mention update conflicts. Nor does the delegate. So, seeing that you didn't come up with some lower level EOF magic, I would not know where to look. But, I will browse some more in the JC distribution classes. Maybe something there deals with this... I don't think it does though, I've read most of the docs for that stuff and don't recall update conflicts ever being mentioned. However, seeing that WOJC explicitly deals with update conflicts, it would be reasonable to assume that it is possible to gracefully resolve them. That assumption by itself isn't worth much though :) Will dig a bit more. So far, this has resulted in nothing. If a person had something like JAD, and looked in EODistributionContext, they might notice an inner class _RemoteMethodReceiver with a method called clientSideRequestGetNotifications. Methods that start with clientSideRequest are typically methods responding to, well, client side requests. I am unsure what such a method has to do with the process of saving changes. And if they kept looking and looked in EODistributedObjectStore they might see that getting sent. I'm just saying... So maybe there is some way to check (and thus clear) those notifications before attempting the save? Again, sorry for not understanding you, but what exactly are you saying that the role of notifications in this scenario is? How are they causing / triggering the conflict failure? I don't follow you, I'd appreciate it if you explained what you mean a bit more. Besides that I am all up for hacking my way through this, in the absence of a proper way to do it... Ah, the joy of working with WOJC once again :D Thanks, F ___ Do not 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: [JC] update conflict handling
On Jul 14, 2009, at 11:48, Chuck Hill wrote: On Jul 14, 2009, at 7:29 AM, David Avendasora wrote: On Jul 14, 2009, at 10:09 AM, Stamenkovic Florijan wrote: On Jul 13, 2009, at 14:04, Chuck Hill wrote: If a person had something like JAD, and looked in EODistributionContext, they might notice an inner class _RemoteMethodReceiver with a method called clientSideRequestGetNotifications. Methods that start with clientSideRequest are typically methods responding to, well, client side requests. I am unsure what such a method has to do with the process of saving changes. And if they kept looking and looked in EODistributedObjectStore they might see that getting sent. I'm just saying... So maybe there is some way to check (and thus clear) those notifications before attempting the save? Again, sorry for not understanding you, but what exactly are you saying that the role of notifications in this scenario is? How are they causing / triggering the conflict failure? I don't follow you, I'd appreciate it if you explained what you mean a bit more. Wouldn't calling clientSideRequestGetNotifications() on the client trigger an automatic copying of the client-side EditingContext back to the server, Hm, not really. This would be a stateless call which would not trigger an EC sync to the server. which would then cause the server side to sync up the server-side EditingContexts and return the Notifications (if any). You could then process those notifications on the client and only _then_ call saveChanges()? I'm just guessing... Right, I guess that is what Chuck is saying. OK, that could make sense. I know nothing of JC, but if that functionality is available on the client, doing this should avoid the exception. It does mean that you will have to handle whatever clientSideRequestGetNotifications() returns / does to process the optimistic locking problem on the client. Right, I can try that. It sounds super fishy though, I am not sure what I can do on the client context to make it convince the server that it's (latest) changes are the ones to be accepted. It also raises concurrency questions. In that sense it seems to me that this should somehow be resolved on the server side. But, I will look into clientSideRequestGetNotifications(), see what that is all about. Thanks, F ___ Do not 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: [JC] update conflict handling
On Jul 14, 2009, at 11:56, Chuck Hill wrote: On Jul 14, 2009, at 7:09 AM, Stamenkovic Florijan wrote: On Jul 13, 2009, at 14:04, Chuck Hill wrote: On Jul 13, 2009, at 10:46 AM, Stamenkovic Florijan wrote: On Jul 11, 2009, at 10:13, Stamenkovic Florijan wrote: Bummer. I was kind of hoping you'd come up with something involving parts of the EOF that I am not that familiar with. Hm, do you know perhaps of a way to simply turn optimistic locking off in EOF, so that last write always wins? Of course, the obvious solution to this would be to turn off locking on all database columns in EOModeler, but with JC this does not help. It seems that the locking column is simply ignored, and the column values are checked anyway (well, I am not sure what is happening, but I have a test case in which an update conflict exception is thrown when editing a record whose entity has no columns marked as locked). I forgot to mention that before, sorry. Yeah, this error you are getting is notification based. Sorry if I am being slow, I have not been working with WO and Java in the past few months, but I don't see what you mean here. The stack trace of the exception does not indicate that it is a notification that triggers this, but a response to a request. This is all theoretical knowledge on my part. The EO was saved in some other EC on the server. When that happens, an ObjectChangedInObjectStore notification is broadcast. EODistributionContext receives this, sees that it has distributed the EO and so makes a note that the EO values it distributed are no longer current on the server. There is no client push mechanism (that I am aware of), so the EODistributionContext holds on to this so that the client can be notified later. When you try to save that object without having received this notification from the EODistributionContext, it throws that exception. Ah OK, now I understand what you meant. Thanks. It is detecting a change in another EC as an OL exception. This makes sense. Which is how (IMHO) it ought to work for web apps too, rather than the silent merge. You could try the documentation. :-P Did that already... Since it is the EODistributionContext that throws the exception, that is where I started. However, even though it deals with this, it's public API and docs don't even mention update conflicts. Nor does the delegate. So, seeing that you didn't come up with some lower level EOF magic, I would not know where to look. But, I will browse some more in the JC distribution classes. Maybe something there deals with this... I don't think it does though, I've read most of the docs for that stuff and don't recall update conflicts ever being mentioned. However, seeing that WOJC explicitly deals with update conflicts, it would be reasonable to assume that it is possible to gracefully resolve them. That assumption by itself isn't worth much though :) Will dig a bit more. So far, this has resulted in nothing. If a person had something like JAD, and looked in EODistributionContext, they might notice an inner class _RemoteMethodReceiver with a method called clientSideRequestGetNotifications. Methods that start with clientSideRequest are typically methods responding to, well, client side requests. I am unsure what such a method has to do with the process of saving changes. You should request that the notifications be returned to the client, and then handle them, before attempting to save. And if they kept looking and looked in EODistributedObjectStore they might see that getting sent. I'm just saying... So maybe there is some way to check (and thus clear) those notifications before attempting the save? Again, sorry for not understanding you, but what exactly are you saying that the role of notifications in this scenario is? How are they causing / triggering the conflict failure? I don't follow you, I'd appreciate it if you explained what you mean a bit more. Besides that I am all up for hacking my way through this, in the absence of a proper way to do it... Ah, the joy of working with WOJC once again :D See David's reply. Chuck -- Chuck Hill Senior Consultant / VP Development Learn WO at WOWODC'09 East in Montréal this August! http://www.wocommunity.org/wowodc09/east http://arstechnica.com/apple/news/2009/07/webobjects-sliced-from-106but-prognosis-of-death-premature.ars ___ Do not 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: [JC] update conflict handling
On Jul 11, 2009, at 10:13, Stamenkovic Florijan wrote: Bummer. I was kind of hoping you'd come up with something involving parts of the EOF that I am not that familiar with. Hm, do you know perhaps of a way to simply turn optimistic locking off in EOF, so that last write always wins? Of course, the obvious solution to this would be to turn off locking on all database columns in EOModeler, but with JC this does not help. It seems that the locking column is simply ignored, and the column values are checked anyway (well, I am not sure what is happening, but I have a test case in which an update conflict exception is thrown when editing a record whose entity has no columns marked as locked). I forgot to mention that before, sorry. You could try the documentation. :-P Did that already... Since it is the EODistributionContext that throws the exception, that is where I started. However, even though it deals with this, it's public API and docs don't even mention update conflicts. Nor does the delegate. So, seeing that you didn't come up with some lower level EOF magic, I would not know where to look. But, I will browse some more in the JC distribution classes. Maybe something there deals with this... I don't think it does though, I've read most of the docs for that stuff and don't recall update conflicts ever being mentioned. However, seeing that WOJC explicitly deals with update conflicts, it would be reasonable to assume that it is possible to gracefully resolve them. That assumption by itself isn't worth much though :) Will dig a bit more. So far, this has resulted in nothing. F ___ Do not 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: [JC] update conflict handling
Hi Chuck, On Jul 10, 2009, at 23:32, Chuck Hill wrote: Hi Flor, On Jul 10, 2009, at 10:32 AM, Stamenkovic Florijan wrote: Hi all, I am implementing update conflict handling based on the info here: http://developer.apple.com/documentation/webobjects/Enterprise_Objects/UpdateStrategies/UpdateStrategies.html That is a little misleading. It only applies to OL conflicts across instances (or EOF stacks). Huh, I totally missed that... Well, not my primary concern right now, as the code never gets reached. However, it seems that in a JavaClient scenario the update fails before saveChanges() is ever called on an editing context being saved. This means that I can't use an overridden saveChanges() in an EC subclass to catch the adaptor exception caused by the conflict, nor can I use the context delegate to deal with the exception. So, I am not sure where to intercept the exception... Or how to deal with this... Perhaps someone has some experience / an idea about this? Well, not really. This is one of the very rare instances when I get to observe that JC is actually more sophisticated in this area than regular WO is. Regular WO just silently merges the changes from other editing contexts (problematic when the other EC is form another session). It looks like JC actually catches this and, at least sort of, handles it. Somehow, you are going to have to handle this earlier than expected. That was my impression too. I am not sure how. Bummer. I was kind of hoping you'd come up with something involving parts of the EOF that I am not that familiar with. Hm, do you know perhaps of a way to simply turn optimistic locking off in EOF, so that last write always wins? You could try the documentation. :-P Did that already... Since it is the EODistributionContext that throws the exception, that is where I started. However, even though it deals with this, it's public API and docs don't even mention update conflicts. Nor does the delegate. So, seeing that you didn't come up with some lower level EOF magic, I would not know where to look. But, I will browse some more in the JC distribution classes. Maybe something there deals with this... I don't think it does though, I've read most of the docs for that stuff and don't recall update conflicts ever being mentioned. However, seeing that WOJC explicitly deals with update conflicts, it would be reasonable to assume that it is possible to gracefully resolve them. That assumption by itself isn't worth much though :) Will dig a bit more. Thanks, F Chuck Below is the server side stack trace of the update exception... TIA, F [2009-7-10 17:20:38 GMT-00:04] WorkerThread10 Server exception: Optimistic locking failure: The object with global ID _EOIntegralKeyGlobalID[Company (java.lang.Integer)23] has been changed by another client [2009-7-10 17:20:38 GMT-00:04] WorkerThread10 java.lang.IllegalStateException: Optimistic locking failure: The object with global ID _EOIntegralKeyGlobalID[Company (java.lang.Integer)23] has been changed by another client at com .webobjects .eodistribution .EODistributionContext ._throwOptimisticLockingFailureForGlobalIDIfNecessary (EODistributionContext.java:829) at com .webobjects .eodistribution .common ._EOSavingProxy.replacementEOInEditingContext(_EOSavingProxy.java: 156) at com .webobjects .eodistribution .EODistributionContext ._replacementObjectForDecodedObject(EODistributionContext.java:882) at sun.reflect.GeneratedMethodAccessor4.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: 122) at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java: 223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java: 159) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObject(_EOReferenceRecordingCoder.java:619) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObjects(_EOReferenceRecordingCoder.java:649) at com.webobjects.foundation.NSArray.decodeObject(NSArray.java:1326) at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.webobjects.eodistribution.common._EOReferenceRecordingCoder $_Decoder.decodeObject(_EOReferenceRecordingCoder.java:767) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObject(_EOReferenceRecordingCoder.java:611) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObjects(_EOReferenceRecordingCoder.java:649) at com .webobjects
[JC] update conflict handling
Hi all, I am implementing update conflict handling based on the info here: http://developer.apple.com/documentation/webobjects/Enterprise_Objects/UpdateStrategies/UpdateStrategies.html However, it seems that in a JavaClient scenario the update fails before saveChanges() is ever called on an editing context being saved. This means that I can't use an overridden saveChanges() in an EC subclass to catch the adaptor exception caused by the conflict, nor can I use the context delegate to deal with the exception. So, I am not sure where to intercept the exception... Or how to deal with this... Perhaps someone has some experience / an idea about this? Below is the server side stack trace of the update exception... TIA, F [2009-7-10 17:20:38 GMT-00:04] WorkerThread10 Server exception: Optimistic locking failure: The object with global ID _EOIntegralKeyGlobalID[Company (java.lang.Integer)23] has been changed by another client [2009-7-10 17:20:38 GMT-00:04] WorkerThread10 java.lang.IllegalStateException: Optimistic locking failure: The object with global ID _EOIntegralKeyGlobalID[Company (java.lang.Integer)23] has been changed by another client at com .webobjects .eodistribution .EODistributionContext ._throwOptimisticLockingFailureForGlobalIDIfNecessary (EODistributionContext.java:829) at com .webobjects .eodistribution .common ._EOSavingProxy.replacementEOInEditingContext(_EOSavingProxy.java:156) at com .webobjects .eodistribution .EODistributionContext ._replacementObjectForDecodedObject(EODistributionContext.java:882) at sun.reflect.GeneratedMethodAccessor4.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: 122) at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:159) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObject(_EOReferenceRecordingCoder.java:619) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObjects(_EOReferenceRecordingCoder.java:649) at com.webobjects.foundation.NSArray.decodeObject(NSArray.java:1326) at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:585) at com.webobjects.eodistribution.common._EOReferenceRecordingCoder $_Decoder.decodeObject(_EOReferenceRecordingCoder.java:767) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObject(_EOReferenceRecordingCoder.java:611) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObjects(_EOReferenceRecordingCoder.java:649) at com .webobjects .eodistribution .common._EOServerInvocation.decodeObject(_EOServerInvocation.java:66) at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:585) at com.webobjects.eodistribution.common._EOReferenceRecordingCoder $_Decoder.decodeObject(_EOReferenceRecordingCoder.java:767) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObject(_EOReferenceRecordingCoder.java:611) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObjects(_EOReferenceRecordingCoder.java:649) at com.webobjects.foundation.NSArray.decodeObject(NSArray.java:1326) at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:585) at com.webobjects.eodistribution.common._EOReferenceRecordingCoder $_Decoder.decodeObject(_EOReferenceRecordingCoder.java:767) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .decodeObject(_EOReferenceRecordingCoder.java:611) at com .webobjects .eodistribution .EODistributionContext .responseToClientMessage(EODistributionContext.java:560) at com .webobjects .eodistribution .WOJavaClientComponent.handleClientRequest(WOJavaClientComponent.java: 1148) at com .webobjects .eodistribution .WOJavaClientComponent.invokeAction(WOJavaClientComponent.java:445) at com .webobjects .appserver ._private.WOComponentReference.invokeAction(WOComponentReference.java: 127) at com .webobjects .appserver ._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com .webobjects .appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:115)
Wonder FrontBase plugin exception
Hi all, While performing an insertion that is performed often (at least a few hundred times till now) and normally without problems, I got: java.lang.IllegalStateException: Server exception: EvaluateExpression failed: com.webobjects.jdbcadaptor._FrontBasePlugIn $FrontbaseExpression: INSERT INTO BOOKING(what, dateDue, debitID, hidden, currencyID, date, creditID, invoiceNumber, amount, where, id, extraInfo, comment) VALUES ('Legal ', NULL, 180, NULL, 16210, TIMESTAMP '0007-07-19 21:00:00.000', 3, '6299', 150., 'Dennys Dumont', 784, NULL, 'Volmacht voor afhandeling') withBindings: : Next exception:SQL State:00 subclass = -- error code: 39 -- msg: Syntax error 39. Improper TIMESTAMP literal. Next exception:SQL State:40 subclass = 00 -- error code: 363 -- msg: Exception condition 363. Transaction rollback. The timestamp in question looks quite normal to me. Any thoughts? I have not updated the FB plugin in a month or three, could it be that I am running into something that has been fixed? Also, this did not happen after an update or something like that. The deployment in question is running for weeks now. This comes seemingly out of nowhere... Thx, F ___ Do not 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: Wonder FrontBase plugin exception
LOL, I was looking at the structure and missed the content. Hm, this is still a problem. I can live with the user screwing up and ending up with a bad year, but I prefer it not resulting in a crash... Will try to see what can be done with FB to accept any date, and not crash. Thanks, F On Jun 27, 2009, at 16:24, Chuck Hill wrote: It is the year, 0007. FrontBase does not accept dates before the Gregorian calendar switch. Did you mean 2007? On Jun 27, 2009, at 12:20 PM, Stamenkovic Florijan wrote: Hi all, While performing an insertion that is performed often (at least a few hundred times till now) and normally without problems, I got: java.lang.IllegalStateException: Server exception: EvaluateExpression failed: com.webobjects.jdbcadaptor._FrontBasePlugIn$FrontbaseExpression: INSERT INTO BOOKING(what, dateDue, debitID, hidden, currencyID, date, creditID, invoiceNumber, amount, where, id, extraInfo, comment) VALUES ('Legal ', NULL, 180, NULL, 16210, TIMESTAMP '0007-07-19 21:00:00.000', 3, '6299', 150., 'Dennys Dumont', 784, NULL, 'Volmacht voor afhandeling') withBindings: : Next exception:SQL State:00 subclass = -- error code: 39 -- msg: Syntax error 39. Improper TIMESTAMP literal. Next exception:SQL State:40 subclass = 00 -- error code: 363 -- msg: Exception condition 363. Transaction rollback. The timestamp in question looks quite normal to me. Any thoughts? I have not updated the FB plugin in a month or three, could it be that I am running into something that has been fixed? Also, this did not happen after an update or something like that. The deployment in question is running for weeks now. This comes seemingly out of nowhere... Thx, F ___ Do not 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
Re: Large dataset for RDBMS/EOF tests?
Would a randomly generated dataset be acceptable? http://web.mac.com/flor385/eSwamp/software/index.html#wovagen You can use it to generate as much data as you want. The only limitation is how much data fits into the app's memory during a single generation process, so you may need to do a few runs for really large sets. F On Jun 19, 2009, at 14:07, Pascal Robert wrote: This is a bit off-topic, but does anyone have a good large example dataset to test different RDBMS, mainly for performance? In fact, I think it would be nice to have such a thing with a EOModel so that not only people can test the RDBMS but also different settings for EO fetching (batch faulting, etc.). Let's just say that the Movies database is not big enough to do a suitable test... :-) --- Pascal Robert http://www.macti.ca | http://www.linkedin.com/in/macti Skype | Twitter | AIM/iChat : MacTICanada ___ Do not 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/ flor385%40mac.com This email sent to flor...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Rich Clients and WO
A few things here need addressing. On Jun 09, 2009, at 11:08, John Huss wrote: I believe JavaClient uses the standard Java serialization, which is a binary format. Generating the format in Javascript is probably not feasible; if it was I'm sure the GWT folks would have used it, but they didn't. I would not be sure of this. I know that it uses NSCoding stuff, ported to Java, to do RMI transfers, and in that sense it *might* be reasonable to assume it also uses NSCoding for archiving content on other client-server ops. As for how NSCoding is implemented below the surface, I can't say, but I don't think it relies on Java's serialization, as it's quite picky about what it accepts or not (it does not accept many Java classes that are Serializeable). But yes, either way it is binary data. Also, JavaClient's serialization is HEAVY since the whole EC is transferred (I think) with each request to the server,which kind of makes sense actually, but is possibly an expensive operation. It does not make sense, and does not happen. There is a load of client / server communication, but it is quite optimized (not to say there isn't room for improvements). The client side contexts perform more or less as child editing context of their server side counterparts, with some additional layers in between. Meaning: data is fetched / transferred on demand, and only the data that is asked for / required is transferred. Resulting in a wide scale of response sizes. The transfer of an entire editing context object *never* happens. Appropriate ECs are instantiated on the client and the server and they communicate EO data over the pipe. There is other data being transferred as well (EOClassDescriptions, custom RMI calls), but these generally represent a less frequent, and mostly less expensive traffic. Also, you would have to rewrite EOEditingContext and related classes in Javascript, which is a fairly large task. Yep. Also I don't really know if it's possible. I don't do JavaScript, but from what I understand it is by no means strong enough create such complex functionality in. F ___ Do not 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
Scheduled backup + files store
Hi all, In our database (FrontBase) we have a FileRecord table that defines the db representation of a file. The actual files are however stored on the file system. Now, we need to do scheduled backups. The individual ops are not a problem (run a script that backs the database up, and tars or zips the files, store it somewhere, done). I am however worried about doing this with a running app. As it's possible that a file upload operation is happening at the same time as the backup process, which could result in an inconsistent backup. Thoughts on handling this: 1. Refuse or delay the transfers of files to the server at a particular time of day when the backup is happening. This is sloppy, I don't want to do it. 2. If I first perform the database backup, and afterwards backup the files (delay it a bit), the only risk I run is that I have a file too many in my file storage. This could be acceptable if I tweak my server- side file writing to overwrite without asking. Is there a better, standardized way of doing this? Thanks, F ___ Do not 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: Scheduled backup + files store
On May 13, 2009, at 15:58, Guido Neitzer wrote: On May 13, 2009, at 12:42 PM, Stamenkovic Florijan wrote: 1. Refuse or delay the transfers of files to the server at a particular time of day when the backup is happening. This is sloppy, I don't want to do it. This is what I do at the moment. Not the best solution though. 2. If I first perform the database backup, and afterwards backup the files (delay it a bit), the only risk I run is that I have a file too many in my file storage. This could be acceptable if I tweak my server-side file writing to overwrite without asking. This is not true, if your users can also delete files. You might end up with a backup that refers to files that were deleted during the backup run. They can't. We have a simple increment-only file storage system, where file names are FileRecord (db) IDs. So, I think that in our situation this should be an acceptable solution. What do you think? Is there a better, standardized way of doing this? Hmm. I could think of triggering an rsync to file system clone when you also trigger the db backup. If you do the rsync part really often (so that only minimal changes need to be transferred each time), you should have a pretty good snapshot of the file for the time when you start your db backup. Now, during the db backup you can stop the rsync process so changes happening during the db backup will not change your FS structure. Yeah, that sounds OK. However, not sure I need to do that, if the above mentioned works... F ___ Do not 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: Inverse Relationships
On Apr 28, 2009, at 10:12, Mr. Frank Cobia wrote: If I am using the EOGenerator files from WOLips is there not a way to update a relationship without automatically updating the inverse relationship? For to ones you can use takeStoredValueForKey(...) For to manys you can use includeObjectIntoPropertyWithKey(...) and excludeObjectFromPropertyWithKey(...) None of these methods will touch the inverse relationship. If these methods aren't good enough to do what you want, please elaborate on your situation. F ___ Do not 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
JC client side EO encoding problem
Has anyone seen anything like this before: [Apr 23, 2009 21:03:31 -0400] Exception thrown: java.lang.IllegalArgumentException: encodeObject: unable to encode object of class com.havaso.dvis.client.eof.eo.UserGroup at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObject(_EOReferenceRecordingCoder.java:348) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObjects(_EOReferenceRecordingCoder.java:375) at com.webobjects.foundation.NSArray.encodeWithCoder(NSArray.java:1330) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObject(_EOReferenceRecordingCoder.java:344) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObjects(_EOReferenceRecordingCoder.java:375) at com .webobjects .eodistribution .common._EOServerInvocation.encodeWithCoder(_EOServerInvocation.java:79) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObject(_EOReferenceRecordingCoder.java:344) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObjects(_EOReferenceRecordingCoder.java:375) at com.webobjects.foundation.NSArray.encodeWithCoder(NSArray.java:1330) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObject(_EOReferenceRecordingCoder.java:344) at com .webobjects .eodistribution .client.EOHTTPChannel._responseToMessage(EOHTTPChannel.java:542) at com .webobjects .eodistribution .client.EOHTTPChannel.responseToMessage(EOHTTPChannel.java:640) at com .webobjects .eodistribution .client.EODistributedObjectStore._send(EODistributedObjectStore.java: 651) at com .webobjects .eodistribution .client .EODistributedObjectStore .saveChangesInEditingContext(EODistributedObjectStore.java:475) at com .webobjects .eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192) ... Where UserGroup is a standard issue EO. Note that this is entirely arbitrary, I can for example save, update or delete any number of UserGroup records, or other records for that matter, and not see this. Then out of nowhere, this happens. Any thoughts? Thx, F ___ Do not 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: JC client side EO encoding problem
Hi guys, Thanks for your replies... I believe I've found the culprit. I wasn't releasing my to-delete cache after saving, which resulted in something like ec.deleteObject(someEO); // someEO is a valid object for deletion at this point ec.saveChanges(); ec.deleteObject(someEO);// obviously this is idiotic ec.saveChanges(); I've fixed it, so that should be it. In the remote case this was caused by something else, I will get back on it. Thx, F On Apr 24, 2009, at 11:09, David Avendasora wrote: Hey Flor, What follows is entirely speculation. It makes sense to me, but I don't know how grounded in reality it is. With that said... I've seen this when the client-side and server-side classes were not able to be serialized into each other (does that make any sense?) I had the problem when I tried to add an Inner Class to the server- side class, but the client didn't have the Inner Class. I _think_ the structure of the class on the client and server have to be the same otherwise they can't be serialized and passed back and forth as though they are the same class. Normally the EOModel defines both classes so they are close enough. Are the client- and server-side classes substantially different? Dave On Apr 24, 2009, at 11:02 AM, Stamenkovic Florijan wrote: Has anyone seen anything like this before: [Apr 23, 2009 21:03:31 -0400] Exception thrown: java.lang.IllegalArgumentException: encodeObject: unable to encode object of class com.havaso.dvis.client.eof.eo.UserGroup at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObject(_EOReferenceRecordingCoder.java:348) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObjects(_EOReferenceRecordingCoder.java:375) at com.webobjects.foundation.NSArray.encodeWithCoder(NSArray.java: 1330) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObject(_EOReferenceRecordingCoder.java:344) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObjects(_EOReferenceRecordingCoder.java:375) at com .webobjects .eodistribution .common ._EOServerInvocation.encodeWithCoder(_EOServerInvocation.java:79) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObject(_EOReferenceRecordingCoder.java:344) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObjects(_EOReferenceRecordingCoder.java:375) at com.webobjects.foundation.NSArray.encodeWithCoder(NSArray.java: 1330) at com .webobjects .eodistribution .common ._EOReferenceRecordingCoder .encodeObject(_EOReferenceRecordingCoder.java:344) at com .webobjects .eodistribution .client.EOHTTPChannel._responseToMessage(EOHTTPChannel.java:542) at com .webobjects .eodistribution .client.EOHTTPChannel.responseToMessage(EOHTTPChannel.java:640) at com .webobjects .eodistribution .client .EODistributedObjectStore._send(EODistributedObjectStore.java:651) at com .webobjects .eodistribution .client .EODistributedObjectStore .saveChangesInEditingContext(EODistributedObjectStore.java:475) at com .webobjects .eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192) ... Where UserGroup is a standard issue EO. Note that this is entirely arbitrary, I can for example save, update or delete any number of UserGroup records, or other records for that matter, and not see this. Then out of nowhere, this happens. Any thoughts? Thx, F ___ Do not 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%40avendasora.com This email sent to webobje...@avendasora.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
NSArray bug
Please confirm: NSArraySomeEO children = someEO.children(); SomeEO[] childrenArray = children.objects(); // compiles, no warning, throws ClassCastException (Object[]) at runtime SomeEO[] childrenArray = children.toArray(new SomeEO[children.count()]); // works fine F ___ Do not 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
[SOLVED] Re: NSArray bug
OK, I assume that then it's also reported. F On Apr 21, 2009, at 16:20, Mike Schrag wrote: yes, the impl is wrong in 5.4 ... q fixed this in Wonder's a couple weeks ago On Apr 21, 2009, at 4:13 PM, Stamenkovic Florijan wrote: Please confirm: NSArraySomeEO children = someEO.children(); SomeEO[] childrenArray = children.objects(); // compiles, no warning, throws ClassCastException (Object[]) at runtime SomeEO[] childrenArray = children.toArray(new SomeEO[children.count()]); // works fine ___ Do not 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: JavaClient: does the eomodel file need to be included with the client app?
Just on the server. On Apr 17, 2009, at 12:33, John Huss wrote: In JavaClient does the eomodel file need to be included with the client app? Or just on the server as usual? John ___ Do not 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: JavaClient offline storage / replication
On Apr 15, 2009, at 11:24, John Huss wrote: We're considering using JavaClient for some new projects and one of the big features we want is the ability to run offline by caching database from the server's DB and storing any modifications locally until the server is online again. How would you approach this? Is it possible to use the same EOModel and use EOF on the client to save the data locally? Your way: no. You are not allowed to do this. You can only distribute the client-side libs in your client app, and those do not contain the functionality to connect to whichever data-source (EOAccess). Here are some thoughts that I had on this subject in the past... Basically two ideas occurred to me for handling this. 1. Serializing an EOEditingContext. EOEC implements Serializable. And if you think about it, it might be! However, in a practical JC scenario this does not really do you any good. An EC will want a parent object store, and without a connection to the WO server, you can't give it one. And even if you somehow manage to hack this, as soon as a fault gets fired, and you don't have a connection to your data source, you're screwed. 2. Now, this is a pretty big idea, on my to-do-in-the-coming-5-years list. It comes down to implementing: a) Local persistence support for JBND b) A further elaboration of non-persistence-specific relational concepts for JBND c) JBND code that focused on migrating data from one persistence system to another d) An AppKit architecture that is JBND based and focuses on writing client apps that are capable of dealing with multiple persistence sources, and to switch connections between them dynamically, or at least have multiple connections in parallel This would solve your problem, as it would allow you to migrate EOF data from WOJC to local persistence data, and back again. In short, it is the only solution I could think of to the same problem you have, though admittedly it addresses a bit more then just those issues. The only problem is: while this *might* be possible, I bet that to bring it to a functional, usable implementation, it would take (me, alone) at least half a year of focused work. Which I will not be doing :) However, if you are into this, and feel up to the (rather large) challenge, I'd be happy to support the effort. Besides that, well, WOJC was not meant to do this. Unfortunately. However, if anyone has an idea on twisting it's arm to make it do it, I'm all ears. HTH, F ___ Do not 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: JavaClient offline storage / replication
On Apr 15, 2009, at 12:42, Chuck Hill wrote: On Apr 15, 2009, at 9:36 AM, John Huss wrote: On Wed, Apr 15, 2009 at 11:25 AM, David Avendasora webobje...@avendasora.com wrote: On Apr 15, 2009, at 11:51 AM, Stamenkovic Florijan wrote: On Apr 15, 2009, at 11:24, John Huss wrote: We're considering using JavaClient for some new projects and one of the big features we want is the ability to run offline by caching database from the server's DB and storing any modifications locally until the server is online again. How would you approach this? Is it possible to use the same EOModel and use EOF on the client to save the data locally? Your way: no. You are not allowed to do this. You can only distribute the client-side libs in your client app, and those do not contain the functionality to connect to whichever data-source (EOAccess). I'm not entirely sure this is true anymore. If you can deploy a standard WO app to any platform for free, why can't a client machine run the same stuff as a server? I know that when it cost money for a deployment license, they specifically said you could send the client-side apps to a client for free. But now that the whole thing is free... why not? Yeah, I agree. The license permits you to bundle WO with your server application. The only restriction is that you can't use the bundled WO frameworks to develop new applications on the machine you're deploying it too -- not a problem. So what then? If all of WO is available on the client... Still seems tough. I didn't know about these licensing changes. Sorry for the out-of-date info. Need to read up about what's allowed nowadays, and what not. And tougher still if the data you are caching can get modified on the server while the client is disconnected. Then you have some interesting update conflicts to handle. This can be a real tough nut to crack. Yeah, data freshness in general would be a pain. However one would handle it, some serious confusion for the users is inevitable. The only reasonable way out of this that I can see is to make the cached data read-only. F ___ Do not 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: JavaClient offline storage / replication
On Apr 15, 2009, at 17:32, Lachlan Deck wrote: On 16/04/2009, at 1:51 AM, Stamenkovic Florijan wrote: It would also open up a can of worms too. With normal connections you can get an optimistic locking failure and can present this immediately to the user. In its absence you'd either not be able to use any locking at all (and thus the last update wins however old it may have been queued) or have the user deal with failed updates at some later date. Problems: - will all clients connect again at the same time? No. - how would you determine the correct order of queued updates being applied? Can't. - how would you deal with failures? Is the user still there to deal with it? - Do they have to deal with every off-line update manually? Even if it became read-only when the connection dropped you'd still have to send all changes simultaneously to the client cached db and the remote. I'm replicating data between clients and their web site. I can guarantee this won't be fun to implement nor be out of your hair in six months. Yes, I see what you're saying. Managing update conflicts might be a killer. I originally thought of this in terms of replicating data from one persistence system to the other, didn't even consider using this in a full blown multi-user, concurrent-update scenario. But when John posted his question, I thought: hey, that idea I had could handle this! I guess I have a tendency to run my big mouth before thinking something through... In my defense, I put some qualification in my original reply, I said: The only problem is: while this *might* be possible, I bet that to bring it to a functional, usable implementation, it would take (me, alone) at least half a year of focused work. ;) F ___ Do not 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: [OT] local persistence ORM
Hi John, Hm... Maybe. Have you done anything like this, or are you speaking hypothetically? F On Apr 09, 2009, at 23:07, John Ours wrote: What about combining Cayenne backed with H2? John ___ Do not 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: [OT] local persistence ORM
Hi Daniel, This looks quite interesting... JavaPersistence's API makes much more sense to me then JDO's. I have some questions about JP however, if you have a moment to answer them: 1. How complicated is the glue layer between JP, and MSAccess / Derby? 2. Do you have to define the database schema on both layer manually? Or is there some sort of an automation involved in this process? 3. Are there any significant ORM-feature differences between WO and JP? 4. Can JP conveniently deliver info on the database shema? Info such as a list of properties, attributes, relationships, inverse relationships, attribute classes... Or maybe does one have to manually extract that from the annotations using reflection? 5. JP seems to rely heavily on annotations. I have never worked much with annotations... What are your experiences with this approach? 6. JP seems to required quite a bit of typing to define even the simplest entities. Do you have problems with scaling, when defining a complex schemas? Thanks, F On Apr 09, 2009, at 23:03, Daniel Mejía wrote: Hi, To have persistence in the client I'm using the JavaPersistence API with NetBeans. Here you can find an example with MS Access, but also works fine with Derby. http://wiki.netbeans.org/JavaPersistenceApi Saludos, Daniel. On 09/04/2009, at 07:35 p.m., webobjects-dev-requ...@lists.apple.com wrote: From: Stamenkovic Florijan flor...@mac.com Date: 9 de abril de 2009 04:29:12 p.m. GMT-05:00 To: David Avendasora webobje...@avendasora.com Cc: Development WebObjects webobjects-dev@lists.apple.com Subject: Re: [OT] local persistence ORM Nope... 1) I am not allowed to bundle all of WO into my client app. 2) This should be light-weight. Both in terms of the API and the library size. WO is neither. Thx, F ___ Do not 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
[OT] local persistence ORM
Hi all, I am wondering about local persistence ORM pure Java libs. I know of Derby, and just started reading stuff about JDO. I am interested in reasonably easy, light-weight, fast, but not necessarily super-charged local persistence, similar to WO in it's in-memory object handling. Not picky about the low-level storage implementation. I also don't need it to be GUI-binding ready (as I want to integrate it with JBND), nor do I need any super fancy features, whatever those might be. I'd like to be able to define entities as powerfully as possible, but do not require fancy tools to do that with. Any thoughts / recommendations? Does anyone have experience with JDO? I took a very brief look at the JavaDoc, on first look it seems a bit weird, and not really to-the-point. But maybe that's a wrong impression? Thx, F p.s. - it being open source is beneficial but not required. It being free is required. GPL license (and similar) unacceptable, need to be able to build it into commercial products. ___ Do not 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: [OT] local persistence ORM
Not possible, as it would require server-side WO libraries to use. F On Apr 09, 2009, at 13:47, David Avendasora wrote: I have never looked at it, but what about Wonder's JavaFSAdaptor EOAdaptor? I believe it is a work in progress, but I think I remember Mike talking about it at one of the WONoVA meetings (semi- shameless plug). Dave ___ Do not 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: [OT] local persistence ORM
Nope... 1) I am not allowed to bundle all of WO into my client app. 2) This should be light-weight. Both in terms of the API and the library size. WO is neither. Thx, F On Apr 09, 2009, at 17:24, David Avendasora wrote: Hmm. Even if WO doesn't automatically copy it to the client, couldn't you manually do it, if all you want it for is for writing stuff to the FS of the client and not accessing the server-side object store? Just thinking out-loud. Dave On Apr 9, 2009, at 5:16 PM, Stamenkovic Florijan wrote: Not possible, as it would require server-side WO libraries to use. F On Apr 09, 2009, at 13:47, David Avendasora wrote: I have never looked at it, but what about Wonder's JavaFSAdaptor EOAdaptor? I believe it is a work in progress, but I think I remember Mike talking about it at one of the WONoVA meetings (semi- shameless plug). Dave ___ Do not 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
[JC] EODistributionChannel.Delegate and session expiration
Hi all, I am currently using an EODistributionChannel.Delegate to handle request tracking. And am observing some weird behavior, so I am wondering if anyone else has experience with this... 1. If I set a custom delegate on the distribution channel, the JC runtime no longer catches the session expiration exception, so instead of getting a Your session expired, etc. dialog, the exception propagates all the way and crashes my app. At first that made me think that there was a default delegate of sorts that I replaced, and therefore lost this functionality, but there is no default delegate... Any thoughts on this? 2. Not really about the delegate, but related... When a session expires, and I do get a dialog on the client side telling me it expired, it seems that the thread the request was made on (namely the Swing EDT) continues the execution even though a modal dialog is up. This is very bizarre. And it also causes additional exceptions to be thrown, resulting in my custom exception handler kicking in, and the GUI becoming a mess... Any thoughts on this? 3. I am wondering if I should ditch WO's default behavior, and simply implement a Delegate that will also deal with session expiration exceptions. However, the error state handling mechanism is not all what it could be, meaning: the only way I see of detecting if an exception occurred because of session expiration is to parse the exception's info text, which I am always reluctant to do, if there is another way. Any thoughts on this? Fervently hoping to get some reply on this, F ___ Do not 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
Scheduling and re-scheduling
Hi all, Though a JavaClient question, it is more about Java, then about WO, so please ignore the JC aspect of it... I am looking for the best way to deal with the following requirement: - I am watching (from the JavaClient side) for the server-side session timing out - I want to perform action X a specified amount of time before the session times out - i can observe requests being made to the session (from the client side), and use this to know when X needs to execute So, the crux of the problem is: re-scheduling action X. I can think of two reasonably decent ways of dealing with this: 1. Have a daemon thread poll a long variable to see when the last request to the session occurred, and have my request tracker just update the same variable with System.nanoTime(). What I like: it's simple and clean, the request tracker does minimal work. What I don't like: the daemon thread needs to check this at a reasonably small interval, I think each half a minute or so. 2. Use a ScheduledExecutorService to schedule action X. Hold the reference to ScheduledFuture, cancel it every time that the request tracker informs of a request being made, and immediately reschedule. What I like: It relies of java.util.concurrent, which is said to be a GoodThing. What I don't like: The reaction to each request is not as light-weight. Considering that this is a JC situation, and it is possible and probable that requests are made very frequently, I think the first solution might be more appropriate. Any thoughts on this? Also, does anyone know a better way to handle this situation? I am digging through java.util.concurrent, but I don't see anything focused specifically on this kind of a scheduling problem. Thanks, F ___ Do not 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
[OT] It's gone!!!
Hey, the Could not deliver auto-reply is gone!!! WOO HOO F ___ Do not 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: Scheduling and re-scheduling
ScheduledExecutorService, no question ... If you don't, I would write it with an someObject.wait(sessionTimeout) and someObject.notifyAll when you ping the session to keep it alive, at which point your code can decide if it needs to perform its action or resleep. Definitely don't poll, but regardless, I wouldn't write this yourself. java.util.concurrent will do something better than either of us can come up with. The guys who wrote that stuff are pretty damn smart. I see what you're saying about java.util.concurrent, the more I learn about it, the more I like it and feel comfortable relying on it. Will go with that option... Thx, F ___ Do not 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: Getters without the get part
On Mar 31, 2009, at 14:39, Hugi Thordarson wrote: Actually, I'd vote for a WO release that added get to all methods and provided no compatibility deprecation at all. Wow, want to bleed some, huh? But, I agree, Java has pretty clearly defined naming conventions, and the get prefix is most definitively NOT just a a silly Java hack for JavaBeans, but one of those (generally) sensible and (generally) well adopted conventions. Heh - and while we're at it, let's replace NSArray with ArrayList, NSDictionary with HashMap and NSSet with well, some of those gazillion java collection classes This already should have happened. Once you get a firm grasp of the Java Collections API, it's design, intention and power, NSArray and it's company will make you want to puke. I actually thought that WO would move in this direction by first making NSArray implement List, and do all the similar stuff, then depreciate Foundation collections, and the finally get rid of them. Well, maybe that still is the intention, but it sure is slow. F ___ Do not 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: JavaClient session timeout?
On Mar 30, 2009, at 10:06, John Huss wrote: Is there a session timeout in JavaClient? I would think there has to be. Yep, there is. What happens when the session times out? The next request from a client coming to the session gets refused, the client app is informed of why, and the client application displays a Swing modal window to the user telling the user that the session timed out, and when the user hits OK, the app quits. Is there built-in notification or do you have to handle it manually? Well, there is the above mentioned handling. I am not sure if there is a way to override it with some manual handling. I'd be interested in this though, so I might take a look. However, I have other priorities at the moment. Please let me know if you get into it and find something! I will do the same... I think a good place to start looking would be EOClientApplicationSupport. Best, F ___ Do not 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: JavaClient session timeout?
On Mar 30, 2009, at 10:24, David Avendasora wrote: Yes, there is. By default I believe it is 30 minutes, or maybe 20. I'm not entirely sure. It is the same session timeout that a web client session has by default It's the same session mechanism, controlled with the same server side properties etc... In D2JC I get a nice, Your Session has Timedout on the server. The application will quit now. dialog box the next time the client tries connecting to the server. Yeah, you also get that in non-direct development. Though I believe there are ways one can do something JC does not expect, and end up with an exception instead of this message. Have not experimented much with it though. Note, that depending on how much data is cached on the client, you could be working for quite a while on the client without ever talking to the server because if it doesn't have an explicit reason to talk to the server, it doesn't. The default is plenty of time if someone is actively using the client application, but being a desktop application most users will expect to be able to leave it running for hours at a time without actually using it. You need to balance this expectation with data-freshness and such and come up with an appropriate timeout for you particular situation. Also, users simply need to know that the data they are accessing is not stored locally. Session timeouts are one of the aspects of this. But, I agree, ideally we want to make it as convenient for the user as possible. With that said, I think it would be much better to have a more pro- active approach to session timeouts. Some type of notification to the user that their session is going to timeout if they have unsaved changes, and an option to automatically reconnect without a relaunch would be very helpful too. I have not implemented these things, but I don't really see a reason why they couldn't be. Flor probably has some ideas on how to do this as he more directly manages the client-server connection since he doesn't use WebStart. The problem is that the server can't just inform the client of anything, as client-server communication is request-response based. It *might* be possible for the client to time the period elapsed since the last request, and notify the user based on that. However, this might be tricky. Or it might not... I am not sure, never tried that. Another approach I considered at some point is to have the client ping the session at small intervals. Now, this should be fairly easy to do, and should ensure that the session never expires. There are some potential problems with this: - multithreading: the ping of course will get scheduled on another thread, which EOF might not like. One could schedule it to happen on the EDT, but that might result in an occasional glitch in the GUI. Or, maybe if using a stateless RMI method for the purpose of the ping, this would not be a problem - session accumulation on the server: not sure what the implications of this could be. In short, I think it all depends on your needs. I'd be happy to implement the ping system, and put it into WOJCKit, if somebody else has the time to test it. I am wy too busy at the moment to deal with that. Anyone interested? F ___ Do not 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: JavaClient session timeout?
OK, you can download WOJCKit here: http://web.mac.com/flor385/eSwamp/software/files/WOJCKit.zip It's a WOLips project. Eclipse 3.4.1, appropriate stable WOLips (update say a month ago or something). Note: this project contains both server and client side classes. Both are well documented in code, be sure to read that, as there is no other documentation for the project at the moment. Also, there is client / server separation, package based. What I do is add source filters in my server / client projects to ensure I don't accidentally use any inappropriate classes. I suggest you do the same. And finally, for the ping functionality, look into: org.wojc.client.RemoteMethodInvoker#startPing(int, boolean) I tried it out, it seems to work just fine. I did not try the stopPing(...) functionality yet, but it's quite conservative, so I believe it will just work. Let me know how it goes, F On Mar 30, 2009, at 11:52, John Ours wrote: Certainly, I'm going to need to go down this road very soon myself. Let me know, ___ Do not 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: JavaClient session timeout?
On Mar 30, 2009, at 15:50, David Avendasora wrote: Flor, anyway you want to set it up is fine with me. :-) :-) :-) *any* way? How about 3.5 inch floppies shipped from Southern America to the US via Russia, by boat? :) Let's stick to .me for the time being, though I would like to Subversionise all my stuff... I just have better things to do. F ___ Do not 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
[ANN] JBND 0.92
...is up. News: - derived property handling is *much* better, but it's API has been changed - individual Swing component connections can now be connected to multiple value bindings - ditched all int based flags in favor of enums ... F ___ Do not 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: [Somewhat OT] Code organization question
Hi Lachlan, On Mar 28, 2009, at 06:55, Lachlan Deck wrote: You've described how they're used, which is all cool, but the particular problem you're trying to solve sounds like it's more to do with how they're initialised. Yes, it does. Read on... So the normal EOClassDescription, for example, is usually derived from the model and is therefore loaded at runtime from the plist definitions. In a JC situation a class description is loaded from the server, which loads it from the model. The model itself is not available on the client. I'm guess that you have something else happening (e.g., definitions in code rather than plist?) Definitions of what? Derived properties? Yes, they only are in code. I do not define my derived properties in the model because EOF's derived prop system is not capable of doing what I need done. As for manipulating the class descriptions in code, nope, I don't do that. DataType interface (JBND equivalent of EOClassDescription) among other things defines some method: ... public void addDerivedProp(String key, PropType type, Class? propClass, String... derivedFromProps); ... public SetString propsDerivedFrom(String key); Then this info is queried by EOs, which use it in the following way: - the constructor of EOFDataObject (EO superclass) checks the info in it's DataType to see if there are derived properties that depend on keypaths. If there are, it schedules the creation of KeyPathChangeManagers. Those are objects made to observe changes happening on trees of inter-related objects, defined by a keypath. EOFDataObject uses a specialized KeyPathChangeManager subclass that reports the changes on the path back to the EO that created it. When a relevant change is detected, a change event is fired for the property that is derived from the keypath, resulting in the clearing of it's cache. Aha. This is the crux of the problem: the need to observe changes of derived properties destinations. Perhaps DataType - which is the conceptual representation of the type - is not the right place for initialising keypath observance implementations. Well, the DataType stores this information. It does not initialize it. Please see below. This could be trigged, for example, from the first awakeFrom[Insertion|Fetch] for each entity perhaps? Yes! This is exactly what I am doing :) I inform the DataType of the derived props for that DataType, on the first init of an EO of that type. I do it from the constructor. It is safe to do in the constructor as this process does not involved any EOF work in the EO itself. You might thing that awakeFromFetch could be a better option because it would enable me to immediately initialize keypath change observers. This would be ideal, but unfortunately it does not work, I tried it out. For some convoluted reason that my hung-over head can't exactly remember... The initialization of observing the object graph that defines a derived property works properly only if done at a later point, such as valueForKey, which is why I do it there. I believe now you can see exactly what I meant in the first post... In essence we came up with the same solution to the problem... Now, my first post also describes why I don't like it too much, even though it's fully functional. Which brings us back to the original question: any thoughts on improving this? Thanks, F ___ Do not 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: [OT] Colour palettes for designers
Yeah, it really is cool. Definitively a good point to start if deciding on a color scheme. Thanks for sharing, F On Mar 27, 2009, at 16:53, David Holt wrote: Really cool site for helping you to choose the colour palette of your next web app. Should you actually have to do that ;-) http://www.colourlovers.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: [Somewhat OT] Code organization question
On Mar 25, 2009, at 18:42, Peter Vandoros wrote: In the end, I would try to keep things as simple as possible. Thus going with your original idea. Yeah, seeing that I didn't come up with anything better in the meanwhile, and nothing got posted on the list, this is what I ended up with. Sorry for the confusion. No prob, thanks for the idea. F ___ Do not 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: [Somewhat OT] Code organization question
Henrique, Did not think about it... I took a look at what you suggest, but it seems too heavy a solution for this problem, which is in fact not that big. Thanks anyway, F On Mar 26, 2009, at 12:28, Henrique Prange wrote: Hi Florijan, Have you thought about Dependency Injection? You could use a framework like Guice [1] to inject those properties for you. [1]http://code.google.com/p/google-guice/ Cheers, Henrique ___ Do not 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: [Somewhat OT] Code organization question
Hi Lachlan, On Mar 26, 2009, at 13:53, Lachlan Deck wrote: Does lazy instantiating for each prop work? If I understand you correctly, you are thinking of initializing the property dependence meta-info lazily. I thought about this. It would not work. Unfortunately I need to obtain an EOClassDescription at the point in which I define the property dependence. This is because property dependencies are defined on DataType objects, and my EOF specific DataTypes are based on EOClassDescriptions. So, to postpone this I would need to encapsulate the meta-info outside of the DataType, but at the same time somehow explain to that DataType that there is info waiting for it, until a time the DataType will need it. Even if possible, this is a big mess. If you meant something else, please explain, Thanks, F ___ Do not 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: Mixing D2JC with Non-Direct Java Client
On Mar 26, 2009, at 15:13, John Ours wrote: I'm wading through this business of supercontrollers and subcontrollers now... Argh... I hate those. Well, after some more of doing what you're doing now, you will hopefully see why I made JBND. F ___ Do not 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: [Somewhat OT] Code organization question
On Mar 26, 2009, at 16:51, Lachlan Deck wrote: Nothing else at this time. Perhaps a little more explanation about your derived properties mechanism will trigger some extra thinking. Sure, here is how it works, as briefly as possible... DataType interface (JBND equivalent of EOClassDescription) among other things defines some method: /** * Adds meta-information about a derived property, does bnot/b accept a * property definition. This meta-info could (and should) be used for * derived property value caching, to reduce the overhead involved in * calculating a derived property every time it is asked for. The info * (specifically the derived property type and class) is used throughout * JBND where such info is required... */ public void addDerivedProp(String key, PropType type, Class? propClass, String... derivedFromProps); /** * Returns a ttSet/tt of keys designating properties that are derived * from the given ttkey/tt, or ttCollections.EMPTY_SET/tt if there * aren't any. * * @param key The key that might be used in the derivation of any number of *derived properties. * @return See above. */ public SetString propsDerivedFrom(String key); Then this info is queried by EOs, which use it in the following way: - the constructor of EOFDataObject (EO superclass) checks the info in it's DataType to see if there are derived properties that depend on keypaths. If there are, it schedules the creation of KeyPathChangeManagers. Those are objects made to observe changes happening on trees of inter-related objects, defined by a keypath. EOFDataObject uses a specialized KeyPathChangeManager subclass that reports the changes on the path back to the EO that created it. When a relevant change is detected, a change event is fired for the property that is derived from the keypath, resulting in the clearing of it's cache. - valueForKey is overridden to check if the key points to a derived property. If so, the cache is queried for a value, which is returned. If there is no cached value, then the derived prop is evaluated using EOF's KVC, and cached. valueForKey also initializes the KeyPathChangeManagers that were scheduled for creation in the constructor. This needs to happen here, because only here it is guaranteed that the object graph defined by the keypath is fully initialized. Also, since this can be an expensive operation, it is not bad to initialize it lazily. - the even firing mechanism of JBND (the DataObject aspect of it) ensures two things: a) When a change in any of the variables of a derived prop is detected, a change event is fired for the derived prop too b) When a change event for a derived prop is fired, the prop's cached value is cleared There are additional uses for the info about a derived property that is given to a DataType. - The PropType argument (PropType is an enumeration declared in the DataType interface) is used to define if the property is an attribute, a to-one or a to-many, or a derived attribute, to-one, to-many. It is queried at various points in JBND to ensure appropriate behavior. - The property class argument is only applicable to derived attributes, and is also queried throughout JBND where it is desired or beneficial to know the value type for an attribute. JBND does not deal with actual property derivation. It is not interested in property definitions. In my opinion that would only weaken it. Instead, the evaluation of derived properties happens in EO methods, which are accessed through standard KVC. JBND just wants to know about them to ensure they are properly handled, and to deal with caching. JBND has to know about all derived properties, as otherwise it might encounter a key it can't interpret. In that sense I might have to provide a per derived prop switch to control weather caching should be done for the value or not. However, this is a performance optimization that *might* be necessary, so I did not build that in yet. Something to think about... Most likely this would be done by checking the number of arguments passed to the addDerivedProp(...) method. If it was given no info on which props a derived property is made from, caching for that property should be disabled. This pretty much covers it. F p.s. - this is not present in the current distribution of JBND. It is coming out in 0.92. It is done, except for the caching control mentioned above. And it could use a bit more testing. So far it works OK, but I have not tested it extensively. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
[Somewhat OT] Code organization question
Hi all, Not a strictly WO question, but what the heck :) I am working on moving JBND derived prop management to DataTypes (JBND's view of class descriptions), for various reasons. In principle I am done, and it works great. However, I am faced with the problem of initializing those derived prop definitions. They need to be initialized once per class, before any KVC takes place. Doing this properly is a pain. My first idea of doing a static block per-class: static{ // initialize stuff } ...does not work. It causes a JC specific exception because it makes a circular class loading situation. So, I switch to something like: public static void initDerivedProps(){ // initialize stuff } This works, but it requires that the method be externally called, once per class that contains derived props. This is a maintenance pain (and makes me think about the concept of abstract static methods). Anyway, I've come up with putting the following in my EO superclass: private static final SetClass? initializedDerivedProps = new HashSet()...; // the EO superclass constructor protected EOFDataObject(...){ if( ! initializedDerivedProps.contains(getClass()){ initDerivedProps(); initializedDerivedProps.add(getClass()); } ... } // not static, but called only once per class protected initDerivedProps(){ // initialize stuff } I didn't try this out yet, but I think it should do what I want it to. There are however two problems with it. One: it causes a HashSet.contains(Class) call once per EO instantiation. Not a large overhead, but it's annoying. Two: it's an ugly hack... So, I'm wondering if anyone else has an idea for a better approach? Thx, F ___ Do not 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: JavaClient Common classes
Hey John, On Mar 25, 2009, at 12:46, John Huss wrote: This is mainly aimed at David, but anyone is welcome to share. How are you using the common class functionality in WOLips? From what I gather there is a common class for the each Entity and then two subclasses (parallel), one for the Server and one for the Client. Do you have three sets of templates then? Would you be willing to share? I see the client templates on the wiki, but nothing for the common ones. I am also wondering about this... I do lots of JC, but haven no idea about how the common class stuff works. Guess I have a tendency to get behind on this sort of thing :) Anyway, Dave, speak up! Then, on a different note: are you using Wonder on the client as well? There isn't a jar in WebServerResources, but there's really no reason why you couldn't use it is there? There are reasons why you can't use Wonder on the client. There are many differences between server and client side libraries. There might be *some* functionalities from Wonder that could be used on the client, but the bulk of it: nope. Have you thought about adding project templates to WOLips for JavaClient apps (server and client)? Or a built-in library that would add all the standard WebServerResources jars to the classpath like the WebObjects Frameworks one does for the server? I isolate client side libs as Eclipse classpath variables. However, I believe there is room for improvement. Not sure if it can be standardized... Might be possible. Something like a WOJC classpath container becoming a part of WOLips. I'm still on the older WOLips, but are there any ant tasks for JavaClient now too? Client side apps can be many different things. For example, IIRC Dave is deploying using WebStart, has his server and client stuff in the same project, relies on WOLips JC stuff to build his client side apps and does lots of D2JC. As a different example, I am not using WebStart, have separate projects for client and server stuff, don't rely on WOLips JC capabilities, and do pure JBND+Swing WOJC apps. My point: there are many different ways one can approach WOJC. In that sense I believe making standard project templates would be difficult. Sorry, lots of questions. I'm exploring the possibility of using JavaClient. Go for it! The few of us that use it will be there for you... Best regards, and hope we can hook you to the JC hook :D F don't want to self-advertise, but if you are new to JC, and interested in your options, I suggest you also take a look at: http://web.mac.com/flor385/eSwamp/software/wojc_tutorial.html ___ Do not 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: JavaClient Common classes
One more thing... As a further motivation for doing WOJC and Swing, take a look at some screenshots of an app made in Swing: http://explodingpixels.wordpress.com/2009/03/23/swing-can-be-oh-so-sweet/ There's cool stuff going on with Swing on OSX, and you can make close to native-looking apps that are WOJC driven. A *very* powerful combo. My best, F On Mar 25, 2009, at 13:07, Stamenkovic Florijan wrote: Hey John, On Mar 25, 2009, at 12:46, John Huss wrote: This is mainly aimed at David, but anyone is welcome to share. How are you using the common class functionality in WOLips? From what I gather there is a common class for the each Entity and then two subclasses (parallel), one for the Server and one for the Client. Do you have three sets of templates then? Would you be willing to share? I see the client templates on the wiki, but nothing for the common ones. I am also wondering about this... I do lots of JC, but haven no idea about how the common class stuff works. Guess I have a tendency to get behind on this sort of thing :) Anyway, Dave, speak up! Then, on a different note: are you using Wonder on the client as well? There isn't a jar in WebServerResources, but there's really no reason why you couldn't use it is there? There are reasons why you can't use Wonder on the client. There are many differences between server and client side libraries. There might be *some* functionalities from Wonder that could be used on the client, but the bulk of it: nope. Have you thought about adding project templates to WOLips for JavaClient apps (server and client)? Or a built-in library that would add all the standard WebServerResources jars to the classpath like the WebObjects Frameworks one does for the server? I isolate client side libs as Eclipse classpath variables. However, I believe there is room for improvement. Not sure if it can be standardized... Might be possible. Something like a WOJC classpath container becoming a part of WOLips. I'm still on the older WOLips, but are there any ant tasks for JavaClient now too? Client side apps can be many different things. For example, IIRC Dave is deploying using WebStart, has his server and client stuff in the same project, relies on WOLips JC stuff to build his client side apps and does lots of D2JC. As a different example, I am not using WebStart, have separate projects for client and server stuff, don't rely on WOLips JC capabilities, and do pure JBND+Swing WOJC apps. My point: there are many different ways one can approach WOJC. In that sense I believe making standard project templates would be difficult. Sorry, lots of questions. I'm exploring the possibility of using JavaClient. Go for it! The few of us that use it will be there for you... Best regards, and hope we can hook you to the JC hook :D F don't want to self-advertise, but if you are new to JC, and interested in your options, I suggest you also take a look at: http://web.mac.com/flor385/eSwamp/software/wojc_tutorial.html ___ Do not 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/ flor385%40mac.com This email sent to flor...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Java Client (topic of the day!)
Hi John On Mar 25, 2009, at 17:46, John Ours wrote: Funny to see all these messages about creating a Java Client, since that's exactly what I've been working on today. I've been following Florijan's write up and David's examples (thank you both!) and I've actually got things working so far. After all these years of grinding through client-server builds, this is like a gift from God. Cool to see that the hard work is being put to use :D For a while it seemed like Dave and I were the only ones out there... Anyhow, when working with this in development, what's the best way to handle starting the app from the IDE? I do exactly what you describe below, with some minor improvements. Please read on. The way it's set up now, I've got my WebObjects server application in one project and my Swing client app in another. In the client app I call EOClientApplicationSupport.main and pass in the URL to the running server app. The problem is that the port changes on the server app every time I start it. Is there a way to set it to a fixed port? Yes. Use the WOPort property in the server app's launch config (in the WO tab of a WOLips launch config). Or a better way to setup the run profiles for a Java Client app? I don't do anything fancy there. Sometimes I set heap sizes, but that's it. Still, depending on what you're doing there might be a better way to deal with EOClientAppSupport. Attached is a class that I use as a parent class for the main class of my JC apps. It takes care of some things for you... It's main purpose is to allow you to pass it multiple URLs to try to connect to. It is a part of my WOJCKit framework (a set of client and server side stuff for WOJC apps), which I guess I should publish, seeing all the interest on WOJC lately :) HTH, F EOAppSubclass.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 arch...@mail-archive.com
Re: [Somewhat OT] Code organization question
Hi Peter, On Mar 25, 2009, at 18:20, Peter Vandoros wrote: I'm not sure it will help you, but have you looked at using annotations? Nope. Never crossed my mind... They might be able to do what you described by simply annotating your EOFDataObject class. Could you please explain what you mean? I don't understand... Thanks, F ___ Do not 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
[OT] A good free profiler
Hi all, I am looking for a decent free Java profiler, not necessarily open source. For profiling a commercial product. At the moment I am interested purely in CPU profiling, though naturally I am not against other features. It can be an Eclipse plugin, but that is not required. I already know of Shark being an option (remember Mark's session on WOWODC last year), and might get into that. But, I am interested in what else is out there... Anyone has any experience with particular products? Thanks in advance, F ___ Do not 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: [OT] A good free profiler
Any idea if it can be used in standalone mode? My projects are all in Eclipse... F On Mar 19, 2009, at 18:21, Q wrote: Netbeans has a pretty decent profiler built in. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [OT] A good free profiler
This looks promising! Thanks, F On Mar 19, 2009, at 18:18, Peter Vandoros wrote: You can look at VisualVM as well. Regards Peter ___ Do not 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: [OT] A good free profiler
Hm, I work on a first generation Intel Mac, 32 bit - No Java6 - can't use VisualVM... Bummer... F On Mar 19, 2009, at 19:32, Stamenkovic Florijan wrote: This looks promising! Thanks, F On Mar 19, 2009, at 18:18, Peter Vandoros wrote: You can look at VisualVM as well. Regards Peter ___ Do not 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/ flor385%40mac.com This email sent to flor...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: [OT] A good free profiler
Thanks, will check it out. F On Mar 19, 2009, at 19:35, Q wrote: On 20/03/2009, at 9:26 AM, Stamenkovic Florijan wrote: Any idea if it can be used in standalone mode? My projects are all in Eclipse... Yes, it can be used to profile a remote application by supplying to extra vm args to the app before launch: http://www.mail-archive.com/webobjects-dev@lists.apple.com/msg11254.html F On Mar 19, 2009, at 18:21, Q wrote: Netbeans has a pretty decent profiler built in. -- Seeya...Q Quinton Dolan - qdo...@gmail.com Gold Coast, QLD, Australia (GMT+10) Ph: +61 419 729 806 ___ Do not 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: Eclipse Crashes but WOApp Keeps Running
On Mar 12, 2009, at 11:45, David Avendasora wrote: I have just discovered something that I didn't realize before. If you have you have a WO app running inside of Eclipse and Eclipse crashes the WO app keeps running. Huh, that's good to know. Thinking about it, this could be both a bug and a feature, from Eclipse's point of view... This can cause all sorts of problems. I ended up with three separate apps running (Eclipse crashed twice) and they were all running the same scheduled task (via Quartz) so not only was it s...l...o...w with lots of unexplained DB activity, I was also getting DB errors on unique-constraints because all three had their own cache of objects and were each creating the same object. I had to manually go in and quit the Java process in Activity Monitor. However, if you define the port on which the app runs, you can only have one instance running. Other instances can't start up as the port is taken. This is useful also in other situations. For example, I normally run my builds from the cmd line before deploying, because an app can behave differently if you run it from Eclipse (which I do during dev). So, if one version is already running, the other will crash on startup. Thereby, I am 100% sure which app I am connecting to. Talk about spending way too much time looking in my code for a bug. I did, however, end up making my app much more resilient to unexpected DB changes. :D F ___ Do not 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: Jad?
On Mar 12, 2009, at 14:03, Chuck Hill wrote: No! No loop holes either! Codez bad, goatez good. Sheep too if they can stand the heat. Can we at least do manual quicksorting? Y'know, to keep the animals in order... Hey, we could have the annual sheep-sorting competition! And sheep-puzzlers... God, to imagine all the things deprived programmers could think of, I am not so sure anymore that this would be a pleasant place to live in. :D F ___ Do not 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: Jad?
On Mar 12, 2009, at 15:14, Chuck Hill wrote: Mine. :-P The plan is that I control the beer supply and ration it out. Anything left at the end is mine, mine, all mine! And you just lost a years ration for questioning me! Next! I think I see a revolution on the horizon... F ___ Do not 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
[OT] Generic search component UI
Hi all, I am thinking of implementing a generic search component on top of JBND's qualification system. However, I am having trouble visualizing a really good, user friendly interface for such a component. The main problem: AND and OR qualifiers. I am looking for good ways to handle their creation, manipulation, and display. This is intended for end users defining complex searches, so I need it both easy to use and powerful and flexible. So, if anyone has a pointer to some app that does a good job of handling those, please let me know. Thanks, F ___ Do not 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: Owns Destination Deny
Hey Dave, On Mar 06, 2009, at 07:40, David Avendasora wrote: So if the only thing that Owns Destination does is cause the child to be deleted if the parent no longer exists but the Deny delete rule stops you from doing that, how can the Owns Destination setting have any meaning? Not entirely correct. It's more meant to be used to handle situations in which you un-relate the two. So, the owner continues existing, but the owned EO is deleted because it was removed from the relationship. Besides, if you are right then there is a bug in WO related to this. If I try to delete the parent with Owns and Deny set, I get the undo manager is in invalid state, undo was called with too many nested undo groups error I originally posted about. If I remove the Deny delete rule (and change nothing else), the deletion of the Parent completes without a problem. This indeed sounds like a bug, but I think the expected behavior should be different then what you describe. I believe that with the Owns and Deny set, if you have owned EOs you should not be able to delete the owner (should get an NSValidationException). According to the Deny rule contract. However, setting the delete rule to let's say Nullify should have the effect of Cascade. Because you delete the parent, it un-relates from the children, so they should be deleted too, according to the Owns contract. It's not that I don't think there can be bugs in WebObjects, I just want to be sure that the combination of Owns and Deny is valid before I file a bug. The way I see it, the two address separate issues and we should be able to use them together. In practice, I think in many cases it is appropriate to use Owns and Deny together. F ___ Do not 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: Owns Destination Deny
On Mar 06, 2009, at 11:00, David Avendasora wrote: Is it just that if you set the required Parent relationship on the Child to null you won't get a validation error when you save because the Child will get deleted before validation rules are applied to it? That's what I'd expect in a setup you described. For that particular action (un-relating the Child EO) I would expect Owns Relationship to override the fact that the parent relationship is mandatory. This still does not render the mandatory aspect meaningless because it ensures you can't initially save the Child without the parent relationship being set. Are you observing a different behavior, or was this hypothetical? I think I just answered my own question. Guess so. Sometimes typing it out helps :) F ___ Do not 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: Jad?
On Mar 06, 2009, at 15:27, Chuck Hill wrote: Tip o the hat to Mike for pointing this out to me. And one from us to you, for pointing it out to us. C'mon everybody, hail Chuck! :D F ___ Do not 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: Owns Destination Deny
Hey Dave, On Mar 02, 2009, at 16:55, David Avendasora wrote: What I find is really weird is that in most ways this never causes problems, except when trying to delete the Owner from within a Java Client application. I've never had a Web-app complain about it. It seems the delete is processed fine on the java client, but then when the EC is saved back to the Server-side and just when everything looks like it's about to start the actual save to the DB, I get the Undo Manager error, which is reported back to the client side. Are you actually doing some operations using the undo manager,? If I understand you correctly, you are not necessarily even using it, and still get the error? Then comes the *really* weird part: The server-side then goes ahead and reprocesses the delete and is successful, but the client isn't notified of the successful processing so the client is stuck with an out-of-sync EC. Ouch, that must hurt. Badly. Never experienced that and I hope I never will! F ___ Do not 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
[DITCHED] Re: Yet another threading question...
On Feb 27, 2009, at 14:37, Stamenkovic Florijan wrote: Hope this helps illustrate what I am thinking of. It's a bit weird. But so far it has been successful, outside of doing it inside EOF of course. Well, put it together, made a OneThread EC, and it didn't work. I keep getting IllegalMonitorStateExceptions caused by locking the parent object store of the ec. It could be what you (Chuck) said about the object store expecting calls to be made to it in a certain sequence, that is the only explanation left. However, I still do not understand why that causes the exception it causes, thought about it a lot, and it makes no sense whatsoever. I hate misteries... It's one of the reasons I like programming: if you dig deep enough you find the cause. Oh well, you win some, you loose some. Single threaded EOF access it is. Thanks for the input, F ___ Do not 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: Yet another threading question...
On Feb 26, 2009, at 22:19, Chuck Hill wrote: I thought of making an EOEditingContext subclass that encapsulates a thread and it does all it's work on that single thread, regardless of which thread a method call to it is made on. It would entail overriding all the methods in the EOEditingContext to do something like a producer / consumer setup. I think that if well made, it would introduce minimal overhead, as any inactive thread would be waiting, and would insulate the EOEditingContext from the multithreading outside of it. I have not thought it through very well (though I am pretty sure it can be made), so, can anyone think of unexpected bad side-effects? Also, this is happening on the client side, though I am not sure if that makes much of a difference for this. Not really sure what that is going to achieve. Thread X altering the state of an EC or thread X getting thread Y to do it seems the same. In that scenario: nothing. But, if I have threads X and Y altering the state of an EC (which I do at the moment, with disastrous results), and instead getting threads X and Y to get thread Z to alter the state of the EC would accomplish that the EC is only ever touched by thread Z. In short, I could have 50 threads doing work in a single EC, but the EC only ever getting touched by one. Which I hope would solve the deadlock / exception problem I have at the moment. Plus, since only thread would be actually doing the work, it would have the side effect of task queuing and synchronization on the EC. See my point? - still trying :) I was just about to ditch all the multithreading in my client app, saw how much it'd slow it down and make it less user friendly, and I just can't do it without another shot at it... Aw, just make a web app! :-P And have most problems already solved?!? Use Wonder?!? Have an easy life?!? How could you even suggest that??? F ___ Do not 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: Yet another threading question...
On Feb 27, 2009, at 09:20, David Avendasora wrote: On Feb 26, 2009, at 9:19 PM, Chuck Hill wrote: On Feb 26, 2009, at 1:01 PM, Stamenkovic Florijan wrote: Also, this is happening on the client side, though I am not sure if that makes much of a difference for this. Aw, just make a web app! :-P Chuck, why don't you just make an ASP app. :-P Game, set, match... Thank you Dave! :D F ___ Do not 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: [WORKED AROUND] Re: Bug in client side EOF locking?
On Feb 26, 2009, at 22:22, Chuck Hill wrote: snip How? Where? willRead(), willReadRelationship(Object) snip Have stack traces? See below. Sorry about not providing them before, that was silly. How come this particular exception happens in a multi-threaded scenario and not in a single threaded scenario? Hint: more than one thread. :-) Concurrency ww, ya think? :-P (Also note that the lock object is not public, it's lock() and unlock() methods are exposed through the public API of EODistributedObjectStore). Assuming that ReenetrantLock is not buggy, the only way I can imagine to get this exception is doing the equivalent of: if(accessingThreadCount 1) // super-evil eoDistributedObjectStoreInstance.unlock(); If anyone else knows another way, please let me know. I can't think of one, and am amazed to see it happening. In the meanwhile, I admit defeat, and go back to single threaded EOF operations. An exception resulting in an unlock upon which the other thread locks it and then a finally block unlocking it again in the first thread? Interesting idea, however... Let's say that this exception you mention gets thrown in a single threaded scenario. It would still result in more calls to unlock() then to lock(). The IllegalMonitorStateException would be thrown at either of the last two unlock() calls. So, we can assume it does not happen in a single threaded scenario, since the monitor exception is not thrown. Which means that it only happens in a multi threaded scenario. So, it still falls under the category of the idiotic idiom: if(accessingThreadCount 1) throw SomeException(); Or not? F Output logged from my EC's lockObjectStore() and unlockObjectStore() methods. There is only one EC. ... will lock: JBND worker thread did lock: JBND worker thread will unlock: JBND worker thread did unlock: JBND worker thread will lock: AWT-EventQueue-0 did lock: AWT-EventQueue-0 will lock: JBND worker thread did lock: JBND worker thread will unlock: AWT-EventQueue-0 did unlock: AWT-EventQueue-0 will unlock: JBND worker thread Stack traces... Got them by putting an exception breakpoint for IllegalMonitorStateException. The breakpoint set to suspend the VM. Traces are from the only two threads that do EOF work: Thread [JBND worker thread] (Suspended (exception IllegalMonitorStateException)) ReentrantLock$NonfairSync(ReentrantLock$Sync).tryRelease(int) line: 125 ReentrantLock$NonfairSync(AbstractQueuedSynchronizer).release(int) line: 1137 ReentrantLock.unlock() line: 431 EODistributedObjectStore.unlock() line: 107 JCEC(EOEditingContext).unlockObjectStore() line: 4668 JCEC.unlockObjectStore() line: 283 User(EOFDataObject).willRead() line: 744 _EOMutableKnownKeyDictionary$Initializer $_GenericRecordBinding.valueInObject(Object) line: 570 User(EOCustomObject).storedValueForKey(String) line: 1634 User(_User).password() line: 77 ... Thread [AWT-EventQueue-0] (Suspended) JCEC.lockObjectStore() line: 274 Account(EOFDataObject).willRead() line: 742 _EOMutableKnownKeyDictionary$Initializer $_GenericRecordBinding.valueInObject(Object) line: 570 Account(EOCustomObject).storedValueForKey(String) line: 1634 Account(_Account).number() line: 94 GeneratedMethodAccessor50.invoke(Object, Object[]) line: not available DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 585 NSKeyValueCoding$ValueAccessor$1.methodValue(Object, Method) line: 636 NSKeyValueCoding$_MethodBinding.valueInObject(Object) line: 1134 Account(EOCustomObject).valueForKey(String) line: 1498 Account(EOFDataObject).valueForKey(String) line: 714 Account(EOFDataObject).get(String) line: 212 ... ___ Do not 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: [WORKED AROUND] Re: Bug in client side EOF locking?
On Feb 27, 2009, at 14:14, Chuck Hill wrote: On Feb 27, 2009, at 6:10 AM, Stamenkovic Florijan wrote: On Feb 26, 2009, at 22:22, Chuck Hill wrote: snip I am old. My memory is weak. Less snips help. How? Where? willRead(), willReadRelationship(Object) snip Have stack traces? See below. Sorry about not providing them before, that was silly. How come this particular exception happens in a multi-threaded scenario and not in a single threaded scenario? Hint: more than one thread. :-) Concurrency ww, ya think? :-P Dunno, just a guess. ;-) (Also note that the lock object is not public, it's lock() and unlock() methods are exposed through the public API of EODistributedObjectStore). Assuming that ReenetrantLock is not buggy, the only way I can imagine to get this exception is doing the equivalent of: if(accessingThreadCount 1) // super-evil eoDistributedObjectStoreInstance.unlock(); If anyone else knows another way, please let me know. I can't think of one, and am amazed to see it happening. In the meanwhile, I admit defeat, and go back to single threaded EOF operations. An exception resulting in an unlock upon which the other thread locks it and then a finally block unlocking it again in the first thread? Interesting idea, however... Let's say that this exception you mention gets thrown in a single threaded scenario. It would still result in more calls to unlock() then to lock(). The IllegalMonitorStateException would be thrown at either of the last two unlock() calls. So, we can assume it does not happen in a single threaded scenario, since the monitor exception is not thrown. You would get a different error (attempt to unlock an unlocked lock?) if ReentrantLock even throws on that condition. It does, and it actually throws at exactly the same point. The same line throws an exception for: 1. an unlock() without a lock() 2. one unlock() too many 3. unlock() from a thread when another thread owns the lock Which means that it only happens in a multi threaded scenario. So, it still falls under the category of the idiotic idiom: if(accessingThreadCount 1) throw SomeException(); Or not? I still rather doubt that. :-) Me too... It is really weird. I just can't find any other explanation for what I see. I've been thinking about this on and off for weeks, and the more I do, the more stupefied I am. Output logged from my EC's lockObjectStore() and unlockObjectStore() methods. There is only one EC. ... will lock: JBND worker thread did lock: JBND worker thread will unlock: JBND worker thread did unlock: JBND worker thread will lock: AWT-EventQueue-0 did lock: AWT-EventQueue-0 will lock: JBND worker thread did lock: JBND worker thread will unlock: AWT-EventQueue-0 did unlock: AWT-EventQueue-0 will unlock: JBND worker thread I am not sure what that means. Well, if the above output can be trusted, it means that an unlock() occurs somewhere in the bowels of EOF, that is not preceded with a lock(). Because the EC locks the object store for one thread, immediately followed by a lock for the second thread. Also be careful of messages output by a log mechanism in a MT environment. NSLog in particular will show things out of exact order. Hm, hadn't considered that... I did it with System.out.println(...) though, and PrintStream does synchronize... Hopefully that's a tad more reliable. Still, I see your point. Possibly the above output is crap. Stack traces... Got them by putting an exception breakpoint for IllegalMonitorStateException. The breakpoint set to suspend the VM. Traces are from the only two threads that do EOF work: Thread [JBND worker thread] (Suspended (exception IllegalMonitorStateException)) ReentrantLock$NonfairSync(ReentrantLock$Sync).tryRelease(int) line: 125 ReentrantLock$NonfairSync(AbstractQueuedSynchronizer).release(int) line: 1137 ReentrantLock.unlock() line: 431 EODistributedObjectStore.unlock() line: 107 JCEC(EOEditingContext).unlockObjectStore() line: 4668 JCEC.unlockObjectStore() line: 283 User(EOFDataObject).willRead() line: 744 _EOMutableKnownKeyDictionary$Initializer $_GenericRecordBinding.valueInObject(Object) line: 570 User(EOCustomObject).storedValueForKey(String) line: 1634 User(_User).password() line: 77 ... Thread [AWT-EventQueue-0] (Suspended) JCEC.lockObjectStore() line: 274 Account(EOFDataObject).willRead() line: 742 _EOMutableKnownKeyDictionary$Initializer $_GenericRecordBinding.valueInObject(Object) line: 570 Account(EOCustomObject).storedValueForKey(String) line: 1634 Account(_Account).number() line: 94 GeneratedMethodAccessor50.invoke(Object, Object[]) line: not available DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Re: [WORKED AROUND] Re: Bug in client side EOF locking?
On Jan 28, 2009, at 15:17, Stamenkovic Florijan wrote: As you suggested, adding this to my EO superclass seems to do it: private static final Integer monitor = new Integer(345345); public void willRead(){ synchronized(monitor){ super.willRead(); } } public Object willReadRelationship(Object object){ synchronized(monitor){ return super.willReadRelationship(object); } } Just hope it does not introduce deadlocks in the future... Well, it did. Adding arbitrary synchronization is dangerous business... Right. So I figured, I'll use the existing lock: public void willRead(){ EOEditingContext ec = editingContext(); ec.lockObjectStore(); try{ super.willRead(); } finally{ ec.unlockObjectStore(); } } public Object willReadRelationship(Object object){ EOEditingContext ec = editingContext(); ec.lockObjectStore(); try{ return super.willReadRelationship(object); } finally{ ec.unlockObjectStore(); } } Should be a nice, atomic operation, and it relies on existing locking (a recursive lock), so I should be all good, right? Wrong... Got rid of the deadlock, but increased the frequency of the same exception I've seen before. The exception is caused by unlock() being called on the EODistributedObjectStore from a Thread that is not the lock owner. I am more and more perplexed by this. How come this particular exception happens in a multi-threaded scenario and not in a single threaded scenario? (Also note that the lock object is not public, it's lock() and unlock() methods are exposed through the public API of EODistributedObjectStore). Assuming that ReenetrantLock is not buggy, the only way I can imagine to get this exception is doing the equivalent of: if(accessingThreadCount 1) // super-evil eoDistributedObjectStoreInstance.unlock(); If anyone else knows another way, please let me know. I can't think of one, and am amazed to see it happening. In the meanwhile, I admit defeat, and go back to single threaded EOF operations. Best regards, F ___ Do not 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
Yet another threading question...
Hi all, I thought of making an EOEditingContext subclass that encapsulates a thread and it does all it's work on that single thread, regardless of which thread a method call to it is made on. It would entail overriding all the methods in the EOEditingContext to do something like a producer / consumer setup. I think that if well made, it would introduce minimal overhead, as any inactive thread would be waiting, and would insulate the EOEditingContext from the multithreading outside of it. I have not thought it through very well (though I am pretty sure it can be made), so, can anyone think of unexpected bad side-effects? Also, this is happening on the client side, though I am not sure if that makes much of a difference for this. Thx, F - still trying :) I was just about to ditch all the multithreading in my client app, saw how much it'd slow it down and make it less user friendly, and I just can't do it without another shot at it... ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Hibernate
On Feb 25, 2009, at 19:20, Mike Schrag wrote: 3. Hibernate validators are not too bad for basic validations I've always felt that EOF should have more out-of-the-box model- defined validation support I'm not so sure about EOF doing this -- I quite like being able to organise this in-code and I think it is one of those things that something like PW can add-on without having to put too much into the basic frameworks. Admittedly, validation in the model is a bit of a religious debate. I think there's a lot of value that can be derived by model-defining it in that you can things like have the UI automatically do richer validation without custom-coding it, and if they're written declaratively, you can actually generate client-side validations that don't require a server roundtrip to just tell the user that you aren't allowed to say you have more than 25 children (or whatever). Anjo, I believe, is also adamantly against model-based validations too, though. I don't know if this helps or hurts your case ;) I don't think that the two are mutually exclusive. In such a situation it is plainly better to have more options. F ___ Do not 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: deferrable initially deferred
On Feb 24, 2009, at 09:06, Ricardo J. Parada wrote: Hmm... what is the trick to using the right frontbase plug-in? :-) FB automatically installs their version of the plugin into /Library/ Frameworks (during the installation of the FB package), so if you did not replace that with the Wonder one, the odds are your app is using the FB one. There are different ways for dealing with this I guess, what I do is simply replacing the FB one with the Wonder one. F ___ Do not 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: WO/Wonder and Java 6 as a deployment environment?
On Feb 24, 2009, at 09:32, David Avendasora wrote: BTW how's Java 6 for Mac? Is it final already, or still beta? Intel only, or PowerPC? Sorry for the dumb questions, but I looked at the Apple Java page and I couldn't really figure it out. I believe that 1.6 is released (not Beta) for Intel True. and that there will be no 1.6 for PPC. This is almost guaranteed. Apple has shown absolutely no intentions of doing this, though I am not sure if they actually said they would not. + only Leopard + only 64 bit F ___ Do not 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: deferrable initially deferred
On Feb 24, 2009, at 11:37, Ricardo J. Parada wrote: Is there anything that I can use to differentiate between the FrontBase and Wonder versions of this plug in? Not based on the screenshot you sent. Others probably know a better way, but you can add the following to your model project's .properties file: com.frontbase.unique=1 (replace number 1 with whatever) Then if the SQL generation generates stuff like: SET UNIQUE = 1 FOR ENTITY_NAME; You are using the Wonder plugin. The original FB plugin does not support this AFAIK. There are also other ways of telling, but I only know of those that can be reproduced through erroneous situations, the above is the simplest way I know. Well, you can also check the byte size of the different framework's .jar. I bet there's a difference. But for that you'll need the same versions of different vendor plugins to start with, argh, a PITA. I'll probably just clean up these two directories and re-download the Wonder frameworks. :-) The easiest way of making sure :) F ___ Do not 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: opposite method to objectMatchingKeyAndValue
On Feb 21, 2009, at 04:30, Paul Hoadley wrote: I see a thread from 2003 [1] that seems to indicate that uniqueness of an attribute isn't expressible in an EO model. I take it the only way to add such a constraint, then, is manually? AFAIK: yes. However, it *might* be possible to enhance EntityModeler to include this info in the EOModel, and thereby to generate SQL that does this for you... It would not be information present at runtime, in the programatic rep of the model, which could be a source of confusion, but it might be a convenient feature nevertheless. And who knows, maybe Apple would pick up on it and include this info in the EOModel standard... Any thoughts on this from WOProject folks? F ___ Do not 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: opposite method to objectMatchingKeyAndValue
On Feb 21, 2009, at 11:22, Mike Schrag wrote: However, it *might* be possible to enhance EntityModeler to include this info in the EOModel, and thereby to generate SQL that does this for you... It would not be information present at runtime, in the programatic rep of the model, which could be a source of confusion, but it might be a convenient feature nevertheless. And who knows, maybe Apple would pick up on it and include this info in the EOModel standard... Any thoughts on this from WOProject folks? 5.4 added this, and Entity Modeler already supports it ... It depends on your plugin as to whether or not SQL will be generated for it, and I don't think migrations look at that (because the API isn't available in 5.3). Huh, I can't find it... I don't see any sort of a uniqueness control column in the EntityModeler (plugin, not standalone) in the attributes table, nor do I see it in the Properties tab for an attribute. Uhm, WTF? Eclipse 3.4.1 WOLips 3.4.5668 (stable) WO 5.4 F ___ Do not 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: opposite method to objectMatchingKeyAndValue
On Feb 21, 2009, at 13:10, Mike Schrag wrote: You create EntityIndexes on an Entity ... It's not per-attribute because you can have composite unique indexes potentially. Got it, thanks... Bummer it's not fully functional yet. Still, very nice it's worked on. Perhaps in the future a more elaborate adaptor exception API will be built around this... Best regards, F ___ Do not 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: opposite method to objectMatchingKeyAndValue
Gus, Bringing this back to the list. Sorry about going off-list, I mistakenly hit Reply... On Feb 20, 2009, at 14:25, Gustavo Pizano wrote: Hello Florijan. I made a try-test trying to insert a product that was already there, to see which kind of exception EOF will throw, I go this one, EOGeneralAdaptorException, of course after setting up in the DB a unique constrain for the code, so what about if I catch that exception and inform the user? In principle, this is exactly what you should do. However, an EOGeneralAdaptorException can be raised for various reasons, not only a violation of the uniqueness constraint. And since the exception does not have an API to tell you what the exact reason is, you need to parse the textual information that the exception contains to determine what happened. Which is specific to the database you are using. Depending on the DB, people on the list might be able to give you the code that deals with this. F On 20.2.2009, at 19:14, Stamenkovic Florijan wrote: Hey Gus, The code you intend to use does not guarantee that the code value will be unique in the database. The only way of achieving this with a 100% guarantee is to have a uniqueness constraint on the given column in the database. In short, what you are doing is not a good way to deal with this requirement. I suggest you look into this, there is plenty of discussions in the archives on the subject, most of them going into much more depth then would fit into this email. Search for uniqueness constraint, unique value, unique column etc... That said, I believe you are looking for the following code pattern (you do not need to throw any kind of an additional exception): try{ // this line potentially throws an exception Product p = (Product )EOUtilities .objectMatchingKeyAndValue (editingContext(),Product,Product.CODE_KEY, code); // if this line is reached, then the object *is* found in the database, so inform the user about it informUser(); }catch(EOObjectNotAvailableException ex){ // at the moment of fetching the object with the given code was not found in the db insertObject(); } HTH, F On Feb 20, 2009, at 13:40, Gustavo Pizano wrote: Hello all. Well I want to insert a EObject into the database, I found that the objectMatchingKeyAndValue will return me the object with the given parameters, and if not found will throw and EOObjectNotAvailableException. Now, I need to insert the new objects, but I need to be sure that they don't exist in the database, the entity has a attribute called code, which is not the primary key, so I was thinking in using the following. try{ Product p = (Product )EOUtilities .objectMatchingKeyAndValue (editingContext(),Product,Product.CODE_KEY, code); }catch (EOObjectNotAvailableException e){ //insert the new object into the EC, and save it } the problem i see, is that if the object in fact exists, I must alert the user that this particular product exist already, so Im feeling doing the things in the wrong way, I was thinking in putting a throw exception before the catch and with that alert the user... but i dunno i feel kinda weird doing this... Suggestions?? Thanks Gus ___ Do not 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/flor385%40mac.com This email sent to flor...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Making a fake EO
On Feb 19, 2009, at 09:20, Mike Schrag wrote: Is it possible somehow? Or my only way is to create a real record in my employee database called Mr. Vacancy and maybe even pay him salary :) anything is possible but not everything should be done ... IMO, do Mr. Vacancy. you'll be a happier person. Maybe if you combined this with inheritance (single table), you could make Mr. Vacancy behave in a customized way, and make it easily differentiable from other (real) Person records. Just a thought, haven't really thought the feasibility of this through. HTH, F ___ Do not 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: BigDecimal vs WOConditional
On Feb 17, 2009, at 12:57, Ondřej Čada wrote: Just bumped into a ugly thing: a WOConditional considers a BigDecimal 'false' for values 1 -- self-evidently, it checks an integer value of the thing. Just for reference, is that my fault or WO fault? To be quite frank, I cannot find in specifications the exact API contract for this... I've always thought the C rules apply there (i.e., for any numeric value, nonzero equals true), but quite clearly they do not :( The Java language specification does not allow conversion of non- boolean primitives to boolean primitives. The java.lang.Number API is consistent with this: it does not have a boolean-export method. In short: there is no contract for this. So, if it is happening, it is a library-specific process, so I guess we just have to accept whatever WO (in this case) does. F ___ Do not 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
[JC] Time to vote!
Hi to all JavaClient users on the list... And also those who are considering becoming JC users. If you are using EntityModeler to make models for JC apps, please take a minute to look at an enhancement request made a while back, and if you feel it could improve your development environment, please vote for it! Just to give the awesome WOLips team some incentive to look into it... http://issues.objectstyle.org/jira/browse/WOL-714 Thank you, F ___ Do not 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
Fwd: Eclipse 3.5M5 - The future is Cocoa
Forwarding from Java OX list. Thought this might be of interest to WO list too F Begin forwarded message: From: Erik Mattheis irond...@mac.com Date: February 05, 2009 09:24:06 GMT-04:00 To: java-...@lists.apple.com Java-dev java-...@lists.apple.com Subject: Eclipse 3.5M5 - The future is Cocoa I just noticed a new milestone of Eclipse 3.5 which includes the port of SWT to the Cocoa framework: http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5-200902021535/index.php The 'new and noteworthy' document has this to say: The future is Cocoa The Cocoa port of SWT is nearing completion and we have removed the **early access** warning from the download page. Cocoa is feature complete, and is the future of Eclipse on the Mac. Please download Cocoa builds and enter bug reports. The download is offered in 32 and 64 bit versions. I was able to run the 64 bit version using Java 6 by adding the following lines to the eclipse.ini file: -vm /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/ java I performed a few simple tests and it seems a lot less 'rough around the edges' as previous milestones. Kudos to everyone involved! The speed at which this as gone from concept to reality is truly impressive. Cocoa SWT should go a long way towards keeping Mac OS X a viable platform for Java development. ___ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (java-...@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/flor385%40mac.com This email sent to flor...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
[ANN] JBND 0.91
Though a minor release, this version introduces some really important depreciations and API changes, so if you are using JBND you should *definitively* check out the detailed release notes: http://web.mac.com/flor385/JBND/news.html F ___ Do not 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
[ANN] JBND 0.9 released
Hi all, So, a new version of JBND is out... Relevant stuff: - WO 5.4 supported (required) - Undo / redo manager built into JBND (org.jbnd.undo package), works well with property changes, with some additional handling can handle also EO insertions / deletions, though this is a bit hackish. Independent of NSUndoManager - support for SwingX (http://swinglabs.org/) components: JXTreeTable (a tree-like component that displays multiple columns, awesome for data driven apps) and JXDatePicker (a popup calender) - automated derived property caching / releasing improved and simplified - JBND generated user feedback is localized (English, Spanish, Dutch), localization capabilities for entity and property names improved - a few other helping classes added: WorkerThread, LimitingDataSource, MerginingDataSource, BoundMessageLabel, JBNDSwingUtil... - many bugs fixed (SortingDataSource and FilteringDataSource completely overhauled) ... Detailed release notes: http://web.mac.com/flor385/JBND/news.html F ___ Do not 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: Prefetching?
Hi Jeffrey, Are you referring to relationship prefetching? As in: a row in table1 relates to many rows in table2, and you want to prefetch table2 rows based on that relationship? If so, well, I would assume most people use it, as it can drastically increase your performance. Say you have a single row in table1, and 1000 rows in table2 relating to it. Let's assume that you will for sure need those 1000 rows in your app... If you pre-fetch the table1 - table2 relationship when fetching table1 row(s), then those 1000 objects will be fetched from the database immediately using a single select, resulting in total in a few selects, as opposed to (a few + 1000) selects... This can speed fetching up *a lot*, and is in many situations not only beneficial, but a must-do. Does this help? If you are referring to something else, please clarify. F On Jan 30, 2009, at 10:18, Jeffrey Simpson wrote: I was reading though WebObjects Documentation and ran across a section on Prefetching. I then looked through the mailing list and did not find any messages about it. Does anyone use it? Is it worth using? Jeffrey Simpson Youth For Understanding USA jsimp...@yfu.org Telephone: (240) 235-2114 FAX: (202) 235-2104 Preparing young people for their responsibilities and opportunities in a changing, interdependent world. ___ Do not 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/ flor385%40mac.com This email sent to flor...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Prefetching?
On Jan 30, 2009, at 11:05, Stamenkovic Florijan wrote: If so, well, I would assume most people use it, as it can drastically increase your performance. Ahem, sorry about this, it will not drastically increase *your* performance, but that of your WebObjects app... :D F ___ Do not 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: Bug in client side EOF locking?
On Jan 27, 2009, at 19:44, Chuck Hill wrote: This happens while I have two threads doing some work. One is performing calculations, the other is updating the GUI. Both of them are accessing the same EOs, asking them for data. That sounds problematic. Usually one thread would hold the EC lock and only that thread would touch the EOs. Well, I've synchronized access to all the methods in my EC (synchronizing on the default parent object store object, to avoid some deadlocks, which are JC specific I believe), and till now that seemed sufficient, it solved all the locking issues I had so far encountered... 2. EOCustomObject.willReadRelationship is calling unlockObjectStore(...) while the thread this is happening on does not actually own the lock in the EODistributedObjectStore... To me this looks like a bug outside the scope of my code. Or am I missing something? It will lock the object store to fire a fault for the relationship. Then it will unlock it. Perhaps both threads were firing faults at the same time? They are, guaranteed. But they should synchronize between themselves... I thought that was what locking the object store was all about... Also, when I look at the source of ReentrantLock, I see that this exception is thrown because of: if (Thread.currentThread() != owner) throw new IllegalMonitorStateException(); So, the thread trying to unlock does not actually own the lock, the other thread owns it. AFAIK the only way to make this happen is calling unlock, without the same thread obtaining a lock before that. Which is most definitively a bug. Or do I see this wrong? This is one of those situations in which being able to see WO source would really make life easier :) 3. Ideas, suggestions (bug reporting aside)? EOF does not really like more than one thread accessing EOs at one time. Can you use two sets of EOs in different editing contexts? Post notifications from the thread doing the calculations? Hm, I can fix this particular situation quite easily (make the thread that is calculating stuff fire all the faults that the other thread would normally fire). I am more interested in the principle of things... So, what is the end verdict? Report a bug? Avoid more then one thread doing EO work? Thanks, F ___ Do not 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: Bug in client side EOF locking?
On Jan 28, 2009, at 11:10, Stamenkovic Florijan wrote: Also, when I look at the source of ReentrantLock, I see that this exception is thrown because of: if (Thread.currentThread() != owner) throw new IllegalMonitorStateException(); So, the thread trying to unlock does not actually own the lock, the other thread owns it. AFAIK the only way to make this happen is calling unlock, without the same thread obtaining a lock before that. Which is most definitively a bug. Or do I see this wrong? Or calling unlock() more times then lock() was called F ___ Do not 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
[WORKED AROUND] Re: Bug in client side EOF locking?
As you suggested, adding this to my EO superclass seems to do it: private static final Integer monitor = new Integer(345345); public void willRead(){ synchronized(monitor){ super.willRead(); } } public Object willReadRelationship(Object object){ synchronized(monitor){ return super.willReadRelationship(object); } } Just hope it does not introduce deadlocks in the future... Adding arbitrary synchronization is dangerous business... Still, I'll report this. I don't believe that exception should be happening, even with the stuff I am doing... Thanks, F On Jan 28, 2009, at 14:49, Stamenkovic Florijan wrote: Accessing any EO can trigger EOF access and if you are locking around EC methods, it won't be locked at that time. You would at least need to synchronize around willRead() and willReadRelationship(). Note that willReadRelationship() locks the object store, not the EC. Yep, noticed that. Considered making a completely synchronized EO superclass, but that seems a bit excessive; would probably wreck performance. However, synchronizing those two methods might be the way to go ___ Do not 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
Bug in client side EOF locking?
Hi all, I am starting to get another locking exception, shortly after switching to 5.4. Could be that the update changed something, or that I simply never managed to trigger this before (race condition). So, the exception is: java.lang.IllegalMonitorStateException at java.util.concurrent.locks.ReentrantLock $Sync.tryRelease(ReentrantLock.java:125) at java .util .concurrent .locks .AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java: 1137) at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java: 431) at com .webobjects .eodistribution .client.EODistributedObjectStore.unlock(EODistributedObjectStore.java: 107) at com .webobjects .eocontrol.EOEditingContext.unlockObjectStore(EOEditingContext.java: 4668) at org.wojc.client.JCEC.unlockObjectStore(JCEC.java:280) at com .webobjects .eocontrol.EOCustomObject.willReadRelationship(EOCustomObject.java:1281) at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer $ _LazyGenericRecordBinding .valueInObject(_EOMutableKnownKeyDictionary.java:614) at com .webobjects .eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634) at com.havaso.dvis.client.eof.eo._Account.debitBookings(_Account.java: 168) ... This happens while I have two threads doing some work. One is performing calculations, the other is updating the GUI. Both of them are accessing the same EOs, asking them for data. So, a few questions: 1. Does anyone know if ReentrantLock is only used since 5.4? I don't recall seeing WO use any java.util.concurrent stuff before... 2. EOCustomObject.willReadRelationship is calling unlockObjectStore(...) while the thread this is happening on does not actually own the lock in the EODistributedObjectStore... To me this looks like a bug outside the scope of my code. Or am I missing something? 3. Ideas, suggestions (bug reporting aside)? Thanks, F ___ Do not 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: last chance for stable
WOL-950, just created. F On Jan 21, 2009, at 13:36, Mike Schrag wrote: If there are any bugs you consider total showstoppers for the new stable release of WOL, please comment on them in the WOLips Jira. Clock is ticking :) ms ___ Do not 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: ant clean install versus Eclipse/WOLips clean install
John, I'll try to do some speculating based on what you say 1. Your project relies on Eclipse's Incremental build to copy the .gif resources to the bin output folder of your project 2. WOLips compile target does *not* copy those resources to bin, but only compiles .java files 3. Your jarring of the client side code (added to the build.xml I presume?) jars the content of the bin folder If this is all true (and you could verify), then I guess the problem in the situation is that WOCompile does not deal with anything that's not a .java file. Ergo only java sources get compiled and copied to the bin output folder. Which would be a fundamental difference between Eclipse's incremental builder and the WOLips ant compilation process. Workarounds I can think of: 1. Separate your client and server projects. This is what I do, however I do not do WebStart. If you are, this might be slightly more difficult to do (though not at all impossible). However it might not chime well with your deployment process. 2. Add some ant magic to your build.xml to manually copy .gif (and other resources) to your bin output as a part of the ant build. 3. Continue with the hack that you are already doing. 4. David Avendasora and Mike Schrag have been working on WOJC additions to the ant build process (which are AFAICS all WebStart focused), so you might want to coordinate with them. On a side note, the first thing I do for my new WO projects is turn the Incremental builder off (in project properties). I rely solely on WOLips ant, exactly to avoid this kind of confusion. However, I think that the JC / WebStart additions to WOLips depend on it... Hope this helps, F p.s. - also I'd be interested to hear how exactly are you setting up your client/server code, perhaps we could discuss it... On Jan 20, 2009, at 06:52, John Pollard wrote: Hi List, I have a framework with a classes.include.patternset that ensures gif resource files are included in my jar (why I need this isn't really relevant, but it is for accessing the image resources in a java client application). If I use Eclipse, Project, Clean on this framework, followed by WOLips Ant Tools, Install then all is well, my gif files are embedded in the installed framework's jar. If however I then use my deployment script to do a command line ant clean install, the gifs do not appear in the jar. If I follow that with another WOLips Ant Tools, Install from within Eclipse, the gifs are still missing. The only fix is to do an Eclipse Project, Clean again. A workaround is to drop the clean from the command line call to ant. I have WOLips nightly from about 2 weeks ago and Eclipse. The ant command that drops the gifs is: ant -lib /Developer/Applications/eclipse/plugins/ org.objectstyle.wolips.woproject.ant_3.4.5594/lib clean install Thanks for any help. John ___ Do not 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: ant clean install versus Eclipse/WOLips clean install
John, On Jan 20, 2009, at 10:28, John Pollard wrote: Hi Florijan, Many thanks for your reply. I was kind of aware that Eclipse did something different when using incremental build; a recent post I made gave an example where compiles worked on the incremental build but not in ant. I should point out that this was all working before I upgraded to recent versions of Eclipse and the nightly WOLips. So the ant clean install did previously put the gif files into the jar, or at least didn't remove them! Yeah, I'd guess that earlier versions of the install target did not do a clean - compile - bundle, but just compile - bundle. Although this is client side code, it is already in its own separate project, so doesn't get any special client-side treatment other than this gif bundling within the jar which is just done using patternset rules, so nothing special within build.xml. My jnlp is manually edited and managed and my deployment scripts copy the jar to the appropriate place for java web start access. So, you have a separate client side project... I think that is a good way of handling it, I also keep my client side stuff separate. However, I don't understand then the ant build confusion. Is your client side project a WOLips project, or just a standard Java project? Or an ant based Java project? Also, where are those .gif resources located? In which project I mean... If your client side project is a WOLips project, may I ask why? How do you have it set up? I have not tried turning off the incremental builder, I just assumed that coding is more pleasant with it on and didn't have a reason that I knew of to change this before. Yes, it is more pleasant. I have to wait for the ant build to do all of it's stuff every time that I save any server side changes. However, since my server projects are quite simple in general, this works fine for me, and gives me results more consistent with the final deployment. Though this may have improved with the latest WOLips classpath handling. Best regards, F ___ Do not 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: ant clean install versus Eclipse/WOLips clean install
On Jan 20, 2009, at 12:28, John Pollard wrote: Although this is client side code, it is already in its own separate project, so doesn't get any special client-side treatment other than this gif bundling within the jar which is just done using patternset rules, so nothing special within build.xml. My jnlp is manually edited and managed and my deployment scripts copy the jar to the appropriate place for java web start access. So, you have a separate client side project... I think that is a good way of handling it, I also keep my client side stuff separate. However, I don't understand then the ant build confusion. Is your client side project a WOLips project, or just a standard Java project? Or an ant based Java project? Also, where are those .gif resources located? In which project I mean... A WOLips project. The .gif resources were in the same folder as the .java files. Yeah, that's what I thought. I guess that can be tricky, as the desired results (for a client app, as opposed to a WO server app) are different. I use a standard Java app project for my client stuff, and the FatJar plugin to generate the end product jar, and the manifest file and all. I also have all sorts of resources in my source tree, and no problems bundling them all into a jar. However, in client projects I only rely on the incremental builder (combined with FatJar), no ant. If your client side project is a WOLips project, may I ask why? How do you have it set up? Probably for no good reason, just copying processes used with other non-client projects. At least the patternset stuff was useful in allowing me to include the gifs in the jars. Hm, I never tried doing that. Just always used Java projects with added client side libs. F ___ Do not 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: Altering EOModel
On Jan 16, 2009, at 16:20, Stavros Panidis wrote: Hi all, I am developing an application where I want to give to the end user the ability to alter EOModel and database, that is to add fields in a table, or to add a new table and to be able to insert and/or edit data on this table. I am sure that there is a way to do it but as with the whole WebObjects documentation is a miracle to find out how (at least for a new comer like me). Can anyone suggest to me some APIs or readings about this? I think you should also consider alternative technologies. I *believe* you might find stuff that is a lot more suited to this kind of work then WO is. A question to the rest of the list: has anyone ever even tried doing this with WO? And I don't mean just fiddling with the in-memory model, but also saving the model, changing the DB schema on the fly etc... F another thing, Stavros... You say you are a newcomer to WO... After some 4 years with WO (and still learning), I would not dare attempt this. However, if you still go for it, best of luck to you (and let us know what you make, I am sure many in the community would be interested to see this happening). ___ Do not 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
Leopard friendly JavaBrowser alternative
Hi all, So, the JavaBrowser app is gone. I found some info saying that Tiger's version can work on Leopard too, but it seems I'd have to do some hacks. So, before I do that, I'd like to hear how others browse Java docs / source? I am especially interested in standalone apps (though I'd prefer not using a browser to do this, for reasons of convenience), as I like to Cmd+Tab between the doc and Eclipse. Thanks, F ___ Do not 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