Skip to content

Commit

Permalink
Merge pull request #446 from ascopes/bugfix/singleton-scope
Browse files Browse the repository at this point in the history
Force components to be initialised as singletons rather than prototypes (the default)
  • Loading branch information
ascopes authored Nov 4, 2024
2 parents dcf75a0 + 22b9948 commit 2a1a5bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.stream.Collectors;
import javax.annotation.PreDestroy;
import javax.inject.Named;
import javax.inject.Singleton;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@
import java.util.stream.Stream;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* A bean that exposes information about the underlying platform and the context of the invocation.
*
* <p>Unlike most beans, this can be a global singleton.
*
* @author Ashley Scopes
*/
@Named
@Singleton // Global singleton, shared between plugin instances potentially.
public final class HostSystem {

private static final Logger log = LoggerFactory.getLogger(HostSystem.class);
Expand Down

0 comments on commit 2a1a5bb

Please sign in to comment.