|
I am developing on OS X using Eclipse.
Nothing out of the ordinary. This line of code: Application
app = (Application) this.application(); Is throwing an ‘Invalid cast exception’.
Yet both classes inherit from WOApplication. I, too, am confused as to why
this wouldn’t work. I even tried stripping the Application class entirely of
its functionality, but still got the same Exception. Do you think the exception has anything
to do with the Application instance being a singleton? Just a thought. The
cast creates a reference, so I can’t imagine why it would throw an exception. Thanks, From: Jerry W. Walker
[mailto:[EMAIL PROTECTED] Hi, Colin, On Jan 27, 2006, at 5:33 PM, Colin Shreffler wrote:
In my wo
application, I have a class that was created by the development environment
(when the project was created) called Application.java. This is the standard Application class provided by WO to allow you to
override WOApplication, a singleton class whose single instance represents the
application.
It does
not, however, appear to be working… the constructor doesn’t appear to get
called. Is there a better way to add start up routines? In a
different class perhaps? This is the appropriate place to add initialization code if you're
running a standard WO deployment. I haven't deployed outside that environment,
but I seem to remember reading on the list that a WOApp is initialized slightly
differently if deployed in a J2EE servlet container. In any case, it would help
to know what your deployment environment is if you're having this kind of
trouble.
As stated above, this is the class provided to you to customize (by
inheritance) the WOApplication class which represents the application. Within
any given WO application, this is a singleton class. You can run multiple WO
instances on a server, but communicating between them requires going outside
the bounds of the application.
Application
app = (Application) this.application(); The
instanced referenced by this.application() also inherits from
WOApplication. Why won’t this cast work? I don't know why this should fail. Could you provide more information
on how it fails?
Please post answers to these questions back to the mailing list for a
wider audience to address further concerns, and so both current mailing list
members and posterity can follow the thread if others have the same problems. Regards, Jerry -- __
Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
[EMAIL PROTECTED]
203 278-4085 office
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]
