Announcement Announcement Module
No announcement yet.
standalone app + webapp Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • standalone app + webapp

    I was attracted to Spring based on a description I had read about it. It sounded like one could execute multiple applications within Spring.

    In my case, I need a framework which allows us to run a standalone (main() ) Java application and also a J2EE web application on the same server.

    Specifically, Apache's standalone FTPServer (to receive file uploads), and at the same time, a JSP2.0 Web Application, which is not executed from a main() method, but rather executes in the J2EE App Server (Glassfish)--to receive HTTP requests and respond to them.

    Am I right; can one run both at the same time in Spring? Any problems with this?

    Also, for running standalone Java Applications within Spring (those executed from a call to main() ), how do you start them after they are deployed to the Application Server? In other words... what actually calls main()? I have sifted through dozens of Spring books, but never found an answer to this basic question. FOr standalone Java applications run in Spring, what or who calls main() on the server?

    Remember: I'm not talking about local testing, in my IDE. I know how to execute the main() method in that environment. No--I'm talking about once it is deployed to a remote Application Server. What calls main() to kick off the application in a deployed environment?

  • #2
    Spring supports life cycle callbacks on beans. Check this for example:
    You could start your FTP server in the init-method of a FTPLauncherBean



    • #3
      Thanks, Mantorn

      Thank You! I'll give that a try. Appreciated.