Re: WO 5.4 Linux Deployment

2008-04-02 Thread Aleksey Novicov

Thanks Jeff!

I tried this and found that the latest Eclipse/WOLips tools are very  
complete in packaging up woapps for servlet deployment. However, there  
were a couple of caveats worth mentioning:


1. Starting with a WOnder Application template there is no need (and  
no option!) to create a project with servlet support. All that is  
needed after the project is created is to check Servlet Deployment and  
check Autogenerate web.xml in WOLips Build within the project  
properties. This will create the proper WAR file as a fully self- 
contained servlet single directory deployment (SSDD) with all of the  
necessary WO frameworks. It's very slick.


2. Project dependencies (such as other frameworks) however will not be  
included in the SSDD. They must be included as framework dependencies  
as well. See http://wiki.objectstyle.org/confluence/display/WOL/Add+a+Framework+Dependency 
.


3. The generated web.xml file in WEB-INF has a parameter named  
WOAppMode which is set to Development. I found that with this  
setting, Tomcat and the WebObjects Resource Manager would not serve up  
any static WebServerResources correctly. I kept getting links like / 
MyApp/WebObjects/MyApp.woa/_wr_/wodata=/Library/stuff. I don't know  
if I had a particular property value set incorrectly. But I did find  
that if I changed the WOAppMode value to Deployment, the problem  
went away since the static resources get served up directly by the web  
server. This of course requires a split install (Tomcat + Apache).  
Because I'm using Ajax, I had to remember to include Ajax.framework/ 
WebServerResources in the split install since there are critical  
javascript files that are required.


4. For the static resources to be served correctly via port 80 of the  
Apache web server (as opposed to Tomcat's port 8080), I had to install  
the Tomcat-Apache plugin, mod_jk. I am deploying on Linux, but  
developing on a Mac, and so I wanted to make sure this also works  
under Leopard. There are useful instructions for installing mod_jk on  
Leopard client at http://blog.lo-fi.net/2007/10/leopard-for-web-developer-installing.html 
 (the downloadable binary for mod_jk for Leopard doesn't run  
correctly).


5. In the Tomcat log file (catalina.out), I keep getting an exception  
(below) related to JDBC but everything runs fine regardless (I'm using  
MySQL). Tomcat seems to have it's own data source mechanism for  
supplying database information. Being a Tomcat newbie, I'm not sure if  
there is an easy way to suppress these exceptions, or if it's better  
to just configure and use the servlet container data source. I know  
there is some pertinent information at http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Deployment-Tomcat+Deployment 
, but I'm interested in getting input on best practices related to WO  
deployment and data sources in a servlet container. Please let me  
know, especially if you have experience with business-critical  
deployments.


MyApp[2008-4-1 23:16:41 PDT] http-8080-1  
javax.naming.NameNotFoundException: Name jdbc is not bound in this  
Context

at org.apache.naming.NamingContext.list(NamingContext.java:345)
at org.apache.naming.NamingContext.list(NamingContext.java:353)
at org.apache.naming.NamingContext.list(NamingContext.java:353)
at org.apache.naming.NamingContext.list(NamingContext.java:368)
at org.apache.naming.SelectorContext.list(SelectorContext.java:307)
at javax.naming.InitialContext.list(InitialContext.java:395)
	at  
com 
.webobjects 
.jdbcadaptor.JDBCContext.setupJndiConfiguration(JDBCContext.java:310)

at com.webobjects.jdbcadaptor.JDBCContext.connect(JDBCContext.java:197)

Thanks,
Aleksey


On Mar 26, 2008, at 5:38 AM, Jeff Smith wrote:

We've just started deploying on Linux (ubuntu in this case) using a  
hosting provider and have found that the Tomcat/WAR file deployment  
works very well.  Nothing special being used here, mainly the  
standard dev tools/WO install from Apple (5.4) and then Eclipse 
+WOLips (latest stable) to build the project/WAR files.


As a matter of fact, I've found that just creating the projects with  
servlet support and then checking the WOLips boxes for Servlet  
deployment and automatically generating the WAR files (in the  
preferences) was all I needed to do to get the proper WAR file  
generated.


Jeff

On Mar 25, 2008, at 9:41 PM, Aleksey Novicov wrote:

I am looking for input and instruction on deploying WO 5.4 apps on  
Red Hat Linux. Are there any updated instructions for WO 5.4? Is  
there a pre-compiled Apache 2.2 WebObjects adapter for Red Hat  
available? How about deploying on Tomcat? Is it preferred over  
JavaMonitor/wotaskd? I have experience with JavaMonitor on OS X but  
have never tried deploying on Tomcat.


By the way, this mail list is invaluable. Thanks to all of the  
contributors.


Aleksey
___
Do not post admin requests 

Re: WO 5.4 Linux Deployment

2008-04-02 Thread Aleksey Novicov
Which source do you recommend using? The source that is distributed  
with Xcode and is in /Developer/Examples/WebObjects/Source/Adaptors?  
Or the source in Project Wonder?


On Mar 30, 2008, at 10:22 PM, Joe Little wrote:

On Tue, Mar 25, 2008 at 6:41 PM, Aleksey Novicov [EMAIL PROTECTED]  
wrote:
I am looking for input and instruction on deploying WO 5.4 apps on  
Red

Hat Linux. Are there any updated instructions for WO 5.4? Is there a
pre-compiled Apache 2.2 WebObjects adapter for Red Hat available? How
about deploying on Tomcat? Is it preferred over JavaMonitor/ 
wotaskd? I

have experience with JavaMonitor on OS X but have never tried
deploying on Tomcat.



I'll just add that I never deploy as a servlet, but use native
adaptors. Nothing precompiled, but the instructions out there for 5.3
still work for 5.4, albeit using the newer 5.4 frameworks/jars. The
FreeBSD install script that has been posted might be more enlightening
as I think its already updated to 5.4.


By the way, this mail list is invaluable. Thanks to all of the
contributors.

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

This email sent to [EMAIL PROTECTED]



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

This email sent to [EMAIL PROTECTED]


Re: Multiple EOModels

2008-04-02 Thread David Griffith
Thanks for that, obviously frameworks are the way to go, I haven't  
really needed to make my own up to now but clearly I should have :-)   
Back to the bookshelf then :-)


Regards,
David.

On 27 Mar 2008, at 18:52, Chuck Hill wrote:



On Mar 27, 2008, at 1:57 AM, David Griffith wrote:


Hi all,

I have two apps that have two distinct EOModels.  I now need to  
link these two apps so that they have access to each other's data,  
so I was going to add both models to each app and recompile.


Frameworks.  You want frameworks.  Frameworks are WebObjects (and,  
well, OS X's) way of sharing things between applications.  Put the  
models and the related code in a framework and use the framework in  
the application.  I _never_ _ever_ put a model in an application.



However, it transpires that both models have a couple of entity  
names in common.


Are they the same entity (same database, same table)?  If so, create  
a framework and model to hold the common entities.  Use this  
framework in the frameworks holding the models with the other  
entities.  Include all three frameworks in your application.


If they are not the same entity but just happen to have the same  
name, then you need to rename one of them.



I can understand why this would cause a problem, what I need to  
know is if there is a way around this without having to completely  
rename the entities in one of the models.


The other strange thing is that it tells me there is a name  
conflict between the EOPrototypes entity in each model, but I don't  
think there is any other way to name this entity, correct?



You probably guessed this already, but framework.  The prototypes  
go into a model by themselves and this framework is included in  
(referenced in) the frameworks that have models and in the  
application.


Thus
Application
- Prototypes framework
- Common entities framework
- Other EO framework 1
- Other EO framework 2

Chuck

--

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

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









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

This email sent to [EMAIL PROTECTED]


D2WS: Can't obtain rules because of protected access!

2008-04-02 Thread Juergen Lorenz Simon

Hi,

I posted this message to the WOLips list at first. But since this  
seems to be more

of a WebObjects isue, I'll cross post it here.

I'm trying to develop a D2WS application on Eclipse with WOLips.  
Starting the
web service assistant and connecting to the application fails. The  
error message

looks like this:

java.lang.IllegalStateException: Can't obtain rules because of  
protected access!
[2008-3-31 14:39:16 CEST] WorkerThread0  
java.lang.IllegalStateException: Can't obtain rules because of  
protected access!
	at  
com 
.webobjects 
.webservices 
.generation._WSDirectAction.loadD2WModelAction(_WSDirectAction.java:224)

at com.kontrast.cms.index.app.Session.awake(Session.java:15)
	at com.webobjects.appserver.WOSession._awakeInContext(WOSession.java: 
834)
	at  
com 
.webobjects 
.appserver 
.WOApplication._initializeSessionInContext(WOApplication.java:2111)
	at  
com 
.webobjects 
.appserver 
._private 
.WOComponentRequestHandler 
._dispatchWithPreparedApplication(WOComponentRequestHandler.java:319)
	at  
com 
.webobjects 
.appserver 
._private 
.WOComponentRequestHandler 
._handleRequest(WOComponentRequestHandler.java:369)
	at  
com 
.webobjects 
.appserver 
._private 
.WOComponentRequestHandler 
.handleRequest(WOComponentRequestHandler.java:442)
	at  
com 
.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java: 
1678)
	at  
com 
.webobjects 
.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
	at  
com 
.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java: 
226)

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

I checked the project out on an older machine, where it worked under  
XCode and
Eclipse/WOLips (after I added the server.wsdd and client.wsdd to the  
resources).


So i have to assume it's a problem with 5.4.


Any ideas?

J.L.Simon

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

This email sent to [EMAIL PROTECTED]

Re: Locking Session.defaultEditingContext() Question

2008-04-02 Thread Juergen Lorenz Simon

Hi,

I'm not entirely sure the problem is related to locking the editing  
context.

This exception can be produced by objects, which are disconnected from
their editing context but keep hovering about.

Could it be your application holds onto an object, which has been  
deleted

(in the EO sense), but some component maintains a reference? Or created
one without inserting it into an editing context in the first place?

J.L.Simon

On 01.04.2008, at 20:13, Tonny Staunsbrink wrote:

If I should take a guess, I would say it's a concurrency issue. Are  
you running a multithreaded app, do you have custom RequestHandler  
or are you running any background jobs?


/T

On Tue, Apr 1, 2008 at 5:17 PM, Dov Rosenberg  
[EMAIL PROTECTED] wrote:

I have been tracking down a strange error in our app.

java.lang.IllegalStateException: There is no database snapshot  
available for the object


In a lot of places we use a new EditingContext instead of the  
default Editing Context for the session. When we use a new editing  
context we have been very careful to lock and unlock before and  
after use. In some places we use the session default EditingContext  
(we are probably going to stop doing that in the future). A couple  
of questions come to mind:


I have read that it is not necessary to lock the session default  
EditingContext because EOF will automanage it. What happens if it  
does get manually locked? The error above was thrown when trying to  
do an ec.lock() on a Session.defaultEditingContext().
What physically happens when an EC is locked? It seems it is some  
sort of reference counter. In an earlier post Chuck mentioned that  
locking the EODatabaseContext will prevent fetches/saves from  
occurring, what happens when an EC is locked?
Is there any compelling reason to use the session default editing  
context? We aren't using Project Wonder (yet)


Thanks in advance for any help

Dov Rosenberg

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

This email sent to [EMAIL PROTECTED]

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

This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]

Re: WO 5.4 Linux Deployment

2008-04-02 Thread Andrew Lindesay

Hello Aleksey;

It would be really great if you could write-up your experiences an  
tips in the WO wiki for others to read about.


http://wiki.objectstyle.org/confluence/display/WO/Home

4. For the static resources to be served correctly via port 80 of  
the Apache web server (as opposed to Tomcat's port 8080), I had to  
install the Tomcat-Apache plugin, mod_jk.


Actually Apache 2.2 has AJP support built-in as well as a neat little  
balancer web app to monitor the deploy.  I have some unrelated, but  
possibly helpful notes on the Apache 2.2 setup for this in this  
document;



http://homepage.mac.com/andrewlindesay/le/manuals/lewostuff/LEWOStuffOverview.pdf

See 9.5 and 9.6.  I find the Apache 2.2 balancer setup much more  
elegant than mod_jk.


5. In the Tomcat log file (catalina.out), I keep getting an  
exception (below) related to JDBC but everything runs fine  
regardless (I'm using MySQL). Tomcat seems to have it's own data  
source mechanism


I think I read something about that in an old mailing list post.  I  
think you need to give the data source the same name as the model or  
something -- perhaps somebody can clarify?


cheers.

___
Andrew Lindesay
www.lindesay.co.nz

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

This email sent to [EMAIL PROTECTED]


Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread David Avendasora
The fact that Chuck didn't come up with this makes me doubt my memory,  
but...


It seems that when I've run into this in my applications, it usually  
means that between the time the EO was read out of the database, and  
the time it is written back in, something in one of the locking fields  
changed, or the field isn't locking-friendly in that WO has a  
difficult time reading the datatype of the DB field and converting it  
into the requested Java datatype and then converting it back and  
coming up with the original value. I know with MS SQL Server that long  
text fields are a problem.


I _believe_ (please correct me if I'm wrong) when EOF does an update,  
it does it along the lines of UPDATE TABLE WHERE ATTRIBUTE_1 = x,  
ATTRIBUTE2 = y, etc where the attribute values are from the original  
reading of the record.


The problem is that the UPDATE can't find any records matching the  
original attributes, and therefore didn't select any rows for  
updating.


Dave

On Apr 1, 2008, at 6:06 PM, Johan Henselmans wrote:


Error:
com.webobjects.eoaccess.EOGeneralAdaptorException:  
lockRowComparingAttributes --  
com.webobjects.jdbcadaptor.JDBCChannel: lock operation failed to  
select any rows


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

This email sent to [EMAIL PROTECTED]


Re: [OT] Postgresql capital accentuated characters problem

2008-04-02 Thread Ralf Schuchardt

Hi Miguel,

I think you must initialize your database cluster with the correct  
locale, to get this working (see http://www.postgresql.org/docs/8.3/ 
interactive/locale.html).


Ralf Schuchardt


Am 02.04.2008 um 03:34 schrieb Miguel Arroz:
  I created an UNIQUE INDEX using the lower() function to create a  
case-insensitive UNIQUE constraint. I tested this and I noticed  
it's failing on accentuated characters. The problem is this:


select lower('JoÃo');
 lower
---
 joÃo
(1 row)

  lower() is not lowering the accentuated characters.

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

This email sent to [EMAIL PROTECTED]


Re: WO 5.4 Linux Deployment

2008-04-02 Thread David Avendasora

Hey Aleksey,

You are right Tomcat has it's own DB connection stuff, which can be a  
pain in the a** at times. I ran into this and it actually was a show- 
stopper when I had two (or more) EOModels.


See: the Data Source for Model Database Configuration section of http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Deployment-Tomcat+Deployment#WebApplications-Deployment-TomcatDeployment-DataSourceforModelDatabaseConfiguration 
.


This wiki page is somewhat out-of-date due to the improved project  
setup options in WOLips, but the core information in it still holds  
true, so read through it to see if you can find any other changes you  
may need to make to your build files. Specifically, it will help you  
get all the frameworks imbedded.


On Apr 2, 2008, at 5:05 AM, Andrew Lindesay wrote:

5. In the Tomcat log file (catalina.out), I keep getting an  
exception (below) related to JDBC but everything runs fine  
regardless (I'm using MySQL). Tomcat seems to have it's own data  
source mechanism


I think I read something about that in an old mailing list post.  I  
think you need to give the data source the same name as the model or  
something -- perhaps somebody can clarify?


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

This email sent to [EMAIL PROTECTED]


Re: WO 5.4 Linux Deployment

2008-04-02 Thread Oliver Scheel

 See: the Data Source for Model Database Configuration section of
 http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Deployment-
 Tomcat+Deployment#WebApplications-Deployment-TomcatDeployment-DataSourceforMod
 elDatabaseConfiguration

btw: I have deployed a Wonder App as a Servlet and tried to specified the db
connection via context.xml. It still uses the information from the eo model.
I have played around with resource-refs in web.xml but no luck. Does anyone
here have a working configuration?

Oliver


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

This email sent to [EMAIL PROTECTED]


Re: [OT] Postgresql capital accentuated characters problem

2008-04-02 Thread Miguel Arroz

Hi!

  I see... I specially like this quote:

  The drawback of using locales other than C or POSIX in PostgreSQL  
is its performance impact. It slows character handling and prevents  
ordinary indexes from being used by LIKE. For this reason use locales  
only if you actually need them.


  In this situation, I really prefer to drop the accentuation (it's  
an username).


  rant mode

  How can we be in 2008 and accentuated characters are still a  
problem!? Must become farmer, must become farmer...


  /rant mode

  Yours

Miguel Arroz

On 2008/04/02, at 12:33, Ralf Schuchardt wrote:


Hi Miguel,

I think you must initialize your database cluster with the correct  
locale, to get this working (see http://www.postgresql.org/docs/8.3/interactive/locale.html) 
.


Ralf Schuchardt


Am 02.04.2008 um 03:34 schrieb Miguel Arroz:
 I created an UNIQUE INDEX using the lower() function to create a  
case-insensitive UNIQUE constraint. I tested this and I noticed  
it's failing on accentuated characters. The problem is this:


select lower('JoÃo');
lower
---
joÃo
(1 row)

 lower() is not lowering the accentuated characters.

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

This email sent to [EMAIL PROTECTED]


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





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

This email sent to [EMAIL PROTECTED]

Re: WO 5.4 Linux Deployment

2008-04-02 Thread Aleksey Novicov
Yes, I will post what I've learned on the WO wiki as soon as I think I  
have everything worked out.


Aleksey

On Apr 2, 2008, at 2:05 AM, Andrew Lindesay wrote:


Hello Aleksey;

It would be really great if you could write-up your experiences an  
tips in the WO wiki for others to read about.


http://wiki.objectstyle.org/confluence/display/WO/Home

4. For the static resources to be served correctly via port 80 of  
the Apache web server (as opposed to Tomcat's port 8080), I had to  
install the Tomcat-Apache plugin, mod_jk.


Actually Apache 2.2 has AJP support built-in as well as a neat  
little balancer web app to monitor the deploy.  I have some  
unrelated, but possibly helpful notes on the Apache 2.2 setup for  
this in this document;



http://homepage.mac.com/andrewlindesay/le/manuals/lewostuff/LEWOStuffOverview.pdf

See 9.5 and 9.6.  I find the Apache 2.2 balancer setup much more  
elegant than mod_jk.


5. In the Tomcat log file (catalina.out), I keep getting an  
exception (below) related to JDBC but everything runs fine  
regardless (I'm using MySQL). Tomcat seems to have it's own data  
source mechanism


I think I read something about that in an old mailing list post.  I  
think you need to give the data source the same name as the model or  
something -- perhaps somebody can clarify?


cheers.

___
Andrew Lindesay
www.lindesay.co.nz



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

This email sent to [EMAIL PROTECTED]


Re: Locking Session.defaultEditingContext() Question

2008-04-02 Thread Chuck Hill


On Apr 1, 2008, at 8:17 AM, Dov Rosenberg wrote:

I have been tracking down a strange error in our app.

java.lang.IllegalStateException: There is no database snapshot  
available for the object


In a lot of places we use a new EditingContext instead of the  
default Editing Context for the session. When we use a new editing  
context we have been very careful to lock and unlock before and  
after use.


How?  What do you use?  Where / how do you do this?


In some places we use the session default EditingContext (we are  
probably going to stop doing that in the future). A couple of  
questions come to mind:


	• I have read that it is not necessary to lock the session default  
EditingContext because EOF will automanage it. What happens if it  
does get manually locked? The error above was thrown when trying to  
do an ec.lock() on a Session.defaultEditingContext().


I'd really go a long way to avoid locking and unlocking the default  
EC.  This can lead to serious problems, especially around session  
termination.




	• What physically happens when an EC is locked? It seems it is some  
sort of reference counter. In an earlier post Chuck mentioned that  
locking the EODatabaseContext will prevent fetches/saves from  
occurring, what happens when an EC is locked?


Mostly it prevents other threads from updating its state (e.g. when an  
EC in those threads saves changes to objects in this EC).  The changes  
are queued for later processing.



	• Is there any compelling reason to use the session default editing  
context? We aren’t using Project Wonder (yet)



I use them  for things whose lifetime matches the session: logged in  
user, their permissions, etc.


Chuck

--

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

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





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

This email sent to [EMAIL PROTECTED]


Re: Why no 1to1 relationships?

2008-04-02 Thread Jacky Gagnon

Hi Jeff,

I've decided to fully EOize my app to replace my current use of  
flat files, mainly to better deal with concurrency issues.  In  
creating my analogous tables, I found that there's no way to  
specify a 1 to 1 relationship between tables using the Entity  
Modeler tool.  Is there a specific reason for this?  Or is it just  
figured that you might as well make it one to many anyway even if  
it is just one to one?




You can specify «1 to 1» relationship with Entity Modeler.

If the destination cannot be null, use the same id in the two tables.
-In Properties  Basic select : the cardinality «To One», your  
destination, and add your primary keys.
-In Properties  Advanced select : for the source object, check  
Propagates primary key and Owns Destination (if the destination  
object cannot exist without an owner).


Good luck!

Jacky

If you're wondering why I want to do this, it's to hopefully reduce  
conflicts of multiple people updating the same record in a table.   
Is that generally a good reason to split 1 to 1 data into two tables?


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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread Chuck Hill


On Apr 2, 2008, at 10:38 AM, David Avendasora wrote:


Couldn't this be the same problem though?


No.  :-)


If the SELECT ... FOR LOCK can't find any rows that have fields with  
values that match exactly with what the DB has, then it wouldn't get  
any rows either. No?


Yes, but...  SELECT ... FOR LOCK is _pessimistic_ locking and EOF  
should be using optimistic locking.  If EOF is issuing pessimistic  
locking SQL, then something has gone wrong.



Maybe log the SQL and then compare what WO is looking for with what  
is actually in the DB?


That is not the issue. The important symptom is that EOF is doing a  
SELECT ... FOR LOCK.


Didn't you see this when you were using cough Vertical Inheritance?


Chuck



On Apr 2, 2008, at 1:19 PM, Chuck Hill wrote:

Close, but no rabbit stamp.  What you are talking about produces an  
optimistic locking expection and update operation failed to update  
any rows from the channel.  What Johan is hitting is an SQL  
statement like SELECT ... FOR LOCK.  That is pessimistic locking.





--

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

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





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

This email sent to [EMAIL PROTECTED]


Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread David Avendasora


Yes, but...  SELECT ... FOR LOCK is _pessimistic_ locking and EOF  
should be using optimistic locking.  If EOF is issuing pessimistic  
locking SQL, then something has gone wrong.


Ah. I see. Who cares why it isn't returning rows. It shouldn't be  
doing this in the first place.




Maybe log the SQL and then compare what WO is looking for with what  
is actually in the DB?


That is not the issue. The important symptom is that EOF is doing a  
SELECT ... FOR LOCK.


Didn't you see this when you were using cough Vertical Inheritance?


*whistling, while looking around the room* I have no idea what you're  
talking about. Vertical who?

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

This email sent to [EMAIL PROTECTED]


Re: Why no 1to1 relationships?

2008-04-02 Thread Robert Walker
Yes, it is possible to create one-to-one relationships, joined on the  
primary keys. One side of the relationship will need Propagates  
primary key, as has been mentioned.


I just wanted to add one caveat to this configuration: The  
relationship will always be 1-to-1 and will never be 1-to-0. In other  
words if you created an instance of the entity on the side  
propagating the key, you will get an instance of the other side of  
the relationship. This will happen even if no fields are set on the  
other side. This means that if any attributes (other than the PK) on  
the other side of the relationship are set to required, neither  
object will save.


Also if you attempt to create a new instance on other other side (not  
propagating the key) you will also have problems saving.


As far as I recall this is the experience that I've had when  
attempting to do this. Because of these complications I now opt for  
the more flexible one-to-one style by setting it up in the model as a  
one-to-many relationship. Then force the many-side to allow only one  
or zero related rows though validation logic.


This also makes me think of the Ruby on Rails associations mechanism  
for creating one-to-one relationships:


One-to-one

Master:
has_one :detail

Detail:
belongs_to :master

as opposed to the one to many setup...

One-to-many

Master:
has_many :details

Detail:
belongs_to :master

It seems to me that adding something along this line to EOF would be  
very useful, and not particularly difficult. I don't mean in the  
syntax above, but rather having a built-in way to constrain the  
many-side to allow only one. Come to think of it: Core Data supports  
this in its relationship configuration. It even goes a step further  
by allowing you to specified the number of related objects allowed.


On Apr 2, 2008, at 1:48 PM, Jacky Gagnon wrote:


Hi Jeff,

I've decided to fully EOize my app to replace my current use of  
flat files, mainly to better deal with concurrency issues.  In  
creating my analogous tables, I found that there's no way to  
specify a 1 to 1 relationship between tables using the Entity  
Modeler tool.  Is there a specific reason for this?  Or is it just  
figured that you might as well make it one to many anyway even if  
it is just one to one?




You can specify «1 to 1» relationship with Entity Modeler.

If the destination cannot be null, use the same id in the two tables.
-In Properties  Basic select : the cardinality «To One», your  
destination, and add your primary keys.
-In Properties  Advanced select : for the source object, check  
Propagates primary key and Owns Destination (if the destination  
object cannot exist without an owner).


Good luck!

Jacky

If you're wondering why I want to do this, it's to hopefully  
reduce conflicts of multiple people updating the same record in a  
table.  Is that generally a good reason to split 1 to 1 data into  
two tables?


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


This email sent to [EMAIL PROTECTED]


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


This email sent to [EMAIL PROTECTED]


Robert Walker
[EMAIL PROTECTED]




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

This email sent to [EMAIL PROTECTED]

Re: Why no 1to1 relationships?

2008-04-02 Thread Art Isbell

On Apr 2, 2008, at 8:45 AM, Robert Walker wrote:

Yes, it is possible to create one-to-one relationships, joined on  
the primary keys. One side of the relationship will need Propagates  
primary key, as has been mentioned.


I just wanted to add one caveat to this configuration: The  
relationship will always be 1-to-1 and will never be 1-to-0. In  
other words if you created an instance of the entity on the side  
propagating the key, you will get an instance of the other side of  
the relationship. This will happen even if no fields are set on the  
other side. This means that if any attributes (other than the PK) on  
the other side of the relationship are set to required, neither  
object will save.


Also if you attempt to create a new instance on other other side  
(not propagating the key) you will also have problems saving.


As far as I recall this is the experience that I've had when  
attempting to do this. Because of these complications I now opt for  
the more flexible one-to-one style by setting it up in the model as  
a one-to-many relationship. Then force the many-side to allow only  
one or zero related rows though validation logic.


	Another way of stating this is that a one-to-one relationship must be  
mandatory (i.e., it cannot be optional).  This makes sense because the  
foreign key in a one-to-one relationship is the primary key which  
cannot be null and is guaranteed to be unique.  If a foreign key is  
not null, the destination object must exist.  If a foreign key is not  
the primary key, it is not guaranteed to be unique, so an attribute  
that is not the primary key cannot be the foreign key of a one-to-one  
relationship.


	I think that this agrees with relational database theory; i.e., all  
one-to-one relationships must be 1:1, not 1:0.  A 1:0 relationship is  
just a special case of a 1:many relationship.


Aloha,
Art

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

This email sent to [EMAIL PROTECTED]


Re: Locking Session.defaultEditingContext() Question

2008-04-02 Thread Dov Rosenberg
Anywhere we created a new EOEditingContext - we replaced it with the
LockScreamingEditingContext so we can track lock and unlocks properly. All
of our locks and unlocks are in TRY/FINALLY methods. Not a perfect solution
but it certainly helped clean up our stability issues.

I removed the lock we were doing on a session based default editing context
and it fixed the issue we were having. Definitely not a good idea to lock
the default editing context.


Dov Rosenberg

On 4/2/08 1:29 PM, Chuck Hill [EMAIL PROTECTED] wrote:

 
 On Apr 1, 2008, at 8:17 AM, Dov Rosenberg wrote:
 I have been tracking down a strange error in our app.
 
 java.lang.IllegalStateException: There is no database snapshot
 available for the object
 
 In a lot of places we use a new EditingContext instead of the
 default Editing Context for the session. When we use a new editing
 context we have been very careful to lock and unlock before and
 after use.
 
 How?  What do you use?  Where / how do you do this?
 
 
 In some places we use the session default EditingContext (we are
 probably going to stop doing that in the future). A couple of
 questions come to mind:
 
 € I have read that it is not necessary to lock the session default
 EditingContext because EOF will automanage it. What happens if it
 does get manually locked? The error above was thrown when trying to
 do an ec.lock() on a Session.defaultEditingContext().
 
 I'd really go a long way to avoid locking and unlocking the default
 EC.  This can lead to serious problems, especially around session
 termination.
 
 
 
 € What physically happens when an EC is locked? It seems it is some
 sort of reference counter. In an earlier post Chuck mentioned that
 locking the EODatabaseContext will prevent fetches/saves from
 occurring, what happens when an EC is locked?
 
 Mostly it prevents other threads from updating its state (e.g. when an
 EC in those threads saves changes to objects in this EC).  The changes
 are queued for later processing.
 
 
 € Is there any compelling reason to use the session default editing
 context? We aren¹t using Project Wonder (yet)
 
 
 I use them  for things whose lifetime matches the session: logged in
 user, their permissions, etc.
 
 Chuck

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

This email sent to [EMAIL PROTECTED]


Re: Locking Session.defaultEditingContext() Question

2008-04-02 Thread Chuck Hill


On Apr 2, 2008, at 12:04 PM, Dov Rosenberg wrote:


Anywhere we created a new EOEditingContext - we replaced it with the
LockScreamingEditingContext so we can track lock and unlocks  
properly. All
of our locks and unlocks are in TRY/FINALLY methods. Not a perfect  
solution

but it certainly helped clean up our stability issues.


What the LockScreamingEditingContext won't tell you is when  you are  
using the EC but it is NOT locked.  Unless you are doing the locking  
using ERXEC and friends or the MultiECLockManager (whatever its real  
name is), there is a very good chance that you are using unlocked  
editing contexts at some point.



I removed the lock we were doing on a session based default editing  
context
and it fixed the issue we were having. Definitely not a good idea to  
lock

the default editing context.


I agree.  :-)


Chuck



Dov Rosenberg

On 4/2/08 1:29 PM, Chuck Hill [EMAIL PROTECTED] wrote:



On Apr 1, 2008, at 8:17 AM, Dov Rosenberg wrote:

I have been tracking down a strange error in our app.

java.lang.IllegalStateException: There is no database snapshot
available for the object

In a lot of places we use a new EditingContext instead of the
default Editing Context for the session. When we use a new editing
context we have been very careful to lock and unlock before and
after use.


How?  What do you use?  Where / how do you do this?



In some places we use the session default EditingContext (we are
probably going to stop doing that in the future). A couple of
questions come to mind:

• I have read that it is not necessary to lock the session default
EditingContext because EOF will automanage it. What happens if it
does get manually locked? The error above was thrown when trying to
do an ec.lock() on a Session.defaultEditingContext().


I'd really go a long way to avoid locking and unlocking the default
EC.  This can lead to serious problems, especially around session
termination.




• What physically happens when an EC is locked? It seems it is some
sort of reference counter. In an earlier post Chuck mentioned that
locking the EODatabaseContext will prevent fetches/saves from
occurring, what happens when an EC is locked?


Mostly it prevents other threads from updating its state (e.g. when  
an
EC in those threads saves changes to objects in this EC).  The  
changes

are queued for later processing.



• Is there any compelling reason to use the session default editing
context? We aren’t using Project Wonder (yet)



I use them  for things whose lifetime matches the session: logged in
user, their permissions, etc.

Chuck





--

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

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





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

This email sent to [EMAIL PROTECTED]


Re: Why no 1to1 relationships?

2008-04-02 Thread Sacha Michel Mallais

On Apr 2, 2008, at 12:02 PM, Art Isbell wrote:

I think that this agrees with relational database theory; i.e., all  
one-to-one relationships must be 1:1, not 1:0.  A 1:0 relationship  
is just a special case of a 1:many relationship.



It is definitely possible to have an optional to-one, just not one  
where the FK is also the PK.



sacha


--
Sacha Michel Mallais Senior Developer / President
Global Village Consulting Inc.   http://www.global-village.net/
PGP Key ID: 7D757B65 AIM: smallais
ObAd: read Practical WebObjects fnord
http://www.global-village.net/products/practical_webobjects


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

This email sent to [EMAIL PROTECTED]


Adaptor problems in Eclipse. No Instance Available

2008-04-02 Thread Helmut Schottmüller

Hi Group,

since a few hours my WO httpd adaptor seems to be broken. I'm getting  
getting constant No Instance Available messages when I am trying to  
run my projects with webserver connect from Eclipse.
I already checked the adaptor log file (enabled it with Debug in  
the .conf file) but nothing strange in there. The httpd access log is  
the only log which shows something (bunches of  500 (Internal Server  
Error) responses).

I tried restarting apache and the computer for several times.
The strange thing is that I did not change anything besides adding one  
or two new components to my project. I thought it might be memory  
related but I increased the VM settings and even with some simple  
projects the webserver connect isn't running as supposed when I run  
the projects from within Eclipse.
With DirectConnect everything runs fine and even if I deploy my  
applications on the same Mac webserver connect is working.


I am working with Eclipse 3.3.1.1, Leopard 10.5.2 and WO 5.4 using the  
system httpd and adaptor.


Does anyone know if there is some other place where I might find some  
more information why I am getting this No Instance Available? Is  
there any more logging that might be activated besides the usual?
Maybe it's a timeout problem. Are there any settings which I could  
increase to prevent the No Instance Available problem?


I'll be happy for any hints which might help to solve my problem.

Thanks in advance,

Helmut

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

This email sent to [EMAIL PROTECTED]

Re: Why no 1to1 relationships?

2008-04-02 Thread netBrackets
Thanks for the great comments.  And 1:1, owned/mandatory data etc. is what I 
want. 

I perhaps have an unusual case in that for a small minority of days I 
experience bursts very heavy activity, with changes occurring on only a small 
subset of my data during this period and furthermore, changes to any one record 
can be guaranteed (through disabling a few features of the site temporarily) to 
be made by only a single session.  I have an idea that I'd like to segregate 
this changing data into its own table, and then on the heavy days, turning 
off all locking on the table (along with disabling the required site features 
to assure single session changes) to speed things up.  Which leads to my next 
question, might there be a way to easily disable lock checking on a single 
table, and then turn it back on without having to create a whole new build and 
or re-create my database schema?

 Thanks,
Jeff

On Wednesday, April 02, 2008, at 02:12PM, Art Isbell [EMAIL PROTECTED] 
wrote:
On Apr 2, 2008, at 8:45 AM, Robert Walker wrote:

 Yes, it is possible to create one-to-one relationships, joined on  
 the primary keys. One side of the relationship will need Propagates  
 primary key, as has been mentioned.

 I just wanted to add one caveat to this configuration: The  
 relationship will always be 1-to-1 and will never be 1-to-0. In  
 other words if you created an instance of the entity on the side  
 propagating the key, you will get an instance of the other side of  
 the relationship. This will happen even if no fields are set on the  
 other side. This means that if any attributes (other than the PK) on  
 the other side of the relationship are set to required, neither  
 object will save.

 Also if you attempt to create a new instance on other other side  
 (not propagating the key) you will also have problems saving.

 As far as I recall this is the experience that I've had when  
 attempting to do this. Because of these complications I now opt for  
 the more flexible one-to-one style by setting it up in the model as  
 a one-to-many relationship. Then force the many-side to allow only  
 one or zero related rows though validation logic.

   Another way of stating this is that a one-to-one relationship must be  
mandatory (i.e., it cannot be optional).  This makes sense because the  
foreign key in a one-to-one relationship is the primary key which  
cannot be null and is guaranteed to be unique.  If a foreign key is  
not null, the destination object must exist.  If a foreign key is not  
the primary key, it is not guaranteed to be unique, so an attribute  
that is not the primary key cannot be the foreign key of a one-to-one  
relationship.

   I think that this agrees with relational database theory; i.e., all  
one-to-one relationships must be 1:1, not 1:0.  A 1:0 relationship is  
just a special case of a 1:many relationship.

Aloha,
Art

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

This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: Locking Session.defaultEditingContext() Question

2008-04-02 Thread Art Isbell

On Apr 2, 2008, at 9:10 AM, Chuck Hill wrote:

What the LockScreamingEditingContext won't tell you is when  you are  
using the EC but it is NOT locked.  Unless you are doing the locking  
using ERXEC and friends or the MultiECLockManager (whatever its real  
name is), there is a very good chance that you are using unlocked  
editing contexts at some point.



	I've have been using MultiECLockManager without problems for several  
years.  It's at http://wocode.com/WOCode/Files/MultiECLockManager.java.


Aloha,
Art

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

This email sent to [EMAIL PROTECTED]


Re: Why no 1to1 relationships?

2008-04-02 Thread Art Isbell

On Apr 2, 2008, at 9:52 AM, Sacha Michel Mallais wrote:

It is definitely possible to have an optional to-one, just not one  
where the FK is also the PK.



	But if the FK isn't the PK, then the FK isn't guaranteed to be  
unique.  But it must be unique because it joins with the PK of another  
object which, by definition, is unique.  I suppose that you could add  
a unique constraint to the FK, but that's cheating :-) (at least, to  
relational DB purists)


	So an optional to-one relationship is really a to-many relationship  
constrained to contain no more than 1 object (i.e., 0 or 1 object).   
From the EOModeler User Guide:


Cardinality
Every relationship has a cardinality. The cardinality defines how many  
destination records can potentially resolve the relationship. In  
relational database systems, there are generally two cardinalities:


	• to-one relationship — for each source record, there is exactly one  
corresponding destination record
	• to-many relationship — for each source record, there may be zero,  
one, or more corresponding destination records


Aloha,
Art

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

This email sent to [EMAIL PROTECTED]


Re: Adaptor problems in Eclipse. No Instance Available

2008-04-02 Thread Art Isbell

On Apr 2, 2008, at 9:56 AM, Helmut Schottmüller wrote:

since a few hours my WO httpd adaptor seems to be broken. I'm  
getting getting constant No Instance Available messages when I am  
trying to run my projects with webserver connect from Eclipse.


	If a No instance available response occurs after 30 seconds, the  
default timeout to receive a response from an instance, then the  
instance is taking more than 30 seconds to process the request.  This  
is usually due to database activity.  Frequently, lots of faults are  
firing resulting in many one-object fetches (batch fetch).  Or maybe  
there are fetches on huge DB tables without good indexes (add  
indexes).  Or maybe fetches involve huge many-table joins.


	If you can't fix the performance problem, then you can increase the  
HTTP adaptor's receive timeout.  I don't know how to do this in Web  
server connect mode during development.  I have worked around my  
ignorance by configuring an instance of this app using JavaMonitor,  
increasing the receive timeout for this app in JavaMonitor, and then  
launching from Eclipse with the -WOPort port launch argument in  
which port is the port of the instance that JavaMonitor assigned.   
This will allow the HTTP adaptor to get the receive timeout setting  
for the process listening on this port from the SiteConfig.xml file.


	If a No instance available response occurs almost immediately, then  
something else is wrong.  I don't know what that something else  
might be.


Aloha,
Art

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

This email sent to [EMAIL PROTECTED]


Re: Adaptor problems in Eclipse. No Instance Available

2008-04-02 Thread Chuck Hill
Have their been any network changes?  Have you made the WOHost changes  
here: http://wiki.objectstyle.org/confluence/display/WO/Development+Tools-Running+Through+Apache





On Apr 2, 2008, at 12:56 PM, Helmut Schottmüller wrote:


Hi Group,

since a few hours my WO httpd adaptor seems to be broken. I'm  
getting getting constant No Instance Available messages when I am  
trying to run my projects with webserver connect from Eclipse.
I already checked the adaptor log file (enabled it with Debug in  
the .conf file) but nothing strange in there. The httpd access log  
is the only log which shows something (bunches of  500 (Internal  
Server Error) responses).

I tried restarting apache and the computer for several times.
The strange thing is that I did not change anything besides adding  
one or two new components to my project. I thought it might be  
memory related but I increased the VM settings and even with some  
simple projects the webserver connect isn't running as supposed when  
I run the projects from within Eclipse.
With DirectConnect everything runs fine and even if I deploy my  
applications on the same Mac webserver connect is working.


I am working with Eclipse 3.3.1.1, Leopard 10.5.2 and WO 5.4 using  
the system httpd and adaptor.


Does anyone know if there is some other place where I might find  
some more information why I am getting this No Instance Available?  
Is there any more logging that might be activated besides the usual?
Maybe it's a timeout problem. Are there any settings which I could  
increase to prevent the No Instance Available problem?


I'll be happy for any hints which might help to solve my problem.

Thanks in advance,

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

This email sent to [EMAIL PROTECTED]


--

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

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





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

This email sent to [EMAIL PROTECTED]


Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread Art Isbell


On Apr 2, 2008, at 7:38 AM, David Avendasora wrote:

Couldn't this be the same problem though? If the SELECT ... FOR LOCK  
can't find any rows that have fields with values that match exactly  
with what the DB has, then it wouldn't get any rows either. No?



	Maybe, but I think Chuck's point is that SELECT ... FOR LOCK  
shouldn't be generated unless the fetch specification was configured  
to lock objects (i.e., fetchSpec.locksObjects() returns true).  This  
is not recommended.


Aloha,
Art

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

This email sent to [EMAIL PROTECTED]


Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread Chuck Hill


On Apr 2, 2008, at 2:18 PM, Art Isbell wrote:



On Apr 2, 2008, at 7:38 AM, David Avendasora wrote:

Couldn't this be the same problem though? If the SELECT ... FOR  
LOCK can't find any rows that have fields with values that match  
exactly with what the DB has, then it wouldn't get any rows either.  
No?



	Maybe, but I think Chuck's point is that SELECT ... FOR LOCK  
shouldn't be generated unless the fetch specification was configured  
to lock objects (i.e., fetchSpec.locksObjects() returns true).  This  
is not recommended.



Yes.  And there is at least one place in EOF where an unexpected  
exception or null or something, causes it to assume that it is a lock  
operation.  I _think_ it has something to do with adaptor operations.   
I just can't quite recall what it was.


Chuck

--

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

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





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

This email sent to [EMAIL PROTECTED]


Re: WO 5.4 Linux Deployment

2008-04-02 Thread Jeff Smith
FWIW, I'm getting the java name not found in context as well and I  
haven't figure out a way around getting the messages either including  
specifying my data source in the web.xml.  Doesn't seem to hurt  
anything but it does clog up the log file.


On Apr 2, 2008, at 10:34 AM, Aleksey Novicov wrote:

Yes, I will post what I've learned on the WO wiki as soon as I think  
I have everything worked out.


Aleksey

On Apr 2, 2008, at 2:05 AM, Andrew Lindesay wrote:


Hello Aleksey;

It would be really great if you could write-up your experiences an  
tips in the WO wiki for others to read about.


http://wiki.objectstyle.org/confluence/display/WO/Home

4. For the static resources to be served correctly via port 80 of  
the Apache web server (as opposed to Tomcat's port 8080), I had to  
install the Tomcat-Apache plugin, mod_jk.


Actually Apache 2.2 has AJP support built-in as well as a neat  
little balancer web app to monitor the deploy.  I have some  
unrelated, but possibly helpful notes on the Apache 2.2 setup for  
this in this document;



http://homepage.mac.com/andrewlindesay/le/manuals/lewostuff/LEWOStuffOverview.pdf

See 9.5 and 9.6.  I find the Apache 2.2 balancer setup much more  
elegant than mod_jk.


5. In the Tomcat log file (catalina.out), I keep getting an  
exception (below) related to JDBC but everything runs fine  
regardless (I'm using MySQL). Tomcat seems to have it's own data  
source mechanism


I think I read something about that in an old mailing list post.  I  
think you need to give the data source the same name as the model  
or something -- perhaps somebody can clarify?


cheers.

___
Andrew Lindesay
www.lindesay.co.nz



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

This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: WO 5.4 Linux Deployment

2008-04-02 Thread Mike Schrag
This does not cause any problems ... It's an obnoxious error that  
isn't really an error.  It's been a couple months since I tracked down  
what exactly was going on, but I _believe_ it's trying to lookup the  
jdbc datasource in your tomcat server config, and if it's not there,  
it displays this warning.  You can safely ignore it.


ms

On Apr 2, 2008, at 5:14 PM, Jeff Smith wrote:

FWIW, I'm getting the java name not found in context as well and I  
haven't figure out a way around getting the messages either  
including specifying my data source in the web.xml.  Doesn't seem to  
hurt anything but it does clog up the log file.


On Apr 2, 2008, at 10:34 AM, Aleksey Novicov wrote:

Yes, I will post what I've learned on the WO wiki as soon as I  
think I have everything worked out.


Aleksey

On Apr 2, 2008, at 2:05 AM, Andrew Lindesay wrote:


Hello Aleksey;

It would be really great if you could write-up your experiences an  
tips in the WO wiki for others to read about.


http://wiki.objectstyle.org/confluence/display/WO/Home

4. For the static resources to be served correctly via port 80 of  
the Apache web server (as opposed to Tomcat's port 8080), I had  
to install the Tomcat-Apache plugin, mod_jk.


Actually Apache 2.2 has AJP support built-in as well as a neat  
little balancer web app to monitor the deploy.  I have some  
unrelated, but possibly helpful notes on the Apache 2.2 setup for  
this in this document;



http://homepage.mac.com/andrewlindesay/le/manuals/lewostuff/LEWOStuffOverview.pdf

See 9.5 and 9.6.  I find the Apache 2.2 balancer setup much more  
elegant than mod_jk.


5. In the Tomcat log file (catalina.out), I keep getting an  
exception (below) related to JDBC but everything runs fine  
regardless (I'm using MySQL). Tomcat seems to have it's own data  
source mechanism


I think I read something about that in an old mailing list post.   
I think you need to give the data source the same name as the  
model or something -- perhaps somebody can clarify?


cheers.

___
Andrew Lindesay
www.lindesay.co.nz



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

This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]



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

This email sent to [EMAIL PROTECTED]


Re: Why no 1to1 relationships?

2008-04-02 Thread Chuck Hill


On Apr 2, 2008, at 1:09 PM, netBrackets wrote:

Thanks for the great comments.  And 1:1, owned/mandatory data etc.  
is what I want.


I perhaps have an unusual case in that for a small minority of days  
I experience bursts very heavy activity, with changes occurring on  
only a small subset of my data during this period


And exactly what problem does this result in?


and furthermore, changes to any one record can be guaranteed  
(through disabling a few features of the site temporarily) to be  
made by only a single session.  I have an idea that I'd like to  
segregate this changing data into its own table, and then on the  
heavy days, turning off all locking on the table (along with  
disabling the required site features to assure single session  
changes) to speed things up.  Which leads to my next question, might  
there be a way to easily disable lock checking on a single table,  
and then turn it back on without having to create a whole new build  
and or re-create my database schema?


I think  it would be fair to characterize that method of handling this  
situation as insane, crazy, wacked out, and totally nuts.   
Unless your goal is data inconsistency.   Maybe we should look at the  
real problem?



Chuck


On Wednesday, April 02, 2008, at 02:12PM, Art Isbell [EMAIL PROTECTED] 
 wrote:

On Apr 2, 2008, at 8:45 AM, Robert Walker wrote:


Yes, it is possible to create one-to-one relationships, joined on
the primary keys. One side of the relationship will need Propagates
primary key, as has been mentioned.

I just wanted to add one caveat to this configuration: The
relationship will always be 1-to-1 and will never be 1-to-0. In
other words if you created an instance of the entity on the side
propagating the key, you will get an instance of the other side of
the relationship. This will happen even if no fields are set on the
other side. This means that if any attributes (other than the PK) on
the other side of the relationship are set to required, neither
object will save.

Also if you attempt to create a new instance on other other side
(not propagating the key) you will also have problems saving.

As far as I recall this is the experience that I've had when
attempting to do this. Because of these complications I now opt for
the more flexible one-to-one style by setting it up in the model as
a one-to-many relationship. Then force the many-side to allow only
one or zero related rows though validation logic.


	Another way of stating this is that a one-to-one relationship must  
be
mandatory (i.e., it cannot be optional).  This makes sense because  
the

foreign key in a one-to-one relationship is the primary key which
cannot be null and is guaranteed to be unique.  If a foreign key is
not null, the destination object must exist.  If a foreign key is not
the primary key, it is not guaranteed to be unique, so an attribute
that is not the primary key cannot be the foreign key of a one-to-one
relationship.

I think that this agrees with relational database theory; i.e., all
one-to-one relationships must be 1:1, not 1:0.  A 1:0 relationship is
just a special case of a 1:many relationship.

Aloha,
Art

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

This email sent to [EMAIL PROTECTED]



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

This email sent to [EMAIL PROTECTED]



--

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

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





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

This email sent to [EMAIL PROTECTED]


Re: WO 5.4 Linux Deployment

2008-04-02 Thread Lachlan Deck

Hi there,

On 02/04/2008, at 5:37 PM, Aleksey Novicov wrote:
I tried this and found that the latest Eclipse/WOLips tools are very  
complete in packaging up woapps for servlet deployment. However,  
there were a couple of caveats worth mentioning:


1. Starting with a WOnder Application template there is no need (and  
no option!) to create a project with servlet support. All that is  
needed after the project is created is to check Servlet Deployment  
and check Autogenerate web.xml in WOLips Build within the project  
properties. This will create the proper WAR file as a fully self- 
contained servlet single directory deployment (SSDD) with all of the  
necessary WO frameworks. It's very slick.


2. Project dependencies (such as other frameworks) however will not  
be included in the SSDD. They must be included as framework  
dependencies as well. See http://wiki.objectstyle.org/confluence/display/WOL/Add+a+Framework+Dependency 
.


3. The generated web.xml file in WEB-INF has a parameter named  
WOAppMode which is set to Development. I found that with this  
setting, Tomcat and the WebObjects Resource Manager would not serve  
up any static WebServerResources correctly. I kept getting links  
like /MyApp/WebObjects/MyApp.woa/_wr_/wodata=/Library/stuff. I  
don't know if I had a particular property value set incorrectly. But  
I did find that if I changed the WOAppMode value to Deployment,  
the problem went away since the static resources get served up  
directly by the web server. This of course requires a split install  
(Tomcat + Apache). Because I'm using Ajax, I had to remember to  
include Ajax.framework/WebServerResources in the split install since  
there are critical javascript files that are required.


...

You might like to adjust the project template for, adding the optional  
tickboxes for all of these, and provide them back to WOLips.


with regards,
--

Lachlan Deck



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

This email sent to [EMAIL PROTECTED]


Re: stateless component

2008-04-02 Thread Chuck Hill


On Apr 2, 2008, at 2:37 PM, Archibald Singleton wrote:


Hello,

From the WO API docs: For extra efficiency, you can create  
stateless components: components that can be shared between  
sessions. Stateless components aren't replicated each time they're  
needed; rather, a single shared instance is referenced each time the  
component is used.


But logging calls to my stateless component constructor (subclass of  
ERXStatelessComponent), I see that's it's being called for every  
request and that new instances are created for each request.


Maybe worth noting is the fact that the component is instantiated by  
a direct action (hence there are no sessions).


I basically replicated what David showed in his lastest screencast  
re: the first  hit to the app being a default action instead of a  
component action.


I would have thought that that shared instance business means it's  
created once and reused all along?


Could someone please be kind enough to enlighten me as to what's  
happening?



Are you creating this using pageWithName()?  These are stateless  
_components_ not _pages_.  That is all that comes immediately to  
mind.  If you use more than one in a thread, new ones will be created.


Chuck

--

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

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





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

This email sent to [EMAIL PROTECTED]


stateless component

2008-04-02 Thread Archibald Singleton

Hello,

From the WO API docs: For extra efficiency, you can create stateless  
components: components that can be shared between sessions. Stateless  
components aren't replicated each time they're needed; rather, a  
single shared instance is referenced each time the component is used.


But logging calls to my stateless component constructor (subclass of  
ERXStatelessComponent), I see that's it's being called for every  
request and that new instances are created for each request.


Maybe worth noting is the fact that the component is instantiated by a  
direct action (hence there are no sessions).


I basically replicated what David showed in his lastest screencast re:  
the first  hit to the app being a default action instead of a  
component action.


I would have thought that that shared instance business means it's  
created once and reused all along?


Could someone please be kind enough to enlighten me as to what's  
happening?


TIA

= tmk =


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

This email sent to [EMAIL PROTECTED]


Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread Lachlan Deck

On 03/04/2008, at 4:55 AM, Chuck Hill wrote:


On Apr 2, 2008, at 10:38 AM, David Avendasora wrote:

If the SELECT ... FOR LOCK can't find any rows that have fields  
with values that match exactly with what the DB has, then it  
wouldn't get any rows either. No?


Yes, but...  SELECT ... FOR LOCK is _pessimistic_ locking and EOF  
should be using optimistic locking.  If EOF is issuing pessimistic  
locking SQL, then something has gone wrong.


Maybe log the SQL and then compare what WO is looking for with what  
is actually in the DB?


That is not the issue. The important symptom is that EOF is doing a  
SELECT ... FOR LOCK.


Didn't you see this when you were using cough Vertical Inheritance?


Rings a bell for me...

(Pierre, see radar://5632577 for suggested fix)

with regards,
--

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

This email sent to [EMAIL PROTECTED]


Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread Chuck Hill


On Apr 2, 2008, at 2:57 PM, Lachlan Deck wrote:


On 03/04/2008, at 4:55 AM, Chuck Hill wrote:


On Apr 2, 2008, at 10:38 AM, David Avendasora wrote:

If the SELECT ... FOR LOCK can't find any rows that have fields  
with values that match exactly with what the DB has, then it  
wouldn't get any rows either. No?


Yes, but...  SELECT ... FOR LOCK is _pessimistic_ locking and EOF  
should be using optimistic locking.  If EOF is issuing pessimistic  
locking SQL, then something has gone wrong.


Maybe log the SQL and then compare what WO is looking for with  
what is actually in the DB?


That is not the issue. The important symptom is that EOF is doing a  
SELECT ... FOR LOCK.


Didn't you see this when you were using cough Vertical Inheritance?


Rings a bell for me...

(Pierre, see radar://5632577 for suggested fix)



Was it you that I was discussing this with?  Do you recall what was  
happening?  So many obscure bugs, so little time...


Chuck

--

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

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





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

This email sent to [EMAIL PROTECTED]


Re: Why no 1to1 relationships?

2008-04-02 Thread Jeff Schmitz


On Apr 2, 2008, at 4:19 PM, Chuck Hill wrote:



On Apr 2, 2008, at 1:09 PM, netBrackets wrote:

Thanks for the great comments.  And 1:1, owned/mandatory data etc.  
is what I want.


I perhaps have an unusual case in that for a small minority of days  
I experience bursts very heavy activity, with changes occurring on  
only a small subset of my data during this period


And exactly what problem does this result in?
Just the performance, and being able to keep up with the rate of  
transactions without having to buy more hardware.  I guess I'm worried  
about the speed of database transactions and all that checking being  
very slow, maybe more than I should?




and furthermore, changes to any one record can be guaranteed  
(through disabling a few features of the site temporarily) to be  
made by only a single session.  I have an idea that I'd like to  
segregate this changing data into its own table, and then on the  
heavy days, turning off all locking on the table (along with  
disabling the required site features to assure single session  
changes) to speed things up.  Which leads to my next question,  
might there be a way to easily disable lock checking on a single  
table, and then turn it back on without having to create a whole  
new build and or re-create my database schema?


I think  it would be fair to characterize that method of handling  
this situation as insane, crazy, wacked out, and totally  
nuts.  Unless your goal is data inconsistency.   Maybe we should  
look at the real problem?
Now don't hold back, tell us what you really think. :-)  There's no  
real problem other than improving throughput for a short period of  
time.  It's really how it's handled now, except using flat files and  
not a database to save the data (basically each session updates its  
own file), and it's not been a problem.  Any specifics as to what's  
totally nuts as long as the guarantee holds up?  Or is it the  
guarantee (no two existing sessions will ever update the same record)  
itself that you question?




Chuck


On Wednesday, April 02, 2008, at 02:12PM, Art Isbell [EMAIL PROTECTED] 
 wrote:

On Apr 2, 2008, at 8:45 AM, Robert Walker wrote:


Yes, it is possible to create one-to-one relationships, joined on
the primary keys. One side of the relationship will need  
Propagates

primary key, as has been mentioned.

I just wanted to add one caveat to this configuration: The
relationship will always be 1-to-1 and will never be 1-to-0. In
other words if you created an instance of the entity on the side
propagating the key, you will get an instance of the other side of
the relationship. This will happen even if no fields are set on the
other side. This means that if any attributes (other than the PK)  
on

the other side of the relationship are set to required, neither
object will save.

Also if you attempt to create a new instance on other other side
(not propagating the key) you will also have problems saving.

As far as I recall this is the experience that I've had when
attempting to do this. Because of these complications I now opt for
the more flexible one-to-one style by setting it up in the model as
a one-to-many relationship. Then force the many-side to allow only
one or zero related rows though validation logic.


	Another way of stating this is that a one-to-one relationship  
must be
mandatory (i.e., it cannot be optional).  This makes sense because  
the

foreign key in a one-to-one relationship is the primary key which
cannot be null and is guaranteed to be unique.  If a foreign key is
not null, the destination object must exist.  If a foreign key is  
not

the primary key, it is not guaranteed to be unique, so an attribute
that is not the primary key cannot be the foreign key of a one-to- 
one

relationship.

I think that this agrees with relational database theory; i.e., all
one-to-one relationships must be 1:1, not 1:0.  A 1:0 relationship  
is

just a special case of a 1:many relationship.

Aloha,
Art

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

This email sent to [EMAIL PROTECTED]



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

This email sent to [EMAIL PROTECTED]



--

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

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







___
Do not post admin requests to the list. They will 

Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread Lachlan Deck

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


On Apr 2, 2008, at 2:57 PM, Lachlan Deck wrote:


On 03/04/2008, at 4:55 AM, Chuck Hill wrote:


On Apr 2, 2008, at 10:38 AM, David Avendasora wrote:

If the SELECT ... FOR LOCK can't find any rows that have fields  
with values that match exactly with what the DB has, then it  
wouldn't get any rows either. No?


Yes, but...  SELECT ... FOR LOCK is _pessimistic_ locking and EOF  
should be using optimistic locking.  If EOF is issuing pessimistic  
locking SQL, then something has gone wrong.


Maybe log the SQL and then compare what WO is looking for with  
what is actually in the DB?


That is not the issue. The important symptom is that EOF is doing  
a SELECT ... FOR LOCK.


Didn't you see this when you were using cough Vertical  
Inheritance?


Rings a bell for me...

(Pierre, see radar://5632577 for suggested fix)


Was it you that I was discussing this with?


We did discuss this at one point a while ago.

Do you recall what was happening?  So many obscure bugs, so little  
time...


Yes, see thread Snapshot weirdness Dec 07
http://sourceforge.net/mailarchive/message.php?msg_id=866FD117-33B9-488F-BD23-77FBA7636F88%40gmail.com

Essentially... that thread will give you the background of the  
problem... but the real solution I posted to yourself/Mike offlist due  
to certain code mods.


with regards,
--

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

This email sent to [EMAIL PROTECTED]


Re: an interesting lockRowComparingAttributes:

2008-04-02 Thread Chuck Hill


On Apr 2, 2008, at 3:27 PM, Lachlan Deck wrote:


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


On Apr 2, 2008, at 2:57 PM, Lachlan Deck wrote:


On 03/04/2008, at 4:55 AM, Chuck Hill wrote:


On Apr 2, 2008, at 10:38 AM, David Avendasora wrote:

If the SELECT ... FOR LOCK can't find any rows that have fields  
with values that match exactly with what the DB has, then it  
wouldn't get any rows either. No?


Yes, but...  SELECT ... FOR LOCK is _pessimistic_ locking and EOF  
should be using optimistic locking.  If EOF is issuing  
pessimistic locking SQL, then something has gone wrong.


Maybe log the SQL and then compare what WO is looking for with  
what is actually in the DB?


That is not the issue. The important symptom is that EOF is doing  
a SELECT ... FOR LOCK.


Didn't you see this when you were using cough Vertical  
Inheritance?


Rings a bell for me...

(Pierre, see radar://5632577 for suggested fix)


Was it you that I was discussing this with?


We did discuss this at one point a while ago.

Do you recall what was happening?  So many obscure bugs, so little  
time...


Yes, see thread Snapshot weirdness Dec 07
http://sourceforge.net/mailarchive/message.php?msg_id=866FD117-33B9-488F-BD23-77FBA7636F88%40gmail.com

Essentially... that thread will give you the background of the  
problem... but the real solution I posted to yourself/Mike offlist  
due to certain code mods.


Yes, that is what I was remembering.  It wasn't David this time.  This  
time...


But unless Johann is using VI, that does not shed much light on his  
problem.


Thanks!

Chuck


--

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

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





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

This email sent to [EMAIL PROTECTED]


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

2008-04-02 Thread Chuck Hill
WWDC sessions are out and there are no WO sessions!It is the end!   
WebObjects is dead! Dead, dead I say!

http://developer.apple.com/wwdc/sessions/

Was I first this year?  Was I?  Someone was going to start the panic.   
It was my turn.



For anyone new to WO: the WO sessions get announced later.  WebObjects  
is definitely not dead.  Be patient.  But if you want even more real  
cool WO stuff, you want to come to WOWODC:


http://www.wocommunity.org/wowodc08/

See you there!

Chuck

--

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

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





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

This email sent to [EMAIL PROTECTED]


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

2008-04-02 Thread David Holt

Darn, you beat me to it!

David

:-)

On 2-Apr-08, at 3:57 PM, Chuck Hill wrote:

WWDC sessions are out and there are no WO sessions!It is the  
end!  WebObjects is dead! Dead, dead I say!

http://developer.apple.com/wwdc/sessions/

Was I first this year?  Was I?  Someone was going to start the  
panic.  It was my turn.



For anyone new to WO: the WO sessions get announced later.   
WebObjects is definitely not dead.  Be patient.  But if you want  
even more real cool WO stuff, you want to come to WOWODC:


http://www.wocommunity.org/wowodc08/

See you there!

Chuck

--

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

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





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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


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

2008-04-02 Thread Owen McKerrow




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

Darn, you beat me to it!

David

:-)


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

This email sent to [EMAIL PROTECTED]


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

2008-04-02 Thread Alan Ward


I can't wait for the annual noob fest where they all jump in with...  
I'm not gonna spend my time learning this if Apple is EOL'ing it.

I look forward to that *every* year :-)

Alan

On Apr 2, 2008, at 5:03 PM, David Holt wrote:


Darn, you beat me to it!

David

:-)

On 2-Apr-08, at 3:57 PM, Chuck Hill wrote:

WWDC sessions are out and there are no WO sessions!It is the  
end!  WebObjects is dead! Dead, dead I say!

http://developer.apple.com/wwdc/sessions/

Was I first this year?  Was I?  Someone was going to start the  
panic.  It was my turn.



For anyone new to WO: the WO sessions get announced later.   
WebObjects is definitely not dead.  Be patient.  But if you want  
even more real cool WO stuff, you want to come to WOWODC:


http://www.wocommunity.org/wowodc08/

See you there!

Chuck

--

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

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





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


This email sent to [EMAIL PROTECTED]


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


This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


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

2008-04-02 Thread Pascal Robert
They can't do WO sessions, almost all the great speakers of the  
community are speaking at WOWODC :-)


WWDC sessions are out and there are no WO sessions!It is the  
end!  WebObjects is dead! Dead, dead I say!

http://developer.apple.com/wwdc/sessions/

Was I first this year?  Was I?  Someone was going to start the  
panic.  It was my turn.



For anyone new to WO: the WO sessions get announced later.   
WebObjects is definitely not dead.  Be patient.  But if you want  
even more real cool WO stuff, you want to come to WOWODC:


http://www.wocommunity.org/wowodc08/

See you there!

Chuck

--

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

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





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

This email sent to [EMAIL PROTECTED]


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

This email sent to [EMAIL PROTECTED]


Re: [OT] Limiting File Upload Sizes

2008-04-02 Thread james o

i've successfully implemented the SWFUpload with WO.

unfortunately i didn't know how to play nice with all the javascript  
SWFUpload and WO stuff so i placed the PHP upload feature (which is  
quite nice with smooth ajax interface) in an inline frame and send the  
results to a DA for processing / inserting file information into my  
WOApp.  i pass variables into the PHP code to limit upload size, the #  
of files to upload, path to write, etc...


i'll try to clean this up and remove it from my project for sharing.

./james

{ primaxSTUDIO : http://primaxSTUDIO.com : 513.772.1223 }



On Apr 1, 2008, at 4:49 AM, Owen McKerrow wrote:


Hi Guys,

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


I will check out Joshua's implementation.

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

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


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

   - Peter Jackson,  The Lord of The Rings


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


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


Hi!

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


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


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


Chuck




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


Hi All,

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


Or is there something better out there ?

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

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

- Dilbert Quotes Winner, Fred Dales, Microsoft Corp


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

This email sent to [EMAIL PROTECTED]


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



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

This email sent to [EMAIL PROTECTED]


--

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

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







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

This email sent to [EMAIL PROTECTED]







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

This email sent to [EMAIL PROTECTED]

Re: Accessing Session

2008-04-02 Thread David LeBer

Please keep questions on the list.

On 2-Apr-08, at 11:19 PM, Eleni Manou wrote:

Hi David

I am just copying some lines from my project in WO 5.3. There in  
Session.java I define


public String userName;

and then in a component I set this variable using

((Session)session()).userName = .


This should work, though personally I'd wrap userName with accessor  
methods.



This is not working in WOLips project, wher I get the error message

Unresolved compilation problem:
username cannot be resolved or is not a field


Why is username not here not camelCased like above?


Can you help more? Many thanks

Stavros

On 02 Απρ 2008, at 6:23 ΠΜ, David LeBer wrote:


On 1-Apr-08, at 11:14 PM, Eleni Manou wrote:


Hi all,

Can anyone help e on how to access session variables? Before (WO  
5.3) I had simply to declare a variable in to the session.java  
class and then I cold read and and set this variable using  
(Session)session(). This seems that does not work in my Eclipse/ 
WOLips project.


Am I doing something wrong (probably)?

Many thanks in advance



Are your variables private or protected?

They need to be public or (better yet) have public accessors.


;david

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


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

This email sent to [EMAIL PROTECTED]


Re: WO 5.4 Linux Deployment

2008-04-02 Thread Joe Little
wonder sources. Works great for Apache 2 and 2.2

On Tue, Apr 1, 2008 at 11:58 PM, Aleksey Novicov [EMAIL PROTECTED] wrote:
 Which source do you recommend using? The source that is distributed with
 Xcode and is in /Developer/Examples/WebObjects/Source/Adaptors? Or the
 source in Project Wonder?



  On Mar 30, 2008, at 10:22 PM, Joe Little wrote:


  On Tue, Mar 25, 2008 at 6:41 PM, Aleksey Novicov [EMAIL PROTECTED] wrote:
 
   I am looking for input and instruction on deploying WO 5.4 apps on Red
   Hat Linux. Are there any updated instructions for WO 5.4? Is there a
   pre-compiled Apache 2.2 WebObjects adapter for Red Hat available? How
   about deploying on Tomcat? Is it preferred over JavaMonitor/wotaskd? I
   have experience with JavaMonitor on OS X but have never tried
   deploying on Tomcat.
  
  
 
  I'll just add that I never deploy as a servlet, but use native
  adaptors. Nothing precompiled, but the instructions out there for 5.3
  still work for 5.4, albeit using the newer 5.4 frameworks/jars. The
  FreeBSD install script that has been posted might be more enlightening
  as I think its already updated to 5.4.
 
 
   By the way, this mail list is invaluable. Thanks to all of the
   contributors.
  
   Aleksey
___
   Do not post admin requests to the list. They will be ignored.
   Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
   Help/Unsubscribe/Update your Subscription:
  
 http://lists.apple.com/mailman/options/webobjects-dev/jmlittle%40gmail.com
  
   This email sent to [EMAIL PROTECTED]
  
  
 


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

This email sent to [EMAIL PROTECTED]