oVirt / oVirt/ovirt-engine-sdk-java

Question: Lifetime of a Connection

Open
#27 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
30
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I have a question regarding the intended usage of this lib.

how long can I keep a Connection Object without closing it? I want to use the SDK in a wrapper class for a long running service, so I would setup the connection using ConnectionBuilder and keep it as field in my wrapper class whose methods are called several times (with long or short timespans between calls) throughout the lifetime of my service. If the service gets restarted/stopped I would call close().

Is this the intended usage or should I build a new connection for each set of calls I have to make to the API and then close it? In the mentioned service this would most likely mean everytime a method in the wrapper is called a new connection is built and closed respectively.

Thanks in advance.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Connection and ConnectionBuilder API documentation and check how close() is described. Document whether a connection can be retained across long-running service calls or should be rebuilt per API use, including the expected behavior when the service stops.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.