Charles, The main reason to run under Tomcat for me would be when I update the database, I'd like to use a JNDI connection pool for my dataaccess class. I'm also much more familiar with Tomcat than a standalone java app, although I'm not committed to using it. Being able to port it over to another servlet container would be helpful also. Most of our clients will have Sybase's EA Server. I've changed my UDPServer class to implement start() stop() and run() methods. I'd like to have it be a service that starts when Tomcat does, but if not, I can access via a webpage and start/stop it.
Thanks, Kevin --- "Caldarale, Charles R" <[EMAIL PROTECTED]> wrote: > > From: Pulkit Singhal > [mailto:[EMAIL PROTECTED] > > Subject: Re: UDP Server app > > > > a) I think that since main() is a static method, > it should > > run automagically when you deploy your app into > webapps and > > start tomcat. > > At best, that's wishful thinking. Tomcat is not the > same as java.exe > (or the UNIX/Linux equivalent), and that's the only > thing that calls > main() automatically. Please read the Servlet spec. > (Providing a > static public main() API is sometimes useful as a > means of testing a > simple webapp outside of Tomcat.) > > In any event, there are standard APIs called at > webapp initialization > that can be used for this (again, read the spec), > but that presumes that > this application benefits in some way from being run > under Tomcat. No > evidence has been presented so far in this thread > that such is the case. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR > OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended > recipient. If you > received this in error, please contact the sender > and delete the e-mail > and its attachments from all computers. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]