You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zbynek Vavros <Zb...@cz.ibm.com> on 2011/04/19 15:59:32 UTC

Restarting Tomcat & Threads


Hi,

I would like to ask on strange behavior Im experiencing.
I have webapp that connects to Lotus Notes periodically(every 1 minute).
For this I have class that implements Runnable that takes care about
connection itself.
Im starting this using basic :

Thread t = new Thread(MyClassImplementingRunnable);
t.start();

I have noticed that when I kill Tomcat (shut down its service) then after
start this thread is started
automatically (I can see messages about connecting to Lotus in log when I
didnt start anything).

Is this usual behavior?
Is there any was for threads "not to start automatically" ?

Im beginner with Tomcat so excuse my lack of knowledge.

Thanks
Zbynek


                                                                         
 Kind Regards / Mit                                                      
 freundlichen Grüßen /                                                   
 Üdvözlettel / S                                                         
 pozdravem:                                                              
                                                                         
                                                                         
 Zbynek VAVROS                                                 (Embedded 
 Development                                                 image moved 
                                                                to file: 
                                                           pic31252.gif) 
                                                                         
     Delivery Centre      616 00, Brno                                   
      Central Europe      Technicka 21                                   
        Brno SITE         Czech Republic                                 
                                                                         
 (Embedded image moved to                                                
   file: pic21477.gif)    Phone: 420-53341- x6283                        
                          Mobile:                                        
                          E-mail: Zbynek_Vavros@cz.ibm.com               
                                                                         
                                                                         
                                                                         
                                                                         
   IBM Global Services                                                   
  Delivery Center Czech                                                  
     Republic, s.r.o.                                                    
   Registered address:                                                   
 Brno, Technicka 2995/21,                                                
 Zip code: 61600, Company                                                
       ID: 26244535                                                      
      Entered in the                                                     
   Commercial Register                                                   
    maintained by the                                                    
  Regional Court in Brno                                                 
  (Part C, Entry 39922)                                                  
                                                                         
   IBM Global Services                                                   
  Delivery Center Czech                                                  
     Republic, s.r.o.                                                    
  Sídlo: Brno, Technická                                                 
  2995/21, PSČ 61600 IČ:                                                 
         26244535                                                        
   Zapsaná v obchodním                                                   
    rejstříku, vedeném                                                   
  Krajským soudem v Brně                                                 
  oddíl C, vlozka 39922                                                  
                                                                         



Re: Restarting Tomcat & Threads

Posted by André Warnier <aw...@ice-sa.com>.
Zbynek Vavros wrote:
> - How do you kill Tomcat ?
> 
> I stop its service.
> 
> - You say "after start" and "I didnt [sic] start anything" in the same
> sentence; you're contradicting yourself.
> 
> I start Tomcat which starts my webapp but connection to Lotus is started
> separatedlly.
> = I start my webapp but do not start "Lotus connector".
> 
> 1) My code(thread) could not be executed unless I start it via web
> interface.Which I dont.
> 
> 2) Im talking about log from log4j so it is log of my application.No one
> else's.
> 

The tomcat code, by itself, has no reason to connect to Lotus.
So if something connects to Lotus, it must be in the code of your application.
But you say above that you do not do that.
So something above is wrong.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


AW: Restarting Tomcat & Threads

Posted by Thomas Strauß <t....@srs-management.de>.

Mit freundlichen Grüßen

Thomas Strauß
Geschäftsführer Entwicklung

SRS PaperDynamixR 
DIGITAL SCHON AUF DEM PAPIER

SRS-Management GmbH 
Berliner Ring 93
64625 Bensheim 
T +49 6251 85 424 - 20 
F +49 6251 85 424 - 14
M +49 174 2110912

www.srs-management.de
www.srs-paperdynamix.de

HRB 25262 AG Darmstadt
Geschäftsführer: Detlev Homilius, Thomas Strauß



> -----Ursprüngliche Nachricht-----
> Von: David kerber [mailto:dckerber@verizon.net]
> Gesendet: Dienstag, 19. April 2011 17:02
> An: Tomcat Users List
> Betreff: Re: Restarting Tomcat & Threads
> 
> On 4/19/2011 10:34 AM, Zbynek Vavros wrote:
> >
> > - How do you kill Tomcat ?
> >
> > I stop its service.
> >
> > - You say "after start" and "I didnt [sic] start anything" in the
> same
> > sentence; you're contradicting yourself.
> >
> > I start Tomcat which starts my webapp but connection to Lotus is
> started
> > separatedlly.
> > = I start my webapp but do not start "Lotus connector".
> >
> > 1) My code(thread) could not be executed unless I start it via web
> > interface.Which I dont.
> >
> > 2) Im talking about log from log4j so it is log of my application.No
> one
> > else's.
> 
> So you have to go through that web interface to start the lotus thread,
> but you're not doing that and the thread is still starting up?
> 
> Sounds like the method that starts the thread is being called from
> somewhere that you're not expecting.  Any chance it's being fired off
> from a timer or a listener?
> 

Maybe you are running the Lotus connector through a servlet that defines
"load-on-startup"?

> 
> 
> >
> >
> > Zbynek
> >
> >   Kind Regards / Mit
> >   freundlichen Grüßen /
> >   Üdvözlettel / S
> >   pozdravem:
> >
> >
> >   Zbynek VAVROS
> (Embedded
> >   Development                                                 image
> moved
> >                                                                  to
> file:
> >
> pic01634.gif)
> >
> >       Delivery Centre      616 00, Brno
> >        Central Europe      Technicka 21
> >          Brno SITE         Czech Republic
> >
> >   (Embedded image moved to
> >     file: pic31451.gif)    Phone: 420-53341- x6283
> >                            Mobile:
> >                            E-mail: Zbynek_Vavros@cz.ibm.com
> >
> >
> >
> >
> >     IBM Global Services
> >    Delivery Center Czech
> >       Republic, s.r.o.
> >     Registered address:
> >   Brno, Technicka 2995/21,
> >   Zip code: 61600, Company
> >         ID: 26244535
> >        Entered in the
> >     Commercial Register
> >      maintained by the
> >    Regional Court in Brno
> >    (Part C, Entry 39922)
> >
> >     IBM Global Services
> >    Delivery Center Czech
> >       Republic, s.r.o.
> >    Sídlo: Brno, Technická
> >    2995/21, PSČ 61600 IČ:
> >           26244535
> >     Zapsaná v obchodním
> >      rejstříku, vedeném
> >    Krajským soudem v Brně
> >    oddíl C, vlozka 39922
> >
> >
> >
> >
> >
> >
> > |------------>
> > | From:      |
> > |------------>
> >    >-----------------------------------------------------------------
> -----------------------------------------------------------------------
> ----------|
> >    |"Caldarale, Charles R"<Ch...@unisys.com>
> |
> >    >-----------------------------------------------------------------
> -----------------------------------------------------------------------
> ----------|
> > |------------>
> > | To:        |
> > |------------>
> >    >-----------------------------------------------------------------
> -----------------------------------------------------------------------
> ----------|
> >    |Tomcat Users List<us...@tomcat.apache.org>
> |
> >    >-----------------------------------------------------------------
> -----------------------------------------------------------------------
> ----------|
> > |------------>
> > | Date:      |
> > |------------>
> >    >-----------------------------------------------------------------
> -----------------------------------------------------------------------
> ----------|
> >    |04/19/2011 04:09 PM
> |
> >    >-----------------------------------------------------------------
> -----------------------------------------------------------------------
> ----------|
> > |------------>
> > | Subject:   |
> > |------------>
> >    >-----------------------------------------------------------------
> -----------------------------------------------------------------------
> ----------|
> >    |RE: Restarting Tomcat&  Threads
> |
> >    >-----------------------------------------------------------------
> -----------------------------------------------------------------------
> ----------|
> >
> >
> >
> >
> >
> >> From: Zbynek Vavros [mailto:Zbynek_Vavros@cz.ibm.com]
> >> Subject: Restarting Tomcat&  Threads
> >
> >> I have noticed that when I kill Tomcat (shut down its service)
> >
> > How do you kill Tomcat?  (Be specific.)
> >
> >> then after start this thread is started automatically (I can
> >> see messages about connecting to Lotus in log when I didnt
> >> start anything).
> >
> > You say "after start" and "I didnt [sic] start anything" in the same
> > sentence; you're contradicting yourself.
> >
> > Tomcat knows nothing about your thread or the connection to Lotus, so
> one
> > of two things is happening:
> >
> > 1) Your code is being executed, you just aren't aware of it.
> >
> > 2) Something else is connecting to Lotus and you're mistaking that
> for your
> > code.
> >
> >   - Chuck
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.


Re: Restarting Tomcat & Threads

Posted by David kerber <dc...@verizon.net>.
On 4/19/2011 10:34 AM, Zbynek Vavros wrote:
>
> - How do you kill Tomcat ?
>
> I stop its service.
>
> - You say "after start" and "I didnt [sic] start anything" in the same
> sentence; you're contradicting yourself.
>
> I start Tomcat which starts my webapp but connection to Lotus is started
> separatedlly.
> = I start my webapp but do not start "Lotus connector".
>
> 1) My code(thread) could not be executed unless I start it via web
> interface.Which I dont.
>
> 2) Im talking about log from log4j so it is log of my application.No one
> else's.

So you have to go through that web interface to start the lotus thread, 
but you're not doing that and the thread is still starting up?

Sounds like the method that starts the thread is being called from 
somewhere that you're not expecting.  Any chance it's being fired off 
from a timer or a listener?



>
>
> Zbynek
>
>   Kind Regards / Mit
>   freundlichen Grüßen /
>   Üdvözlettel / S
>   pozdravem:
>
>
>   Zbynek VAVROS                                                 (Embedded
>   Development                                                 image moved
>                                                                  to file:
>                                                             pic01634.gif)
>
>       Delivery Centre      616 00, Brno
>        Central Europe      Technicka 21
>          Brno SITE         Czech Republic
>
>   (Embedded image moved to
>     file: pic31451.gif)    Phone: 420-53341- x6283
>                            Mobile:
>                            E-mail: Zbynek_Vavros@cz.ibm.com
>
>
>
>
>     IBM Global Services
>    Delivery Center Czech
>       Republic, s.r.o.
>     Registered address:
>   Brno, Technicka 2995/21,
>   Zip code: 61600, Company
>         ID: 26244535
>        Entered in the
>     Commercial Register
>      maintained by the
>    Regional Court in Brno
>    (Part C, Entry 39922)
>
>     IBM Global Services
>    Delivery Center Czech
>       Republic, s.r.o.
>    Sídlo: Brno, Technická
>    2995/21, PSČ 61600 IČ:
>           26244535
>     Zapsaná v obchodním
>      rejstříku, vedeném
>    Krajským soudem v Brně
>    oddíl C, vlozka 39922
>
>
>
>
>
>
> |------------>
> | From:      |
> |------------>
>    >--------------------------------------------------------------------------------------------------------------------------------------------------|
>    |"Caldarale, Charles R"<Ch...@unisys.com>                                                                                                |
>    >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | To:        |
> |------------>
>    >--------------------------------------------------------------------------------------------------------------------------------------------------|
>    |Tomcat Users List<us...@tomcat.apache.org>                                                                                                        |
>    >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | Date:      |
> |------------>
>    >--------------------------------------------------------------------------------------------------------------------------------------------------|
>    |04/19/2011 04:09 PM                                                                                                                               |
>    >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | Subject:   |
> |------------>
>    >--------------------------------------------------------------------------------------------------------------------------------------------------|
>    |RE: Restarting Tomcat&  Threads                                                                                                                   |
>    >--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>
>
>
>
>> From: Zbynek Vavros [mailto:Zbynek_Vavros@cz.ibm.com]
>> Subject: Restarting Tomcat&  Threads
>
>> I have noticed that when I kill Tomcat (shut down its service)
>
> How do you kill Tomcat?  (Be specific.)
>
>> then after start this thread is started automatically (I can
>> see messages about connecting to Lotus in log when I didnt
>> start anything).
>
> You say "after start" and "I didnt [sic] start anything" in the same
> sentence; you're contradicting yourself.
>
> Tomcat knows nothing about your thread or the connection to Lotus, so one
> of two things is happening:
>
> 1) Your code is being executed, you just aren't aware of it.
>
> 2) Something else is connecting to Lotus and you're mistaking that for your
> code.
>
>   - Chuck


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Restarting Tomcat & Threads

Posted by Zbynek Vavros <Zb...@cz.ibm.com>.
- How do you kill Tomcat ?

I stop its service.

- You say "after start" and "I didnt [sic] start anything" in the same
sentence; you're contradicting yourself.

I start Tomcat which starts my webapp but connection to Lotus is started
separatedlly.
= I start my webapp but do not start "Lotus connector".

1) My code(thread) could not be executed unless I start it via web
interface.Which I dont.

2) Im talking about log from log4j so it is log of my application.No one
else's.


Zbynek
                                                                         
 Kind Regards / Mit                                                      
 freundlichen Grüßen /                                                   
 Üdvözlettel / S                                                         
 pozdravem:                                                              
                                                                         
                                                                         
 Zbynek VAVROS                                                 (Embedded 
 Development                                                 image moved 
                                                                to file: 
                                                           pic01634.gif) 
                                                                         
     Delivery Centre      616 00, Brno                                   
      Central Europe      Technicka 21                                   
        Brno SITE         Czech Republic                                 
                                                                         
 (Embedded image moved to                                                
   file: pic31451.gif)    Phone: 420-53341- x6283                        
                          Mobile:                                        
                          E-mail: Zbynek_Vavros@cz.ibm.com               
                                                                         
                                                                         
                                                                         
                                                                         
   IBM Global Services                                                   
  Delivery Center Czech                                                  
     Republic, s.r.o.                                                    
   Registered address:                                                   
 Brno, Technicka 2995/21,                                                
 Zip code: 61600, Company                                                
       ID: 26244535                                                      
      Entered in the                                                     
   Commercial Register                                                   
    maintained by the                                                    
  Regional Court in Brno                                                 
  (Part C, Entry 39922)                                                  
                                                                         
   IBM Global Services                                                   
  Delivery Center Czech                                                  
     Republic, s.r.o.                                                    
  Sídlo: Brno, Technická                                                 
  2995/21, PSČ 61600 IČ:                                                 
         26244535                                                        
   Zapsaná v obchodním                                                   
    rejstříku, vedeném                                                   
  Krajským soudem v Brně                                                 
  oddíl C, vlozka 39922                                                  
                                                                         





|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"Caldarale, Charles R" <Ch...@unisys.com>                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Tomcat Users List <us...@tomcat.apache.org>                                                                                                       |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |04/19/2011 04:09 PM                                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |RE: Restarting Tomcat & Threads                                                                                                                   |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|





> From: Zbynek Vavros [mailto:Zbynek_Vavros@cz.ibm.com]
> Subject: Restarting Tomcat & Threads

> I have noticed that when I kill Tomcat (shut down its service)

How do you kill Tomcat?  (Be specific.)

> then after start this thread is started automatically (I can
> see messages about connecting to Lotus in log when I didnt
> start anything).

You say "after start" and "I didnt [sic] start anything" in the same
sentence; you're contradicting yourself.

Tomcat knows nothing about your thread or the connection to Lotus, so one
of two things is happening:

1) Your code is being executed, you just aren't aware of it.

2) Something else is connecting to Lotus and you're mistaking that for your
code.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




RE: Restarting Tomcat & Threads

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Zbynek Vavros [mailto:Zbynek_Vavros@cz.ibm.com] 
> Subject: Restarting Tomcat & Threads

> I have noticed that when I kill Tomcat (shut down its service)

How do you kill Tomcat?  (Be specific.)

> then after start this thread is started automatically (I can 
> see messages about connecting to Lotus in log when I didnt 
> start anything).

You say "after start" and "I didnt [sic] start anything" in the same sentence; you're contradicting yourself.

Tomcat knows nothing about your thread or the connection to Lotus, so one of two things is happening:

1) Your code is being executed, you just aren't aware of it.

2) Something else is connecting to Lotus and you're mistaking that for your code.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org