ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | javaservice List | July 2005 Index

<--  Date Index     <--  Thread Index    

RE: [javaservice] Service starts but automatically stops


> -----Original Message-----
> From: julien.legrand@xxxxxxxxxxxxxxxxxxxx 
> [mailto:julien.legrand@xxxxxxxxxxxxxxxxxxxx] 
> Sent: 13 July 2005 13:39
> To: javaservice@xxxxxxxxxxxxx
> Subject: [javaservice] Service starts but automatically stops
> Like subject says, when I start a service (a "while(true){ 
> ... }" class), it stops just after starting and the error 
> says that "some services can automatically stop if they don't 
> have task to execute..."
> Do somebody know this problem ?

I could be wrong about this, but the method you supply as an entry point
should be able to "drop out". For example, below is the method we use to
have the RMI registry as a service:

  public static void main(String[] args) {
    final int port = Preferences.systemNodeForPackage(
          RMIRegistryLauncher.class).getInt(KEY_PORT, DEFAULT_PORT);

    try {
      System.out.println("RMI registry ready on port " + port);
    } catch (Exception e) {
      System.err.println("Problem starting RMI registry:");

Therefore any other work should be done on a different thread.

Maybe that is your problem?


Pareto Investment Management Limited is a Mellon Financial Company.  Pareto
Investment Management Limited is authorised and regulated by the Financial
Services Authority (Firm Ref. No. 416024), and registered in England and
Wales with Number 03169281. Registered Office: Mellon Financial Centre, 160
Queen Victoria Street, London EC4V 4LA, United Kingdom. Pareto(r) is the
registered trademark of Pareto Investment Management Limited.  This message
may contain confidential and privileged information and is intended solely
for the use of the named addressee. Access, copying or re-use of the e-mail
or any information contained therein by any other person is not authorised.
If you are not the intended recipient please notify us immediately by
returning the e-mail to the originator and then immediately delete this

<--  Date Index     <--  Thread Index    

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.