cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharath Ganesh" <bhar...@pramati.com>
Subject Re: Non-Daemon Timer thread created at RMManager
Date Thu, 15 Mar 2007 04:12:13 GMT
Yes correct. The client would neither do a System.exit() nor shutdown the bus.  So making the
Timer thread to be a daemon thread seems to be the best solution. 
  ----- Original Message ----- 
  From: Daniel Kulp 
  To: cxf-dev@incubator.apache.org 
  Sent: Thursday, March 15, 2007 5:10 AM
  Subject: Re: Non-Daemon Timer thread created at RMManager


  On Tuesday 13 March 2007 09:44, Dan Diephouse wrote:
  > But if someone is using just a generated client should they really
  > have to call Bus.shutdown()?  Maybe we should add some shutdown hooks
  > so Bus.shutdown() is called automatically when someone exits the JVM.

  Just FYI:  a shutdown hook wouldn't help in this case.    If there is a 
  non-daemon thread around, the VM won't ever start to shutdown.   Thus, 
  the shutdown hooks wouldn't be called.  

  Basically, we need to get the Timer switched over to a daemon thread.   
  Any other threads that may be created also need to be the same way.  
  (does the WS-RM stuff cause threads/servers to start up?   What about 
  the work queues?)

  Dan



  >
  > - Dan
  >
  > On 3/13/07, Andrea Smyth <andrea.smyth@iona.com> wrote:
  > > Bharath Ganesh wrote:
  > > >Hi
  > > >
  > > >I could see a Timer created at org.apache.cxf.ws.rm.RMManager using
  > > > the
  > >
  > > default Timer constructor. This causes the associate timer thread to
  > > run as a non-daemon thread.
  > >
  > > >Since this timer is never cancelled, the thread to be there
  > > > forever,
  > >
  > > stopping the VM from exiting. (Matters a lot at the JAX-WS client
  > > side)
  > >
  > > >This needs to be fixed.
  > > >
  > > >Thanks
  > > >-Bharath
  > > >http://www.bharathganesh.com
  > >
  > > Hi Barath,
  > >
  > > This timer is canceled - in the RMManager's  @PreDestroy annotated
  > > shutdown method, which is called when the the bus is shutdown. Do
  > > you call Bus.shutdown() in your application?
  > >
  > > Andrea.

  -- 
  J. Daniel Kulp
  Principal Engineer
  IONA
  P: 781-902-8727    C: 508-380-7194
  daniel.kulp@iona.com
  http://www.dankulp.com/blog
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message