Uploaded image for project: 'Phoenix Tephra'
  1. Phoenix Tephra
  2. TEPHRA-24

Do lazy initialization of PooledClientProvider to avoid guide injection error.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • None
    • 0.2.0
    • None
    • None

    Description

      • Guice injection error could raised if the TransactionServiceClient instance is being injected to another object.
      • During the instantiation of TransactionServiceClient, which in turn call PooledClientProvider.initialize(). The initialization would fails if it is not yet connected to ZooKeeper, which would be the case when still constructing the Guice Injector, depending on whether the DiscoveryServiceClient do auto-connect to zookeeper or not, which is not guaranteed.
      • It's also better not to do resource related initialization in Guice constructor, as suggested in Guice guideline.

      Attachments

        Activity

          People

            chtyim Terence Yim
            chtyim Terence Yim
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: