ApplicationDidFinishLaunchingNotification Problem

2008-04-08 Thread Aleksey Novicov
There is a handy notification in WOApplication called  
ApplicationDidFinishLaunchingNotification for which you can register  
an observer. In fact, this is what Wonder uses for ERXApplication's  
didFinishLaunching().


However, I've noticed that when when building for deployment as a  
servlet (using Leopard Server & Tomcat), no observers for  
ApplicationDidFinishLaunchingNotification get called! If I deploy as  
a .woa it works fine, but as a servlet it does not. I've reduced it to  
a very simple test case and will file a bug with Apple, but I just  
wanted to find out if anyone else has seen this problem?


Is there a recommended alternative for performing one time application  
startup batch operations other than in the constructor or using  
ApplicationDidFinishLaunchingNotification? I guess there is always the  
request-response loop...


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

This email sent to [EMAIL PROTECTED]

Re:[SOLVED] ERXMigration Problem with Multiple Models

2008-04-07 Thread Aleksey Novicov
I updated Wonder using last night's build, and it does in fact fix the  
exception I was seeing.


Thanks again Mike.

Aleksey

On Apr 6, 2008, at 6:52 PM, Aleksey Novicov wrote:


Thanks Mike. Where is the signup for the Wonder list?

I do have a third model for accessing legacy data in a separate  
database, but on the same MySQL server. There are a couple of  
relationships that traverse models to the legacy data. But that  
third model does not use migrations at all.


I tried explicitly listing the third model in the model names list,  
and... it works! That fixed it.


Thanks!
Aleksey


This should really be on the Wonder list rather than wo-dev, but I
just committed a fix for this ... I saw this once before but didn't
end up looking into it.  Is it possible you are depending on another
framework that is bringing in a migration that only is being
discovered because of a relationship to a 3rd model?  For instance,
you are declaring Model1 and Model2, but do you have a relationship  
to

a Model3 that also uses migrations (like ERAttachment or ERTaggable,
maybe?).  Anyway, that was the scenario that would cause this ... If
you can track down that 3rd model and list it explicitly in the
modelNames list, it would probably fix the problem for you also, or
you can update Wonder after tonight's build and it should be properly
fixed.

As an aside, you no longer have to declare MigrationClassPrefix for
your models if the class name matches your EOModel name ...

ms

On Apr 6, 2008, at 4:43 PM, Aleksey Novicov wrote:


I love ERXMigration! But I seem to be having a problem when I use it
for multiple models. The models do not have any dependency on each
other, so I don't bother to implement modelDependencies() in either
of my Migration classes.

If I configure the settings so that the migration for only one model
runs, and not the other, everything runs fine. So it seems to be
gagging on the fact there are multiple models. Do I need to
configure some sort of default model dependency, even if there is
none? Both models refer to the same database, and the migrations are
both migration0.

Thanks,
Aleksey




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

This email sent to [EMAIL PROTECTED]

Re: ERXMigration Problem with Multiple Models

2008-04-06 Thread Aleksey Novicov

Thanks Mike. Where is the signup for the Wonder list?

I do have a third model for accessing legacy data in a separate  
database, but on the same MySQL server. There are a couple of  
relationships that traverse models to the legacy data. But that third  
model does not use migrations at all.


I tried explicitly listing the third model in the model names list,  
and... it works! That fixed it.


Thanks!
Aleksey


This should really be on the Wonder list rather than wo-dev, but I
just committed a fix for this ... I saw this once before but didn't
end up looking into it.  Is it possible you are depending on another
framework that is bringing in a migration that only is being
discovered because of a relationship to a 3rd model?  For instance,
you are declaring Model1 and Model2, but do you have a relationship to
a Model3 that also uses migrations (like ERAttachment or ERTaggable,
maybe?).  Anyway, that was the scenario that would cause this ... If
you can track down that 3rd model and list it explicitly in the
modelNames list, it would probably fix the problem for you also, or
you can update Wonder after tonight's build and it should be properly
fixed.

As an aside, you no longer have to declare MigrationClassPrefix for
your models if the class name matches your EOModel name ...

ms

On Apr 6, 2008, at 4:43 PM, Aleksey Novicov wrote:


I love ERXMigration! But I seem to be having a problem when I use it
for multiple models. The models do not have any dependency on each
other, so I don't bother to implement modelDependencies() in either
of my Migration classes.

If I configure the settings so that the migration for only one model
runs, and not the other, everything runs fine. So it seems to be
gagging on the fact there are multiple models. Do I need to
configure some sort of default model dependency, even if there is
none? Both models refer to the same database, and the migrations are
both migration0.

Thanks,
Aleksey


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

This email sent to [EMAIL PROTECTED]

Re: WO 5.4 Linux Deployment

2008-04-03 Thread Aleksey Novicov
It does seem benign. I'm wondering if anyone knows how  
(javax.naming.NameNotFoundException: Name jdbc is not bound in this  
Context) might be suppressed.


Thanks,
Aleksey


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

ms

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


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

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


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

Aleksey

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


Hello Aleksey;

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

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


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


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


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

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


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


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

cheers.

___
Andrew Lindesay
www.lindesay.co.nz


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

This email sent to [EMAIL PROTECTED]

Re: WO 5.4 Linux Deployment

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


Aleksey

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


Hello Aleksey;

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


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

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


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



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

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


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


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


cheers.

___
Andrew Lindesay
www.lindesay.co.nz



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

This email sent to [EMAIL PROTECTED]


Re: WO 5.4 Linux Deployment

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


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

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

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

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



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


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

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

This email sent to [EMAIL PROTECTED]



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

This email sent to [EMAIL PROTECTED]


Re: WO 5.4 Linux Deployment

2008-04-01 Thread Aleksey Novicov

Thanks Jeff!

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


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


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


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


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


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


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

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

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

Thanks,
Aleksey


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

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


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


Jeff

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

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


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


WO 5.4 Linux Deployment

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


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


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

This email sent to [EMAIL PROTECTED]