Re: EOF - statement has been closed?

2013-03-25 Thread Michael Gargano
Hey Chuck et al,

This is a follow-up question for you.  I'm doing things like the code shown 
below in quite a few places.  I'm assuming the ERXEC's are locked automagically 
as normal during the RR loop, but are you saying I also need to explicitly lock 
the EODatabaseContext in this case?  Do I need to manually lock the EC too?  
When do these things need to be manually locked?  Do I need to manually lock 
the EC when I'm getting a ref. to the EOModel, EOAttributes, etc...?

EODatabaseContext db = 
EOUtilities.databaseContextForModelNamed(editingContext(), myModel);
EOSQLExpressionFactory sqlFactory = 
db.adaptorContext().adaptor().expressionFactory();
EOSQLExpression exp = sqlFactory.createExpression(al);
exp.setUseBindVariables(true);
exp.setStatement(sql);


//set the values
exp.addBindVariableDictionary(
exp.bindVariableDictionaryForAttribute(al.attributeNamed(Al.E_KEY), 
user().e().id()));
exp.addBindVariableDictionary(
exp.bindVariableDictionaryForAttribute(al.attributeNamed(Al.U_KEY), user()));
exp.addBindVariableDictionary(
exp.bindVariableDictionaryForAttribute(al.attributeNamed(Al.AL_KEY), 
AlEnum.GSTONE));
exp.addBindVariableDictionary(
exp.bindVariableDictionaryForAttribute(al.attributeNamed(Al.AL_KEY), 
AlEnum.GSTRATEGY));

//execute the query
NSArrayNSDictionary rows = 
ERXEOAccessUtilities.rawRowsForSQLExpression(editingContext(), myModel, exp);


return ((BigDecimal) rows.get(0).valueForKey(NUMBER)).intValue();

Thanks.
-Mike



On Mar 21, 2013, at 1:42 PM, Michael Gargano wrote:

I've checked this in our code several times, there is another app where we do 
stuff like that, but not in this one.

Thanks.
-Mike

-Original Message-
From: Chuck Hill [mailto:ch...@global-village.net]
Sent: Thursday, March 21, 2013 11:07 AM
To: Michael Gargano
Cc: vladimir gadyatskiy; WebObjects Development; Mark Cassidy
Subject: Re: EOF - statement has been closed?

Another possibility is that something in your code (or Wonder, unlikely to be 
in WO itself) is accessing the database context or below without proper locking 
and using and closing this statement behind EOF's back.  It looks less like a 
race condition and more like an improperly shared resource.

Chuck

On 2013-03-21, at 7:47 AM, Michael Gargano wrote:

Hi Vladimir,

   Mark and I work together.  We have not found the solution to 
this problem.  We modified the postgres jdbc driver to provide some additional 
logging, and whatever slight delay that has added seems to have lessened the 
frequency of the problem.  We're not sure where it is happening, but I'm 
convinced it has to be a race condition in wonder or EOF at this point (unless 
there's something wrong with the postgres jdbc driver which I find hard to 
believe since so many people are using it).  I've included Mark on this email 
as well.  Maybe we can find a solution.

Thanks.
-Mike


From: 
webobjects-dev-bounces+mgargano=escholar@lists.apple.commailto:webobjects-dev-bounces+mgargano=escholar@lists.apple.com
 
[mailto:webobjects-dev-bounces+mgargano=escholar@lists.apple.commailto:escholar@lists.apple.com]
 On Behalf Of vladimir gadyatskiy
Sent: Wednesday, March 20, 2013 3:25 PM
To: WebObjects Development
Subject: RE: EOF - statement has been closed?

Hello, all

Sorry, I do not know how to ask Mark Cassidy directly, he'd asked about 
connection lost problems here:  
http://lists.apple.com/archives/webobjects-dev/2013/Jan/msg00429.html
Mark, did you find a solution? Seems we have the same problems with Postgres 
9.2...
Thanks for any help.

Best regards,
Vladimir Gadyatskiy

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

This email sent to ch...@global-village.netmailto:ch...@global-village.net

--
Chuck Hill
Executive Managing Partner, VP Development and Technical Services

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/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C!
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada's Fastest-Growing Companies by PROFIT Magazine!














___
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:
https://lists.apple.com/mailman/options/webobjects-dev/mgargano%40escholar.com

This email sent to mgarg...@escholar.com


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

RE: EOF - statement has been closed?

2013-03-21 Thread Michael Gargano
Hi Vladimir,

Mark and I work together.  We have not found the solution to 
this problem.  We modified the postgres jdbc driver to provide some additional 
logging, and whatever slight delay that has added seems to have lessened the 
frequency of the problem.  We're not sure where it is happening, but I'm 
convinced it has to be a race condition in wonder or EOF at this point (unless 
there's something wrong with the postgres jdbc driver which I find hard to 
believe since so many people are using it).  I've included Mark on this email 
as well.  Maybe we can find a solution.

Thanks.
-Mike


From: webobjects-dev-bounces+mgargano=escholar@lists.apple.com 
[mailto:webobjects-dev-bounces+mgargano=escholar@lists.apple.com] On Behalf 
Of vladimir gadyatskiy
Sent: Wednesday, March 20, 2013 3:25 PM
To: WebObjects Development
Subject: RE: EOF - statement has been closed?

Hello, all

Sorry, I do not know how to ask Mark Cassidy directly, he'd asked about 
connection lost problems here:  
http://lists.apple.com/archives/webobjects-dev/2013/Jan/msg00429.html
Mark, did you find a solution? Seems we have the same problems with Postgres 
9.2...
Thanks for any help.

Best regards,
Vladimir Gadyatskiy

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


RE: EOF - statement has been closed?

2013-03-21 Thread Michael Gargano
I've checked this in our code several times, there is another app where we do 
stuff like that, but not in this one.

Thanks.
-Mike

-Original Message-
From: Chuck Hill [mailto:ch...@global-village.net] 
Sent: Thursday, March 21, 2013 11:07 AM
To: Michael Gargano
Cc: vladimir gadyatskiy; WebObjects Development; Mark Cassidy
Subject: Re: EOF - statement has been closed?

Another possibility is that something in your code (or Wonder, unlikely to be 
in WO itself) is accessing the database context or below without proper locking 
and using and closing this statement behind EOF's back.  It looks less like a 
race condition and more like an improperly shared resource.

Chuck

On 2013-03-21, at 7:47 AM, Michael Gargano wrote:

 Hi Vladimir,
  
 Mark and I work together.  We have not found the solution to 
 this problem.  We modified the postgres jdbc driver to provide some 
 additional logging, and whatever slight delay that has added seems to have 
 lessened the frequency of the problem.  We're not sure where it is happening, 
 but I'm convinced it has to be a race condition in wonder or EOF at this 
 point (unless there's something wrong with the postgres jdbc driver which I 
 find hard to believe since so many people are using it).  I've included Mark 
 on this email as well.  Maybe we can find a solution.
  
 Thanks.
 -Mike
  
  
 From: webobjects-dev-bounces+mgargano=escholar@lists.apple.com 
 [mailto:webobjects-dev-bounces+mgargano=escholar@lists.apple.com] On 
 Behalf Of vladimir gadyatskiy
 Sent: Wednesday, March 20, 2013 3:25 PM
 To: WebObjects Development
 Subject: RE: EOF - statement has been closed?
  
 Hello, all
  
 Sorry, I do not know how to ask Mark Cassidy directly, he'd asked about 
 connection lost problems here:  
 http://lists.apple.com/archives/webobjects-dev/2013/Jan/msg00429.html
 Mark, did you find a solution? Seems we have the same problems with Postgres 
 9.2...
 Thanks for any help.
  
 Best regards,
 Vladimir Gadyatskiy
  
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net

-- 
Chuck Hill 
Executive Managing Partner, VP Development and Technical Services

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/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada's Fastest-Growing Companies by PROFIT Magazine!














 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


postgres jdbc driver

2013-03-06 Thread Michael Gargano
Hi all,

Just taking a quick survey of folks using postgres.  I think 
we've found an issue with the jdbc driver (any version within the last year or 
so).
Since people don't update the jdbc drivers too frequently.
What version of driver are you on?   Has it been stable under 
heavy load?

Thanks.
-Mike

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


RE: postgres jdbc driver

2013-03-06 Thread Michael Gargano
The statement is closing at random times and it eventually ends up hanging eof 
and locking the instance.  It looks like others have found an issue with the 
postgres jdbc driver doing this under heavy load, it's all in the statement 
pooling (some kind of race condition).  I've been trying to debug this for 
months.  I'm on pg 9.0.

-Mike

From: Ramsey Gurley [mailto:rgur...@smarthealth.com]
Sent: Wednesday, March 06, 2013 11:59 AM
To: Michael Gargano
Cc: WebObjects-Dev List (webobjects-dev@lists.apple.com)
Subject: Re: postgres jdbc driver

Out of curiosity, what sort of issues are you seeing? We use postgresql here, 
but it's old. (8.3.x)

Ramsey

On Mar 6, 2013, at 9:37 AM, Michael Gargano wrote:


Hi all,

Just taking a quick survey of folks using postgres.  I think 
we've found an issue with the jdbc driver (any version within the last year or 
so).
Since people don't update the jdbc drivers too frequently.
What version of driver are you on?   Has it been stable under 
heavy load?

Thanks.
-Mike

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

This email sent to rgur...@smarthealth.commailto:rgur...@smarthealth.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


RE: postgres jdbc driver

2013-03-06 Thread Michael Gargano
We're have the postgres logging on for long running queries... nothing takes 
more than a few seconds.

-Mike


From: Karl Gretton [mailto:kgret...@mac.com]
Sent: Wednesday, March 06, 2013 12:06 PM
To: Michael Gargano
Cc: WebObjects-Dev List (webobjects-dev@lists.apple.com)
Subject: Re: postgres jdbc driver

Michael,

Did my suggestion about the statement_timeout help at all?  If you have queries 
that run for a long time, the statement will time out and Postgres will close 
the connection.  There are both statement and connection timeout parameters in 
the PG conf file.

Karl

On 6 Mar 2013, at 08:37, Michael Gargano 
mgarg...@escholar.commailto:mgarg...@escholar.com wrote:


Hi all,

Just taking a quick survey of folks using postgres.  I think 
we've found an issue with the jdbc driver (any version within the last year or 
so).
Since people don't update the jdbc drivers too frequently.
What version of driver are you on?   Has it been stable under 
heavy load?

Thanks.
-Mike

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

This email sent to kgret...@mac.commailto:kgret...@mac.com

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

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


RE: WOWorkerThread deadlocks

2013-01-15 Thread Michael Gargano
Hi guys,

I know I'm a little late on this, but I'm also seeing the same 
behavior.  It's not a long running query I don't think because I'm logging long 
queries in postgres and nothing is running over 10 seconds.  Can you explain 
why having a max of 256 worker threads is too high?  Any other things I should 
look at?  The customers are not happy!  My last problem did turn out to be a 
bunch of deadlocks, which all now seem to be resolved.  It had to with setting 
er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators=4 which should be 
seamless (you would think) but causes issues with fetch specs that have EOs 
crossing OSCs.  I had to pull all EOs local, seems like something that should 
be handled inside wonder automatically (so I consider it a bug, whether it is 
or not could be argued I guess).  Anyway, after those all got fixed, I'm now 
running into this.  Much harder to figure out since I don't even know what the 
lock is held on.

BTW Chuck and Quinton, I owe you guys a beer.  Thanks for pointing me in the 
right direction on the last problem.

Thanks for any help.
-Mike

-Original Message-
From: webobjects-dev-bounces+mgargano=escholar@lists.apple.com 
[mailto:webobjects-dev-bounces+mgargano=escholar@lists.apple.com] On Behalf 
Of Chuck Hill
Sent: Monday, September 10, 2012 1:24 PM
To: Maik Musall
Cc: webobjects-dev@lists.apple.com WebObjects
Subject: Re: WOWorkerThread deadlocks

Hi Maik,

WorkerThread207 that many worker threads indicates two things to me:
1. Your app configuration is too high.  I'd use a max of 6-10 and a listen 
queue size of around 4 (adjusted to suit your specific needs).  A WO app is 
very, very unlikely to recover from a 200 worker thread backlog in any way that 
is useful to the users

2. You have a thread that is taking a long time to return a result.  If you are 
dispatching requests concurrently, then this is most likely stuck in 
EOControl/EOAccess (e.g. waiting for a slow query result) or connecting to some 
external process.  You could also have a deadlock.  If you are not dispatching 
requests concurrently, then this delay could be in other code.

The traces below do not show the problem.  If you want to send a full dump, I 
am willing to look at it.  It is possible that the problem had resolved by the 
time you took this dump.  What you show below is normal for a lot of worker 
threads.  WorkerThread206 is waiting for a new request, WorkerThread207 is idle 
waiting for something to do in the future.

Chuck


On 2012-09-10, at 8:03 AM, Maik Musall wrote:

 Hi,
 
 in an app with high concurrency, the app sometimes becomes unresponsive to 
 everything but DirectActions at the time of day with the most concurrency. 
 All users aren't seeing responses any more. In jstack I see hundreds of these:
 
 WorkerThread207 prio=5 tid=131e0a800 nid=0x151aa2000 waiting for monitor 
 entry [151aa1000]
   java.lang.Thread.State: BLOCKED (on object monitor)
  at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:406)
  - waiting to lock 20d3da450 (a java.net.SocksSocketImpl)
  at java.net.ServerSocket.implAccept(ServerSocket.java:462)
  at java.net.ServerSocket.accept(ServerSocket.java:430)
  at 
 com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:210)
  at java.lang.Thread.run(Thread.java:680)
 
 all waiting on the same lock 20d3da450, and one thread holding that lock:
 
 WorkerThread206 prio=5 tid=131d79800 nid=0x15199f000 runnable [15199e000]
   java.lang.Thread.State: RUNNABLE
  at java.net.PlainSocketImpl.socketAccept(Native Method)
  at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
  - locked 20d3da450 (a java.net.SocksSocketImpl)
  at java.net.ServerSocket.implAccept(ServerSocket.java:462)
  at java.net.ServerSocket.accept(ServerSocket.java:430)
  at 
 com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:210)
  at java.lang.Thread.run(Thread.java:680)
 
 Anyone familiar with this problem?
 
 Maik
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/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:
https://lists.apple.com/mailman/options/webobjects-dev/mgargano%40escholar.com

This email sent to 

Re: WOWorkerThread deadlocks

2013-01-15 Thread Michael Gargano

On Jan 15, 2013, at 2:54 PM, Chuck Hill wrote:

 
 On 2013-01-15, at 10:50 AM, Michael Gargano wrote:
 
 Hi guys,
 
  I know I'm a little late on this, but I'm also seeing the same 
 behavior.  It's not a long running query I don't think because I'm logging 
 long queries in postgres and nothing is running over 10 seconds.  Can you 
 explain why having a max of 256 worker threads is too high?
 
 http://osdir.com/ml/web.webobjects.admin/2005-02/msg6.html
 
 Keep in mind that you have 256 threads all trying to do something that 
 usually sooner or later needs a single threaded EOF lock.  That is just not 
 going to make for happy users.

Thanks.  I'll take a look at this.

 
 
 Any other things I should look at?  The customers are not happy!
 
 Cut down the number of worker threads and the listen queue size.  It won't 
 fix the problem but at least (a) you will see it sooner and (b) the app can 
 recover.
 
 
 My last problem did turn out to be a bunch of deadlocks, which all now seem 
 to be resolved.  It had to with setting 
 er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators=4 which should 
 be seamless (you would think) but causes issues with fetch specs that have 
 EOs crossing OSCs.  
 
 Why on earth would an EO ever cross an OSC?  They don't even cross ECs.

a page creates a new EC gets an EO... that EO is passed around, is on 
another (or the same) page where another EC is created, when a fetchSpec is run 
against the new EC, but the other EO is used as part of the fetchSpec those ECs 
can be associated with two different OSCs, the new EC just created and the EC 
associated with the EO we already have a reference to.  once i called 
localInstance on every EO being used like that all the deadlocks went away.

 
 
 I had to pull all EOs local, seems like something that should be handled 
 inside wonder automatically (so I consider it a bug, whether it is or not 
 could be argued I guess).  Anyway, after those all got fixed, I'm now 
 running into this.  Much harder to figure out since I don't even know what 
 the lock is held on.
 
 sudo jstack -F process id 
 will show you if it is a deadlock.  Otherwise it is likely bad exception 
 handling that results in your code doing a lock() and never doing an unlock()
 

no deadlocks are being detected and i don't see any either.  i see the same 
thing Maik saw, all the worker threads are waiting on a lock held by one worker 
thread which is in a run state and awaiting a socket accept.  I did searches 
across all the code and there is no manual locking anywhere, everything is 
through the autolocking of wonder.


 
 Chuck
 
 
 BTW Chuck and Quinton, I owe you guys a beer.  Thanks for pointing me in the 
 right direction on the last problem.
 
 Thanks for any help.
 -Mike
 
 -Original Message-
 From: webobjects-dev-bounces+mgargano=escholar@lists.apple.com 
 [mailto:webobjects-dev-bounces+mgargano=escholar@lists.apple.com] On 
 Behalf Of Chuck Hill
 Sent: Monday, September 10, 2012 1:24 PM
 To: Maik Musall
 Cc: webobjects-dev@lists.apple.com WebObjects
 Subject: Re: WOWorkerThread deadlocks
 
 Hi Maik,
 
 WorkerThread207 that many worker threads indicates two things to me:
 1. Your app configuration is too high.  I'd use a max of 6-10 and a listen 
 queue size of around 4 (adjusted to suit your specific needs).  A WO app is 
 very, very unlikely to recover from a 200 worker thread backlog in any way 
 that is useful to the users
 
 2. You have a thread that is taking a long time to return a result.  If you 
 are dispatching requests concurrently, then this is most likely stuck in 
 EOControl/EOAccess (e.g. waiting for a slow query result) or connecting to 
 some external process.  You could also have a deadlock.  If you are not 
 dispatching requests concurrently, then this delay could be in other code.
 
 The traces below do not show the problem.  If you want to send a full dump, 
 I am willing to look at it.  It is possible that the problem had resolved by 
 the time you took this dump.  What you show below is normal for a lot of 
 worker threads.  WorkerThread206 is waiting for a new request, 
 WorkerThread207 is idle waiting for something to do in the future.
 
 Chuck
 
 
 On 2012-09-10, at 8:03 AM, Maik Musall wrote:
 
 Hi,
 
 in an app with high concurrency, the app sometimes becomes unresponsive to 
 everything but DirectActions at the time of day with the most concurrency. 
 All users aren't seeing responses any more. In jstack I see hundreds of 
 these:
 
 WorkerThread207 prio=5 tid=131e0a800 nid=0x151aa2000 waiting for monitor 
 entry [151aa1000]
 java.lang.Thread.State: BLOCKED (on object monitor)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:406)
- waiting to lock 20d3da450 (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:462)
at java.net.ServerSocket.accept(ServerSocket.java:430)
at 
 com.webobjects.appserver._private.WOWorkerThread.run

Re: Multiple databases an EOModel.

2012-12-20 Thread Michael Gargano
yes, I'm doing that now.   just be aware that cross db joins are a b*tch.  if 
there are to many relations to join across you will quickly hit limitations 
with IN clauses (which will be your best friend).  unless someone else has come 
up with something more clever than what I'm doing

-Mike

On Dec 20, 2012, at 6:45 PM, Miguel Torres 
w...@toracom.netmailto:w...@toracom.net wrote:

Hi list,

We are developing an ERP application.
We want to use the following approach:

One database to storage users, access control rules, application configuration 
and an enterprises catalog.

For each enterprise we want to set up a different database.

For example: One ERP controlling information of two enterprises would need 
three databases:

  *   ApplicationDatabase
  *   EnterpriseOneDatabase
  *   EnterpriseTwoDatabase

We are doing this because we believe this is more efficient in the long term 
with clients that have more than one enterprise.

We have two Data base Models in the application


  *   ErpApplicatioEOModel
  *   ErpEnterpriseEOModel

The main page is a Login form where the user selects the Enterprise she wants 
to work with. After the user logins successfully we want to set the database 
connection information in the ErpEnterpriseEOModel.

Is that possible?


Thanks in advanced.

Saludos, Miguel Torres.

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

This email sent to mgarg...@me.commailto:mgarg...@me.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Great argument for the continued use of WO/WOnder

2012-12-19 Thread Michael Gargano
I had seriously looked into it.  it's a nice technology, but the documentation 
isn't the greatest and there's a lot of change happening now since strobe, inc. 
was purchased by Facebook.  for those reasons and the fact that there's not 
much of a component library I went with Ext-JS.  as for managing 200k+ lines of 
js, it's one of my biggest concerns.  I'll let you know how it goes.  there are 
a few eclipse plug-ins that provide some autocompletion, but they're not great.

-Mike


On Dec 19, 2012, at 2:59 PM, Johnny Miller 
jlmil...@kahalawai.commailto:jlmil...@kahalawai.com wrote:

Speaking of ember/sproutcore.  Is anybody besides Apple using it on this list?

The promise seems really cool but like the article states - how do you maintain 
200K lines of JavaScript?  And what do you use for an IDE?

After Googling it for a while I found that some people are using WebStorm 
(which is a wonderful HTML + JS + CSS editor - best I've used to date) but 
there is no specific SproutCore plugin that I can find.  It just seems like 
writing a client in SproutCore is a much more arduous task than creating 
components with WOLips.

Sorry to derail the conversation but I've been wondering about this for a while 
and I've love to get the opinion of senior programmers and people who have used 
it with WO.

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
websitehttp://www.kahalawai.com | e-mailmailto:%20jlmil...@kahalawai.com
[http://www.kahalawai.com/email.gif]

On Dec 19, 2012, at 9:30 AM, 
programming...@mac.commailto:programming...@mac.com wrote:

Preaching to the converted, but worthwhile read all the same.

http://zef.me/4235/pick-your-battles

d

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

This email sent to jlmil...@kahalawai.commailto:jlmil...@kahalawai.com

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

This email sent to mgarg...@me.commailto:mgarg...@me.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: production hanging

2012-11-30 Thread Michael Gargano
)
at 
er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1986)
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(Unknown Source)




On Nov 28, 2012, at 6:47 PM, Chuck Hill wrote:

 Now that is a good thought!
 
 On 2012-11-28, at 3:43 PM, Q wrote:
 
 If you are doing concurrent dispatch then this might be worth doing even 
 after they have been running for a while. It could be that you have a 
 deadlock issue and are slowly deadlocking all your worker threads over time 
 until eventually they all become non-responsive and the app instance is 
 effectively dead in the water.
 
 
 On 29/11/2012, at 6:39 AM, Chuck Hill ch...@global-village.net wrote:
 
 Try running jstack on them when the start not responding:
 
 jstack -F process id
 
 That will give you a thread dump and may show something.
 
 Have you looked in the logs for OutOfMemory and HeapSpace?  It could be 
 running out of PermGen space
 
 Are you dispatching requests concurrently?
 
 
 Chuck
 
 
 On 2012-11-28, at 12:05 PM, Michael Gargano wrote:
 
 Hi all,
 
  I’m having an issue in our production environment.  I have 
 two servers (vm’s w/ windows 2008 r2 64-bit) running two instances each.  
 The servers are load balanced by a hardware load balancer that pings the 
 app on each box every minute to determine if it is still up (because of 
 the way our app works, this creates a session).  After about a week of 
 uptime, the each app instance seems to just stop responding to requests 
 one at a time until no instances respond any more.  The java processes are 
 still always running, but nothing responds.  I recently bumped up the mem. 
 on the apps to 3G each, to see if that would help, but the same problem 
 occurred.  Any ideas why this might be happening?  It’s not good.  Below 
 is a sample of the app switches…
 
 -WOPort 2001 -WOCachingEnabled YES -WODebuggingEnabled NO -WOOutputPath 
 c:/logs/log-1 -WOAutoOpenInBrowser NO -WOAutoOpenClientApplication NO 
 -WOLifebeatInterval 120 -WOLifebeatEnabled YES -WOLifebeatDestinationPort 
 1085 -WOAdaptor WODefaultAdaptor -WOWorkerThreadCount 8 -WOListenQueueSize 
 128 -WOWorkerThreadCountMin 16 -WOWorkerThreadCountMax 256 
 -NSProjectSearchPath () -WOSessionTimeOut 1800 -WOApplicationName eGM 
 -WOMonitorEnabled YES -WONoPause YES -Xmx3g 
 -WOAllowsConcurrentRequestHandling YES
 
 
 Thanks.
 -Mike
 
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/gvc/practical_webobjects
 
 Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest 
 Growing Companies in B.C! 
 Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
 Canada’s Fastest-Growing Companies by PROFIT Magazine!
 
 
 
 
 
 
 
 
 
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/qdolan%40gmail.com
 
 This email sent to qdo...@gmail.com
 
 
 -- 
 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/gvc/practical_webobjects
 
 Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
 Companies in B.C! 
 Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
 Canada’s Fastest-Growing Companies by PROFIT Magazine!
 
 
 
 
 
 
 
 
 



 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: production hanging

2012-11-30 Thread Michael Gargano
Some more info on this that I just found.  This doesn't happen under load when 
concurrent dispatch is disabled.  Now is that a bug in wonder or in my app.?

-Mike

On Nov 30, 2012, at 1:25 PM, Michael Gargano wrote:

 okay guys,
 
   you were right... it's a deadlock the worst of all possible worlds. 
  I've included the trace below for one of the deadlocks.  I keep getting two 
 deadlocks at the time the app goes down.  I can't quite figure out why, it 
 seems like it's always in the same one or two places, but there's nothing so 
 different about those spots that it shouldn't lock for the same reasons in a 
 million other places in the app.  I'm only doing fetches in these methods 
 where it breaks and my guess is, that since I have 4 coordinators going, the 
 four threads involved (between the two deadlocks) are locking the 
 coordinators and bringing all the other threads to a grinding halt.  It 
 almost looks to me like a bug in the auto-locking.  Can one thread be 
 accessing multiple coordinators?  I almost feel like one of the EOs I'm 
 getting out of my default session store, that is being used in a fetch spec 
 with an EO from the editing context on the page, are locking across two 
 different store coordinators.  Any help, as usual, is greatly appreciated.  
 Thanks.
 
 Found one Java-level deadlock:
 =
 WorkerThread255:
  waiting for ownable synchronizer 0x000750171ce0, (a 
 java.util.concurrent.locks.ReentrantLock$NonfairSync),
  which is held by WorkerThread68
 WorkerThread68:
  waiting for ownable synchronizer 0x0007409438e0, (a 
 java.util.concurrent.locks.ReentrantLock$NonfairSync),
  which is held by WorkerThread255
 
 Java stack information for the threads listed above:
 ===
 WorkerThread255:
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  0x000750171ce0 (a 
 java.util.concurrent.locks.ReentrantLock$NonfairSync)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at 
 java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(Unknown
  Source)
   at 
 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(Unknown 
 Source)
   at 
 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(Unknown Source)
   at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(Unknown 
 Source)
   at java.util.concurrent.locks.ReentrantLock.lock(Unknown Source)
   at 
 com.webobjects.eocontrol.EOEditingContext.lock(EOEditingContext.java:4617)
   at er.extensions.eof.ERXEC.lock(ERXEC.java:514)
   at er.extensions.eof.ERXEC.autoLock(ERXEC.java:636)
   at er.extensions.eof.ERXEC.initializeObject(ERXEC.java:1143)
   at 
 com.webobjects.eoaccess.EODatabaseContext._fireFault(EODatabaseContext.java:4124)
   at 
 com.webobjects.eoaccess.EOAccessFaultHandler.completeInitializationOfObject(EOAccessFaultHandler.java:89)
   at 
 com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java:1172)
   at 
 com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_GenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:570)
   at 
 com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyGenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:613)
   at 
 er.extensions.eof.ERXGenericRecord$TouchingBinding.valueInObject(ERXGenericRecord.java:205)
   at 
 com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634)
   at com.theapp.security.model._EGMUser.role(Unknown Source)
   at com.theapp.components.Nav.myLocker(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor654.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at 
 com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636)
   at 
 com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
   at 
 com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
   at 
 com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736)
   at 
 com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
   at 
 com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
   at 
 com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804)
   at 
 com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
   at 
 com.webobjects.appserver._private.WOHyperlink.invokeAction(WOHyperlink.java:98)
   at 
 er.extensions.components._private.ERXHyperlink.invokeAction(ERXHyperlink.java:66

production hanging

2012-11-28 Thread Michael Gargano
Hi all,

I'm having an issue in our production environment.  I have two 
servers (vm's w/ windows 2008 r2 64-bit) running two instances each.  The 
servers are load balanced by a hardware load balancer that pings the app on 
each box every minute to determine if it is still up (because of the way our 
app works, this creates a session).  After about a week of uptime, the each app 
instance seems to just stop responding to requests one at a time until no 
instances respond any more.  The java processes are still always running, but 
nothing responds.  I recently bumped up the mem. on the apps to 3G each, to see 
if that would help, but the same problem occurred.  Any ideas why this might be 
happening?  It's not good.  Below is a sample of the app switches...

-WOPort 2001 -WOCachingEnabled YES -WODebuggingEnabled NO -WOOutputPath 
c:/logs/log-1 -WOAutoOpenInBrowser NO -WOAutoOpenClientApplication NO 
-WOLifebeatInterval 120 -WOLifebeatEnabled YES -WOLifebeatDestinationPort 1085 
-WOAdaptor WODefaultAdaptor -WOWorkerThreadCount 8 -WOListenQueueSize 128 
-WOWorkerThreadCountMin 16 -WOWorkerThreadCountMax 256 -NSProjectSearchPath () 
-WOSessionTimeOut 1800 -WOApplicationName eGM -WOMonitorEnabled YES -WONoPause 
YES -Xmx3g -WOAllowsConcurrentRequestHandling YES


Thanks.
-Mike

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


RE: production hanging

2012-11-28 Thread Michael Gargano
I can give that a try.  One thing I forgot to mention, I don't see anything 
strange in the logs either.  No OutOfMemory exceptions no permgen errors, 
nothing unusual  (notice I'm not saying no errors at all :) ).

-Mike

From: Maik Musall [mailto:m...@selbstdenker.ag]
Sent: Wednesday, November 28, 2012 3:31 PM
To: Michael Gargano
Cc: WebObjects-Dev List (webobjects-dev@lists.apple.com)
Subject: Re: production hanging

Without knowing enough about your app, here's a wild guess. Add

-XX:MaxPermSize=256m

directly after your -Xmx setting for heap memory.

Maik



Am 28.11.2012 um 21:05 schrieb Michael Gargano 
mgarg...@escholar.commailto:mgarg...@escholar.com:


Hi all,

I'm having an issue in our production environment.  I have two 
servers (vm's w/ windows 2008 r2 64-bit) running two instances each.  The 
servers are load balanced by a hardware load balancer that pings the app on 
each box every minute to determine if it is still up (because of the way our 
app works, this creates a session).  After about a week of uptime, the each app 
instance seems to just stop responding to requests one at a time until no 
instances respond any more.  The java processes are still always running, but 
nothing responds.  I recently bumped up the mem. on the apps to 3G each, to see 
if that would help, but the same problem occurred.  Any ideas why this might be 
happening?  It's not good.  Below is a sample of the app switches...

-WOPort 2001 -WOCachingEnabled YES -WODebuggingEnabled NO -WOOutputPath 
c:/logs/log-1 -WOAutoOpenInBrowser NO -WOAutoOpenClientApplication NO 
-WOLifebeatInterval 120 -WOLifebeatEnabled YES -WOLifebeatDestinationPort 1085 
-WOAdaptor WODefaultAdaptor -WOWorkerThreadCount 8 -WOListenQueueSize 128 
-WOWorkerThreadCountMin 16 -WOWorkerThreadCountMax 256 -NSProjectSearchPath () 
-WOSessionTimeOut 1800 -WOApplicationName eGM -WOMonitorEnabled YES -WONoPause 
YES -Xmx3g -WOAllowsConcurrentRequestHandling YES


Thanks.
-Mike

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

This email sent to m...@selbstdenker.agmailto:m...@selbstdenker.ag

 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


RE: production hanging

2012-11-28 Thread Michael Gargano
Hi Chuck,

There's nothing unusual in the logs indicating an OutOfMemory 
exception.  I recall PermGen throwing an exception or spitting out an error (at 
least in non-WO apps), don't see that either.  I think I'm dispatching requests 
concurrently I have -WOAllowsConcurrentRequestHandling YES set on each 
instance.  I think that does it, no?

Thanks.
-Mike

-Original Message-
From: Chuck Hill [mailto:ch...@global-village.net] 
Sent: Wednesday, November 28, 2012 3:39 PM
To: Michael Gargano
Cc: WebObjects-Dev List (webobjects-dev@lists.apple.com)
Subject: Re: production hanging

Try running jstack on them when the start not responding:

jstack -F process id

That will give you a thread dump and may show something.

Have you looked in the logs for OutOfMemory and HeapSpace?  It could be running 
out of PermGen space

Are you dispatching requests concurrently?


Chuck


On 2012-11-28, at 12:05 PM, Michael Gargano wrote:

 Hi all,
  
 I'm having an issue in our production environment.  I have 
 two servers (vm's w/ windows 2008 r2 64-bit) running two instances each.  The 
 servers are load balanced by a hardware load balancer that pings the app on 
 each box every minute to determine if it is still up (because of the way our 
 app works, this creates a session).  After about a week of uptime, the each 
 app instance seems to just stop responding to requests one at a time until no 
 instances respond any more.  The java processes are still always running, but 
 nothing responds.  I recently bumped up the mem. on the apps to 3G each, to 
 see if that would help, but the same problem occurred.  Any ideas why this 
 might be happening?  It's not good.  Below is a sample of the app switches...
  
 -WOPort 2001 -WOCachingEnabled YES -WODebuggingEnabled NO -WOOutputPath 
 c:/logs/log-1 -WOAutoOpenInBrowser NO -WOAutoOpenClientApplication NO 
 -WOLifebeatInterval 120 -WOLifebeatEnabled YES -WOLifebeatDestinationPort 
 1085 -WOAdaptor WODefaultAdaptor -WOWorkerThreadCount 8 -WOListenQueueSize 
 128 -WOWorkerThreadCountMin 16 -WOWorkerThreadCountMax 256 
 -NSProjectSearchPath () -WOSessionTimeOut 1800 -WOApplicationName eGM 
 -WOMonitorEnabled YES -WONoPause YES -Xmx3g 
 -WOAllowsConcurrentRequestHandling YES
  
  
 Thanks.
 -Mike
  
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

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

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada's Fastest-Growing Companies by PROFIT Magazine!











 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


RE: willDelete

2012-06-26 Thread Michael Gargano
Does the might in mightDelete indicate that it may actually be reverted 
after being called or is it just a misnomer?

-Mike

-Original Message-
From: David LeBer [mailto:dleber_wo...@codeferous.com] 
Sent: Tuesday, June 26, 2012 12:04 PM
To: Michael Gargano
Cc: WebObjects-Dev List (webobjects-dev@lists.apple.com)
Subject: Re: willDelete

On 2012-06-26, at 11:45 AM, Michael Gargano wrote:

 Is the following true...
  
 When in willDelete are the relationships all set to null?

Yes.

  
 Anyway to not have it do that or work around it?

ERXGenericRecord's mightDelete

  
 Thanks.
 -Mike

You're welcome.

D





 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: MariaDB

2012-04-16 Thread Michael Gargano
interesting... along the same lines... anyone try out drizzle yet?

-Mike

On Apr 13, 2012, at 8:08 PM, Kieran Kelleher wrote:

I haven't had an opportunity to look at it. Have you?

Regards, Kieran.
(Sent from my iPhone)


On Apr 13, 2012, at 6:34 PM, Paul Yu p...@me.commailto:p...@me.com wrote:


Kieran

Any opinion on MariaDB?  It is suppose to be a drop in replacement for MySQL... 
 Would it work with Wonder/EOF?
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.commailto:Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/mgargano%40escholar.com

This email sent to mgarg...@escholar.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


RE: Optimizing EOF Applications - what does this mean to you?

2012-04-10 Thread Michael Gargano
Hey Chuck,

I know this is a little late, but I'd like to see something about...

- Best way to handle freshness across multiple instances.
- How best to do operations not handled by fetch specs. (e.g. group by, 
adding a column that needs to come from another data source [like an array], 
performing sorting on these types of columns)
- Anything on confederation between db's (although I'm probably the 
only one doing that)

Thanks.
-Mike



-Original Message-
From: webobjects-dev-bounces+mgargano=escholar@lists.apple.com 
[mailto:webobjects-dev-bounces+mgargano=escholar@lists.apple.com] On Behalf 
Of Chuck Hill
Sent: Tuesday, April 03, 2012 3:38 PM
To: WebObjects-Dev List
Subject: Optimizing EOF Applications - what does this mean to you?

Hi,

My topic for WOWODC this year is EOF Optimization.  This was chosen based on 
frequent requests in the yearly surveys.  I do have some things to address, but 
I would really like to hear what YOU are interested in for YOUR projects.  
Please let me know and I will try my best to accommodate all requests.

Thanks,

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/gvc/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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Logo proposal

2012-03-29 Thread Michael Gargano
it's so close to death already, do we really need to push it?  :)

Sent from my iPhone

On Mar 29, 2012, at 4:52 PM, Alexis Tual alexis.t...@gmail.com wrote:

 Hi,
 
 is this Capitain LeChuck leading the dead pirates :] ?
 
 (Sorry I've been playing too much 
 http://itunes.apple.com/us/app/the-secret-monkey-island-special/id324741347?mt=8)
 
 Alex
 
 2012/3/30 Daniel Mejia mej...@evol-tech.com
 Hi all,
 
 Some time ago, Pascal requested some help to redesign the WO community site.  
 I would like to try to help with that job.  I'm sending a logo proposal to 
 know what do you think about. After the logo was decided we can send some 
 proposal for the site look and feel.
 
 Saludos,
 
 Daniel.
 
 
 PastedGraphic-1.tiff
 
 
  ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/alexis.tual%40gmail.com
 
 This email sent to alexis.t...@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:
 https://lists.apple.com/mailman/options/webobjects-dev/mgargano%40me.com
 
 This email sent to mgarg...@me.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Postgresql and ERXSQLHelper

2012-03-19 Thread Michael Gargano
Just some follow up on this

It turns out this had to do with being headless.   As soon as initApp 
was added (or when I turned it into a full fledge WO app) the problem went 
away.  I'm not sure what additional work is being done in initApp, but this is 
clearly a bug when running headless.  I wish I knew where to look to fix it, 
but nothing that initApp does jumped out at me as something that was missing in 
initEOF.

-Mike


On Mar 16, 2012, at 6:35 PM, Michael Gargano wrote:

 Okay, I'm not sure how to explain this, but here it goes...
 
 I have two apps, a standard wonder app and a headless wonder app that only 
 calls initEOF.
 Both of these apps use a common framework and both are set to use the 
 PostgreSQLPlugIn.  In one of the fetch specs in my framework an 
 ERXFalseQualifier is used.  In the regular wonder app this works fine and it 
 generates 0=1 as it should through ERXSQLHelper.  On the headless app, 
 however, this fails stating that the PostgreSQLPlugIn doesn't support 
 generation of ERXFalseQualifier.  While carefully stepping through this ball 
 of confusion I noticed that this is deferred to ERXSQLHelper in the regular 
 app, but in the headless app nothing ever goes through ERXSQLHelper, only the 
 postgres plugin code is ever called.
 
 Can anyone offer any insights into what is going on here?  Why isn't 
 ERXSQLHelper being used?
 
 Thanks.
 Much appreciated.
 
 -Mike
 
 
 ___
 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:
 https://lists.apple.com/mailman/options/webobjects-dev/mgargano%40escholar.com
 
 This email sent to mgarg...@escholar.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Postgresql and ERXSQLHelper

2012-03-16 Thread Michael Gargano
Okay, I'm not sure how to explain this, but here it goes...

I have two apps, a standard wonder app and a headless wonder app that only 
calls initEOF.
Both of these apps use a common framework and both are set to use the 
PostgreSQLPlugIn.  In one of the fetch specs in my framework an 
ERXFalseQualifier is used.  In the regular wonder app this works fine and it 
generates 0=1 as it should through ERXSQLHelper.  On the headless app, 
however, this fails stating that the PostgreSQLPlugIn doesn't support 
generation of ERXFalseQualifier.  While carefully stepping through this ball of 
confusion I noticed that this is deferred to ERXSQLHelper in the regular app, 
but in the headless app nothing ever goes through ERXSQLHelper, only the 
postgres plugin code is ever called.

Can anyone offer any insights into what is going on here?  Why isn't 
ERXSQLHelper being used?

Thanks.
Much appreciated.

-Mike


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


foundation class patching

2012-03-13 Thread Michael Gargano
Hi,

Can anyone describe how the foundation classes are patched into an ERX 
based application?  I have a headless WO app that only starts up EOF with 
initEOF and I'm getting some unusual behavior with NSArray in a framework that 
works fine in the other WO app it's used in.  I have a feeling that the 
foundation classes aren't getting the ERXExtentions patches.  Since they 
collide with Apple's namespace I'm assuming that this is done by a class loader?

Thanks.
-Mike


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


EC locking (headless and threads)

2012-02-10 Thread Michael Gargano
Hi everyone,

I just want to get clarification on something before I get myself into 
trouble later.  If I have a headless WO app (or potential just a spawned worker 
thread), and I'm using ERXEC, I need to manually lock and unlock the context, 
correct?  I'm assuming that ERXEC does the autolock/autounlock in the RR loop, 
which I won't have in this situation.

Thanks.
-Mike


 ___
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


migrations with multiple software versions

2012-01-18 Thread Michael Gargano
Hi all,

I have a little scenario here and I was wondering if there was a way 
the ERXMigration system could handle it.  It looks like a no just reading 
some of the docs, but I can't be the only one doing this (i hope).


So, I have two versions of software being worked on simultaneously.  
The version 1 branch is stable with point releases introducing new features and 
the version 2 branch is a fairly major revision simultaneously undergoing major 
development.


   version 1.0 _ version 1.1__ version 
1.1.1  __ version 1.2.0
  
/_.
  
\version 2.0 development


The question is... is there a good way to mange migrations with this sort of 
setup?  It seems like the migration system is really designed more to handle a 
linear progression only.  Is there even a way to spilt the migration classes of 
a particular model into separate packages to better manage the migrations 
across different versions of the software?  I understand that as I add things 
to the version 1 branch that there will be potential conflict in the version 2 
branch, but my question is more like do I start the version 2 migration numbers 
at like 200 and leave room for ~90 potential future version 1 migrations and if 
i did that does that mean I would need to create ~90 actual classes that do 
nothing  (obviously, this is not really a good solution)


Any thoughts or ideas on this are appreciated.
Thanks.

-Mike

 ___
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


thanks

2012-01-02 Thread Michael Gargano
My first major WebObjects application, the thing we've been working on the last 
year, was finally released today.  Thanks for all the help.

-Mike

 ___
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: thanks

2012-01-02 Thread Michael Gargano
unfortunately the app handles confidential data, but maybe marketing will make 
some screenshots or videos in the future.   so, this is the only link I have 
for now  http://www.escholar.com/products/mytrack/

(just marketing boilerplate)

-mike

On Jan 2, 2012, at 2:10 PM, Jesse Tayler jtay...@oeinc.com wrote:

 congrats!
 
 it takes courage to push it out over the line, especially when you are 
 responsible.
 
 got links?
 
 what's it all about?
 
 On Jan 2, 2012, at 1:55 PM, Michael Gargano wrote:
 
 My first major WebObjects application, the thing we've been working on the 
 last year, was finally released today.  Thanks for all the help.
 
 -Mike
 
 ___
 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/jtayler%40oeinc.com
 
 This email sent to jtay...@oeinc.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: ERXObjectStoreCoordinatorPool exception

2011-12-13 Thread Michael Gargano
Okay, I've figured out how to set this up across servers, but I'm still seeing 
the exception.  Doesn't seem to cause any problems but I haven't met a stack 
trace I like.

I'm a little unsure exactly why you need to make the choice between using the 
remote synchronizer and using 
setFetchTimestamp(System.getCurrentTimeInMillis()) on EC creation.  Isn't the 
end effect really the same?  The DB cache gets the freshest data in both cases, 
no?

Thanks.
-Mike


From: webobjects-dev-bounces+mgargano=escholar@lists.apple.com 
[mailto:webobjects-dev-bounces+mgargano=escholar@lists.apple.com] On Behalf 
Of Michael Gargano
Sent: Monday, December 12, 2011 4:50 PM
To: WebObjects webobjects-dev
Subject: ERXObjectStoreCoordinatorPool exception

Hi again,

I just configured the ERXObjectStoreCoordinatorPool have 4 coordinators using 
the ERJGroupSyncronizer.

I have 2 application servers running 2 apps each.  The apps on each box talk to 
each other and both servers share one DB.


Server A
  Server B
---  
---
myApp   
 myApp
taskRunnerApp   
taskRunnerApp
\   
/
DB Server


Everything seems to be running okay, but now that I've turned on the 
coordinator pool I see this strange exception.

ERROR er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer  - 
java.lang.NullPointerException
NullPointerException
  at 
er.extensions.eof.ERXEOAccessUtilities.databaseContextForEntityNamed(ERXEOAccessUtilities.java:1011)
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue._process(ERXObjectStoreCoordinatorSynchronizer.java:490)
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue.process(ERXObjectStoreCoordinatorSynchronizer.java:521)
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue.run(ERXObjectStoreCoordinatorSynchronizer.java:598)
  ... skipped 1 stack elements

Anything to be concerned about?

I also set both apps to use the same group name, so I assume that means that 
it's syncing the EOF stacks across both apps.  Is there a way to do this across 
servers as well, and is that even a good idea?

Thanks.
-Mike

 ___
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


ERXObjectStoreCoordinatorPool exception

2011-12-12 Thread Michael Gargano
Hi again,

I just configured the ERXObjectStoreCoordinatorPool have 4 coordinators using 
the ERJGroupSyncronizer.

I have 2 application servers running 2 apps each.  The apps on each box talk to 
each other and both servers share one DB.


Server A Server B
--- ---
myApp myApp
taskRunnerApp taskRunnerApp
\ /
DB Server

Everything seems to be running okay, but now that I've turned on the 
coordinator pool I see this strange exception.

ERROR er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer  - 
java.lang.NullPointerException
NullPointerException
  at 
er.extensions.eof.ERXEOAccessUtilities.databaseContextForEntityNamed(ERXEOAccessUtilities.java:1011)
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue._process(ERXObjectStoreCoordinatorSynchronizer.java:490)
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue.process(ERXObjectStoreCoordinatorSynchronizer.java:521)
  at 
er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer$ProcessChangesQueue.run(ERXObjectStoreCoordinatorSynchronizer.java:598)
  ... skipped 1 stack elements

Anything to be concerned about?

I also set both apps to use the same group name, so I assume that means that 
it's syncing the EOF stacks across both apps.  Is there a way to do this across 
servers as well, and is that even a good idea?

Thanks.
-Mike

 ___
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: Interesting DisplayGroup EOEditingContext Interaction

2011-12-12 Thread Michael Gargano
After more testing and playing today.  It seems that the refresh of the 
ERXBatchingDisplayGroup is sporadic at best.  I tried using just the fetch() 
and the status field never updated, setting the qualifier to the current 
qualifier seems to work more often then not, but it still does not work 
consistently.  However, forcing a page refresh in one browser still seems to 
consistently update the other browser.  At the end of the day, I just don't 
want the display group to cache any of the records on this page.

Thanks.
-Mike


On Dec 12, 2011, at 2:35 PM, Chuck Hill wrote:

 
 On 2011-12-09, at 3:54 PM, Michael Gargano wrote:
 
 If I reload the page on one machine, it updates the status and then 
 subsequently the other machine refreshes with the correct status, but I 
 need to poke it.  I don't understand why it works fine on the individual 
 machines when I'm logged in only once and acts like this when I have two 
 browsers refreshing the same data.  The page generates a new EC.  I'm 
 guessing it's some kind of weird locking issue, but I can't figure out 
 what's locking.  I'm using optimistic locking and on top of that, these 
 are only reads.
 
 
 One EOF stack or multiple?  Try turning on SQL logging to see what is going 
 on with the database.
 
 One EOF stack to the database where this is occurring, multiple in the app 
 itself, and in production (not the case here) load balanced app servers.
 From what I can see in the SQL logs... when it works the way I expect it to, 
 I see the fetch for the full object.  When the refresh is just hanging out, 
 I see two queries.  
 
 I suspect these are coming from different places in the code.  You should be 
 able to modify ERXAdaptorChannelDelegate to lock a trace of where the fetches 
 come from.
 
 
 One that gets the count using the user qualifier and then a select on the 
 id's for the batch that I'm currently on.
 
 That is the ERXBatchingDisplayGroup refreshing.  Can you change the 
 underlying fetch spec to refresh refetched objects?
 
 
 I don't see the fetch for the full object in these cases.  That's what's so 
 confusing.  I can't figure out what would be different.  The editing context 
 is getting created at the page level (and cached in an ivar), does that get 
 cached per page or per thread?  If it's per page could it be because they 
 are actually using the same editing context?
 
 
 It is per page *instance* and they should not be using the same EC.
 
 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: Interesting DisplayGroup EOEditingContext Interaction

2011-12-12 Thread Michael Gargano
No, no I am not.  That was it.  Thanks Chuck


-Mike


On Dec 12, 2011, at 5:12 PM, Chuck Hill wrote:

 Are you setting the display group up with a data source like this?
 
dataSource = new EODatabaseDataSource(editingContext(), 
 entityName());

 ((EODatabaseDataSource)dataSource).fetchSpecification().setRefreshesRefetchedObjects(refreshesRefetchedObjects());
 
 
 
 On 2011-12-12, at 1:56 PM, Michael Gargano wrote:
 
 After more testing and playing today.  It seems that the refresh of the 
 ERXBatchingDisplayGroup is sporadic at best.  I tried using just the fetch() 
 and the status field never updated, setting the qualifier to the current 
 qualifier seems to work more often then not, but it still does not work 
 consistently.  However, forcing a page refresh in one browser still seems to 
 consistently update the other browser.  At the end of the day, I just don't 
 want the display group to cache any of the records on this page.
 
 Thanks.
 -Mike
 
 
 On Dec 12, 2011, at 2:35 PM, Chuck Hill wrote:
 
 
 On 2011-12-09, at 3:54 PM, Michael Gargano wrote:
 
 If I reload the page on one machine, it updates the status and then 
 subsequently the other machine refreshes with the correct status, but I 
 need to poke it.  I don't understand why it works fine on the individual 
 machines when I'm logged in only once and acts like this when I have two 
 browsers refreshing the same data.  The page generates a new EC.  I'm 
 guessing it's some kind of weird locking issue, but I can't figure out 
 what's locking.  I'm using optimistic locking and on top of that, these 
 are only reads.
 
 
 One EOF stack or multiple?  Try turning on SQL logging to see what is 
 going on with the database.
 
 One EOF stack to the database where this is occurring, multiple in the app 
 itself, and in production (not the case here) load balanced app servers.
 From what I can see in the SQL logs... when it works the way I expect it 
 to, I see the fetch for the full object.  When the refresh is just hanging 
 out, I see two queries.  
 
 I suspect these are coming from different places in the code.  You should 
 be able to modify ERXAdaptorChannelDelegate to lock a trace of where the 
 fetches come from.
 
 
 One that gets the count using the user qualifier and then a select on the 
 id's for the batch that I'm currently on.
 
 That is the ERXBatchingDisplayGroup refreshing.  Can you change the 
 underlying fetch spec to refresh refetched objects?
 
 
 I don't see the fetch for the full object in these cases.  That's what's 
 so confusing.  I can't figure out what would be different.  The editing 
 context is getting created at the page level (and cached in an ivar), does 
 that get cached per page or per thread?  If it's per page could it be 
 because they are actually using the same editing context?
 
 
 It is per page *instance* and they should not be using the same EC.
 
 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
 
 
 
 
 
 
 

 ___
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


Interesting DisplayGroup EOEditingContext Interaction

2011-12-09 Thread Michael Gargano
Hey dev. group,

As I was working on one of my application pages today I noticed 
something that I couldn't explain and was hoping one of you nice folks could 
shed some light on it.

-Setting the stage-
One of the pages I'm working on has an AjaxGrid that is periodically (5 
secs.) refreshed from an AjaxUpdateContainer.  When the update container fires, 
it calls an action that calls
displayGroup.setQualifier(displayGroup.qualifier()) to refresh the 
ERXBatchingDisplayGroup as noted in the JavaDoc and by Chuck in previous posts.
Now the reason this grid is being updated is because I'm running 
processes in the background and the grid shows the status of the processes 
(qualified by user).  This way I can see when the task completes.
Easy enough It seems to work great.

-The dilemma-
Now here's what I don't get.  If I log into the application as the same 
user from two different machines... When I start a new process on one machine 
both of the grids update showing that a new process is running (as expected), 
but neither ever update the grid when the process is completed.  If I reload 
the page on one machine, it updates the status and then subsequently the other 
machine refreshes with the correct status, but I need to poke it.  I don't 
understand why it works fine on the individual machines when I'm logged in only 
once and acts like this when I have two browsers refreshing the same data.  The 
page generates a new EC.  I'm guessing it's some kind of weird locking issue, 
but I can't figure out what's locking.  I'm using optimistic locking and on top 
of that, these are only reads.


Thanks.
Singed,

Curiously Confused  (aka Mike)

 ___
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: Interesting DisplayGroup EOEditingContext Interaction

2011-12-09 Thread Michael Gargano

On Dec 9, 2011, at 6:19 PM, Chuck Hill wrote:

 
 On 2011-12-09, at 3:05 PM, Michael Gargano wrote:
 
 Hey dev. group,
 
  As I was working on one of my application pages today I noticed 
 something that I couldn't explain and was hoping one of you nice folks could 
 shed some light on it.
 
  -Setting the stage-
  One of the pages I'm working on has an AjaxGrid that is periodically (5 
 secs.) refreshed from an AjaxUpdateContainer.  When the update container 
 fires, it calls an action that calls
  displayGroup.setQualifier(displayGroup.qualifier()) to refresh the 
 ERXBatchingDisplayGroup as noted in the JavaDoc and by Chuck in previous 
 posts.
 
 Calling displayGroup.fetch() might be a better way.

I will try that.

 
 
  Now the reason this grid is being updated is because I'm running 
 processes in the background and the grid shows the status of the processes 
 (qualified by user).  This way I can see when the task completes.
  Easy enough It seems to work great.
 
  -The dilemma-
  Now here's what I don't get.  If I log into the application as the same 
 user from two different machines... When I start a new process on one 
 machine both of the grids update showing that a new process is running (as 
 expected),
 
 OK

  OK indeed!  :)
 
 
 but neither ever update the grid when the process is completed.
 
 Are you sure the Ajax update is actually happening?  Or is an exception 
 thrown on the server side preventing the update.

   Yes, because I do see the SQL in the logs and it does refresh when a new 
process is created.  I don't see any stack traces.

 
 
 If I reload the page on one machine, it updates the status and then 
 subsequently the other machine refreshes with the correct status, but I need 
 to poke it.  I don't understand why it works fine on the individual machines 
 when I'm logged in only once and acts like this when I have two browsers 
 refreshing the same data.  The page generates a new EC.  I'm guessing it's 
 some kind of weird locking issue, but I can't figure out what's locking.  
 I'm using optimistic locking and on top of that, these are only reads.
 
 
 One EOF stack or multiple?  Try turning on SQL logging to see what is going 
 on with the database.

  One EOF stack to the database where this is occurring, multiple in the app 
itself, and in production (not the case here) load balanced app servers.
  From what I can see in the SQL logs... when it works the way I expect it to, 
I see the fetch for the full object.  When the refresh is just hanging out, I 
see two queries.  One that gets the count using the user qualifier and then a 
select on the id's for the batch that I'm currently on.  I don't see the fetch 
for the full object in these cases.  That's what's so confusing.  I can't 
figure out what would be different.  The editing context is getting created at 
the page level (and cached in an ivar), does that get cached per page or per 
thread?  If it's per page could it be because they are actually using the same 
editing context?

 
 
 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


AjaxObserveField observeFieldFrequency problem

2011-12-01 Thread Michael Gargano
Anyone ever encounter this?

I have a CCAjaxTab and inside each tab is a AjaxObserveField observing 
a text field and, somewhere else in the tab, an update container.  the 
AjaxObserveField has an observeFieldFrequency of 1.  everything works fine 
except in IE (of course) when you click on another tab.  An alert box pops up 
from wonder.js (line 379) complaining that it can't find the update container 
ID of what is being observed on the tab I just came from because that tab 
content has now been replaced.  Anyone have ideas of how I can stop the 
observing before switching tabs or any other suggestions?

Thanks.
-Mike

 ___
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: Does wonder have a standard User framework?

2011-11-28 Thread Michael Gargano
you might want to look into apache shiro

-mike

On Nov 28, 2011, at 12:57 PM, James Cicenia ja...@jimijon.com wrote:

 Just wondering...
 
 You know the usual.. 
 
 login/password/email reminder/basic profile
 
 Cheers
 James
 ___
 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/mgargano%40me.com
 
 This email sent to mgarg...@me.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: Raw SQL with bindings

2011-11-09 Thread Michael Gargano
So, for future posterity and to help myself again when I need it...

EOEntity entity = EOUtilities.entityForClass(cdw, YourEntity.class);
JDBCExpression exp = new JDBCExpression(entity);
exp.setUseBindVariables(true);
exp.setStatement(sqlStatement);




exp.addBindVariableDictionary(exp.bindVariableDictionaryForAttribute(entity.attributeNamed(YourEntity.UNIQUE_ID_KEY),
 ID));

exp.addBindVariableDictionary(exp.bindVariableDictionaryForAttribute(entity.attributeNamed(YourEntity.YEAR_KEY),
 new NSTimestamp(year)));



NSArrayNSDictionary rows =
ERXEOAccessUtilities.rawRowsForSQLExpression(cdw, YourModelName, exp);


And now, SQL injection attacks have been avoided and the planet is once again 
safe!

-Mike



On Nov 8, 2011, at 2:29 PM, Michael Gargano wrote:

Okay, let me come at this one another way because this doesn't seem to be 
panning out at all.  I want to write a complicated SQL query across multiple 
tables and return a bunch of columns across those tables as an array of 
dictionaries.  I know EOUtilities.rawRowsForSQLExpression will do this, but I 
want to have the parameters I'm passing into my expression to be parameterized 
as to prevent SQL injection attacks.

Any Ideas?
Thanks.
-Mike

On Nov 8, 2011, at 11:52 AM, Michael Gargano wrote:

Hi,

Does anyone have any examples of how to use 
ERXSQLQueryWithBindingsUtilities.runSqlQueryWithBindings?

Two questions:
1) It seems like it should support named parameters since ERXKeyValueBinding 
implements ERXSQLBinding, but I can't figure out how the parameter placeholders 
should look in the query
2) Since I couldn't figure out 1(above) I was just using ERXObjectBindings and 
the parameter placeholder '?'.  It seems to like this much better but when I 
pass a date in as a parameter it chokes on postgresql.

Anyone ever use this utility method?

Much thanks.
-Mike

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

This email sent to mgarg...@escholar.commailto:mgarg...@escholar.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: Raw SQL with bindings

2011-11-09 Thread Michael Gargano
I actually was instantiating PostgresqlExpression in my code, but I cleaned it 
up for the e-mail.  This is nifty to keep it database agnostic though.  Thanks!

-Mike

On Nov 9, 2011, at 1:38 PM, Mike Schrag wrote:

EODatabaseContext dbc = EOUtilities.databaseContextForModelNamed(ec, 
model.namehttp://model.name());
EOSQLExpressionFactory sqlFactory = 
dbc.adaptorContext().adaptor().expressionFactory();

(adaptor().expressionFactory just calls plugIn().expressionFactory() for JDBC)

ms

On Nov 9, 2011, at 1:34 PM, Mike Schrag wrote:

that's not exactly right ... you want to get an expression from an 
expressionfactory from your jdbcplugin implementation.

ms

On Nov 9, 2011, at 1:30 PM, Michael Gargano wrote:

So, for future posterity and to help myself again when I need it...

EOEntity entity = EOUtilities.entityForClass(cdw, YourEntity.class);
JDBCExpression exp = new JDBCExpression(entity);
exp.setUseBindVariables(true);
exp.setStatement(sqlStatement);


exp.addBindVariableDictionary(exp.bindVariableDictionaryForAttribute(entity.attributeNamed(YourEntity.UNIQUE_ID_KEY),
 ID));

exp.addBindVariableDictionary(exp.bindVariableDictionaryForAttribute(entity.attributeNamed(YourEntity.YEAR_KEY),
 new NSTimestamp(year)));

NSArrayNSDictionary rows =
ERXEOAccessUtilities.rawRowsForSQLExpression(cdw, YourModelName, exp);


And now, SQL injection attacks have been avoided and the planet is once again 
safe!

-Mike



On Nov 8, 2011, at 2:29 PM, Michael Gargano wrote:

Okay, let me come at this one another way because this doesn't seem to be 
panning out at all.  I want to write a complicated SQL query across multiple 
tables and return a bunch of columns across those tables as an array of 
dictionaries.  I know EOUtilities.rawRowsForSQLExpression will do this, but I 
want to have the parameters I'm passing into my expression to be parameterized 
as to prevent SQL injection attacks.

Any Ideas?
Thanks.
-Mike

On Nov 8, 2011, at 11:52 AM, Michael Gargano wrote:

Hi,

Does anyone have any examples of how to use 
ERXSQLQueryWithBindingsUtilities.runSqlQueryWithBindings?

Two questions:
1) It seems like it should support named parameters since ERXKeyValueBinding 
implements ERXSQLBinding, but I can't figure out how the parameter placeholders 
should look in the query
2) Since I couldn't figure out 1(above) I was just using ERXObjectBindings and 
the parameter placeholder '?'.  It seems to like this much better but when I 
pass a date in as a parameter it chokes on postgresql.

Anyone ever use this utility method?

Much thanks.
-Mike

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

This email sent to mgarg...@escholar.commailto:mgarg...@escholar.com


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


Raw SQL with bindings

2011-11-08 Thread Michael Gargano
Hi,

Does anyone have any examples of how to use 
ERXSQLQueryWithBindingsUtilities.runSqlQueryWithBindings?

Two questions:
1) It seems like it should support named parameters since ERXKeyValueBinding 
implements ERXSQLBinding, but I can't figure out how the parameter placeholders 
should look in the query
2) Since I couldn't figure out 1(above) I was just using ERXObjectBindings and 
the parameter placeholder '?'.  It seems to like this much better but when I 
pass a date in as a parameter it chokes on postgresql.

Anyone ever use this utility method?

Much thanks.
-Mike

 ___
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: Raw SQL with bindings

2011-11-08 Thread Michael Gargano
Okay, let me come at this one another way because this doesn't seem to be 
panning out at all.  I want to write a complicated SQL query across multiple 
tables and return a bunch of columns across those tables as an array of 
dictionaries.  I know EOUtilities.rawRowsForSQLExpression will do this, but I 
want to have the parameters I'm passing into my expression to be parameterized 
as to prevent SQL injection attacks.

Any Ideas?
Thanks.
-Mike

On Nov 8, 2011, at 11:52 AM, Michael Gargano wrote:

Hi,

Does anyone have any examples of how to use 
ERXSQLQueryWithBindingsUtilities.runSqlQueryWithBindings?

Two questions:
1) It seems like it should support named parameters since ERXKeyValueBinding 
implements ERXSQLBinding, but I can't figure out how the parameter placeholders 
should look in the query
2) Since I couldn't figure out 1(above) I was just using ERXObjectBindings and 
the parameter placeholder '?'.  It seems to like this much better but when I 
pass a date in as a parameter it chokes on postgresql.

Anyone ever use this utility method?

Much thanks.
-Mike

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

This email sent to mgarg...@escholar.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: EOF validation messages questions

2011-10-21 Thread Michael Gargano
Hi Ramsey,

Okay, so you helped me quite a bit here, but of course I have a few follow-up 
questions.  :-D

1)  (the easier one)  how do I change the name for an entity in the 
localization file?
2)  When a validation exception comes from a formatter (the java.text.Format) 
on a text field, the exception is a NSValidation.ValidationException which does 
not have a context like the ERXValidaion does.  Also, because it is thrown 
before it has anything to do with EOF, there is no attribute or eo associated 
with it, so in the contextForException method you don't even know what form is 
throwing it.  How is this usually handled, because this is giving me the 
following error... The value entered for ? is not valid.  I can grab it on 
the page in validationFailedWithException, but again there's no way to set the 
context.

I'm surprised by how confusing this is for such seemingly simple task.
Thanks again.

-Mike


On Oct 19, 2011, at 6:54 PM, Ramsey Gurley wrote:



On Oct 19, 2011, at 3:41 PM, Michael Gargano wrote:

Hi Ramsey,

I'm a little confused here.  There must be some kind of context that it's using 
by default, because most of the messages are correct.  The other thing I don't 
understand is if there is no attribute() method on ERXValidationException why 
then does the following template string render properly?

ExceedsMaximumLengthException = The value entered for 
b@@displayNameForProperty@@/b exceeds the length of 
b@@attribute.width@@/b.;

Pardon, there IS an attribute() method on ERXValidationException.

I believe if you stick a breakpoint into that method and ERXValidationFactory's 
messageForException() method, you'll get the answers to your questions though 
:-)

Ramsey


Sorry, I guess I just don't fully understand how this mechanism fully works 
yet.  I know you pointed me in a similar direction back in Sep. when I was 
having trouble with the articles displaying properly, but I thought those 
issues were all d2w related.  Now that I'm no longer using any d2w I'm even 
more confused.  :)

Thanks.
-Mike


On Oct 19, 2011, at 4:35 PM, Ramsey Gurley wrote:

Hi Mike,

On Oct 19, 2011, at 10:52 AM, Michael Gargano wrote:

Hi all,

I'm still having some occasional issues with EOF validations (2 things in 
particular)...


1) For some attributes (it seems like attributes that are type intNumber, but 
there may be others too), I'm getting validation error messages that end with 
?.
I had that problem the other month on all my attributes, but it had to with the 
d2w libs I had in the build path at the time, those are gone now and I don't 
know why this happens or the best way to handle it.

In ERExtensions ValidationTemplate.strings file I see:

ValueConversionException = The value entered for 
b@@displayNameForProperty@@/b is not a valid 
b@@attribute.valueClass@@/b.;

The display name for your property is created correctly because there is a 
displayNameForProperty() method on ERXValidationException.

There's no attribute() method on ERXValidationException, so it goes to the 
validation context object for an answer.

If you don't have a validation delegate to supply a context and you haven't set 
a context manually, you end up with a '?' replacement character.


2) Somewhat related to this... I have some EO attributes with names that make 
sense in the business domain, but should be called something else when surfaced 
to the user.  So, the attribute might be fancyBusinessObjectName, but when I 
catch the exception and show the message I want it to be displayed as User Non 
Scary Name.

Is there a way to do either of these things without just doing string 
replacements on the message from the exception, perhaps something in userInfo?


Thanks.
-Mike

In the example above, you could add something like:

PropertyKey.fancyBusinessObjectName = User Non Scary Name;

To your english strings file and get the desired results. It's also done as

MyEntityName.fancyBusinessObjectName = User Non Scary Name;

In some places. Not sure which will work for you.


Ramsey




 ___
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


EOF validation messages questions

2011-10-19 Thread Michael Gargano
Hi all,

I'm still having some occasional issues with EOF validations (2 things in 
particular)...


1) For some attributes (it seems like attributes that are type intNumber, but 
there may be others too), I'm getting validation error messages that end with 
is not a valid ?.
I had that problem the other month on all my attributes, but it had to with the 
d2w libs I had in the build path at the time, those are gone now and I don't 
know why this happens or the best way to handle it.

2) Somewhat related to this... I have some EO attributes with names that make 
sense in the business domain, but should be called something else when surfaced 
to the user.  So, the attribute might be fancyBusinessObjectName, but when I 
catch the exception and show the message I want it to be displayed as User Non 
Scary Name.

Is there a way to do either of these things without just doing string 
replacements on the message from the exception, perhaps something in userInfo?


Thanks.
-Mike

 ___
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: EOF validation messages questions

2011-10-19 Thread Michael Gargano
Hi Ramsey,

I'm a little confused here.  There must be some kind of context that it's using 
by default, because most of the messages are correct.  The other thing I don't 
understand is if there is no attribute() method on ERXValidationException why 
then does the following template string render properly?

ExceedsMaximumLengthException = The value entered for 
b@@displayNameForProperty@@/b exceeds the length of 
b@@attribute.width@@/b.;

Sorry, I guess I just don't fully understand how this mechanism fully works 
yet.  I know you pointed me in a similar direction back in Sep. when I was 
having trouble with the articles displaying properly, but I thought those 
issues were all d2w related.  Now that I'm no longer using any d2w I'm even 
more confused.  :)

Thanks.
-Mike


On Oct 19, 2011, at 4:35 PM, Ramsey Gurley wrote:

Hi Mike,

On Oct 19, 2011, at 10:52 AM, Michael Gargano wrote:

Hi all,

I'm still having some occasional issues with EOF validations (2 things in 
particular)...


1) For some attributes (it seems like attributes that are type intNumber, but 
there may be others too), I'm getting validation error messages that end with 
is not a valid ?.
I had that problem the other month on all my attributes, but it had to with the 
d2w libs I had in the build path at the time, those are gone now and I don't 
know why this happens or the best way to handle it.

In ERExtensions ValidationTemplate.strings file I see:

ValueConversionException = The value entered for 
b@@displayNameForProperty@@/b is not a valid 
b@@attribute.valueClass@@/b.;

The display name for your property is created correctly because there is a 
displayNameForProperty() method on ERXValidationException.

There's no attribute() method on ERXValidationException, so it goes to the 
validation context object for an answer.

If you don't have a validation delegate to supply a context and you haven't set 
a context manually, you end up with a '?' replacement character.


2) Somewhat related to this... I have some EO attributes with names that make 
sense in the business domain, but should be called something else when surfaced 
to the user.  So, the attribute might be fancyBusinessObjectName, but when I 
catch the exception and show the message I want it to be displayed as User Non 
Scary Name.

Is there a way to do either of these things without just doing string 
replacements on the message from the exception, perhaps something in userInfo?


Thanks.
-Mike

In the example above, you could add something like:

PropertyKey.fancyBusinessObjectName = User Non Scary Name;

To your english strings file and get the desired results. It's also done as

MyEntityName.fancyBusinessObjectName = User Non Scary Name;

In some places. Not sure which will work for you.


Ramsey


 ___
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: Entity Validation Exception Question

2011-09-09 Thread Michael Gargano
Hi Ramsey,

Sorry, I'm still a little confused with this one.  I see what you are saying 
about the context, but I don't know how to find which keys to use.  The 
messages that are getting generated by validation produce things like Please 
provide ? Name.  From what I looked at in the code yesterday, I guess the '?' 
is supposed to be the entity name.  Why does the property resolve properly, but 
not the entity name?  And where do I look to find the valid keys for the 
context?

Thanks.
-Mike


On Sep 8, 2011, at 4:08 PM, Ramsey Gurley wrote:

Hi Mike,

ERXValidationFactory.ExceptionDelegateInterface
ERXValidationFactory.setDefaultDelegate

If your exception doesn't have a context (not using d2w, not setting it 
yourself when the exception is caught, etc) then you can override the delegate 
to provide a context.

Ramsey

On Sep 8, 2011, at 12:30 PM, Michael Gargano wrote:

no D2W, just what I'm catching in validationFailedWithException in the component

-Mike

On Sep 8, 2011, at 3:16 PM, David Holt wrote:

D2W ERModernLook??


On 2011-09-08, at 12:00 PM, Michael Gargano wrote:

Hi all,

When an EO is being validated, the exception kicked back has ‘?’s in it.  I’m 
assuming this is where they are expecting us to place the appropriate article 
like (‘a’ vs. ‘an’) or something that is supposed to be pluralized.  Is there a 
good way to handle this or do I just need to do a find and replace on each of 
these messages before display?

Thanks.
-Mike


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.commailto: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 programming...@mac.commailto:programming...@mac.com



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

This email sent to rgur...@smarthealth.commailto:rgur...@smarthealth.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: Entity Validation Exception Question

2011-09-09 Thread Michael Gargano
Okay, now it becomes all clear!  I had the D2W libraries still in the project, 
because I was trying to leverage it at one point.  Once I took them out, it 
works without me having to do anything.  That was confusing.  Thanks Ramsey... 
2 for 2!  :)

-Mike


On Sep 9, 2011, at 12:26 PM, Ramsey Gurley wrote:

 In your .strings files.  In ERD2W framework under 
 /Resources/English.lproj/ValidationTemplate.strings I see:
 
 NullPropertyException = Please provide @@indefiniteArticleForProperty@@ 
 b@@displayNameForProperty@@/b.;
 
 That must be overriding the one in ERXExtensions.  So it would appear you 
 need to provide a context dictionary with a value for the key 
 indefiniteArticleForProperty.
 
 Ramsey
 
 On Sep 9, 2011, at 8:43 AM, Michael Gargano wrote:
 
 Hi Ramsey,
 
  Sorry, I'm still a little confused with this one.  I see what you are 
 saying about the context, but I don't know how to find which keys to use.  
 The messages that are getting generated by validation produce things like 
 Please provide ? Name.  From what I looked at in the code yesterday, I 
 guess the '?' is supposed to be the entity name.  Why does the property 
 resolve properly, but not the entity name?  And where do I look to find the 
 valid keys for the context?
 
 Thanks.
 -Mike
 
 
 On Sep 8, 2011, at 4:08 PM, Ramsey Gurley wrote:
 
 Hi Mike,
 
 ERXValidationFactory.ExceptionDelegateInterface
 ERXValidationFactory.setDefaultDelegate
 
 If your exception doesn't have a context (not using d2w, not setting it 
 yourself when the exception is caught, etc) then you can override the 
 delegate to provide a context.
 
 Ramsey
 
 On Sep 8, 2011, at 12:30 PM, Michael Gargano wrote:
 
 no D2W, just what I'm catching in validationFailedWithException in the 
 component
 
 -Mike
 
 On Sep 8, 2011, at 3:16 PM, David Holt wrote:
 
 D2W ERModernLook??
 
 
 On 2011-09-08, at 12:00 PM, Michael Gargano wrote:
 
 Hi all,
 
 When an EO is being validated, the exception kicked back has ‘?’s in it. 
  I’m assuming this is where they are expecting us to place the 
 appropriate article like (‘a’ vs. ‘an’) or something that is supposed to 
 be pluralized.  Is there a good way to handle this or do I just need to 
 do a find and replace on each of these messages before display?
 
 Thanks.
 -Mike
 
 
 ___
 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 programming...@mac.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
 
 This email sent to rgur...@smarthealth.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


one-to-many relationship question

2011-09-08 Thread Michael Gargano
Hi all,

Quick question, does delete on cascade imply owns destination?  Also, 
does checking owns destination force the insertion of the destination objects 
after the insertion of the source entity?

I think David LeBer answered this for me once, but I forgot.

Thanks.
-Mike

 ___
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


Entity Validation Exception Question

2011-09-08 Thread Michael Gargano
Hi all,

When an EO is being validated, the exception kicked back has ‘?’s in it.  I’m 
assuming this is where they are expecting us to place the appropriate article 
like (‘a’ vs. ‘an’) or something that is supposed to be pluralized.  Is there a 
good way to handle this or do I just need to do a find and replace on each of 
these messages before display?

Thanks.
-Mike


 ___
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: Entity Validation Exception Question

2011-09-08 Thread Michael Gargano
no D2W, just what I'm catching in validationFailedWithException in the component

-Mike

On Sep 8, 2011, at 3:16 PM, David Holt wrote:

D2W ERModernLook??


On 2011-09-08, at 12:00 PM, Michael Gargano wrote:

Hi all,

When an EO is being validated, the exception kicked back has ‘?’s in it.  I’m 
assuming this is where they are expecting us to place the appropriate article 
like (‘a’ vs. ‘an’) or something that is supposed to be pluralized.  Is there a 
good way to handle this or do I just need to do a find and replace on each of 
these messages before display?

Thanks.
-Mike


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.commailto: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 programming...@mac.commailto:programming...@mac.com



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

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


Re: one-to-many relationship question

2011-09-08 Thread Michael Gargano
Don't worry you're not losing me.  :)  Basically, this is what's happening

I have entity A1 with single table inheritance children A2 and A3

A1 has - B1, which is also passed on to the children

I'm creating a new A3 instance and a bunch of new B1 instances, I add 
the B1's to the A3 relationship

I go to commit A3 and it tries to commit the B1's first, which explodes 
because of the FK constraint to A3.

This isn't happening anywhere else so I'm not sure what's wrong (I'm 
hoping it's not just luck), but basically I'm asking if A1,A2,A3 own B1 is 
that the indication to EOF that B1 needs to be committed second, after a PK has 
been generated and committed on A3

Thanks.
-Mike



On Sep 8, 2011, at 3:40 PM, Philippe Rabier wrote:

 Michael, there are 2 distinct notions.
 
 Cascading delete is clear enough I guess.
 
 When an object A owns an object B, that means that B can't live  
 without A. The consequence is when you remove the relationship between  
 A and B, B will be deleted automatically (think about invoice and  
 invoice items).
 
 Sorry, I don't understand the second question. Basically, when you  
 create A, you must create B and link B to A as usual.
 
 I don't want to lose you but there is another case: if you have a to- 
 one between Entity A and Entity B, if EA owns EB and you check  
 propagate primary key, object B will be automatically created when  
 you create object A. That's not your question but just in case…
 
 Bests,
 
 Philippe
 
 On 8 sept. 11, at 20:59, Michael Gargano wrote:
 
 Hi all,
 
  Quick question, does delete on cascade imply owns destination?   
 Also, does checking owns destination force the insertion of the  
 destination objects after the insertion of the source entity?
 
 I think David LeBer answered this for me once, but I forgot.
 
 Thanks.
 -Mike
 
 ___
 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/prabier%40me.com
 
 This email sent to prab...@me.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: one-to-many relationship question

2011-09-08 Thread Michael Gargano
Hi Ramsey,

Thanks!  It was the deferred assignment.  I had added those FKs myself 
(aka not using migration), I didn't realize that deferment was how assignment 
order was being guaranteed (or not guaranteed for that matter).

Thanks again.
-Mike

On Sep 8, 2011, at 4:18 PM, Ramsey Gurley wrote:

 Hi Mike,
 
 That's a different question/answer entirely (^_^)
 
 You need to order your adaptor operations if your database can not do 
 deferred foreign key constraints.  You can do order your ops with a property:
 
 com.webobjects.eoaccess.ERXEntityDependencyOrderingDelegate.active=true
 
 Keep in mind this cannot solve unsolvable problems like required circular 
 relationships.  To fix that requires a new choice in databases.
 
 For information regarding your model, I find the most complete resource is 
 still Apple's old EOModeler docs.
 
 http://developer.apple.com/legacy/mac/library/#documentation/WebObjects/UsingEOModeler/Introduction/Introduction.html
 
 It's worth pointing out that if you did model this as horizontal instead of 
 single table, you'd have FK constraint problems of a different sort.  More 
 info in the gotchas under the description of HI here:
 
 http://wiki.objectstyle.org/confluence/display/WO/Modeling+Inheritance+with+Entity+Modeler
 
 Ramsey
 
 On Sep 8, 2011, at 12:58 PM, Michael Gargano wrote:
 
 Don't worry you're not losing me.  :)  Basically, this is what's 
 happening
 
  I have entity A1 with single table inheritance children A2 and A3
 
  A1 has - B1, which is also passed on to the children
 
  I'm creating a new A3 instance and a bunch of new B1 instances, I add 
 the B1's to the A3 relationship
 
  I go to commit A3 and it tries to commit the B1's first, which explodes 
 because of the FK constraint to A3.
 
  This isn't happening anywhere else so I'm not sure what's wrong (I'm 
 hoping it's not just luck), but basically I'm asking if A1,A2,A3 own B1 is 
 that the indication to EOF that B1 needs to be committed second, after a PK 
 has been generated and committed on A3
 
 Thanks.
 -Mike
 
 
 
 On Sep 8, 2011, at 3:40 PM, Philippe Rabier wrote:
 
 Michael, there are 2 distinct notions.
 
 Cascading delete is clear enough I guess.
 
 When an object A owns an object B, that means that B can't live  
 without A. The consequence is when you remove the relationship between  
 A and B, B will be deleted automatically (think about invoice and  
 invoice items).
 
 Sorry, I don't understand the second question. Basically, when you  
 create A, you must create B and link B to A as usual.
 
 I don't want to lose you but there is another case: if you have a to- 
 one between Entity A and Entity B, if EA owns EB and you check  
 propagate primary key, object B will be automatically created when  
 you create object A. That's not your question but just in case…
 
 Bests,
 
 Philippe
 
 On 8 sept. 11, at 20:59, Michael Gargano wrote:
 
 Hi all,
 
Quick question, does delete on cascade imply owns destination?   
 Also, does checking owns destination force the insertion of the  
 destination objects after the insertion of the source entity?
 
 I think David LeBer answered this for me once, but I forgot.
 
 Thanks.
 -Mike
 
 ___
 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/prabier%40me.com
 
 This email sent to prab...@me.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/rgurley%40smarthealth.com
 
 This email sent to rgur...@smarthealth.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: faulting relationship problem

2011-08-22 Thread Michael Gargano
Just the default constructor, which implicitly calls super.  All the model 
classes are EOGenerated.  Any other ideas to check?

Thanks.
-Mike


On Aug 19, 2011, at 3:39 PM, Chuck Hill wrote:

 Sounds like you forgot to call super someplace in your EOs.
 
 
 On 2011-08-19, at 12:27 PM, Michael Gargano wrote:
 
 Hi all,
 
  I have cascading popup buttons that are narrowing down to a particular 
 instance of an entity and one of the popups is populated with the field from 
 a relationship on that entity.
  So, the fetch spec. has a qualifier consisting of the values of all the 
 previous choices and it retrieves the narrowed set of objects.  Next, I 
 iterate through the results adding the object from the relationship to a 
 NSMutableArray for display.  It is at this point that, periodically, the 
 relationship returns null instead of the object.  This is a test system so 
 there is only one entity in the database and this relationship should 
 definitely return an item.  If I do this in reverse... I preform the fetch 
 on the relationship's entity and use key paths in the qualifier back to the 
 master entity it seems to go away (this is hideous).
 
 
 So, to sum it up... even though the fetch returns the correct results, it 
 seems the proxy load of the relationship slave entity sometimes fails.
 This is on a PostgreSQL DB, btw.
 
 Has anyone ever seen issues when faulting objects from a relationship?  Is 
 it not guaranteed to return an object even if the inner join is definitely 
 valid?
 
 
 Thanks.
 -Mike
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 
 

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

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


Re: faulting relationship problem

2011-08-22 Thread Michael Gargano

On Aug 22, 2011, at 4:02 PM, Chuck Hill wrote:

 
 On 2011-08-22, at 8:13 AM, Michael Gargano wrote:
 
 Just the default constructor, which implicitly calls super.  All the model 
 classes are EOGenerated.  Any other ideas to check?
 
 Awake from insertion?

Checked it, looks good.  The weird thing is I'm doing these cascaded popups all 
over and they seem fine except on this form.  This is a modal dialog on top of 
a modal dialog, so this is a child EC, but the fetches are into the child EC so 
there shouldn't be a problem.  I'll keep searching, I'll update the list when I 
find something.

  Bad modelling.

How dare you sir!  :-p

  Are you using inheritance and have duplicate PKs in different tables?  All 
 the entities in an inheritance hierarchy MUST have a PK unique across all 
 tables.
 

I am using inheritance, but it's single table inheritance (learned that one 
pretty early on).

 
 On Aug 19, 2011, at 3:39 PM, Chuck Hill wrote:
 
 Sounds like you forgot to call super someplace in your EOs.
 
 
 On 2011-08-19, at 12:27 PM, Michael Gargano wrote:
 
 Hi all,
 
I have cascading popup buttons that are narrowing down to a particular 
 instance of an entity and one of the popups is populated with the field 
 from a relationship on that entity.
So, the fetch spec. has a qualifier consisting of the values of all the 
 previous choices and it retrieves the narrowed set of objects.  Next, I 
 iterate through the results adding the object from the relationship to a 
 NSMutableArray for display.  It is at this point that, periodically, the 
 relationship returns null instead of the object.  This is a test system so 
 there is only one entity in the database and this relationship should 
 definitely return an item.  If I do this in reverse... I preform the fetch 
 on the relationship's entity and use key paths in the qualifier back to 
 the master entity it seems to go away (this is hideous).
 
 
 So, to sum it up... even though the fetch returns the correct results, it 
 seems the proxy load of the relationship slave entity sometimes fails.
 This is on a PostgreSQL DB, btw.
 
 Has anyone ever seen issues when faulting objects from a relationship?  Is 
 it not guaranteed to return an object even if the inner join is definitely 
 valid?
 
 
 Thanks.
 -Mike
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 
 
 
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 
 

 ___
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: faulting relationship problem

2011-08-22 Thread Michael Gargano
as I've said before, I just work here.  not my design.  in some places it's up 
to 3 or 4 modals on top of each other.  (ducks for cover)  I've now been given 
the nickname popup-boy [insert lewd comment here]

-mike

On Aug 22, 2011, at 8:02 PM, Chuck Hill ch...@global-village.net wrote:

 
 On 2011-08-22, at 4:54 PM, David Avendasora wrote:
 
 On Aug 23, 2011, at 4:18 AM, Michael Gargano wrote:
 
 This is a modal dialog on top of a modal dialog
 
 Wow. I think I heard Chuck's head explode all the way over hear in Borneo.
 
 It was more of imploding and exiting the opposite ear.
 
 
 I'll miss him.
 
 Sort of.
 
 You will have to drink my share then.
 
 -- 
 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/mgargano%40me.com
 
 This email sent to mgarg...@me.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: faulting relationship problem

2011-08-22 Thread Michael Gargano
well don't worry, i've generalized it for n-dialogs with a little jquery and 
lots of pain.  my app's gonna look like a mahjong table!  :)

-mike

On Aug 22, 2011, at 10:57 PM, Chuck Hill ch...@global-village.net wrote:

 The model I had in mind when I made this was more of a modal inspector than a 
 fist-full of sticky notes.  :-)
 
 On 2011-08-22, at 6:56 PM, Michael Gargano wrote:
 
 as I've said before, I just work here.  not my design.  in some places it's 
 up to 3 or 4 modals on top of each other.  (ducks for cover)  I've now been 
 given the nickname popup-boy [insert lewd comment here]
 
 -mike
 
 On Aug 22, 2011, at 8:02 PM, Chuck Hill ch...@global-village.net wrote:
 
 
 On 2011-08-22, at 4:54 PM, David Avendasora wrote:
 
 On Aug 23, 2011, at 4:18 AM, Michael Gargano wrote:
 
 This is a modal dialog on top of a modal dialog
 
 Wow. I think I heard Chuck's head explode all the way over hear in Borneo.
 
 It was more of imploding and exiting the opposite ear.
 
 
 I'll miss him.
 
 Sort of.
 
 You will have to drink my share then.
 
 -- 
 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/mgargano%40me.com
 
 This email sent to mgarg...@me.com
 
 -- 
 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


faulting relationship problem

2011-08-19 Thread Michael Gargano
Hi all,

I have cascading popup buttons that are narrowing down to a particular 
instance of an entity and one of the popups is populated with the field from a 
relationship on that entity.
So, the fetch spec. has a qualifier consisting of the values of all the 
previous choices and it retrieves the narrowed set of objects.  Next, I iterate 
through the results adding the object from the relationship to a NSMutableArray 
for display.  It is at this point that, periodically, the relationship returns 
null instead of the object.  This is a test system so there is only one entity 
in the database and this relationship should definitely return an item.  If I 
do this in reverse... I preform the fetch on the relationship's entity and use 
key paths in the qualifier back to the master entity it seems to go away (this 
is hideous).


So, to sum it up... even though the fetch returns the correct results, it seems 
the proxy load of the relationship slave entity sometimes fails.
This is on a PostgreSQL DB, btw.

Has anyone ever seen issues when faulting objects from a relationship?  Is it 
not guaranteed to return an object even if the inner join is definitely valid?


Thanks.
-Mike

 ___
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


validation question

2011-08-04 Thread Michael Gargano
Hi everyone,

I have an EO with let's say 3 attributes.

Name  (String, not nullable, 255 chars)
short desc (String, not nullable, 255 chars)
long desc (String, nullable, 2000 chars)

in the ui, name and short desc are attached to wotextfields and long desc is a 
wotext

if i put more than 2000 chars in the long desc text box and leave the other two 
fields blank, i get all three validation errors (name and short desc cannot be 
null and long desc is over 2000 chars)
just as expected.

however
if i fill in name and short desc properly and put more than 2000 chars 
in the long desc text box the EO gets saved to the DB.  upon inspection of the 
record, the long desc attribute is just nullified.  i see the exception being 
thrown in validateValueForKey, but since all the validations get called twice, 
it looks like the first time around the exception is thrown, swallowed by 
something that then nulls that value, and on the second time around since that 
attribute is nullable, it's just stores it straight to the DB.

it looks like others have had similar problems on the mailing list in the past, 
i couldn't seem to find a resolution though.

Thanks.
-Mike


 ___
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: Using DataGrid in WO

2011-08-03 Thread Michael Gargano
Thanks Chuck!

That last line about the AMD opener started me thinking in exactly the 
right way.

-Mike


On Aug 2, 2011, at 11:22 PM, Chuck Hill wrote:

 Hi Michael,
 
 On 2011-08-01, at 2:21 PM, Michael Gargano wrote:
 
 Hey Chuck,
 
  This is from a few months ago, but how exactly are you passing your 
 selected row into the dialog to edit it?  I can't figure this out since I'm 
 using a custom cell in the grid to do this.  the custom cell has an 
 ajaxmodaldialogopener with an image in it.
 
 are you just directly using ajaxmodaldialogopener as the custom component?
 
 No.  Here is a class that I have been using as the superclass of the 
 components in a grid.  You may find it useful:
 
 package net.foo.core.web;
 
 import com.webobjects.appserver.*;
 import com.webobjects.eocontrol.*;
 import com.webobjects.foundation.*;
 
 import er.ajax.*;
 
 /**
 * Optional super-class for components that appear in cells in the AjaxGrid.
 */
 public class AjaxGridCell extends WOComponent
 {
private String rowIndex;
 
/**
 * Basic class constructor.
 *
 * @param context of current page
 */
public AjaxGridCell(WOContext context)
{
super(context);
}
 
 
 
/**
 * @return true as this component is stateless and non-synchronizing
 */
public boolean isStateless()
{
return true;
}
 
 
 
/**
 * Nulls optimization variables.
 */
public void reset()
{
rowIndex = null;
}
 
 
/**
 * @return object bound to codevalue/code
 */
public Object value()
{
return valueForBinding(value);
}
 
 
 
/**
 * @return AjaxGrid bound to codegrid/code
 */
public AjaxGrid grid()
{
return (AjaxGrid) valueForBinding(grid);
/** ensure [valid_result] Result != null;  **/
}
 
 
 
/**
 * @return object bound to grid coderow/code
 */
public EOEnterpriseObject object()
{
return (EOEnterpriseObject)grid().row();
 }
 
 
 
/**
 * @return grid()'s configurationData()
 */
public NSMutableDictionary configurationData()
{
return grid().configurationData();
/** ensure [valid_result] Result != null;  **/
}
 
 
 
/**
 * @return grid()'s displayGroup()
 */
public WODisplayGroup displayGroup()
{
return grid().displayGroup();
/** ensure [valid_result] Result != null;  **/
}
 
 
 
/**
 * @return grid()'s editingContext()
 */
public EOEditingContext editingContext()
{
return displayGroup().dataSource().editingContext();
/** ensure [valid_result] Result != null;  **/
}
 
 
 
/**
 * @return updateContainerID for AjaxActionLinks in this grid
 */
public String updateContainerID()
{
return (String) 
 configurationData().objectForKey(AjaxGrid.UPDATE_CONTAINER_ID);
/** ensure [valid_result] Result != null;  **/
}
 
 
 
/**
 * @return returns index for the current row that can be used to create 
 unique IDs for HTML
 */
public String rowIndex()
{
if (rowIndex == null)
{
int index = 
 displayGroup().displayedObjects().indexOfObject(object());
rowIndex = String.valueOf(index);
}
 
return rowIndex;
/** ensure [valid_result] Result != null;  **/
}
 
 
 
/**
 * Return unique ID for this row in the grid.  This is to be used to build 
 unique IDs for each row.
 *
 * @return unique ID for this row in the grid
 */
public String rowID()
{
return grid().rowID();
/** ensure [valid_result] Result != null;  **/
}
 
 
 }
 
 The AMD Opener then stashes object() in the thread/page/session/as you like 
 for the dialog to use.  My pages have a concept of selected object or 
 focused object
 
 
 
 also, this is probably a dumb question, but there's no way to pop and push 
 modal dialogs on top of one another?   My spec calls for a modal dialog that 
 has another modal on top of it for selection inside the 1st modal dialog  (i 
 just work here).
 
 :-)
 
 
 i starting writing a component myself, but when I needed to make it ajax-y i 
 turned and started running the other way.
 
 I don't think there is a way.  The reason is that the underlying JavaScript 
 implementation just allows for one to be displayed at a time.  You would have 
 to close one and open the other, or update the contents of the current one 
 with the other one. I'd look at that or something like an expansion area.
 
 
 Chuck
 
 
 On May 25, 2011, at 1:37 PM, Chuck Hill wrote:
 
 Hi Raymond,
 
 
 On May 25, 2011, at 3:10 AM, naneon.raym...@neuf.fr 
 naneon.raym...@neuf.fr wrote:
 
 Hi Chuck,
 
 this is my html : 
 wo:tPopUpButton list=$personList item=$person 
 value=$selectedPerson/
 wo:AjaxModalDialogOpener id=refreshGrid
 
 wo:AjaxSubmitButton action=$addSelectedPerson value=addPerson
 
 /wo:AjaxModalDialogOpener

Re: Using DataGrid in WO

2011-08-01 Thread Michael Gargano
Hey Chuck,

This is from a few months ago, but how exactly are you passing your selected 
row into the dialog to edit it?  I can't figure this out since I'm using a 
custom cell in the grid to do this.  the custom cell has an 
ajaxmodaldialogopener with an image in it.

are you just directly using ajaxmodaldialogopener as the custom component?

also, this is probably a dumb question, but there's no way to pop and push 
modal dialogs on top of one another?   My spec calls for a modal dialog that 
has another modal on top of it for selection inside the 1st modal dialog  (i 
just work here).  i starting writing a component myself, but when I needed to 
make it ajax-y i turned and started running the other way.

thanks
-mike


On May 25, 2011, at 1:37 PM, Chuck Hill wrote:

Hi Raymond,


On May 25, 2011, at 3:10 AM, 
naneon.raym...@neuf.frmailto:naneon.raym...@neuf.fr 
naneon.raym...@neuf.frmailto:naneon.raym...@neuf.fr wrote:

Hi Chuck,

this is my html :
wo:tPopUpButton list=$personList item=$person value=$selectedPerson/
wo:AjaxModalDialogOpener id=refreshGrid

wo:AjaxSubmitButton action=$addSelectedPerson value=addPerson

/wo:AjaxModalDialogOpener

webobject name=personNavBar
webobject namepersonGrid

and this is my WOD

personGrid : AjaxGrid {
  configurationData = personDataConfig;
  displayGroup = personDg;
  afterUpdate = personNavBarUpdate();;
}

NavBarPerson : AjaxGridNavPersonBar {
  containerID = NavBarPerson;
  displayGroup = personDg;
  configurationData = personDataConfig;
}

I don't use AjaxModalDialog but AjaxModalDialogOpener.

But... you do have an AjaxModalDialog that the AjaxModalDialogOpener is 
opening, right?  If you don't, you are not using the AjaxModalDialogOpener 
correctly.  If you do have an AjaxModalDialog (even if it is in a different 
component), then the closeUpdateContainerID goes in that WOD definition.


Can I surround AjaxModalDialogOpener with AjaxModalDialog ?

No.  See how they are used in the AjaxExamples application in Wonder.   You 
also should not have a submit button inside the AjaxModalDialogOpener:

wo:AjaxModalDialogOpener id=refreshGrid

wo:AjaxSubmitButton action=$addSelectedPerson value=addPerson

/wo:AjaxModalDialogOpener



Where I insert AjaxModalDialog  in my code to refresh my grid? My 
AjaxModalDialogOpener is on the good side in html code?

The AjaxModalDialog was to edit the information shown in your grid.


Chuck



Message du : 25/05/2011
De : Chuck Hill  ch...@global-village.netmailto:ch...@global-village.net
A : naneon.raym...@neuf.frmailto:naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.commailto:webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


In the plist that has your grid configuration, add a line like this:
updateContainerID = resultsContainer;

Then in the WOD that defines the dialog:
MyDialog : AjaxModalDialog {
  closeUpdateContainerID = resultsContainer;


Chuck


On May 20, 2011, at 12:34 PM, 
naneon.raym...@neuf.frmailto:naneon.raym...@neuf.fr 
naneon.raym...@neuf.frmailto:naneon.raym...@neuf.fr wrote:

Hi Chuck,

Can you give me an example, I don't know how to introduce it in my code.

Thanks




Message du : 20/05/2011
De : Chuck Hill  ch...@global-village.netmailto:ch...@global-village.net
A : naneon.raym...@neuf.frmailto:naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.commailto:webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


Use the closeUpdateContainerID binding on the AjaxModalDialog.


On May 20, 2011, at 6:07 AM, 
naneon.raym...@neuf.frmailto:naneon.raym...@neuf.fr wrote:

Hi Chuck,

I try to follow your advice but I have some problems.

In HTML (my textfield and button using to add person in my Grid: )

wo:tPopUpButton list=$personList item=$person value=$selectedPerson/
wo:AjaxModalDialogOpener id=refreshGrid
wo:AjaxSubmitButton action=$addPerson value=add
/wo:AjaxModalDialogOpener
webobject name=personNavBar
webobject namepersonGrid

In WOD
...
personGrid : AjaxGrid {
  configurationData = personDataConfig;
  displayGroup = personDg;
  afterUpdate = personNavBarUpdate();;
}

in java class
... variable declaration

public WOActionResults addPerson(){
personDg = new WODisplayGroup();
persondg.setObjectArray(PersonData(selectedPerson.fullname));
}

private NSMutableArray PersonData(String aPerson) {
NSMutableDictionnary personDico = new NSMutableDictionnary ();
if(aPerson.equals(null)){
return null;
}
personDico.takeValueForKey(aPerson, persnoFullname 1);

return (NSMutableArray) personDico.allValues();
}

My question is How to refresh my Grid to know if the person I added is present 
in the grid?

Thanks


Message du : 19/05/2011
De : Chuck Hill  ch...@global-village.netmailto:ch...@global-village.net
A : naneon.raym...@neuf.frmailto:naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.commailto:webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


I have never added 

Re: blobArray prototype

2011-07-29 Thread Michael Gargano
Hi Ramsey,

Finally got back around to trying this out after a 3 day detour through 
the land of unpleasantness.  It was a library issue.  Perfect!  Thanks!

-Mike

On Jul 26, 2011, at 6:17 PM, Ramsey Gurley wrote:

 
 On Jul 26, 2011, at 2:52 PM, Michael Gargano wrote:
 
 Hi,
 
  Anyone using blobArray prototypes anywhere?  I'm getting this error on 
 a PostgreSQL DB...
 
 er.transaction.adaptor.Exceptions - Database Exception occured: 
 com.webobjects.foundation.NSForwardException 
 [java.lang.NoSuchMethodException] Class er.prototypes.ValueConversion does 
 not implement method blobArray:java.lang.NoSuchMethodException: Class 
 er.prototypes.ValueConversion does not implement method blobArray
 
 Any suggestions?
 
 Thanks.
 -Mike
 
 I'm not using it, but I wrote and tested it against Postgresql and H2.  It 
 worked when I put it together.  
 
 Two things to check... Make sure the ERAttributeExtension is ahead of the 
 JavaEOAccess framework on your classpath.  If you do that, you should be able 
 to set a breakpoint in adaptorValueByConvertingAttributeValue to figure out 
 what's going on.
 
 Two, make sure the prototype matches what's in the Wonder repository. If you 
 make a change in entity modeler and save, it can wipe out data it doesn't 
 understand from the reimplemented EOAttribute.  I have a patched version of 
 WOLips that handles this, but I don't have a way to make the build available 
 publicly.
 
 Also, not your current problem, but if you're using postgres 9+ you need to 
 adjust your bytea_output when you create your database for anything bytea to 
 work properly:
 
 http://wiki.objectstyle.org/confluence/display/WO/Project+WONDER-Frameworks-PostgresqlPlugin
 
 Ramsey
 
 

 ___
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: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page

2011-07-28 Thread Michael Gargano
just to put it back on the list... turns out my problem was caused by a 
commented out  (in html) AjaxModalContainer inside my AjaxModalDialog.  the 
parser was still rendering the container code inside the comment.  removing the 
comment made everything happy again.  :)

-mike


On Jul 27, 2011, at 2:54 PM, Michael Gargano wrote:

 *jumps up and down on chuck's list*


 On Jul 27, 2011, at 2:50 PM, Chuck Hill ch...@global-village.net wrote:

 Still teetering on the top of my To Do list


 On 2011-07-27, at 11:48 AM, Michael Gargano wrote:

 was there ever a resolution to this.  i'm encountering this problem a lot.

 -mike


 On Jul 15, 2011, at 1:56 PM, Ricardo J. Parada wrote:

 Try the second one I sent out... That one is simpler and easier to 
 understand.

 Thanks




 On Jul 15, 2011, at 1:52 PM, Chuck Hill wrote:

 I will try it later.


 On 2011-07-15, at 7:11 AM, Ricardo J. Parada wrote:


 I have some good news.  I have a little test app with a simple Main 
 component that reproduces the problem in 5 easy steps.

 Who is interested in trying it out?  :-)  You just import into Eclipse 
 and follow the 5 easy steps on the Main component.

 PageCacheTest.zip





 On Jul 14, 2011, at 1:09 PM, Chuck Hill wrote:

 I have, sort of, understood this code in the past.  It is tricky, you 
 really have to pay attention.  IIRC what it has is a two level cache 
 for (potentially) every page in the regular cache.


 Chuck


 On 2011-07-14, at 9:39 AM, Ricardo J. Parada wrote:



 Oh... for reference that code in ERXAjaxSession.java looks like this:

 public void savePage(WOComponent page) {
...

  // Remove the oldest entry if we're about to add a new one and that 
 would put us over the cache size ...
  // We do a CACHE_SIZE*2 here because for every page, we have to 
 potentially store its previous contextid to prevent
  // race conditions, so there technically can be 2x cache size many 
 pages in the cache.
  boolean removedCacheEntry = 
 cleanPageReplacementCacheIfNecessary(pageCacheKey);
 208:if (!removedCacheEntry  pageReplacementCache.size() = 
 ERXAjaxSession.MAX_PAGE_REPLACEMENT_CACHE_SIZE * 2) {
Iterator entryIterator = pageReplacementCache.entrySet().iterator();
Map.Entry oldestEntry = (Map.Entry) entryIterator.next();
entryIterator.remove();
if (logger.isDebugEnabled()) logger.debug(pageCacheKey + 
 pageReplacementCache too large, removing oldest entry =  + 
 ((TransactionRecord)oldestEntry.getValue()).key());
  }

...





 On Jul 14, 2011, at 12:33 PM, Ricardo J. Parada wrote:

 I don't understand the code in ERXAjaxSession.java:208-213 very well 
 but I can see that the size of the page replacement cache referred to 
 by that code is growing with every AJAX request until it is = two 
 times the size specified by 
 er.extensions.maxPageReplacementCacheSize.  From there on it removes 
 entries from there.

 At this point if I close the dialog (AMD) and then click on the link 
 on the page I get the You backtracked too far error.

 Anybody understands that code?  :-)

 I'm gonna compare with my test Wonder app which all it has is the AMD 
 and link on the page to test this and try to find out why I don't get 
 the error there.




 On Jul 14, 2011, at 12:11 PM, Ricardo J. Parada wrote:



 I don't get the error if I set 
 er.extensions.maxPageReplacementCacheSize=50 in my Properties.dev 
 file.

 So now I'm focusing on ERXAjaxSession.java:208-213 to see if that 
 code to try to figure out if that code has anything to do with the 
 problem I have when I reduce the cache size.





 On Jul 13, 2011, at 10:36 PM, Alexis Tual wrote:

 Hi,

 have you tried to raise the 
 er.extensions.maxPageReplacementCacheSize (default is 30) ? It 
 should delay the page restauration error, not fixing the real 
 issue... and if you have few users and enough memory, it might be 
 the cheapest way to get it done.
 Anyway, I filled a jira for this a year ago 
 http://issues.objectstyle.org/jira/browse/WONDER-545 (Don't try the 
 attached patch though, it's worse :))

 Still in Quebec, back to Poutine free area soon

 Alex

 Le 12 juil. 2011 à 19:29, Ricardo J. Parada a écrit :


 On Jul 12, 2011, at 5:53 PM, Chuck Hill wrote:


 On Jul 12, 2011, at 2:45 PM, Ricardo J. Parada wrote:


 On Jul 12, 2011, at 4:52 PM, Chuck Hill wrote:

 Hi Ricardo,

 On Jul 12, 2011, at 1:35 PM, Ricardo J. Parada wrote:

 Does anybody have an idea what could be causing this problem?  
 The user clicks on an AjaxModalDialogOpener which opens the 
 dialog.  Then the user does a whole bunch of stuff in the 
 dialog that involves many clicks

 Does it still happen if they don't make so many clicks?

 If they make a few clicks then it works okay.


 then finally clicks a DONE link to close the dialog.

 Are all of these links and clicks Ajax actions?


 Yes, they are clicking on links generated by AjaxSubmitButton 
 components to be exact.  :-)

 And you are certain that there are no /wo/ or /wa/ requests mixed

Re: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page

2011-07-27 Thread Michael Gargano
was there ever a resolution to this.  i'm encountering this problem a lot.

-mike


On Jul 15, 2011, at 1:56 PM, Ricardo J. Parada wrote:

 Try the second one I sent out... That one is simpler and easier to understand.
 
 Thanks
 
 
 
 
 On Jul 15, 2011, at 1:52 PM, Chuck Hill wrote:
 
 I will try it later.
 
 
 On 2011-07-15, at 7:11 AM, Ricardo J. Parada wrote:
 
 
 I have some good news.  I have a little test app with a simple Main 
 component that reproduces the problem in 5 easy steps.
 
 Who is interested in trying it out?  :-)  You just import into Eclipse and 
 follow the 5 easy steps on the Main component.
 
 PageCacheTest.zip
 
 
 
 
 
 On Jul 14, 2011, at 1:09 PM, Chuck Hill wrote:
 
 I have, sort of, understood this code in the past.  It is tricky, you 
 really have to pay attention.  IIRC what it has is a two level cache for 
 (potentially) every page in the regular cache.
 
 
 Chuck
 
 
 On 2011-07-14, at 9:39 AM, Ricardo J. Parada wrote:
 
 
 
 Oh... for reference that code in ERXAjaxSession.java looks like this:
 
 public void savePage(WOComponent page) {
   ...
 
 // Remove the oldest entry if we're about to add a new one and that 
 would put us over the cache size ...
 // We do a CACHE_SIZE*2 here because for every page, we have to 
 potentially store its previous contextid to prevent
 // race conditions, so there technically can be 2x cache size many 
 pages in the cache.
 boolean removedCacheEntry = 
 cleanPageReplacementCacheIfNecessary(pageCacheKey);
 208:if (!removedCacheEntry  pageReplacementCache.size() = 
 ERXAjaxSession.MAX_PAGE_REPLACEMENT_CACHE_SIZE * 2) {
   Iterator entryIterator = pageReplacementCache.entrySet().iterator();
   Map.Entry oldestEntry = (Map.Entry) entryIterator.next();
   entryIterator.remove();
   if (logger.isDebugEnabled()) logger.debug(pageCacheKey + 
 pageReplacementCache too large, removing oldest entry =  + 
 ((TransactionRecord)oldestEntry.getValue()).key());
 }
 
   ...
 
 
 
 
 
 On Jul 14, 2011, at 12:33 PM, Ricardo J. Parada wrote:
 
 I don't understand the code in ERXAjaxSession.java:208-213 very well but 
 I can see that the size of the page replacement cache referred to by 
 that code is growing with every AJAX request until it is = two times 
 the size specified by er.extensions.maxPageReplacementCacheSize.  From 
 there on it removes entries from there.
 
 At this point if I close the dialog (AMD) and then click on the link on 
 the page I get the You backtracked too far error.
 
 Anybody understands that code?  :-)
 
 I'm gonna compare with my test Wonder app which all it has is the AMD 
 and link on the page to test this and try to find out why I don't get 
 the error there.
 
 
 
 
 On Jul 14, 2011, at 12:11 PM, Ricardo J. Parada wrote:
 
 
 
 I don't get the error if I set 
 er.extensions.maxPageReplacementCacheSize=50 in my Properties.dev file.
 
 So now I'm focusing on ERXAjaxSession.java:208-213 to see if that code 
 to try to figure out if that code has anything to do with the problem I 
 have when I reduce the cache size.
 
 
 
 
 
 On Jul 13, 2011, at 10:36 PM, Alexis Tual wrote:
 
 Hi,
 
 have you tried to raise the er.extensions.maxPageReplacementCacheSize 
 (default is 30) ? It should delay the page restauration error, not 
 fixing the real issue... and if you have few users and enough memory, 
 it might be the cheapest way to get it done.
 Anyway, I filled a jira for this a year ago 
 http://issues.objectstyle.org/jira/browse/WONDER-545 (Don't try the 
 attached patch though, it's worse :))
 
 Still in Quebec, back to Poutine free area soon
 
 Alex
 
 Le 12 juil. 2011 à 19:29, Ricardo J. Parada a écrit :
 
 
 On Jul 12, 2011, at 5:53 PM, Chuck Hill wrote:
 
 
 On Jul 12, 2011, at 2:45 PM, Ricardo J. Parada wrote:
 
 
 On Jul 12, 2011, at 4:52 PM, Chuck Hill wrote:
 
 Hi Ricardo,
 
 On Jul 12, 2011, at 1:35 PM, Ricardo J. Parada wrote:
 
 Does anybody have an idea what could be causing this problem?  
 The user clicks on an AjaxModalDialogOpener which opens the 
 dialog.  Then the user does a whole bunch of stuff in the dialog 
 that involves many clicks
 
 Does it still happen if they don't make so many clicks?
 
 If they make a few clicks then it works okay.
 
 
 then finally clicks a DONE link to close the dialog.
 
 Are all of these links and clicks Ajax actions?
 
 
 Yes, they are clicking on links generated by AjaxSubmitButton 
 components to be exact.  :-)
 
 And you are certain that there are no /wo/ or /wa/ requests mixed in 
 here?
 
 I set this property in my Properties.dev:
 
 log4j.logger.er.extensions.ERXApplication.RequestHandling=DEBUG
 
 and then I looked at all the uri's of the requests coming in.  They 
 have /ajax/ in there and when the dialog first comes up I see a few 
 /_wr_/ and I guess the browser caches those since I don't see 
 requests for those anymore on subsequent requests after the dialog is 
 displayed.
 
 All the requests for the many clicks 

Re: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page

2011-07-27 Thread Michael Gargano
*jumps up and down on chuck's list*


On Jul 27, 2011, at 2:50 PM, Chuck Hill ch...@global-village.net wrote:

 Still teetering on the top of my To Do list
 
 
 On 2011-07-27, at 11:48 AM, Michael Gargano wrote:
 
 was there ever a resolution to this.  i'm encountering this problem a lot.
 
 -mike
 
 
 On Jul 15, 2011, at 1:56 PM, Ricardo J. Parada wrote:
 
 Try the second one I sent out... That one is simpler and easier to 
 understand.
 
 Thanks
 
 
 
 
 On Jul 15, 2011, at 1:52 PM, Chuck Hill wrote:
 
 I will try it later.
 
 
 On 2011-07-15, at 7:11 AM, Ricardo J. Parada wrote:
 
 
 I have some good news.  I have a little test app with a simple Main 
 component that reproduces the problem in 5 easy steps.
 
 Who is interested in trying it out?  :-)  You just import into Eclipse 
 and follow the 5 easy steps on the Main component.
 
 PageCacheTest.zip
 
 
 
 
 
 On Jul 14, 2011, at 1:09 PM, Chuck Hill wrote:
 
 I have, sort of, understood this code in the past.  It is tricky, you 
 really have to pay attention.  IIRC what it has is a two level cache for 
 (potentially) every page in the regular cache.
 
 
 Chuck
 
 
 On 2011-07-14, at 9:39 AM, Ricardo J. Parada wrote:
 
 
 
 Oh... for reference that code in ERXAjaxSession.java looks like this:
 
 public void savePage(WOComponent page) {
 ...
 
   // Remove the oldest entry if we're about to add a new one and that 
 would put us over the cache size ...
   // We do a CACHE_SIZE*2 here because for every page, we have to 
 potentially store its previous contextid to prevent
   // race conditions, so there technically can be 2x cache size many 
 pages in the cache.
   boolean removedCacheEntry = 
 cleanPageReplacementCacheIfNecessary(pageCacheKey);
 208:if (!removedCacheEntry  pageReplacementCache.size() = 
 ERXAjaxSession.MAX_PAGE_REPLACEMENT_CACHE_SIZE * 2) {
 Iterator entryIterator = pageReplacementCache.entrySet().iterator();
 Map.Entry oldestEntry = (Map.Entry) entryIterator.next();
 entryIterator.remove();
 if (logger.isDebugEnabled()) logger.debug(pageCacheKey + 
 pageReplacementCache too large, removing oldest entry =  + 
 ((TransactionRecord)oldestEntry.getValue()).key());
   }
 
 ...
 
 
 
 
 
 On Jul 14, 2011, at 12:33 PM, Ricardo J. Parada wrote:
 
 I don't understand the code in ERXAjaxSession.java:208-213 very well 
 but I can see that the size of the page replacement cache referred to 
 by that code is growing with every AJAX request until it is = two 
 times the size specified by er.extensions.maxPageReplacementCacheSize. 
  From there on it removes entries from there.
 
 At this point if I close the dialog (AMD) and then click on the link 
 on the page I get the You backtracked too far error.
 
 Anybody understands that code?  :-)
 
 I'm gonna compare with my test Wonder app which all it has is the AMD 
 and link on the page to test this and try to find out why I don't get 
 the error there.
 
 
 
 
 On Jul 14, 2011, at 12:11 PM, Ricardo J. Parada wrote:
 
 
 
 I don't get the error if I set 
 er.extensions.maxPageReplacementCacheSize=50 in my Properties.dev 
 file.
 
 So now I'm focusing on ERXAjaxSession.java:208-213 to see if that 
 code to try to figure out if that code has anything to do with the 
 problem I have when I reduce the cache size.
 
 
 
 
 
 On Jul 13, 2011, at 10:36 PM, Alexis Tual wrote:
 
 Hi,
 
 have you tried to raise the 
 er.extensions.maxPageReplacementCacheSize (default is 30) ? It 
 should delay the page restauration error, not fixing the real 
 issue... and if you have few users and enough memory, it might be 
 the cheapest way to get it done.
 Anyway, I filled a jira for this a year ago 
 http://issues.objectstyle.org/jira/browse/WONDER-545 (Don't try the 
 attached patch though, it's worse :))
 
 Still in Quebec, back to Poutine free area soon
 
 Alex
 
 Le 12 juil. 2011 à 19:29, Ricardo J. Parada a écrit :
 
 
 On Jul 12, 2011, at 5:53 PM, Chuck Hill wrote:
 
 
 On Jul 12, 2011, at 2:45 PM, Ricardo J. Parada wrote:
 
 
 On Jul 12, 2011, at 4:52 PM, Chuck Hill wrote:
 
 Hi Ricardo,
 
 On Jul 12, 2011, at 1:35 PM, Ricardo J. Parada wrote:
 
 Does anybody have an idea what could be causing this problem?  
 The user clicks on an AjaxModalDialogOpener which opens the 
 dialog.  Then the user does a whole bunch of stuff in the 
 dialog that involves many clicks
 
 Does it still happen if they don't make so many clicks?
 
 If they make a few clicks then it works okay.
 
 
 then finally clicks a DONE link to close the dialog.
 
 Are all of these links and clicks Ajax actions?
 
 
 Yes, they are clicking on links generated by AjaxSubmitButton 
 components to be exact.  :-)
 
 And you are certain that there are no /wo/ or /wa/ requests mixed 
 in here?
 
 I set this property in my Properties.dev:
 
 log4j.logger.er.extensions.ERXApplication.RequestHandling=DEBUG
 
 and then I looked at all the uri's of the requests coming in.  They 
 have /ajax/ in there and when the dialog first

blobArray prototype

2011-07-26 Thread Michael Gargano
Hi,

Anyone using blobArray prototypes anywhere?  I'm getting this error on a 
PostgreSQL DB...

er.transaction.adaptor.Exceptions - Database Exception occured: 
com.webobjects.foundation.NSForwardException [java.lang.NoSuchMethodException] 
Class er.prototypes.ValueConversion does not implement method 
blobArray:java.lang.NoSuchMethodException: Class er.prototypes.ValueConversion 
does not implement method blobArray

Any suggestions?

Thanks.
-Mike
 ___
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


properties files

2011-07-15 Thread Michael Gargano
I'm assuming the ERXProperties still doesn't allow you to reference other 
properties in your properties, does it?

Thanks.
-Mike

 ___
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: properties files

2011-07-15 Thread Michael Gargano
I thought I recalled something about the properties files getting reprocessed 
like 3 times over, but I couldn't find any documentation on it.
I'll check the vids, thanks.

-Mike

On Jul 15, 2011, at 11:09 AM, John Huss wrote:

It does.  There is a WOWODC video about it from last year.  It boggles the mind.

On Fri, Jul 15, 2011 at 10:03 AM, Michael Gargano 
mgarg...@escholar.commailto:mgarg...@escholar.com wrote:
I'm assuming the ERXProperties still doesn't allow you to reference other 
properties in your properties, does it?

Thanks.
-Mike

 ___
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: properties files

2011-07-15 Thread Michael Gargano
and  @@propertyName@@  FTW  :)

-Mike

On Jul 15, 2011, at 12:02 PM, Paul D Yu wrote:

I think it was one of Kieran's video.  My minds was blown by it.  But I did get 
the Properties in the /etc/WebObjects/InstanceName/ rule.

Paul
On Jul 15, 2011, at 11:13 AM, Michael Gargano wrote:

I thought I recalled something about the properties files getting reprocessed 
like 3 times over, but I couldn't find any documentation on it.
I'll check the vids, thanks.

-Mike

On Jul 15, 2011, at 11:09 AM, John Huss wrote:

It does.  There is a WOWODC video about it from last year.  It boggles the mind.

On Fri, Jul 15, 2011 at 10:03 AM, Michael Gargano 
mgarg...@escholar.commailto:mgarg...@escholar.com wrote:
I'm assuming the ERXProperties still doesn't allow you to reference other 
properties in your properties, does it?

Thanks.
-Mike

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

This email sent to p...@mac.commailto:p...@mac.com


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

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


ajaxgrid and d2w

2011-07-12 Thread Michael Gargano
If anyone knows...

I'm guessing there is no easy way to use ajaxgrid with d2w.  I'm 
assuming I'd have to write my own look to do something like this which would 
involve me mostly rewriting ajaxgrid to cram the d2w content into it.  If 
anyone has any suggestions I'm open.

Thanks.
-Mike

 ___
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: ajaxgrid and d2w

2011-07-12 Thread Michael Gargano
Hi David,

So, it's just a List Page that's been Ajax-ified.  It doesn't even have 
an associated component, so, it's completely not embeddable in my application.  
I got so close with ERModern, but unfortunately every other grid in the app is 
an ajax grid and it just wouldn't look right.  I guess that kills D2W for me.  
So, sad.  If I knew more and had more time I might try to do this on my own, 
but Anjo's code looks crazy and depends heavily on YUI.

Thanks anyway.

-Sad Panda  :(   (I mean... Mike)


On Jul 12, 2011, at 12:06 PM, David LeBer wrote:

 Mike,
 
 Wonder has the AjaxLook, I've not played with it at all but I believe it's 
 primarily a container for a page level wrapper around AjaxGrid.
 
 It may not be complete but it might give you a starting place.
 
 On 2011-07-12, at 11:41 AM, Michael Gargano wrote:
 
 If anyone knows...
 
  I'm guessing there is no easy way to use ajaxgrid with d2w.  I'm 
 assuming I'd have to write my own look to do something like this which would 
 involve me mostly rewriting ajaxgrid to cram the d2w content into it.  If 
 anyone has any suggestions I'm open.
 
 Thanks.
 -Mike
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
 
 This email sent to dleber_wo...@codeferous.com
 
 ;david
 
 --
 David LeBer
 Codeferous Software
 'co-def-er-ous' adj. Literally 'code-bearing'
 site: http://codeferous.com
 blog: http://davidleber.net
 profile:  http://www.linkedin.com/in/davidleber
 twitter:  http://twitter.com/rebeld
 --
 Toronto Area Cocoa / WebObjects developers group:
 http://tacow.org
 
 
 
 
 
 

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

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


Re: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page

2011-07-12 Thread Michael Gargano
my guess is your session is timing out.  for some reason the Ajax components 
produce that error instead.  I've been wondering how to fix it myself.

-mike

Sent from my iPhone

On Jul 12, 2011, at 4:35 PM, Ricardo J. Parada rpar...@mac.com wrote:

 Hi All,
 
 Does anybody have an idea what could be causing this problem?  The user 
 clicks on an AjaxModalDialogOpener which opens the dialog.  Then the user 
 does a whole bunch of stuff in the dialog that involves many clicks then 
 finally clicks a DONE link to close the dialog.  The dialog has a 
 closeUpdateContainerID bound with the id of an ajax update container to 
 refresh, which it does refresh upon closing the dialog.  But then the user 
 clicks on a link on the page that is outside the refreshed 
 AjaxUpdateContainer and the app displays the error You backtracked too far.  
 The application backtracking limit of 30 has been exceeded.
 
 Any ideas?
 
 Thanks,
 Ricardo
 
 ___
 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/mgargano%40me.com
 
 This email sent to mgarg...@me.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: ajaxgrid and d2w

2011-07-12 Thread Michael Gargano

On Jul 12, 2011, at 2:51 PM, Anjo Krank wrote:

 You could create the dictionary it used via D2W.
 
 Cheers, Anjo

I'm going to give this a try.  I think I might be able to get something like 
this working.  thanks.

 
 
 
 Am 12.07.2011 um 20:45 schrieb Ramsey Gurley:
 
 I thought the same thing, but evidently, I was wrong.  I had another look 
 and AjaxLook list page.  You're right Mike, it isn't a wrapper around 
 AjaxGrid.  If you want to use an AjaxGrid in D2W, it will require you to 
 create a list repetition based on it.
 
 Sorry to disappoint, but you still have to write components when they don't 
 exist.
 
 Ramsey

It's not the doing work I'm worried about, it's the lack of comprehensive 
understanding of how everything works.  And the complete and total lack of 
documentation on writing any of these pieces yourself.


 
 
 On Jul 12, 2011, at 10:51 AM, Michael Gargano wrote:
 
 Hi David,
 
 So, it's just a List Page that's been Ajax-ified.  It doesn't even have 
 an associated component, so, it's completely not embeddable in my 
 application.  I got so close with ERModern, but unfortunately every other 
 grid in the app is an ajax grid and it just wouldn't look right.  I guess 
 that kills D2W for me.  So, sad.  If I knew more and had more time I might 
 try to do this on my own, but Anjo's code looks crazy and depends heavily 
 on YUI.
 
 Thanks anyway.
 
 -Sad Panda  :(   (I mean... Mike)
 
 
 On Jul 12, 2011, at 12:06 PM, David LeBer wrote:
 
 Mike,
 
 Wonder has the AjaxLook, I've not played with it at all but I believe it's 
 primarily a container for a page level wrapper around AjaxGrid.
 
 It may not be complete but it might give you a starting place.
 
 On 2011-07-12, at 11:41 AM, Michael Gargano wrote:
 
 If anyone knows...
 
   I'm guessing there is no easy way to use ajaxgrid with d2w.  I'm 
 assuming I'd have to write my own look to do something like this which 
 would involve me mostly rewriting ajaxgrid to cram the d2w content into 
 it.  If anyone has any suggestions I'm open.
 
 Thanks.
 -Mike
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
 
 This email sent to dleber_wo...@codeferous.com
 
 ;david
 
 --
 David LeBer
 Codeferous Software
 'co-def-er-ous' adj. Literally 'code-bearing'
 site:  http://codeferous.com
 blog:  http://davidleber.net
 profile:   http://www.linkedin.com/in/davidleber
 twitter:   http://twitter.com/rebeld
 --
 Toronto Area Cocoa / WebObjects developers group:
 http://tacow.org
 
 
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
 
 This email sent to rgur...@smarthealth.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/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/mgargano%40escholar.com
 
 This email sent to mgarg...@escholar.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: woswitchcomponents

2011-07-08 Thread Michael Gargano
Hey Ramsey,

So, this really helped me out.  I knew I was being stupid.  I didn't know you 
had to pass the WOComponentContent into the WOSwitchComponent.

so, MyComponent was
div
wocomponentcontent/
div

and

i was doing

cctab
woswitch/
/cctab

instead of

cctab
woswitch
wocomponentcontent/
/woswitch
/cctab

I blame the example I was looking at.  :)  yeah, that's the ticket.


Using ERXD2WList, however, I still get this output in the log

Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) - Using JDBCPlugIn 
'PostgresqlPlugIn' for JDBCAdaptor@1983923753
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) -  === Begin Internal 
Transaction
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) -  evaluateExpression: the 
correct sql
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) - 9 row(s) processed
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) -  === Commit Internal 
Transaction
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) - Using JDBCPlugIn 
'PostgresqlPlugIn' for JDBCAdaptor@724020419
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) -  === Begin 
Internal Transaction
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) -  
evaluateExpression: the correct sql
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) - 9 row(s) processed
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) -  === Commit 
Internal Transaction
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) - Using 
JDBCPlugIn 'PostgresqlPlugIn' for JDBCAdaptor@1072235163
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) -  === Begin 
Internal Transaction
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) -  
evaluateExpression: the correct sql
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) - 9 row(s) 
processed
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) -  === Commit 
Internal Transaction
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) (null) - 
Using JDBCPlugIn 'PostgresqlPlugIn' for JDBCAdaptor@133947223
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) (null) -  === 
Begin Internal Transaction
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) (null) -  
evaluateExpression: the correct sql
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) (null) - 9 
row(s) processed
Jul 08 10:11:26 eGM[6] DEBUG NSLog (SelectUser) (null) (null) (null) -  === 
Commit Internal Transaction

The null's just keep appending themselves as it keeps looping, doing... i don't 
know what

thanks.
-mike


On Jul 7, 2011, at 6:56 PM, Ramsey Gurley wrote:

So, given a MyComponent like:

div
wocomponentcontent/
/div

Then

cctab
woswitch componentName=MyComponent
erxd2wlist/
/woswitch
/cctab

fails, but

cctab
MyComponent
erxd2wlist/
/MyComponent
/cctab

Works?

Ramsey

On Jul 7, 2011, at 3:04 PM, Michael Gargano wrote:

hi,

i'm using d2w and my wrapper page has a woswitchcomponent inside a 
ccajaxtabpanel.  the component for the tab has a wocomponentcontent inside of 
it.  this doesn't work, however.  if i remove the woswitchcomponent and put the 
wocompoentcontent inside the tabpanel, d2w works just fine, when i put it back 
i get no errors or anything, but the actual d2w content doesn't render.  the 
other elements in the tab do, but the d2w content is no where to be found.  any 
ideas about what i'm doing wrong?

thanks.
-mike

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

This email sent to rgur...@smarthealth.commailto:rgur...@smarthealth.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


woswitchcomponents

2011-07-07 Thread Michael Gargano
hi,

i'm using d2w and my wrapper page has a woswitchcomponent inside a 
ccajaxtabpanel.  the component for the tab has a wocomponentcontent inside of 
it.  this doesn't work, however.  if i remove the woswitchcomponent and put the 
wocompoentcontent inside the tabpanel, d2w works just fine, when i put it back 
i get no errors or anything, but the actual d2w content doesn't render.  the 
other elements in the tab do, but the d2w content is no where to be found.  any 
ideas about what i'm doing wrong?

thanks.
-mike

 ___
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: woswitchcomponents

2011-07-07 Thread Michael Gargano
sort of, but cut way down.  :)  I'm mixing d2w in my app and trying to display 
different pageconfigurations in each tab.  the problem is that i have 
components for each tab and those components have some elements and then 
wocomponentcontenet.  i was expecting the d2w content to show up there but it 
doesn't, only the additional elements render.  the tabpabel  determines which 
tab component to display with the woswitchcomponent.

-mike

Sent from my iPhone

On Jul 7, 2011, at 6:11 PM, David Holt programming...@mac.com wrote:

 Is this a roll-your-own version of ERXNavigationMenu??
 
 
 On 2011-07-07, at 3:09 PM, David Holt wrote:
 
 Hi Michael,
 
 On 2011-07-07, at 3:04 PM, Michael Gargano wrote:
 
 hi,
 
i'm using d2w and my wrapper page has a woswitchcomponent inside a 
 ccajaxtabpanel.  
 
 is this something in the tabpanel by default?
 
 the component for the tab has a wocomponentcontent inside of it.  this 
 doesn't work, however.
 
 what do you mean?
 
 if i remove the woswitchcomponent and put the wocompoentcontent inside the 
 tabpanel, d2w works just fine, when i put it back i get no errors or 
 anything, but the actual d2w content doesn't render.
 
 How is it working just fine if there is no content?
 
 the other elements in the tab do,
 
 do what?
 
 but the d2w content is no where to be found.
 
 Where are you looking for it? i.e. what behaviour are you actually trying to 
 accomplish??
 
 any ideas about what i'm doing wrong?
 
 thanks.
 -mike
 
 ___
 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 programming...@mac.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
 
 This email sent to programming...@mac.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/mgargano%40me.com
 
 This email sent to mgarg...@me.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: woswitchcomponents

2011-07-07 Thread Michael Gargano
not exactly.  I'm using ermod.  this whole thing is my wrapper.  if I abandon 
ermod and just try sticking a erxd2wlist in there 9 records come back, but the 
console spews out null's and the page never displays.  I think it has something 
to do with the woswitchcomponent, because when I take it out and replace it 
with wocomponentcontenet everything works

Sent from my iPhone

On Jul 7, 2011, at 6:29 PM, David Holt programming...@mac.com wrote:

 So you're embedding D2W content as Ramsey presented in Montreal?
 
 On 2011-07-07, at 3:22 PM, Michael Gargano wrote:
 
 sort of, but cut way down.  :)  I'm mixing d2w in my app and trying to 
 display different pageconfigurations in each tab.  the problem is that i 
 have components for each tab and those components have some elements and 
 then wocomponentcontenet.  i was expecting the d2w content to show up there 
 but it doesn't, only the additional elements render.  the tabpabel  
 determines which tab component to display with the woswitchcomponent.
 
 -mike
 
 Sent from my iPhone
 
 On Jul 7, 2011, at 6:11 PM, David Holt programming...@mac.com wrote:
 
 Is this a roll-your-own version of ERXNavigationMenu??
 
 
 On 2011-07-07, at 3:09 PM, David Holt wrote:
 
 Hi Michael,
 
 On 2011-07-07, at 3:04 PM, Michael Gargano wrote:
 
 hi,
 
  i'm using d2w and my wrapper page has a woswitchcomponent inside a 
 ccajaxtabpanel.  
 
 is this something in the tabpanel by default?
 
 the component for the tab has a wocomponentcontent inside of it.  this 
 doesn't work, however.
 
 what do you mean?
 
 if i remove the woswitchcomponent and put the wocompoentcontent inside 
 the tabpanel, d2w works just fine, when i put it back i get no errors or 
 anything, but the actual d2w content doesn't render.
 
 How is it working just fine if there is no content?
 
 the other elements in the tab do,
 
 do what?
 
 but the d2w content is no where to be found.
 
 Where are you looking for it? i.e. what behaviour are you actually trying 
 to accomplish??
 
 any ideas about what i'm doing wrong?
 
 thanks.
 -mike
 
 ___
 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 programming...@mac.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
 
 This email sent to programming...@mac.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/mgargano%40me.com
 
 This email sent to mgarg...@me.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: Apple Representation On WebObjects-Dev Mailing List?

2011-07-06 Thread Michael Gargano
it's time to accept that it has been... so, now what?  is the question we need 
to focus on

Sent from my iPhone

On Jul 6, 2011, at 12:45 PM, Robert B. Hanviriyapunt roberth...@mac.com 
wrote:

 How about the continued availability of WO.  People can SAY that Apple relies 
 heavily on WO and thus it won't go away, but again it just feels more secure 
 knowing that it is officially true, and that WO will always be kept out there 
 so that I can put away my doubts that it will suddenly disappear.  I'd just 
 feel safer while we're all building on this platform that it won't be pulled 
 from under us.
 
 On Jul 6, 2011, at 11:34 AM, Jesse Tayler wrote:
 
 there has been official word-- you just gotta go back ten years and ask 
 ernie prabhakar or something.
 
 seriously, the official word is that WO is and shall remain WO and will 
 never be open sourced or whatever.
 
 I opine as well, but that's the way it is and shall be.
 
 
 
 
 On Jul 6, 2011, at 12:27 PM, Robert B. Hanviriyapunt wrote:
 
 Who, if anyone, represents Apple on this mailing list?  When it comes to 
 questions of open-sourcing WO or the availability of WO, the answer should 
 be posted by an Apple official rep. in this mailing list.  Anyone can 
 opine, but I think the group benefits greatly when an official word is 
 heard -- second best to that is an insider, even if not officially 
 charged by Apple to represent in the list.
 
 Thoughts anyone?
 
 ___
 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/mgargano%40me.com
 
 This email sent to mgarg...@me.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: Audit Class

2011-07-03 Thread Michael Gargano
check the mailing list from last week.  i just asked about it.  :)

Sent from my iPhone

On Jul 3, 2011, at 11:13 AM, Daniel Beatty danielbea...@mac.com wrote:

 Greetings Dave's, geniuses, Chuck, etc,
 I was looking into ERAudit, heard Dave's talk, and foamed at the mouth to get 
 use that framework with my little application.   Not surprising, the 
 documentation is a bit hard to find.   
 
 Could we help each other on this?  If you guide me, I will write the 
 documentation.
 
 Thank you,
 
 
 
 Dan Beatty, ABD
 Ph.D. Student 
 Texas Tech University
 dan.bea...@mac.com
 http://web.me.com/danielbeatty/My_Home_Page/Welcome.html
 (806)438-6620
 
 
 
 
 
 
 
 
 
 
 ___
 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/mgargano%40me.com
 
 This email sent to mgarg...@me.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: ERCoreBusinessLogic docume-anything

2011-06-29 Thread Michael Gargano
I'm assuming my entity also needs a class override of 
ERCStampedEnterpriseObject.

Thanks.
-Mike

On Jun 28, 2011, at 2:42 PM, Ramsey Gurley wrote:

Are you referring to the audit trails?  That's pretty easy to use.  Just 
include your list of ERXAuditKeys in the userInfo dictionary for the Entity and 
it handles the rest.  If you include the ERXAuditKeys key with an empty value, 
it will log all your attributes by default.  Also, the existing audit trail 
handler doesn't support flattened relationships (many-to-many's) so well, but 
you can provide your own audit trail handler subclass via a property if you 
need that.

If you want to track who makes changes, you'll also need to set up an actor 
entity. Otherwise, you just track changes.  Most everything you need to know 
happens in ERCAuditTrailHandler.java.

Ramsey

On Jun 28, 2011, at 11:14 AM, Michael Gargano wrote:

huh, cool.  i did not know that.  thanks.

-mike

On Jun 28, 2011, at 2:06 PM, Chuck Hill 
ch...@global-village.netmailto:ch...@global-village.net wrote:


On Jun 28, 2011, at 10:58 AM, Michael Gargano wrote:

Hi all,

It seems that all the cool kids are using ERCoreBusinessLogic, but I can't find 
a lick of documentation on it.

Cool kids don't write documentation, they write code.  ;-)


I guess I only know the secret handshake, not the super-secret handshake.  :)

From poking around, I know that it logs and sends e-mails based on EO changes, 
but I wanted to know if it can be used to just log solely to the DB.  Anything 
out there on setting this up?  Should I check in the necronomicon perhaps?  :)

No idea, but log4j can log to a database.


Chuck and going to back to the library


--
Chuck Hill Senior Consultant / VP Development

Come to WOWODC this July for unparalleled WO learning opportunities and real 
peer to peer problem solving!  Network, socialize, and enjoy a great 
cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/ 
http://www.wocommunity.org/wowodc11/

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

This email sent to mailto:mgarg...@me.com 
mgarg...@me.commailto:mgarg...@me.com
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  
(Webobjects-dev@lists.apple.commailto:Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com

This email sent to rgur...@smarthealth.commailto:rgur...@smarthealth.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


ERCoreBusinessLogic docume-anything

2011-06-28 Thread Michael Gargano
Hi all,

It seems that all the cool kids are using ERCoreBusinessLogic, but I can't find 
a lick of documentation on it.

I guess I only know the secret handshake, not the super-secret handshake.  :)

From poking around, I know that it logs and sends e-mails based on EO changes, 
but I wanted to know if it can be used to just log solely to the DB.  Anything 
out there on setting this up?  Should I check in the necronomicon perhaps?  :)

Thanks.
-Mike

 ___
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: ERCoreBusinessLogic docume-anything

2011-06-28 Thread Michael Gargano
huh, cool.  i did not know that.  thanks.

-mike

On Jun 28, 2011, at 2:06 PM, Chuck Hill 
ch...@global-village.netmailto:ch...@global-village.net wrote:


On Jun 28, 2011, at 10:58 AM, Michael Gargano wrote:

Hi all,

It seems that all the cool kids are using ERCoreBusinessLogic, but I can't find 
a lick of documentation on it.

Cool kids don't write documentation, they write code.  ;-)


I guess I only know the secret handshake, not the super-secret handshake.  :)

From poking around, I know that it logs and sends e-mails based on EO changes, 
but I wanted to know if it can be used to just log solely to the DB.  Anything 
out there on setting this up?  Should I check in the necronomicon perhaps?  :)

No idea, but log4j can log to a database.


Chuck and going to back to the library


--
Chuck Hill Senior Consultant / VP Development

Come to WOWODC this July for unparalleled WO learning opportunities and real 
peer to peer problem solving!  Network, socialize, and enjoy a great 
cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/ 
http://www.wocommunity.org/wowodc11/

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

This email sent to mailto:mgarg...@me.com 
mgarg...@me.commailto:mgarg...@me.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


d2w - huh?

2011-06-21 Thread Michael Gargano
Hi all,

I'm trying to integrate d2w into my app and when I change the rules no 
updates seem to ever take hold.  I've tried clearing the d2w cache, but the 
only thing that seems to work is cleaning the project several times.  I had a 
stand alone wonder d2w app to just play with and everything was working fine, 
now that app has the same problem too.  Very strange.  Also, if I grab the 
queryAll page I run out of heap space after about 5-6 refreshes of the page.  I 
hope I'm just doing something stupid here.  Any ideas?

Thanks.
-Mike

 ___
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: Use EOF without WO?

2011-06-15 Thread Michael Gargano
While Cayenne is very similar to EOF prepare for a SUPER buggy modeling tool.  
It's really not ready for prime time.
my 2 ¢

-Mike


On Jun 15, 2011, at 2:19 PM, Mike Schrag wrote:

 I second Cayenne ... You're definitely in a legal quagmire translating EOF to 
 dalvik. I would recommend not even TRYING to go down this road with EOF. Even 
 if you make it work, it's just not worth the legal risk shipping an actual 
 product on it.
 
 ms
 
 On Jun 15, 2011, at 2:14 PM, Amy Worrall wrote:
 
 1) JavaFoundation requires some small tweaks to the binary for it to be used
 successfully by android
 
 Thanks ever so much for the sample project. It looks really useful.
 I'll have a chance to play with it more tomorrow.
 
 Out of interest, what did you have to do to Foundation?
 
 Thanks,
 
 Amy
 ___
 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/mgargano%40escholar.com
 
 This email sent to mgarg...@escholar.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: Mismatch between model and database

2011-06-02 Thread Michael Gargano
Hi Pascal,

This sounds like our stuff that you're working on.  I think I had an open 
question to the list on this actually.  For some reason, when a model is 
reverse engineered and a prototype is incorrectly assigned to a column this 
error seems to occur.  The reverse engineering process is making the assumption 
that if a column's data type matches a prototype, that attribute must be of 
that prototype's  type.  This is clearly incorrect though.  For example you may 
just have a column that is varchar(5), it's not necessarily a boolean 
prototype.  It would be good if the prototype mapping can be turned on/off when 
reverse engineering.  The only solution I've found is to go through and 
manually remove the prototypes, so that's what I've been doing.  The problem is 
the next time I need to refresh the mapping and rev. eng. the newer tables, 
prototype removal will need to be done again.

-Mike


On Jun 2, 2011, at 2:47 PM, Pascal Robert wrote:

I'm getting some mismatch types for an attribute that is part of a model that 
was created from reverse engineering.  Look like it's a mismatch between a 
String type and a number column, but sadly the exception is not saying which 
column or attribute it is, and no success by using breakpoints.

Is there a trick to find which column is the problem? Checking manually more 
than 150 attributes would be a real PITA :-)

Thanks.

juin 02 14:37:33 eGM[49754] WARN  NSLog  - er.ajax.AjaxRequestHandler: 
Exception occurred while handling request:
N/A
[2011-6-2 14:37:33 EDT] WorkerThread8 N/A
at com.webobjects.jdbcadaptor.JDBCColumn.takeInputValue(JDBCColumn.java:621)
at 
com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAndExecute(JDBCChannel.java:260)
at 
com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:337)
at 
com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java:296)
at com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes(JDBCChannel.java:220)
at 
com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationEditingContext(EODatabaseChannel.java:897)
at 
com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:234)
at 
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3055)
at 
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195)
at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
at 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1206)
at 
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:)
...
ATT1..txt

 ___
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: It's alive!

2011-05-31 Thread Michael Gargano
congratulations

-mike

On May 31, 2011, at 7:10 PM, David LeBer dleber_wo...@codeferous.com wrote:

 Finally! The iOS / WO project we've been working on is finally beginning to 
 bear fruit:
 
 http://rbld.me/1h
 
 I'll be talking about the lessons learned on the road to this at WOWODC.
 
 (the app is currently propagating, so that link may not work for everyone 
 just yet)
 
 ;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
 --
 WOWODC 2011 :  July 1-2-3, Montreal. http://wowodc.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/mgargano%40me.com
 
 This email sent to mgarg...@me.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 design patterns for the desperate

2011-05-12 Thread Michael Gargano
I work on reporting apps against a warehouse, so I have to straddle the line 
between objects and things people load in the backend and report off of 
directly.



On May 11, 2011, at 4:51 PM, Mark Wardle wrote:

 Can you re-imagine your problem as objects instead of thinking of the
 database or do you have other code accessing SQL directly?
 
 Mark
 
 On 11 May 2011 20:14, Michael Gargano mgarg...@escholar.com wrote:
 I was just talking to David Holt about this and he suggested I tap the brain 
 trust.  :)
 
 I was wondering if there is a database design pattern for a situation where 
 I have some template structure
 let's say
 
tA - tB - tC  (records across these tables are the template, 
 the template is a whole object graph rooted at one record in tA)
 
 where the templates can be configured on a per tenant basis (so, the 
 templates themselves are records that define defaults and new ones can be 
 added when new tenants or templates are added).  I need to make a copy of a 
 template that a tenant uses and make it local to a user (under that tenant) 
 who can then customize the values in that template for their needs.
 
 It's basically a class/instance kind of structure, but at the data level in 
 the database.  It's as if I need to copy an EOs from one table to another 
 where the destination table has a few more attributes than the source table 
 did.  It's made more complicated by the fact that I need to copy that 
 template object graph, not just one EO.
 
 Any suggestions?
 *Hopes beyond hope*
 
 Thanks.
 -Mike
 
 
  ___
 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/mark%40wardle.org
 
 This email sent to m...@wardle.org
 
 
 
 
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 Cardiff, UK
 

 ___
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


database design patterns for the desperate

2011-05-11 Thread Michael Gargano
I was just talking to David Holt about this and he suggested I tap the brain 
trust.  :)

I was wondering if there is a database design pattern for a situation where I 
have some template structure 
let's say

tA - tB - tC  (records across these tables are the template, the 
template is a whole object graph rooted at one record in tA)

where the templates can be configured on a per tenant basis (so, the templates 
themselves are records that define defaults and new ones can be added when new 
tenants or templates are added).  I need to make a copy of a template that a 
tenant uses and make it local to a user (under that tenant) who can then 
customize the values in that template for their needs.

It's basically a class/instance kind of structure, but at the data level in the 
database.  It's as if I need to copy an EOs from one table to another where the 
destination table has a few more attributes than the source table did.  It's 
made more complicated by the fact that I need to copy that template object 
graph, not just one EO.

Any suggestions?
*Hopes beyond hope*

Thanks.
-Mike

 ___
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 design patterns for the desperate

2011-05-11 Thread Michael Gargano
Thanks Kieran,

Maybe something I wasn't clear about either is that the local user copy 
can change attributes all the way across the structure.  So, tB and tC will 
have additional attributes as well and local values for attributes there too.  
So, I understand doing that for tA, I guess I would need to have the same 
procedure for tB and tC and the implementation of the EOCopyable interface 
would have to create the local versions of the tB and tC objects when doing the 
deep copy.

This is definitely an option.  I'm not expecting it to be pretty.
My heart grows heavy with foreign key constraints.

-Mike

On May 11, 2011, at 4:10 PM, Kieran Kelleher wrote:

 And to add to that, if it's not clear ..
 
 - Use the same table (as you said  near identical)
 - If you like prefix the non-common attributes with underscore or sth, and 
 write behavior interface cover methods that throw when the attribute is being 
 set on the wrong type.
 - Use type attribute for fetches to exclude user-customized templates.
 
 
 On May 11, 2011, at 3:56 PM, Kieran Kelleher wrote:
 
 If I understood you correctly:
 
 - Make option relationship from tUser -- tA for user-owned templates
 - Add extra fields to tA
 - Add a type field to tA - Integer - each int denotes a behavior
 - Use Strategy Design pattern and create 2 behavior classes that correspond 
 to two templates types
  TemplateBehavior interface
  DefaultTemplateBehavior
  UserTemplateBehavior
 
 - Methods/logic that differ between both template scenarios should be put in 
 the Behavior interface and implemented in Behavior classes.
 - The EO class corresponding to tA also implements TemplateBehavior 
 interface.
 - Set default value of type to be DefaultTemplateBehavior type (say type = 
 10)
 - lazy instantiate behavior in the class based on value of type.
  private TemplateBehavior _behavior;
 
  private TemplateBehavior behavior() {
  if ( _behavior == null) {
  if (type().intValue() == 20) {
  _behavior = new UserTemplateBehavior(this);
  } else {
  _behavior = new DefaultTemplateBehavior(this);
  }
  }
  return _behavior;
 
 - implement interface methods in the EO class like this
  public void doSomething() {
  behavior().doSomething();
  }
 
 - Use Chuck's EOCopyable interface and utilities to copy tA instance when a 
 user wants to customize.  Set your extra attrivutes and change the type of 
 the copied template to the int corresponding to the UserTemplateBehavior 
 (and reset _behavior to null - I have a reset() method in my GenericEO and 
 is used to nullify cached ivars on every didUpdate and didInsert btw)
 
 HTH, Kieran
 
 On May 11, 2011, at 3:14 PM, Michael Gargano wrote:
 
 I was just talking to David Holt about this and he suggested I tap the 
 brain trust.  :)
 
 I was wondering if there is a database design pattern for a situation where 
 I have some template structure 
 let's say
 
 tA - tB - tC  (records across these tables are the template, the 
 template is a whole object graph rooted at one record in tA)
 
 where the templates can be configured on a per tenant basis (so, the 
 templates themselves are records that define defaults and new ones can be 
 added when new tenants or templates are added).  I need to make a copy of a 
 template that a tenant uses and make it local to a user (under that tenant) 
 who can then customize the values in that template for their needs.
 
 It's basically a class/instance kind of structure, but at the data level in 
 the database.  It's as if I need to copy an EOs from one table to another 
 where the destination table has a few more attributes than the source table 
 did.  It's made more complicated by the fact that I need to copy that 
 template object graph, not just one EO.
 
 Any suggestions?
 *Hopes beyond hope*
 
 Thanks.
 -Mike
 
 ___
 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/kelleherk%40gmail.com
 
 This email sent to kelleh...@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


eogenerator options

2011-05-09 Thread Michael Gargano
two quick(and believe it or not, related) questions:

1) Is there a way to have EOGenerator not automatically reverse 
engineer fields into prototypes?  [E.g. if I have a varchar(5) column, to not 
have EOGenerator rev. eng. this into a boolean prototype]

2) Is the list of properties shown 
http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-EOGenerator#EOF-UsingEOF-EOGenerator-HowToUseIt
  the complete and up-to-date list of options to that EOGenerator accepts?

Thanks.
-Mike

 ___
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: eogenerator options

2011-05-09 Thread Michael Gargano
One of these days my questions will make sense... I promise!  (i think i'm 
getting better)  :)


On May 9, 2011, at 4:35 PM, David LeBer wrote:

 
 On 2011-05-09, at 4:13 PM, Michael Gargano wrote:
 
 two quick(and believe it or not, related) questions:
 
  1) Is there a way to have EOGenerator not automatically reverse 
 engineer fields into prototypes?  [E.g. if I have a varchar(5) column, to 
 not have EOGenerator rev. eng. this into a boolean prototype]
 
 If you have modeled that attribute as a boolean, EOF will treat it as a 
 boolean (the 'boolean' prototype defines a factory class for EOF to use so by 
 the time you get the value it is no longer a varchar). If you don't want it 
 to be a boolean, then you probably shouldn't model it as a one.

I'm reverse engineering a DB here, so I haven't modeled anything.


 
 
  2) Is the list of properties shown 
 http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-EOGenerator#EOF-UsingEOF-EOGenerator-HowToUseIt
   the complete and up-to-date list of options to that EOGenerator accepts?
 
 Are you using the old standalone EOGenerator tool (described on that page) or 
 the Velocity EOGenerator capabilities built into WOLips?

hmm I guess not, I thought they were one in the same.  I'm just using 
what's in WOLips.


 
 ;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
 --
 WOWODC 2011 :  July 1-2-3, Montreal. http://wowodc.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


getting a session from WOApplication dispatchRequest

2011-04-27 Thread Michael Gargano
Hi all,

I need to do something like this...

public WOResponse dispatchRequest(WORequest) {

session = getWOSession

retrieve / modify values in session

bind some thread local variables

response = super.dispatchRequest()

unbind the tread local variables

return response
}

I was trying to get the session from the request's context, but the context has 
not be created at this point.  So, there were two ways I was looking at 
accomplishing this

1) call createContextFromRequest() to get a new context followed by 
restoreSessionWithID
(this seems like the dicer of the two options)

2) call sessionStore() to retrieve the session store then call 
restoreSessionWithID() to get a reference to the session make my reads and 
changes

Chuck had mentioned doing this in Session's awake() and sleep(), but the 
problem is that I'm trying to unify the WOSession with another framework's 
session model, so some of the information I need to restore the other session 
resides in the WOSession.  The other framework also has a bunch of stuff it 
binds to thread local, but everything works off it's own internal utility 
classes preventing me from using ERXThreadStorage.

Thanks.
-Mike

 ___
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

New WebObjects forum on support.apple.com

2011-04-16 Thread Michael Gargano

Just in case you haven't heard... Apple revamped their support forums and 
there's a WO forum!   #first  :)

https://discussions.apple.com/community/servers_enterprise_software/web_objects

pretty cool.

-Mike

 ___
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


stoping models from loading into default EOModelGroup

2011-04-08 Thread Michael Gargano
Okay... two days... I give up...

Is there a way to stop a model from getting loaded into the default 
EOModelGroup?  I have a entity naming conflict and I want to prevent a model in 
a framework I'm using from loading.  I looked at the delegate methods and they 
don't seem do do what I want, the EOModelGroup.ClassDelegate looked promising, 
but from what I read it looks like I'd have to re-implement most of 
ERXModelGroup.loadModelsFromLoadedBundles() and when I put this code...

// remove the my Model from the default model group of the Application
EOModelGroup.setClassDelegate(new EOModelGroup.ClassDelegate() {


@Override
public EOModelGroup defaultModelGroup() {
ERXModelGroup group = new ERXModelGroup();
group.loadModelsFromLoadedBundles();// pretty sure this would still throw an 
exception
EOModel model = group.modelNamed(mymodel);
if(model != null)
group.removeModel(model);
return group;
}
});

... in the Application() constructor it get the message...

Class com.webobjects.foundation.NSSelector can not access a member of class 
com.mycomp.Application$1 with modifiers public

If this can't be done I guess my only recourse would be to write a util. 
program to edit all the plist from my models and prepend something to all the 
entity names.

Thanks.
-Mike

 ___
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: postgresql schema ignored when adding foreign key

2011-04-06 Thread Michael Gargano
It looks like it's just fundamentally broken, FKs and unique indexes just don't 
work in other schemas for postgtgres.

For my fixes if you're curious.
http://issues.objectstyle.org/jira/browse/WONDER-696

Thanks Tim this info. was helpful.
-Mike


On Apr 6, 2011, at 12:14 AM, D Tim Cummings wrote:

Schemas don't work if you have the following property true

com.webobjects.jdbcadaptor.PostgresqlExpression.enableIdentifierQuoting=true

I have a patch to fix this in

http://issues.objectstyle.org/jira/browse/WONDER-489
Postgresql PlugIn inconsistent application of identifier quoting to table names 
with schemas - Migrations don't work


Regards

Tim Cummings

On 06/04/2011, at 2:27 AM, Michael Gargano wrote:



EOSchemaGeneration foreignKeyConstraintStatementsForRelationship() seems to 
ignore schemas.  Anyone else have problems with that when using addForeignKey() 
in a migration with tables with non-default schemas?  I tried to fix it on my 
own, but either my brain is too small or wonder is too complex... maybe both.  
:p

-Mike

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

This email sent to t...@triptera.com.au


 ___
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


postgresql schema ignored when adding foreign key

2011-04-05 Thread Michael Gargano


EOSchemaGeneration foreignKeyConstraintStatementsForRelationship() seems to 
ignore schemas.  Anyone else have problems with that when using addForeignKey() 
in a migration with tables with non-default schemas?  I tried to fix it on my 
own, but either my brain is too small or wonder is too complex... maybe both.  
:p

-Mike

 ___
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

model connections to multiple DBs

2011-04-04 Thread Michael Gargano
Hi all,

Is there a way to have a model connect to different databases 
simultaneously?  So, I have a schema that is rev. eng'ed but that same schema 
is on 10 different databases, I want to fetch data from different DB's for 
different users of the system simultaneously.  Is this possible?  omg 
please say YES.  :)

Thanks.
-Mike

 ___
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: model connections to multiple DBs

2011-04-04 Thread Michael Gargano
That's bad for me, I need to be able to bring new DB's on dynamically.  It 
wouldn't be possible to rev. eng. each one as needed.
This is quite a road block for me.  *sigh*

-Mike

On Apr 4, 2011, at 11:04 AM, Simon wrote:

 i think it's a big no :-(
 
 but you can definitely have multiple models - one for each db - and
 relationships between the models.
 
 simon
 
 On 4 April 2011 16:00, Michael Gargano mgarg...@escholar.com wrote:
 Hi all,
 
Is there a way to have a model connect to different databases 
 simultaneously?  So, I have a schema that is rev. eng'ed but that same 
 schema is on 10 different databases, I want to fetch data from different 
 DB's for different users of the system simultaneously.  Is this possible?  
 omg please say YES.  :)
 
 Thanks.
 -Mike
 
 
  ___
 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%40potwells.co.uk
 
 This email sent to si...@potwells.co.uk
 
 

 ___
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: model connections to multiple DBs

2011-04-04 Thread Michael Gargano
Sorry, I thought I replied all.  Thanks.  I'll start here.  With overhead I 
just mean that the setup for a new EOF stack must not be very fast and my guess 
is that it's going to use a fairly large amount of memory.

-Mike

On Apr 4, 2011, at 11:30 AM, Anjo Krank wrote:

 Please keep this on-list.
 
 I haven't actually tried it and don't know what you mean by overhead, but 
 the core idea would be sth like:
 
 public Session() {
   EOModelGroup modelGroup = new EOModelGroup();
   EOModel model = modelGroup.addModelWithPath(/some/where); // model should 
 be in a subfolder of Resources so it won't get loaded
   adjustConnectionDict(model);
   EOAdaptor adaptor = EOAdaptor.adaptorWithModel(model);
   EODatabaseContext dbc = new EODatabaseContext(adaptor);
   EOObjectStoreCoordinator osc = new EOObjectStoreCoordinator();
   osc.addCooperatingObjectStore(dbc);
   EOEditingContext ec = new EOEditingContext(osc);
   setDefaultEditingContext(ec);
 }
 
 This probably won't even compile, but should get you started. All other ECs 
 must be created as 
 
 new EOEditingContext(session().defaultEditingContext().parentObjectStore())
 
 or from a thread-local.
 
 Cheers, Anjo
 
 
 Am 04.04.2011 um 17:17 schrieb Michael Gargano:
 
 This sounds good to me.  :-D  Two questions... how much overhead is this?  
 (as i'm sure this is not a light weight process)  where do i find out how to 
 dynamically create new eof stacks?
 
 Thanks.
 -Mike
 
 
 On Apr 4, 2011, at 11:11 AM, Anjo Krank wrote:
 
 Actually, it's a yes. 
 
 You can create one EOF stack per user and clone the model group so it's 
 used in that stack. Then adjust the model dict for the connection and 
 you're good to go. You need to take really good care you never use 
 EOModelGroup.defaultGroup() anywhere, though.
 
 Cheers, Anjo
 
 Am 04.04.2011 um 17:04 schrieb Simon:
 
 i think it's a big no :-(
 
 but you can definitely have multiple models - one for each db - and
 relationships between the models.
 
 simon
 
 On 4 April 2011 16:00, Michael Gargano mgarg...@escholar.com wrote:
 Hi all,
 
 Is there a way to have a model connect to different databases 
 simultaneously?  So, I have a schema that is rev. eng'ed but that same 
 schema is on 10 different databases, I want to fetch data from different 
 DB's for different users of the system simultaneously.  Is this possible? 
  omg please say YES.  :)
 
 Thanks.
 -Mike
 
 
 ___
 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%40potwells.co.uk
 
 This email sent to si...@potwells.co.uk
 
 ___
 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/mgargano%40escholar.com
 
 This email sent to mgarg...@escholar.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/mgargano%40escholar.com
 
 This email sent to mgarg...@escholar.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: PostgreSQL float8

2011-03-28 Thread Michael Gargano
Hi Ramsey and Ted,

It seems like that is the issue.

WONDER-693http://issues.objectstyle.org/jira/browse/WONDER-693

and

WOL-1206http://issues.objectstyle.org/jira/browse/WOL-1206


Thanks guys.
-Mike


On Mar 27, 2011, at 12:42 PM, Ramsey Gurley wrote:

Hi Ted,

I've closed one like that already as it belongs on WOProject JIRA.  Don't be 
offended if I close 517 for the same reasons...

http://issues.objectstyle.org/jira/browse/WONDER-438

The problem appears to be in the migration generation template.  It should be 
filed on JIRA for WOLips instead.  I see

http://issues.objectstyle.org/jira/browse/WOL-1029

which looks related. Maybe vote on that?

Michael,

I was not aware that the double migration itself did not work for Postgresql.  
File a jira for that issue on Wonder and I will take a look once I figure out 
git (^_^)  I suspect all you need to do is add Type.FLOAT and Type.DOUBLE into 
that tremendous 'if' statement in PostgresqlSQLHelper.externalTypeForJDBCType().

Ramsey


On Mar 27, 2011, at 7:59 AM, Theodore Petrosky wrote:

I opened a Jira in April 2010 on this issue (Jira #517). Maybe adding a vote to 
it would help move it along.

Ted

Date: Fri, 25 Mar 2011 14:50:54 -0700
From: Michael Gargano mgarg...@escholar.com
Subject: PostgreSQL float8
To: webobjects-dev@lists.apple.com
List List
   webobjects-dev@lists.apple.com
Message-ID: 37f75e6d-d849-4a90-bb9c-3bc16541a...@escholar.com
Content-Type: text/plain; charset=us-ascii

Hi all,

   I'm using an attribute in my model with
a prototype of doubleNumber, this is set to use a DB type of
float8.  When I generate the migration it uses
.newDoubleColumn with broken precision and scale numbers
(since the prototype doesn't have these fields).
Trying to use newDoubleColumn or even newColumn with
Types.DOUBLE or Types.FLOAT does not seem to work.  A
column gets created, but when my update script runs and
tries to insert data into that table it complains about the
numerical values I'm trying to insert claiming the field
type is 'money'.  I saw an earlier e-mail to the list
about this, but no resolution, but someone must be using
doubles and postgres somewhere.

Thanks.
-Mike


___
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/ramseygurley%40gmail.com

This email sent to ramseygur...@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

PostgreSQL float8

2011-03-25 Thread Michael Gargano
Hi all,

I'm using an attribute in my model with a prototype of doubleNumber, 
this is set to use a DB type of float8.  When I generate the migration it uses 
.newDoubleColumn with broken precision and scale numbers (since the prototype 
doesn't have these fields).  Trying to use newDoubleColumn or even newColumn 
with Types.DOUBLE or Types.FLOAT does not seem to work.  A column gets created, 
but when my update script runs and tries to insert data into that table it 
complains about the numerical values I'm trying to insert claiming the field 
type is 'money'.  I saw an earlier e-mail to the list about this, but no 
resolution, but someone must be using doubles and postgres somewhere.

Thanks.
-Mike

 ___
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

Mimicking the J2EE filter chain

2011-03-23 Thread Michael Gargano
Hi all,

I'm using the Shiro security framework for the project I'm 
working on.  In the framework, the subject (basically the user) is bound to the 
thread and unbound through the J2EE filter chain.  My plan was to just shove 
this subject object into the Session, but the authors of the framework really 
suggest binding and unbinding this object to the request thread .  The problem 
is... I have no idea how that would be done in WO.  Would I have to override 
createRequest in Application?   I was thinking something like...

createRequest(params...) {

Subject.execute(new Callable() {
public Object call() throws Exception {
super.createRequest(params...);
}
}
}

Any other suggestions?  I'm not sure something like this would even work.

Thanks.
-Mike

 ___
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: Indexes on Postgresql using EOF Modeler

2011-03-09 Thread Michael Gargano
I believe Mike S. said that indexes were added in 5.4 and the modeler doesn't 
support them because there's no API.  You have to add them programmatically in 
your migration script.  If you search the archives you can get his exact 
response. I asked in Oct. or Nov. last year.  :)

-the other Mike

Sent from my iPhone

On Mar 9, 2011, at 6:03 AM, Paul Dunkler paul.dunk...@xyrality.com wrote:

 Hi folks,
 
 i'm currently working with WOLipse and the EntityModeler for creating a 
 postgres-driven database model. Everything works fine except the creation of 
 indexes.
 I can create new indexes on tables, but they aren't included in the 
 sql-output generated by the modeler. Only the indexes on the primary key 
 attributes are generated (automatically), but no index which i defined by my 
 self.
 
 Would be very nice if anyone now what to do, because i don't want to maintain 
 my indexes in txt-documents or something ;)
 
 
 --
 Best Regards
 
 Paul Dunkler ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/mgargano%40me.com
 
 This email sent to mgarg...@me.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: what am i doing wrong with this qualifier

2011-01-25 Thread Michael Gargano
sounds like your mapping is wrong on that property

-mike

Sent from my iPhone

On Jan 25, 2011, at 6:09 PM, Theodore Petrosky tedp...@yahoo.com wrote:

 i should have included the error section:
 
 
 --- On Tue, 1/25/11, Theodore Petrosky tedp...@yahoo.com wrote:
 
 From: Theodore Petrosky tedp...@yahoo.com
 Subject: what am i doing wrong with this qualifier
 To: webobjects-dev@lists.apple.com
 Date: Tuesday, January 25, 2011, 6:06 PM
 theDate is an NSTimestamp;
 
 EOQualifier qualifier = ERXQ.is(invoiceBookedDate,
 theDate);
 
 ERXFetchSpecificationInvoice fs = new
 ERXFetchSpecificationInvoice(Invoice.ENTITY_NAME,
 qualifier, sortOrderings);
 NSLog.out.appendln(fs =  + fs);
 
 fs = class
 er.extensions.eof.ERXFetchSpecification(entityName=Invoice,
 qualifier=(invoiceBookedDate =
 (com.webobjects.foundation.NSTimestamp)'2010-12-06 00:00:00
 Etc/GMT'),
 isDeep=true, usesDistinct=false,
 sortOrdering=(class
 er.extensions.eof.ERXSortOrdering(invoiceBookedDate
 compareAscending)),
 hints=null,
 _prefetchingRelationshipKeyPaths = null)
 
 
 er.extensions.components._private.ERXWOString  - Exception while formatting
 NumberFormatException: Infinite or NaN
  at java.math.BigDecimal.init(BigDecimal.java:797)
  at 
 com.webobjects.foundation.NSNumberFormatter.stringForObjectValue(NSNumberFormatter.java:1026)
  at 
 com.webobjects.foundation.NSNumberFormatter.format(NSNumberFormatter.java:1654)
  at 
 er.extensions.formatters.ERXNumberFormatter.format(ERXNumberFormatter.java:250)
  at java.text.Format.format(Format.java:140)
  ... skipped 31 stack elements
 Jan 25 17:58:33 TheWorkTracker[62782] INFO  
 er.extensions.components._private.ERXWOString  - Exception while formatting
 NumberFormatException: Infinite or NaN
  at java.math.BigDecimal.init(BigDecimal.java:797)
  at 
 com.webobjects.foundation.NSNumberFormatter.stringForObjectValue(NSNumberFormatter.java:1026)
  at 
 com.webobjects.foundation.NSNumberFormatter.format(NSNumberFormatter.java:1654)
  at 
 er.extensions.formatters.ERXNumberFormatter.format(ERXNumberFormatter.java:250)
 
 
 
 If qualifier = null; I get the entire list (the query
 works). and the sql: 
 
 select * from  t_invoice where c_invoice_booked_date =
 '2010-12-06 0:00:00 Etc/GMT';
 
 works beautifully.
 
 Am I just being brain dead?
 
 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/mgargano%40me.com
 
 This email sent to mgarg...@me.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: Localization

2011-01-14 Thread Michael Gargano
Okay,

So, for future reference (for myself mostly, I guess) 
ERXLocalizer.currentLocalizer().takeValueForKey() works fine.  I'm not sure 
what these other methods do, but it's not what I want.

-Mike

On Jan 11, 2011, at 11:38 AM, Michael Gargano wrote:

Hi all,

I'm having a issue with string localization

I have English.lproj and Spanish.lproj folders in my Resources directory with a 
Localizable.strings file in each (both UTF-8).  The files look like this

{
loginname = {
test = Test;
};
}

{
loginname = {
test = Prueba;
};
}

Now in my code I'm calling the following...

ERXLocalizer.currentLocalizer().localizedStringForKey(loginname.test);

I also tried...

ERXStringUtilities.localizedStringForKey(loginname.test);

I get nothing but nulls back.  If I get rid of the dictionary, it works fine.  
According to the JavaDoc in ERXLocalizer it appears that this should work.  
Suggestions?

Thanks.
-Mike

ATT1..txt

 ___
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

  1   2   >