EOModel and derived column.

2010-11-23 Thread Theodore Petrosky
I am reading the Red Webobject 5.0 book and I think I finally understand the 
small section on creating an attribute the is derived. 

(I am using postgresql as the backend)

so my User entity has a firstName and a lastName. I created an attribute called 
'theFullName' as derived "firstName || ' ' || lastName", in the advanced tab, I 
choose "Read Only".

i assumed that would be enough, however I needed to also select 'allows null' 
in the basic tab. if I didn't, User.createUser(yada, yada); required a 
'theFullName' attribute.

My assumption was that as the column is derived and read only, I thought the 
column was special and shouldn't need the 'allows null' selection.

so, did I do it correctly?
as the column is a derived column and read only, why do I need to add 'allows 
null'?

I have been creating all these derivatives in java in my User.java file, but I 
thought I would expand my understanding and play with some features.

now on to stored proceedures.

Ted


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

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


Safari can't open the page

2010-11-23 Thread Eleni Manou
Hello,

all over a sudden, in a new MacBook Pro where I work without any problems for 
more than 2 months, I get the following error when I try to run my application 
from Eclipse

Safari can’t open the page 
“http://192.168.2.1:49169/cgi-bin/WebObjects/MyApp.woa”. The error is: “The 
operation couldn’t be completed. Cannot allocate memory” 
(NSPOSIXErrorDomain:12) Please choose Safari > Report Bugs to Apple, note the 
error number, and describe what you did before you saw this message.

And believe me please, I did nothing before to saw this message, except to 
drink as usual my coffee.

Any help?

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

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

Re: Database Connection Question

2010-11-23 Thread Chuck Hill

On Nov 23, 2010, at 3:01 PM, Gennady Kushnir wrote:

> Hello all
> Thanks for you replies. Looks like I have enough to explore yet.
> 
>> It should not be creating more unless you are creating more EOF stacks in 
>> you code.
> 
> The point is that I do use multiple EOF stacks. I clearly admit that
> each EOObjectStoreCoordinator gets its own set of db connections.

It only needs a single connection to work.


> I use separate EOF stack to access previous year data stored in a
> separate database with identical structure.
> That is why I employ
> EODatabaseContext.forceConnectionWithModel(model,connectionDict,ec)
> And that is why my models get identical connection dictionary.

I am not sure if that is the  best / right way to do this.  

Joe (Little), weren't you doing something similar?


> I am quite interested if multiple models could share single db context
> and thus lower the number of open connections.

They can't share db contexts across EOF stacks.


> During my experimentations I have found that it is
> EODatabaseContext.forceConnectionWithModel(...) the one who create a
> connection for a mentioned model which does not get reused afterwards.
> May be that is aforementioned JDBCinfo connection?

Maybe or it could be a side effect or misuse of that method.  Are the models 
already connected in the new EOF stack before you call this?


Chuck


> In my case I decided to close that AdaptorChannel myself after
> connecting model to database.
> As a result I have no dangling connections after launch. And when an
> app needs data  for some real work it opens new connection that gets
> reused afterwards.
> 
> If anyone interested you may review my code on github:
> https://github.com/baywind/reusables/blob/master/Sources/net/rujel/reusables/DataBaseConnector.java
> Here I am speaking about row 222 and around
> 
> 2010/11/23 Chuck Hill :
>> Hi,
>> 
>> On Nov 23, 2010, at 1:54 AM, Gennady Kushnir wrote:
>> 
>>> Hello Chuck and others.
>>> I'd like ask some more questions )
>>> 
>>> 2010/8/27 Chuck Hill :
 
 On Aug 25, 2010, at 11:10 PM, Dov Rosenberg wrote:
 
> I am revisiting some old EOF documentation and wanted to make sure I 
> understood a few things. Are the following statements true?
> 
> 
> *   When an EOModel is found and connected to a database when the app 
> starts up each database connection is mapped to an EODatabaseChannel?
 
 I think that EODatabaseContext is more correct than EODatabaseChannel.  
 The context will then use the channel.  A db context can handle multiple 
 models (the connection information needs to be the same).
>>> 
>>> How can single db context handle multiple models ?
>> 
>> They all need to have the same connection dictionary.  This allows one 
>> database schema to be partitioned between several models.  I could be wrong 
>> too :-)  All the models might be part of the same EODatabase, and each model 
>> gets its own EODatabaseConnection.  I am too lazy to look it up right now.
>> 
>> 
>>> I see that
>>> EODatabaseContext.forceConnectionWithModel(model,cd,ec)
>>> returns different objects for different models, whereas most of my
>>> models point to the same database with the same connection dictionary.
>> 
>> IIRC, that method is not the normal method that EOF uses so the results may 
>> be different than normal.  Also note that the models needs to have the exact 
>> same* (equals()) connection dictionaries.
>> 
>> * OK, they don't need to be fully equals() but the main entries must be 
>> equals().
>> 
>> 
>>> And would it make sense to somehow force all these models to single db 
>>> context?
>> 
>> That depends on the EOF implementation.
>> 
>> 
> Is there a default number of EODatabaseChannels opened when the app 
> starts up? Is there a configuration setting that I can set to add more?
 
 One per db context and no.
>>> My problem is that I see my app opening more connections than a number
>>> of models it has.
>> 
>> That is the jdbc2info connection.  It is an old bug in EOF that this does 
>> not get closed or reused.  The JDBC adaptor in Wonder will close this, but 
>> someone (Simon?) was reporting problems generating PKs with it under load 
>> recently.
>> 
>> 
>>> And those connections do not close even after more than an hour not
>>> used. And it does not reuse all of them for later requests but may
>>> create even more connections.
>> 
>> It should not be creating more unless you are creating more EOF stacks in 
>> you code.
>> 
>> 
>>> As a result when running multiple instances on a server with limited
>>> DB-connections I do get "too many connections" error sometimes.
>>> 
>>> How could I fight it? Is it possible to control the number of open
>>> connections and close unused ones after certain idle time?
>> 
>> Mike said, "this is very tricky".  The code is in, or referenced by, the 
>> JDBC adaptor in Wonder.  I think.
>> 
>> 
>> Chuck
>> 
>> 
 Chuck
 
 
 --
 Chuck

otherclasspath option in maven?

2010-11-23 Thread Rob Urquhart
I'm using maven to build a Wonder app and I need to have a resource file (a 
keystore) end up in a directory on the classpath at runtime. In the ant build I 
could use the "otherclasspath" option of woapplication to add a 
Resources/Keystores folder to the classpath. Is there something equivalent for 
maven? 
Or, is there a way to tell maven to include those files in the application jar? 
The "standard" way as described in the maven getting-started guide doesn't seem 
to work - the files are just included in Resources, but not in the jar.
Thanks for any help.

Rob

--
Rob Urquhart 
IT Services
Simon Fraser University
778-782-3650
rob.urquh...@sfu.ca





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

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


Re: Database Connection Question

2010-11-23 Thread Gennady Kushnir
Hello all
Thanks for you replies. Looks like I have enough to explore yet.

> It should not be creating more unless you are creating more EOF stacks in you 
> code.

The point is that I do use multiple EOF stacks. I clearly admit that
each EOObjectStoreCoordinator gets its own set of db connections.

I use separate EOF stack to access previous year data stored in a
separate database with identical structure.
That is why I employ
EODatabaseContext.forceConnectionWithModel(model,connectionDict,ec)
And that is why my models get identical connection dictionary.
I am quite interested if multiple models could share single db context
and thus lower the number of open connections.

During my experimentations I have found that it is
EODatabaseContext.forceConnectionWithModel(...) the one who create a
connection for a mentioned model which does not get reused afterwards.
May be that is aforementioned JDBCinfo connection?
In my case I decided to close that AdaptorChannel myself after
connecting model to database.
As a result I have no dangling connections after launch. And when an
app needs data  for some real work it opens new connection that gets
reused afterwards.

If anyone interested you may review my code on github:
https://github.com/baywind/reusables/blob/master/Sources/net/rujel/reusables/DataBaseConnector.java
Here I am speaking about row 222 and around

2010/11/23 Chuck Hill :
> Hi,
>
> On Nov 23, 2010, at 1:54 AM, Gennady Kushnir wrote:
>
>> Hello Chuck and others.
>> I'd like ask some more questions )
>>
>> 2010/8/27 Chuck Hill :
>>>
>>> On Aug 25, 2010, at 11:10 PM, Dov Rosenberg wrote:
>>>
 I am revisiting some old EOF documentation and wanted to make sure I 
 understood a few things. Are the following statements true?


 *   When an EOModel is found and connected to a database when the app 
 starts up each database connection is mapped to an EODatabaseChannel?
>>>
>>> I think that EODatabaseContext is more correct than EODatabaseChannel.  The 
>>> context will then use the channel.  A db context can handle multiple models 
>>> (the connection information needs to be the same).
>>
>> How can single db context handle multiple models ?
>
> They all need to have the same connection dictionary.  This allows one 
> database schema to be partitioned between several models.  I could be wrong 
> too :-)  All the models might be part of the same EODatabase, and each model 
> gets its own EODatabaseConnection.  I am too lazy to look it up right now.
>
>
>> I see that
>> EODatabaseContext.forceConnectionWithModel(model,cd,ec)
>> returns different objects for different models, whereas most of my
>> models point to the same database with the same connection dictionary.
>
> IIRC, that method is not the normal method that EOF uses so the results may 
> be different than normal.  Also note that the models needs to have the exact 
> same* (equals()) connection dictionaries.
>
> * OK, they don't need to be fully equals() but the main entries must be 
> equals().
>
>
>> And would it make sense to somehow force all these models to single db 
>> context?
>
> That depends on the EOF implementation.
>
>
 Is there a default number of EODatabaseChannels opened when the app starts 
 up? Is there a configuration setting that I can set to add more?
>>>
>>> One per db context and no.
>> My problem is that I see my app opening more connections than a number
>> of models it has.
>
> That is the jdbc2info connection.  It is an old bug in EOF that this does not 
> get closed or reused.  The JDBC adaptor in Wonder will close this, but 
> someone (Simon?) was reporting problems generating PKs with it under load 
> recently.
>
>
>> And those connections do not close even after more than an hour not
>> used. And it does not reuse all of them for later requests but may
>> create even more connections.
>
> It should not be creating more unless you are creating more EOF stacks in you 
> code.
>
>
>> As a result when running multiple instances on a server with limited
>> DB-connections I do get "too many connections" error sometimes.
>>
>> How could I fight it? Is it possible to control the number of open
>> connections and close unused ones after certain idle time?
>
> Mike said, "this is very tricky".  The code is in, or referenced by, the JDBC 
> adaptor in Wonder.  I think.
>
>
> Chuck
>
>
>>> Chuck
>>>
>>>
>>> --
>>> Chuck Hill             Senior Consultant / VP Development
>>>
>>> Practical WebObjects - for developers who want to increase their overall 
>>> knowledge of WebObjects or who are trying to solve specific problems.
>>> http://www.global-village.net/products/practical_webobjects
>
> --
> Chuck Hill             Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase their overall 
> knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>
>
>
 __

Re: Database Connection Question

2010-11-23 Thread Andrew Lindesay

Hi Guys;


One per db context and no.

My problem is that I see my app opening more connections than a number
of models it has.


Mike talked through a work-around for this bug to me recently on here. 
I had the same problem eating lots of connections into an Oracle 
database from the app-servers.  If you are using "ERXJDBCAdaptor.java" 
then it should resolve this problem I think; otherwise I created my own 
"JDBCAdaptor" and copied in the methods "jdbcInfo()" and "typeInfo()" 
verbatim.  This seems to have resolved the problem.


cheers.

--
Andrew Lindesay
www.silvereye.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 arch...@mail-archive.com


Re: Database Connection Question

2010-11-23 Thread Chuck Hill
Hi,

On Nov 23, 2010, at 1:54 AM, Gennady Kushnir wrote:

> Hello Chuck and others.
> I'd like ask some more questions )
> 
> 2010/8/27 Chuck Hill :
>> 
>> On Aug 25, 2010, at 11:10 PM, Dov Rosenberg wrote:
>> 
>>> I am revisiting some old EOF documentation and wanted to make sure I 
>>> understood a few things. Are the following statements true?
>>> 
>>> 
>>> *   When an EOModel is found and connected to a database when the app 
>>> starts up each database connection is mapped to an EODatabaseChannel?
>> 
>> I think that EODatabaseContext is more correct than EODatabaseChannel.  The 
>> context will then use the channel.  A db context can handle multiple models 
>> (the connection information needs to be the same).
> 
> How can single db context handle multiple models ?

They all need to have the same connection dictionary.  This allows one database 
schema to be partitioned between several models.  I could be wrong too :-)  All 
the models might be part of the same EODatabase, and each model gets its own 
EODatabaseConnection.  I am too lazy to look it up right now.


> I see that
> EODatabaseContext.forceConnectionWithModel(model,cd,ec)
> returns different objects for different models, whereas most of my
> models point to the same database with the same connection dictionary.

IIRC, that method is not the normal method that EOF uses so the results may be 
different than normal.  Also note that the models needs to have the exact same* 
(equals()) connection dictionaries.

* OK, they don't need to be fully equals() but the main entries must be 
equals().


> And would it make sense to somehow force all these models to single db 
> context?

That depends on the EOF implementation.


>>> Is there a default number of EODatabaseChannels opened when the app starts 
>>> up? Is there a configuration setting that I can set to add more?
>> 
>> One per db context and no.
> My problem is that I see my app opening more connections than a number
> of models it has.

That is the jdbc2info connection.  It is an old bug in EOF that this does not 
get closed or reused.  The JDBC adaptor in Wonder will close this, but someone 
(Simon?) was reporting problems generating PKs with it under load recently.


> And those connections do not close even after more than an hour not
> used. And it does not reuse all of them for later requests but may
> create even more connections.

It should not be creating more unless you are creating more EOF stacks in you 
code.


> As a result when running multiple instances on a server with limited
> DB-connections I do get "too many connections" error sometimes.
> 
> How could I fight it? Is it possible to control the number of open
> connections and close unused ones after certain idle time?

Mike said, "this is very tricky".  The code is in, or referenced by, the JDBC 
adaptor in Wonder.  I think.


Chuck


>> Chuck
>> 
>> 
>> --
>> Chuck Hill Senior Consultant / VP Development
>> 
>> Practical WebObjects - for developers who want to increase their overall 
>> knowledge of WebObjects or who are trying to solve specific problems.
>> http://www.global-village.net/products/practical_webobjects

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects









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

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

Re: ERRest and ToMany relationships

2010-11-23 Thread Pascal Robert
Maybe it's because of the way some methods are override in our framework. I was 
trying to get over the problem by creating the order first (POST 
/ra/commandes), and after to create the order item (POST /ra/commandeArticles). 
But the sales taxes on the order item were not calculed when they should be 
calculed automatically. The taxes calculation is done when we set the quantity 
of the order item (setEcoaQuantite) and this setter is override so that we 
check if a product is linked to the order item and if it's linked, we calculate 
the taxes amount. 

Problem is that when setEcoaQuantite is called, the relationship (produit()) is 
not set, so the condition (if produit() != null) fails and the calculation is 
not done. But I did specify the product ID in the JSON data, so I guess 
setEcoaQuantite() is called before setProduitRelationship(). If I call the 
calculation after the CommandeArticle object is created, everything's working. 
We have a lot of funked things like that in that framework, so it might explain 
the other problem (creating the order and items in a single call) I'm having.

> seems like a bug
> 
> On Nov 20, 2010, at 3:20 AM, Farrukh Ijaz wrote:
> 
>> 
>> On 19, نومبر 2010, at 11:30 PM, Pascal Robert  wrote:
>> 
>>> Hi (especially Mike S.),
>>> 
>>> Mike, in the comments you made on my ERRest slides for WOWODC, you said 
>>> that sub-entities should be created for To Many relationships, but I just 
>>> tried back and it's doesn't work for me. I have a Order with a relation 
>>> (1:N) to OrderItem, and each OrderItem is linked to a product (1:1). Now, 
>>> if I try to create a Order with two OrderItem, the Order is created with 
>>> the values, but for the OrderItem, two items are created, but all values 
>>> are set to null.
>>> 
>>> So I am doing something wrong or do I have to create the order first and 
>>> make another calls to create each order item?
>> 
>> I think this is the case AFAIR in one of the podcasts it was explicitly 
>> mentioned that you need to make two separate calls.
>> 
>> Farrukh
>> 
>>> 
>>> 
>>> --
>>> Pascal Robert
>>> prob...@macti.ca
>>> 
>>> AIM/iChat : MacTICanada
>>> LinkedIn : http://www.linkedin.com/in/macti
>>> Twitter : pascal_robert
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com
>>> 
>>> This email sent to farrukh.i...@fuegodigitalmedia.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/mschrag%40pobox.com
>> 
>> This email sent to msch...@pobox.com
> 

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

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


Re: Wonder's Monitor

2010-11-23 Thread Martin Samm
ooh - shiny.

looks great;

Thanks

Martin

On 23 November 2010 15:19, John Huss  wrote:

> Screenshots:
> http://lists.apple.com/archives/Webobjects-dev/2010/Nov/msg00573.html
>
> On Tue, Nov 23, 2010 at 4:57 AM, Martin Samm wrote:
>
>> Apologies as i must have missed the start of this thread.
>>
>> Are the screenshots accessible somewhere?
>>
>> Whats the plan for releasing the new Monitor?
>>
>> many Thanks
>>
>> Martin.
>>
>> On 23 November 2010 10:32, Anjo Krank  wrote:
>>
>>>  How so?
>>>
>>> Cheers, Anjo
>>>
>>> Am 23.11.2010 um 00:48 schrieb Pascal Robert:
>>>
>>> > Ah, finally a Monitor for the 2010s :-) BTW, I think we should remove
>>> the Migrations tab, AFAIK that tab content is useless.
>>> >
>>> >> Looks like poo ;-)
>>> >>
>>> >> 
>>> >> 
>>> >> ;david
>>> >>
>>> >> --
>>> >> David LeBer
>>> >> Codeferous Software
>>> >> 'co-def-er-ous' adj. Literally 'code-bearing'
>>> >> site:http://codeferous.com
>>> >> blog:http://davidleber.net
>>> >> profile: http://www.linkedin.com/in/davidleber
>>> >> twitter: http://twitter.com/rebeld
>>> >> --
>>> >> Toronto Area Cocoa / WebObjects developers group:
>>> >> http://tacow.org
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> ;david
>>> >>
>>> >> --
>>> >> David LeBer
>>> >> Codeferous Software
>>> >> 'co-def-er-ous' adj. Literally 'code-bearing'
>>> >> site:http://codeferous.com
>>> >> blog:http://davidleber.net
>>> >> profile: http://www.linkedin.com/in/davidleber
>>> >> twitter: http://twitter.com/rebeld
>>> >> --
>>> >> Toronto Area Cocoa / WebObjects developers group:
>>> >> http://tacow.org
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> ___
>>> >> Do not post admin requests to the list. They will be ignored.
>>> >> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> >> Help/Unsubscribe/Update your Subscription:
>>> >>
>>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>>> >>
>>> >> This email sent to prob...@macti.ca
>>> >
>>> > ___
>>> > Do not post admin requests to the list. They will be ignored.
>>> > Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> > Help/Unsubscribe/Update your Subscription:
>>> > http://lists.apple.com/mailman/options/webobjects-dev/anjo%40krank.net
>>> >
>>> > This email sent to a...@krank.net
>>>
>>>  ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> http://lists.apple.com/mailman/options/webobjects-dev/martin.samm%40aetopia.com
>>>
>>> This email sent to martin.s...@aetopia.com
>>>
>>
>>
>>
>> --
>> Martin Samm
>> Aetopia Ltd
>> +44 (0) 28 9099 8767
>>
>> 
>> Aetopia Ltd is a limited company registered in Belfast, Northern Ireland,
>> with registration number NI053321, having its principal place of business
>> (and postal address) at ECIT Institute, Queens Road, BELFAST BT3 9DT
>> and registered office at 1, Lanyon Quay, BELFAST BT1 3LG
>>
>>
>>  ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>>
>> http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com
>>
>> This email sent to johnth...@gmail.com
>>
>
>


-- 
Martin Samm
Aetopia Ltd
+44 (0) 28 9099 8767

Aetopia Ltd is a limited company registered in Belfast, Northern Ireland,
with registration number NI053321, having its principal place of business
(and postal address) at ECIT Institute, Queens Road, BELFAST BT3 9DT
and registered office at 1, Lanyon Quay, BELFAST BT1 3LG
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Wonder's Monitor

2010-11-23 Thread John Huss
Screenshots:
http://lists.apple.com/archives/Webobjects-dev/2010/Nov/msg00573.html

On Tue, Nov 23, 2010 at 4:57 AM, Martin Samm wrote:

> Apologies as i must have missed the start of this thread.
>
> Are the screenshots accessible somewhere?
>
> Whats the plan for releasing the new Monitor?
>
> many Thanks
>
> Martin.
>
> On 23 November 2010 10:32, Anjo Krank  wrote:
>
>> How so?
>>
>> Cheers, Anjo
>>
>> Am 23.11.2010 um 00:48 schrieb Pascal Robert:
>>
>> > Ah, finally a Monitor for the 2010s :-) BTW, I think we should remove
>> the Migrations tab, AFAIK that tab content is useless.
>> >
>> >> Looks like poo ;-)
>> >>
>> >> 
>> >> 
>> >> ;david
>> >>
>> >> --
>> >> David LeBer
>> >> Codeferous Software
>> >> 'co-def-er-ous' adj. Literally 'code-bearing'
>> >> site:http://codeferous.com
>> >> blog:http://davidleber.net
>> >> profile: http://www.linkedin.com/in/davidleber
>> >> twitter: http://twitter.com/rebeld
>> >> --
>> >> Toronto Area Cocoa / WebObjects developers group:
>> >> http://tacow.org
>> >>
>> >>
>> >>
>> >>
>> >> ;david
>> >>
>> >> --
>> >> David LeBer
>> >> Codeferous Software
>> >> 'co-def-er-ous' adj. Literally 'code-bearing'
>> >> site:http://codeferous.com
>> >> blog:http://davidleber.net
>> >> profile: http://www.linkedin.com/in/davidleber
>> >> twitter: http://twitter.com/rebeld
>> >> --
>> >> Toronto Area Cocoa / WebObjects developers group:
>> >> http://tacow.org
>> >>
>> >>
>> >>
>> >>
>> >> ___
>> >> Do not post admin requests to the list. They will be ignored.
>> >> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> >> Help/Unsubscribe/Update your Subscription:
>> >>
>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>> >>
>> >> This email sent to prob...@macti.ca
>> >
>> > ___
>> > Do not post admin requests to the list. They will be ignored.
>> > Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> > Help/Unsubscribe/Update your Subscription:
>> > http://lists.apple.com/mailman/options/webobjects-dev/anjo%40krank.net
>> >
>> > This email sent to a...@krank.net
>>
>>  ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>>
>> http://lists.apple.com/mailman/options/webobjects-dev/martin.samm%40aetopia.com
>>
>> This email sent to martin.s...@aetopia.com
>>
>
>
>
> --
> Martin Samm
> Aetopia Ltd
> +44 (0) 28 9099 8767
>
> 
> Aetopia Ltd is a limited company registered in Belfast, Northern Ireland,
> with registration number NI053321, having its principal place of business
> (and postal address) at ECIT Institute, Queens Road, BELFAST BT3 9DT
> and registered office at 1, Lanyon Quay, BELFAST BT1 3LG
>
>
>  ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com
>
> This email sent to johnth...@gmail.com
>
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: ERAttachment... to-many and thumbs

2010-11-23 Thread Denis Frolov
On Tue, Nov 23, 2010 at 3:06 PM, Francesco Romano
 wrote:
> On 23/nov/2010, at 12.30, Denis Frolov wrote:
>
> I think ERAttachmentViewer doesn't resize the image itself - it just passes
> the width/height to WOImage. So, this approach is indeed "heavy". You can
> create thumbnails upon upload and add them to "childrenAttachments"
> relationship. After that you can show the thumbnail by accessing it via
> "childrenAttachments" relationship on your list pages (you can add a cover
> method for thumbnail to Product.java).
>
> So I have to create the thumb...
> How can I manage the upload?

Not sure, what you mean here, but the idea is to create a thumbnail
and then save it as child ERAttachment of this attachment.

> Now I override willUpdate and willInsert in ProductERAttachment entity.
> @Override
> public void willInsert() {
> this.updateThumbnail();
> super.willInsert();
> }
>
> @Override
> public void willUpdate() {
> this.updateThumbnail();
> super.willUpdate();
> }
> private void updateThumbnail() {
>
> ERImageProcessor.imageProcessor().thumbnail(40, 40, inputFile, outputFile);
>
> }
> But... what about inputFile? How can I retrieve it from the ERAttachment
> object?

new File(((ERFileAttachment) attachment()).filesystemPath())

>
> To fix the exception try adding the rule like this:
>
> entity.name = 'Product' and task = 'edit' and propertyKey = 'photos'
> => destinationEntityName = 'ERFileAttachment'
>
> It doesn't fix the problem...This is strange... in a previous test (some
> days ago) I did not have this error... just the form encryption exception...

What's the full stack trace?

ps: You can also prevent the error by making a relationship to
ERFileAttachment instead of ERAttachment.

Denis

> Francesco
>
> Denis
>
> On Tue, Nov 23, 2010 at 1:51 PM, Francesco Romano 
> wrote:
>>
>> Some updates after some hours of work
>> Let's start with thumbnails.
>> First of all... if in the ERAttachmentViewer I bind either the width or
>> height, it resize correctly the picture.. now.. the question is can this
>> become "heavy"? I think I'll use the thumbs only in list pages..or is better
>> to create the thumb on insertion and simply display it later?
>> About D2W rule... if i use as a component ERDList, I don't have the new
>> button to add the image.
>> This is the entity I create:
>> 
>> If I don't create any rule, this is what I see in the CreateProduct page:
>> 
>> Then, if I press New:
>> Nov 23 11:47:47 PNStoreAdmin[5100] WARN  NSLog  -
>> : Exception occurred while handling request:
>> com.webobjects.foundation.NSForwardException
>> [java.lang.InstantiationException] null:
>> is an abstract class. It can not be instantiated !
>> [2010-11-23 11:47:47 CET] 
>> com.webobjects.foundation.NSForwardException
>> [java.lang.InstantiationException] null:
>> is an abstract class. It can not be instantiated !
>> at
>> com.webobjects.foundation._NSUtilities._explainInstantiationException(_NSUtilities.java:616)
>> at
>> com.webobjects.foundation._NSUtilities.instantiateObjectWithConstructor(_NSUtilities.java:665)
>>
>>
>> Francesco
>> On 23/nov/2010, at 08.48, Francesco Romano wrote:
>>
>> Are you actually going to display multiple photos for a Product?
>>
>> Or are you displaying ...
>>
>> one thumbnail
>>
>> or
>>
>> one big photo
>>
>> or
>>
>> one medium photo
>>
>> David
>>
>> What I want is the possibility to have many photos for a product. And i
>> need one thumbnail (but I think I'll thumbnail every photos, otherwise it'l
>> become a bit complex to manage everything..).. So in the list page I display
>> the thumb, in the Inspect page I display all the photos (I don't know if
>> every photo in the same moment, or just a sort of embedded gallery in the
>> page with next and previous button..)
>>
>> I'll try this morning creating a new project and a new db connection, to
>> not destroy my old one, until I find the right migration
>>
>> On 23/nov/2010, at 06.41, Denis Frolov wrote:
>>
>> On Mon, Nov 22, 2010 at 11:27 PM, Francesco Romano
>>
>>  wrote:
>>
>> Ok.. I'll try this for the thumbnail..
>>
>> About D2W...
>>
>> I have something like
>>
>> Product <-->> ERAttachment for a photos property.
>>
>> But.. i watched the tutorial of David and he created a many-to-many, so
>>
>> Product <-->> ProductPhotos <<--> ERAttachment
>>
>> Product has a "photos" property (so a NSArray of ERAttachment).
>>
>> But.. I don't know how to manage this with the rules, both on Inspect and
>> on Edit/Create configuration.
>>
>> BTW: how can I select the first object of an array with a rule?
>>
>> You could try "phot...@objectatindex.0" but I think a better way would
>>
>> be to add a cover method "thumbnail" to your Product.java returning
>>
>> the attachment you need and use it in rule.
>>
>> What I want to do is:
>>
>> In ListProduct configuration I want to display the thumbnail
>>
>> Cover method above would help you with this.
>>
>> I'll go for the cover method
>>
>>
>> In Edit/Create Product configuration I want to display

Re: Wonder's Monitor

2010-11-23 Thread David LeBer

On 2010-11-23, at 5:57 AM, Martin Samm wrote:

> Apologies as i must have missed the start of this thread.
> 
> Are the screenshots accessible somewhere?
> 
> Whats the plan for releasing the new Monitor?

Just teasing ;-)

I've got a few days of work left, then some testing. You should hopefully see a 
commit later this week/early next.

If anyone wants in on early testing let me know in a private email.

> 
> many Thanks
> 
> Martin.
> 
> On 23 November 2010 10:32, Anjo Krank  wrote:
> How so?
> 
> Cheers, Anjo
> 
> Am 23.11.2010 um 00:48 schrieb Pascal Robert:
> 
> > Ah, finally a Monitor for the 2010s :-) BTW, I think we should remove the 
> > Migrations tab, AFAIK that tab content is useless.
> >
> >> Looks like poo ;-)
> >>
> >> 
> >> 
> >> ;david

;david

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




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

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


Re: ERAttachment... to-many and thumbs

2010-11-23 Thread Francesco Romano
On 23/nov/2010, at 12.30, Denis Frolov wrote:

> I think ERAttachmentViewer doesn't resize the image itself - it just passes 
> the width/height to WOImage. So, this approach is indeed "heavy". You can 
> create thumbnails upon upload and add them to "childrenAttachments" 
> relationship. After that you can show the thumbnail by accessing it via 
> "childrenAttachments" relationship on your list pages (you can add a cover 
> method for thumbnail to Product.java).

So I have to create the thumb...
How can I manage the upload? 
Now I override willUpdate and willInsert in ProductERAttachment entity.

@Override
public void willInsert() {
this.updateThumbnail();
super.willInsert();
}

@Override
public void willUpdate() {
this.updateThumbnail();
super.willUpdate();
}

private void updateThumbnail() {

ERImageProcessor.imageProcessor().thumbnail(40, 40, inputFile, 
outputFile);

}

But... what about inputFile? How can I retrieve it from the ERAttachment object?


> 
> To fix the exception try adding the rule like this:
> 
> entity.name = 'Product' and task = 'edit' and propertyKey = 'photos' => 
> destinationEntityName = 'ERFileAttachment'

It doesn't fix the problem...This is strange... in a previous test (some days 
ago) I did not have this error... just the form encryption exception...

Francesco

> 
> Denis
> 
> On Tue, Nov 23, 2010 at 1:51 PM, Francesco Romano  
> wrote:
> Some updates after some hours of work
> Let's start with thumbnails.
> First of all... if in the ERAttachmentViewer I bind either the width or 
> height, it resize correctly the picture.. now.. the question is can this 
> become "heavy"? I think I'll use the thumbs only in list pages..or is better 
> to create the thumb on insertion and simply display it later?
> 
> About D2W rule... if i use as a component ERDList, I don't have the new 
> button to add the image.
> This is the entity I create:
> 
> 
> If I don't create any rule, this is what I see in the CreateProduct page:
> 
> 
> Then, if I press New: 
> 
> Nov 23 11:47:47 PNStoreAdmin[5100] WARN  NSLog  - 
> : Exception occurred while handling request:
> com.webobjects.foundation.NSForwardException 
> [java.lang.InstantiationException] null: is 
> an abstract class. It can not be instantiated !
> [2010-11-23 11:47:47 CET]  
> com.webobjects.foundation.NSForwardException 
> [java.lang.InstantiationException] null: is 
> an abstract class. It can not be instantiated !
>   at 
> com.webobjects.foundation._NSUtilities._explainInstantiationException(_NSUtilities.java:616)
>   at 
> com.webobjects.foundation._NSUtilities.instantiateObjectWithConstructor(_NSUtilities.java:665)
> 
> 
> 
> Francesco
> 
> On 23/nov/2010, at 08.48, Francesco Romano wrote:
> 
>>> Are you actually going to display multiple photos for a Product?
>>> 
>>> Or are you displaying ... 
>>> 
>>> one thumbnail 
>>> or
>>> one big photo
>>> or
>>> one medium photo
>>> 
>>> David
>> 
>> What I want is the possibility to have many photos for a product. And i need 
>> one thumbnail (but I think I'll thumbnail every photos, otherwise it'l 
>> become a bit complex to manage everything..).. So in the list page I display 
>> the thumb, in the Inspect page I display all the photos (I don't know if 
>> every photo in the same moment, or just a sort of embedded gallery in the 
>> page with next and previous button..)
>> 
>> I'll try this morning creating a new project and a new db connection, to not 
>> destroy my old one, until I find the right migration 
>> 
>> On 23/nov/2010, at 06.41, Denis Frolov wrote:
>> 
>>> On Mon, Nov 22, 2010 at 11:27 PM, Francesco Romano
>>>  wrote:
 Ok.. I'll try this for the thumbnail..
 
 About D2W...
 I have something like
 
 Product <-->> ERAttachment for a photos property.
 But.. i watched the tutorial of David and he created a many-to-many, so
 Product <-->> ProductPhotos <<--> ERAttachment
 Product has a "photos" property (so a NSArray of ERAttachment).
 But.. I don't know how to manage this with the rules, both on Inspect and 
 on Edit/Create configuration.
 BTW: how can I select the first object of an array with a rule?
>>> 
>>> You could try "phot...@objectatindex.0" but I think a better way would
>>> be to add a cover method "thumbnail" to your Product.java returning
>>> the attachment you need and use it in rule.
>>> 
 What I want to do is:
 In ListProduct configuration I want to display the thumbnail
>>> 
>>> Cover method above would help you with this.
>> 
>> I'll go for the cover method
>> 
>>> 
 In Edit/Create Product configuration I want to display all the photos in 
 "maximum" size (i don't know yet the size.. I'll decide later)
>>> 
>>> We use our own custom component for this, but I think you could use
>>> ERDList or ERMDEditRelationship to 

Re: Wonder's Monitor

2010-11-23 Thread Pascal Robert
AFAIK, that tab was added when they tried to move away from wotaskd/Monitor to 
plain old Apache and NIO support, which was supposed to be in 5.4 (presentation 
at WWDC 2006 I think). True, the info on that page show how you can move to 
mod_proxy, but IMHO I think that should be explain in the wiki. Or we keep the 
tab in Monitor, we should explain what it is, right now, it's just a bunch of 
Apache directives.

> How so?
> 
> Cheers, Anjo
> 
> Am 23.11.2010 um 00:48 schrieb Pascal Robert:
> 
>> Ah, finally a Monitor for the 2010s :-) BTW, I think we should remove the 
>> Migrations tab, AFAIK that tab content is useless.
>> 
>>> Looks like poo ;-)
>>> 
>>> 
>>> 
>>> ;david
>>> 
>>> --
>>> David LeBer
>>> Codeferous Software
>>> 'co-def-er-ous' adj. Literally 'code-bearing'
>>> site:   http://codeferous.com
>>> blog:   http://davidleber.net
>>> profile:http://www.linkedin.com/in/davidleber
>>> twitter:http://twitter.com/rebeld
>>> --
>>> Toronto Area Cocoa / WebObjects developers group:
>>> http://tacow.org
>>> 
>>> 
>>> 
>>> 
>>> ;david
>>> 
>>> --
>>> David LeBer
>>> Codeferous Software
>>> 'co-def-er-ous' adj. Literally 'code-bearing'
>>> site:   http://codeferous.com
>>> blog:   http://davidleber.net
>>> profile:http://www.linkedin.com/in/davidleber
>>> twitter:http://twitter.com/rebeld
>>> --
>>> Toronto Area Cocoa / WebObjects developers group:
>>> http://tacow.org
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>>> 
>>> This email sent to prob...@macti.ca
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/anjo%40krank.net
>> 
>> This email sent to a...@krank.net
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> 
> This email sent to prob...@macti.ca

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

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


WO 5.4 with IIS (In search of the lost ".dll")

2010-11-23 Thread ashenshugar62-wo
Hello

I have test the Deployment-Windows WO 5.3 - WO 5.4 
:http://wiki.objectstyle.org/confluence/display/WO/Deployment-Windows+WO+5.3+-+WO+5.4


It's perfect.

Thank you to Stefan Klein and Frédéric JECKER.

But I want to use IIS then I have take the WebObjects.dll and the webObject.exe 
from WO 5.2.

I have configure the HTTP Adaptor URL with http://server/scripts/WebObjects.dll

When I launch my Application : http://server/scripts/WebObjects.dll/MyApp.woa 
,it's Ok . I get the main page.

But when I navigate to the next page have an error page, i get this URL 
http://server/scripts/WebObjects/MyApp.woa/1/wo/rKa7QJEtjTPy67V4o1IEVg/0.0.19.10.1.0.2.5.0.1.1.0
 without the ".dll" after WebObjects.

If I add ".dll" on the URL, I get the good page.

Have you any idea?

Thanks

Eric



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

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

Re: Wonder's Monitor

2010-11-23 Thread Antonio Petri
Looks great!
But, why the Apple Logo? Should it have a Wonder logo instead (if it
exists)?
Cheers
Antonio


On 22 November 2010 23:38, David LeBer  wrote:

> Looks like poo ;-)
>
>
>
>
>
> ;david
>
> --
> David LeBer
> Codeferous Software
> 'co-def-er-ous' adj. Literally 'code-bearing'
> site:   http://codeferous.com
> blog:   http://davidleber.net
> profile:http://www.linkedin.com/in/davidleber
> twitter:http://twitter.com/rebeld
> --
> Toronto Area Cocoa / WebObjects developers group:
> http://tacow.org
>
>
>
>
> ;david
>
> --
> David LeBer
> Codeferous Software
> 'co-def-er-ous' adj. Literally 'code-bearing'
> site:   http://codeferous.com
> blog:   http://davidleber.net
> profile:http://www.linkedin.com/in/davidleber
> twitter:http://twitter.com/rebeld
> --
> Toronto Area Cocoa / WebObjects developers group:
> http://tacow.org
>
>
>
>
>
>  ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
>
> http://lists.apple.com/mailman/options/webobjects-dev/antonio.petri%40googlemail.com
>
> This email sent to antonio.pe...@googlemail.com
>
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Wonder's Monitor

2010-11-23 Thread Martin Samm
Apologies as i must have missed the start of this thread.

Are the screenshots accessible somewhere?

Whats the plan for releasing the new Monitor?

many Thanks

Martin.

On 23 November 2010 10:32, Anjo Krank  wrote:

> How so?
>
> Cheers, Anjo
>
> Am 23.11.2010 um 00:48 schrieb Pascal Robert:
>
> > Ah, finally a Monitor for the 2010s :-) BTW, I think we should remove the
> Migrations tab, AFAIK that tab content is useless.
> >
> >> Looks like poo ;-)
> >>
> >> 
> >> 
> >> ;david
> >>
> >> --
> >> David LeBer
> >> Codeferous Software
> >> 'co-def-er-ous' adj. Literally 'code-bearing'
> >> site:http://codeferous.com
> >> blog:http://davidleber.net
> >> profile: http://www.linkedin.com/in/davidleber
> >> twitter: http://twitter.com/rebeld
> >> --
> >> Toronto Area Cocoa / WebObjects developers group:
> >> http://tacow.org
> >>
> >>
> >>
> >>
> >> ;david
> >>
> >> --
> >> David LeBer
> >> Codeferous Software
> >> 'co-def-er-ous' adj. Literally 'code-bearing'
> >> site:http://codeferous.com
> >> blog:http://davidleber.net
> >> profile: http://www.linkedin.com/in/davidleber
> >> twitter: http://twitter.com/rebeld
> >> --
> >> Toronto Area Cocoa / WebObjects developers group:
> >> http://tacow.org
> >>
> >>
> >>
> >>
> >> ___
> >> Do not post admin requests to the list. They will be ignored.
> >> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> >> Help/Unsubscribe/Update your Subscription:
> >>
> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
> >>
> >> This email sent to prob...@macti.ca
> >
> > ___
> > Do not post admin requests to the list. They will be ignored.
> > Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> > Help/Unsubscribe/Update your Subscription:
> > http://lists.apple.com/mailman/options/webobjects-dev/anjo%40krank.net
> >
> > This email sent to a...@krank.net
>
>  ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
>
> http://lists.apple.com/mailman/options/webobjects-dev/martin.samm%40aetopia.com
>
> This email sent to martin.s...@aetopia.com
>



-- 
Martin Samm
Aetopia Ltd
+44 (0) 28 9099 8767

Aetopia Ltd is a limited company registered in Belfast, Northern Ireland,
with registration number NI053321, having its principal place of business
(and postal address) at ECIT Institute, Queens Road, BELFAST BT3 9DT
and registered office at 1, Lanyon Quay, BELFAST BT1 3LG
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Wonder's Monitor

2010-11-23 Thread Anjo Krank
How so?

Cheers, Anjo

Am 23.11.2010 um 00:48 schrieb Pascal Robert:

> Ah, finally a Monitor for the 2010s :-) BTW, I think we should remove the 
> Migrations tab, AFAIK that tab content is useless.
> 
>> Looks like poo ;-)
>> 
>> 
>> 
>> ;david
>> 
>> --
>> David LeBer
>> Codeferous Software
>> 'co-def-er-ous' adj. Literally 'code-bearing'
>> site:http://codeferous.com
>> blog:http://davidleber.net
>> profile: http://www.linkedin.com/in/davidleber
>> twitter: http://twitter.com/rebeld
>> --
>> Toronto Area Cocoa / WebObjects developers group:
>> http://tacow.org
>> 
>> 
>> 
>> 
>> ;david
>> 
>> --
>> David LeBer
>> Codeferous Software
>> 'co-def-er-ous' adj. Literally 'code-bearing'
>> site:http://codeferous.com
>> blog:http://davidleber.net
>> profile: http://www.linkedin.com/in/davidleber
>> twitter: http://twitter.com/rebeld
>> --
>> Toronto Area Cocoa / WebObjects developers group:
>> http://tacow.org
>> 
>> 
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>> 
>> This email sent to prob...@macti.ca
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/anjo%40krank.net
> 
> This email sent to a...@krank.net

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

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


Re: Database Connection Question

2010-11-23 Thread Stefan Klein

Hi,

you can use the following to check who is creating your channels:

public Application()
{
super();
...

// register for database channel needed notification
NSNotificationCenter.defaultCenter().addObserver(this,
new NSSelector("createAdditionalDatabaseChannel", new Class[] { 
NSNotification.class }),

EODatabaseContext.DatabaseChannelNeededNotification, null);
...
}

public void createAdditionalDatabaseChannel(NSNotification notification)
{
EODatabaseContext dbContext = (EODatabaseContext) 
notification.object();

if (dbContext != null)
{
EODatabaseChannel dbChannel = new EODatabaseChannel(dbContext);
// consensus is that if you need more than 30 open channels,
// you might want to re-think something in your code or model
NSLog.err.appendln("createAdditionalDatabaseChannel");
if (dbContext.registeredChannels().count() < 30)
{
EOAdaptorContext adaptorContext = dbContext.adaptorContext();
dbContext.registerChannel(dbChannel);
}
}
}


Stefan

Am 23.11.10 10:54, schrieb Gennady Kushnir:

Hello Chuck and others.
I'd like ask some more questions )

2010/8/27 Chuck Hill:

On Aug 25, 2010, at 11:10 PM, Dov Rosenberg wrote:


I am revisiting some old EOF documentation and wanted to make sure I understood 
a few things. Are the following statements true?


*   When an EOModel is found and connected to a database when the app starts up 
each database connection is mapped to an EODatabaseChannel?

I think that EODatabaseContext is more correct than EODatabaseChannel.  The 
context will then use the channel.  A db context can handle multiple models 
(the connection information needs to be the same).

How can single db context handle multiple models ? I see that
EODatabaseContext.forceConnectionWithModel(model,cd,ec)
returns different objects for different models, whereas most of my
models point to the same database with the same connection dictionary.
And would it make sense to somehow force all these models to single db context?


Is there a default number of EODatabaseChannels opened when the app starts up? 
Is there a configuration setting that I can set to add more?

One per db context and no.

My problem is that I see my app opening more connections than a number
of models it has.
And those connections do not close even after more than an hour not
used. And it does not reuse all of them for later requests but may
create even more connections.
As a result when running multiple instances on a server with limited
DB-connections I do get "too many connections" error sometimes.

How could I fight it? Is it possible to control the number of open
connections and close unused ones after certain idle time?

Gennady Kushnir


Chuck


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects

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

This email sent to stefan.kl...@buero-sde.de


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

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


Re: Database Connection Question

2010-11-23 Thread Dev WO
Hello Gennady,

> Hello Chuck and others.
> I'd like ask some more questions )
> 
> 2010/8/27 Chuck Hill :
>> 
>> On Aug 25, 2010, at 11:10 PM, Dov Rosenberg wrote:
>> 
>>> I am revisiting some old EOF documentation and wanted to make sure I 
>>> understood a few things. Are the following statements true?
>>> 
>>> 
>>> *   When an EOModel is found and connected to a database when the app 
>>> starts up each database connection is mapped to an EODatabaseChannel?
>> 
>> I think that EODatabaseContext is more correct than EODatabaseChannel.  The 
>> context will then use the channel.  A db context can handle multiple models 
>> (the connection information needs to be the same).
> 
> How can single db context handle multiple models ? I see that
> EODatabaseContext.forceConnectionWithModel(model,cd,ec)
> returns different objects for different models, whereas most of my
> models point to the same database with the same connection dictionary.
> And would it make sense to somehow force all these models to single db 
> context?

If you are using Wonder, you could use the following in your Properties file
## Class name to use instead of the JDBCAdaptor, the ERXJDBCAdaptor supports
## connection pooling
er.extensions.ERXJDBCAdaptor.className=er.extensions.jdbc.ERXJDBCAdaptor


> 
>>> Is there a default number of EODatabaseChannels opened when the app starts 
>>> up? Is there a configuration setting that I can set to add more?
>> 
>> One per db context and no.
> My problem is that I see my app opening more connections than a number
> of models it has.
> And those connections do not close even after more than an hour not
> used. And it does not reuse all of them for later requests but may
> create even more connections.
> As a result when running multiple instances on a server with limited
> DB-connections I do get "too many connections" error sometimes.
> 
> How could I fight it? Is it possible to control the number of open
> connections and close unused ones after certain idle time?

Can't respond on this one, but the property above should fix all this.

Xavier

> 
> Gennady Kushnir
> 
>> Chuck
>> 
>> 
>> --
>> Chuck Hill Senior Consultant / VP Development
>> 
>> Practical WebObjects - for developers who want to increase their overall 
>> knowledge of WebObjects or who are trying to solve specific problems.
>> http://www.global-village.net/products/practical_webobjects
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40anazys.com
> 
> This email sent to webobje...@anazys.com
> 

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

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


Re: Database Connection Question

2010-11-23 Thread Gennady Kushnir
Hello Chuck and others.
I'd like ask some more questions )

2010/8/27 Chuck Hill :
>
> On Aug 25, 2010, at 11:10 PM, Dov Rosenberg wrote:
>
>> I am revisiting some old EOF documentation and wanted to make sure I 
>> understood a few things. Are the following statements true?
>>
>>
>> *   When an EOModel is found and connected to a database when the app starts 
>> up each database connection is mapped to an EODatabaseChannel?
>
> I think that EODatabaseContext is more correct than EODatabaseChannel.  The 
> context will then use the channel.  A db context can handle multiple models 
> (the connection information needs to be the same).

How can single db context handle multiple models ? I see that
EODatabaseContext.forceConnectionWithModel(model,cd,ec)
returns different objects for different models, whereas most of my
models point to the same database with the same connection dictionary.
And would it make sense to somehow force all these models to single db context?

>> Is there a default number of EODatabaseChannels opened when the app starts 
>> up? Is there a configuration setting that I can set to add more?
>
> One per db context and no.
My problem is that I see my app opening more connections than a number
of models it has.
And those connections do not close even after more than an hour not
used. And it does not reuse all of them for later requests but may
create even more connections.
As a result when running multiple instances on a server with limited
DB-connections I do get "too many connections" error sometimes.

How could I fight it? Is it possible to control the number of open
connections and close unused ones after certain idle time?

Gennady Kushnir

> Chuck
>
>
> --
> Chuck Hill             Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase their overall 
> knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Wonder's Monitor

2010-11-23 Thread Aurélien Minet
very great!
thanks

On 11/23/2010 12:38 AM, David LeBer wrote:
> Looks like poo ;-)
> 
> 
> 
> 
> 
> 
> 
> 
> ;david
> 
> --
> David LeBer
> Codeferous Software
> 'co-def-er-ous' adj. Literally 'code-bearing'
> site: http://codeferous.com
> blog: http://davidleber.net
> profile:  http://www.linkedin.com/in/davidleber
> twitter:  http://twitter.com/rebeld
> --
> Toronto Area Cocoa / WebObjects developers group:
> http://tacow.org
> 
> 
> 
> 
> ;david
> 
> --
> David LeBer
> Codeferous Software
> 'co-def-er-ous' adj. Literally 'code-bearing'
> site: http://codeferous.com
> blog: http://davidleber.net
> profile:  http://www.linkedin.com/in/davidleber
> twitter:  http://twitter.com/rebeld
> --
> Toronto Area Cocoa / WebObjects developers group:
> http://tacow.org
> 
> 
> 
> 
> 
> 
> 
>  ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/aurelien.minet%40univ-provence.fr
> 
> This email sent to aurelien.mi...@univ-provence.fr

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

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