Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Mar 2012
    Location
    Frankfurt am Main
    Posts
    7

    shutdown method of DataProvider?

    Hi,
    I would like to know why the DataAdapter interface defines the init method:
    Code:
    init(java.util.Map params, java.io.File configDir)
    but has no shutdown whatsoever. I mean, what if my init method opens up a connection which needs to be closed at Lightstreamer's shutdown? Opening/closing connections on subscribe/unsubscribe is NOT what I need, due to my application requirements, the connection must be opened at server start and closed at server stop. Thanks!

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,093
    As the Adapters are destroyed only when the whole process is destroyed, we thought that, for any housekeeping operation not implicitly done by the system at process termination, the Adapters could directly intercept the JVM shutdown through the JDK's Runtime.addShutdownHook method.
    Please check if this may suit your purposes.

  3. #3
    Member
    Join Date
    Mar 2012
    Location
    Frankfurt am Main
    Posts
    7
    Shutdown works fine for me, I just thought I was missing something about Lightstreamer's functionality. Many thanks and regards.

  4. #4
    Hi,

    Do we have any new interface created for shutdown call or do we still need to register with the JDK's Runtime.addShutdownHook method. Just wanted to conform once

    Thanks.

  5. #5
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    718
    Hi Rajesh,

    No, the interface has not yet been extended to add a specific call in case of shutdown.

    I confirm that Runtime.addShutdownHook is still the proper option.

    Regards,
    Giuseppe

  6. #6
    Thanks Giuseppe, this is acknowledged.

 

 

Similar Threads

  1. form POST method vs GET method
    By chuan_ckc in forum Client SDKs
    Replies: 1
    Last Post: August 20th, 2009, 10:29 AM
  2. Replies: 10
    Last Post: July 15th, 2009, 10:02 AM
  3. Replies: 3
    Last Post: February 12th, 2009, 10:31 AM
  4. Data Adapter's subscribe() method not getting called
    By CitiMan in forum Adapter SDKs
    Replies: 8
    Last Post: November 30th, 2006, 04:26 PM
  5. .NET DataProvider
    By gavenb in forum Adapter SDKs
    Replies: 1
    Last Post: September 20th, 2006, 10:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 09:15 PM.
Lightstreamer Logo