Skip to content

Commit

Permalink
cambios nico casteos
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico committed Dec 26, 2024
1 parent fe8ad19 commit cd3966a
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class AppContext {
private ElectionsMonitorEJB monitorBeanRemote;
private ElectionsVoterEJB voterBeanRemote;

private AppContext() {
public AppContext() {

try {

Expand All @@ -45,12 +45,15 @@ private AppContext() {

private static AppContext instance;

private static class Holder {
private static final AppContext INSTANCE = new AppContext();
public static AppContext getInstance() {
if (instance == null) {
instance = new AppContext();
}
return instance;
}

public static AppContext getInstance() {
return Holder.INSTANCE;
public static void setInstance(AppContext contextMock) {
instance = contextMock;
}

public ElectionsManagerEJB getManagerBeanRemote() {
Expand Down

0 comments on commit cd3966a

Please sign in to comment.