Re: WO(Re)petition

2007-10-02 Thread Benoit Cantin

Think Different : Please Opensource WebObjects

--
Benoit Cantin

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@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: I have a dream :-)

2007-10-01 Thread Benoit Cantin

Mac First wrote:
In your dream, you don't explain to Steve what the advantages of 
open-sourcing WO would be.  Heck, you didn't even mention the halo 
effect to him!  You just told him that you thought that WO needs to be 
open-source -- not a compelling presentation.


Yes but he had only 2 minutes :) Quiet short to explain everything !


Now go back to sleep and have that dream again!  ;)


--
Benoit Cantin

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@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: Get server host from request or url

2007-07-06 Thread Benoit Cantin

Chuck Hill wrote:

Hello Benoit,

How are you handling sessions?  When the Flash client requests a web 
service, what URL does it use?


Hello Chuck,

Sessions id are transferred to flash client as a flash variable, as well 
as server FQDN. Sessions are then restored on the server.


Eventually, problem is solved.

Swf file was loaded from an url, let's say url_1. My webobjects server 
sent back a server name from method serverNameFromRequest(WORequest 
request). This server name returned  was then concatenated to a port 
number on the flash client. This returned a new url (url_2) which is 
used to get web services wsdls. The problem was that url_1 and url_2 
host parts differed, so that the Flash Player tried to get a 
crossdomain.xml on the second host (something like 
my.local.computer:2002/crossdomain.xml, 2002 is my web services port). 
Of course, this returned a 404 status code which made my aplication hang up.


I just simplified my method :

>> public String serverNameFromRequest(WORequest request) {
>> return request.headerForKey("host");
>>
>> }

I am now sure that url_1 and url_2 are the same. Everything seems to 
work now :)


Thanks Chuck !


On Jul 5, 2007, at 6:56 AM, Benoit Cantin wrote:


Dear list,

I would like to establish a connexion between a webobjects server and 
a flash client.


To do so, I have to transfer the server's FQDN, or the server's IP 
adress to the flash client as a flash variable passed to the swf.


The flash client, then, communicate through web services using this 
variable.


The problem is that it seems that when the server return its FQDN and 
if a try to contact the server through it's IP adress without 
specifying the port on which my application instance run, then, I just 
can't get my web services.


If I force the server to return it's IP, it just work. But if I try to 
contact the server through it FQDN, it fails.


Here is the method involved on the server in returning the host name.

public String serverNameFromRequest(WORequest request) {
String s = request.headerForKey("x-webobjects-server-name");
if (s == null) {
s = request.headerForKey("server_name");
}   
if (s == null) {

s = request.headerForKey("host");
}
if (s == null) {
s = request._originatingAddress().getHostAddress();
}
if (s == null) {
s = WOApplication.application().host();
}
    return s;

Does anybody ever have this problem ? Any help is appreciated.
Thank you.

--
Benoit Cantin

___
Do not post admin requests to the list. They will 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]






--
Benoit Cantin

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@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]


Get server host from request or url

2007-07-05 Thread Benoit Cantin

Dear list,

I would like to establish a connexion between a webobjects server and a 
flash client.


To do so, I have to transfer the server's FQDN, or the server's IP 
adress to the flash client as a flash variable passed to the swf.


The flash client, then, communicate through web services using this 
variable.


The problem is that it seems that when the server return its FQDN and 
if a try to contact the server through it's IP adress without specifying 
the port on which my application instance run, then, I just can't get my 
web services.


If I force the server to return it's IP, it just work. But if I try to 
contact the server through it FQDN, it fails.


Here is the method involved on the server in returning the host name.

public String serverNameFromRequest(WORequest request) {
String s = request.headerForKey("x-webobjects-server-name");
if (s == null) {
s = request.headerForKey("server_name");
}   
if (s == null) {
s = request.headerForKey("host");
}
if (s == null) {
s = request._originatingAddress().getHostAddress();
}
if (s == null) {
s = WOApplication.application().host();
}
return s;

Does anybody ever have this problem ? Any help is appreciated.
Thank you.

--
Benoit Cantin

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@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: Performance problem before and after growing WOWorkerThreads number

2007-06-12 Thread Benoit Cantin

Chuck Hill wrote:

Hi Benoit,



Hi Chuck,
Thank you for your reply.


On Jun 8, 2007, at 11:24 AM, Benoit Cantin wrote:


On one of our apps, we have what I describe in the subject.


The growing worker threads is not the problem  It is just a symptom of 
the problem.



Application runs on xserve dual G5 and wo 5.3.3. Only one instance, 
multithread disabled. Adaptor settings are given in the attachement 
(sorry for this).


The workflow is the following : only 3 users connect to the webobjects 
backend through one direct action. In this direct action, there is a 
call to the the session().defaulteditingcontext() method initiating 
the creation of a session. That is what I understand from the doc.


Just calling session() is sufficient.


OK. As our DAs don't need to maintain an active session to do their job, 
we decided to switch to a new EOEditingContext() and to manage lock and 
unlock as described in the wikibooks 
http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/Using_EOF/Context_and_Database_Locking



Now we come to about 250 sessions created, then log says :

[2007-06-08 19:54:00 CEST]  
: Growing number 
of WOWorkerThreads to 32


That is a symptom of a bug in your application.  Having more than 16 
worker threads is either a sign of a bug, or an indication that you need 
to run more instances as load is too high.



But just before and after, application becomes slw. It 
processes one request a minute and then application becomes unreachable.


It is the slowness that is causing the extra worker threads to be 
created.  You need to find why it is getting slow.  I suspect that your 
sessions are not terminating properly and that memory is running out and 
the app is spending too much time doing garbage collection.  If could be 
a deadlock, but then the app should just stop responding, not get slow.


So that's not a deadlock since app doesn't stop responding. And you are 
right about memory running out. Now that we have made a couple of 
amendments (especially on DAs), this trouble seems to have been solved.


Until now, we couldn't add more instances due to optimistic locking 
problems. We are confident for this to be quickly solved too. Once this 
will be done, we will add more instances, and we hope that slowness 
problems will be definitely solved.


My question is : from where does this problem come from ? Can this be 
from WODefaultAdaptor settings which I didn't modify ? sessions in 
direct action ? Anything else.


Please let me know if you have ideas or wish any other info.


Check the app log for exceptions.  Have you overridden awake, sleep, or 
terminate in the Session class?  Don't let those methods throw any 
exceptions!


We have not overridden theses methods.

Thanks Chuck.

--
Benoit Cantin

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

This email sent to [EMAIL PROTECTED]


WebObjects and Axis2 ?

2006-12-18 Thread Benoit Cantin

Dear list,

Has anybody heard about a move from Axis(1) 1.1, to Axis(1) 1.4, or 
Axis2 1.1 planned for webobjects future releases ?


Thank you

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

This email sent to archive@mail-archive.com


[WO XCODE] xcodebuild, Webserver configuration

2006-10-18 Thread Benoit Cantin

Hi list,

I have set a special vhost to handle one of my WO app. DocumentRoot of 
this vhost is *not* /Library/WebServer/Documents.


I perform then a split install :
sudo xcodebuild install -configuration WebServer DSTROOT=/

Static contents (rendered by Apache) are not displayed because they are 
located in /Library/WebServer/Documents/WebObjects/myapp.woa while 
they should be in /myDocumentRoot/WebObjects/myapp.woa


My question is : is there a parameter in xcodebuild commandline to tell 
that I would like static contents to be located in 
/myDocumentRoot/WebObjects/myapp.woa and not in 
/Library/WebServer/Documents/WebObjects/myapp.woa ?


Thank you !

PS : I didn't find anything in wikibooks nor in xcodebuild man.
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Ajax drag and drop not working in deployment

2006-09-14 Thread benoit cantin

Jean Pierre Malrieu a écrit :

Hi,

I have an app that uses AjaxDraggable/Droppable and AjaxSortableList 
from Project Wonder.

It works in development, but not in deployment (no dragging at all).
What could explain this behaviour?
I have copied the WebServerResources  to the Web server...


Instead of copying WebServerResources to the Web server, you might 
perform a split installation :


xcodebuild install -configuration Deployment DSTROOT=/
xcodebuild install -configuration WebServer DSTROOT=/

Maybe, this will solve your pb.

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

This email sent to archive@mail-archive.com


Re: Xcode : copy web component

2006-09-11 Thread benoit cantin

John Larson a écrit :

Benoit,

I haven't used XCode for a while, but when you import the wo file, 
select "Create Folder References for any added folders."  That worked 
for me.


John,

Thank you for the tip. It worked for me :)



On Sep 11, 2006, at 8:44 AM, benoit cantin wrote:


Hi list,

I would like to add a component written for one project into another 
project. The thing is that this component, once copied, is not 
recognized as a wo component. I mean that :
- icon in front of .wo file is not the one of webobject builder, 
instead, it is a common folder icon ;
- if I have a look at file info, file type is not 'Folder', but 
'Default for file' and this property is locked.
- if I double-click on the wo component, it lists its content (html, 
wod, woo) instead of opening webobjects builder ;
- if the component to add is a reusable component, it is not listed 
into custom dynamic component in webobjects builder.


Does anyone have a solution, different from copying each old file to a 
new component ?


Thanks,

--Benoit

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

This email sent to archive@mail-archive.com


Xcode : copy web component

2006-09-11 Thread benoit cantin

Hi list,

I would like to add a component written for one project into another 
project. The thing is that this component, once copied, is not 
recognized as a wo component. I mean that :
- icon in front of .wo file is not the one of webobject builder, 
instead, it is a common folder icon ;
- if I have a look at file info, file type is not 'Folder', but 'Default 
for file' and this property is locked.
- if I double-click on the wo component, it lists its content (html, 
wod, woo) instead of opening webobjects builder ;
- if the component to add is a reusable component, it is not listed into 
custom dynamic component in webobjects builder.


Does anyone have a solution, different from copying each old file to a 
new component ?


Thanks,

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

This email sent to archive@mail-archive.com


Re: api variables

2006-09-05 Thread benoit cantin

First of all, thank you for your answer.

I am working on the same project (a CMS).


Hi, Laetitia,

On Sep 4, 2006, at 5:45 PM, Laetitia Orsini wrote:


Hello,

I'm a newbie and after having developed my first "complex" webobjects
application I wonder if it was the right way to do it... The aim of the
application is to offer an interface to manage contents stocked in a
database. I have at the end many reusable web components with many api
variables. Within these api variables I send the edited objects and a
lot of booleans to deal with the layout with conditionals. Is it a
common way to do things in a web objects application ? Doesn't it look
like dirty javascript ?


It's not clear what you're asking here. However, it sounds like you may 
be trying to do some things that WebObjects (WO) would do for you more 
easily if you would let it.


Here is an example of what we are doing. An entity called "Artist" 
references instances of an entity called "Album". We have 2 Web 
components, one which let users customize Artist properties, let's call 
it component1, and the other which let users customize Album properties 
(component2). Both components are reusable ones. Main component defines 
an instance of component1, and component1 defines an instance of 
component2. A variable called "theEditedArtist" is passed from Main to 
component1, and to component2 as an API variable. The reason is that we 
must get modification on "theEditedArtist" made in component2 back to 
Main. Identically, Boolean API variables are passed to component1 from 
Main to enable/disable blocks visibility in component1. Other Boolean 
API variables are passed from Main to component2 (which is attainable 
from Main and component1). You guess that those Boolean variables are 
passed from component1 to component2. These API variables must be in a 
coherent state, since they control component1 and component2 display, 
themselves displaying on the same screen area.


So the problem is to maintain Boolean coherency, otherwise :
-if all Booleans are set to false : no display.
-if all Booleans are set to true : multiple overlaying displayed components.


It might help to review an example. Take a look, for instance, at the 
ThinkMovies example at:


  /Developer/Examples/JavaWebObjects/ThinkMovies/

This application also uses the JavaBusinessLogic framework whose source 
code you can find at:


  /Developer/Examples/JavaWebObjects/Frameworks/JavaBusinessLogic/

In order to build and run the example, you will also need to start the 
WOMovies OpenBase database, but you can review the code and WO 
Components without doing that, if you don't wish to take the trouble to 
build the application. If you do want to build the app, Apple recommends 
that you copy the project to your own work area first, and not modify 
the code in the Examples directory.



What are the differences between api variables and non synchronized
variables ?


Thank you for the tip. I think it doesn't simplify our design. If my 
understanding is good, they define MovieComponent in order to share 
movie variable declaration and other static variables definitions. But 
it doesn't answer our synchronization need. Good ?


The api variables for a component may be synchronized or 
non-synchronized. Synchronized, means that WO will push any variable 
values through the api variable bindings from the parent to the child 
component, then pull the values from the child component back to the 
parent component both before and after each of the Request/Response loop 
method calls (appendToResponse, takeValuesFromRequest and invokeAction). 
That means that the values will be pushed downward and pulled upward 
across the component/subcomponent interface six times for each page 
rendering and user response to the page.


Though this approach is not particularly efficient, it tends to keep 
people new to WO out of trouble. To make the value transfers more 
efficient, you can override the synchronizesVariablesWithBindings method 
in your subcomponent to return false, which will stop WO from doing the 
six push/pulls for you. In that case, you will probably use the 
WOComponent valueForBinding and setValueForBinding methods to push and 
pull the values yourself. Although this is more efficient, it is also 
more work on your part. For a small, local, low traffic, administrative 
application (e.g. an app that will be used by fewer than 10 or 20 people 
each day on the LAN), I probably would let WO synchronize the values.


So API variables sounds good in our case.


I also wonder if this kind of applications would be more quickly
implemented with Direct To Web. I've made some tests with Direct To Web
on my database model but it seams I'll still have a lot of work to
customize things if I want the same features as in my own application.
For example, if I have an entity Album that contains Singles, I would
like to be able to edit Singles just by clicking on a Single listed in
my edited Album.


This 

Many questions about SCM and svn in XCode

2006-08-18 Thread benoit cantin

Hello,

I use SCM in XCode with svn, but it is not always as simple as I would 
like it to be.


First of all, what is the difference between options "update entire 
project" and "refresh entire project" ?


Many times, I got this kind of error "svn: Out of date: 
'test.eomodeld/test.plist' in transaction '19-1'" when comitting from 
svn client in console (I sometimes commit from console since SCM fails 
in XCode just saying "Commit failed" with no detail). Any suggestion 
(it's not really WO, but you may have an idea).


I can solve conflicts on java file as well as on eomodels files. But how 
can you solve conflicts on project file ?  Currently, most of the time, 
conflict on project file is leading me to a deadlock. As a result, I 
have to create a new project and copy all  my Web Components, etc...


I wonder if I not going to use Eclipse instead of XCode for forthcoming 
projects due to SCM problems.


Thank you,

--
Benoit

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

This email sent to archive@mail-archive.com