Announcement Announcement Module
Collapse
No announcement yet.
statis block solve singleton issue. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • statis block solve singleton issue.

    Can the static block bellow solve the singleton issue?
    static {
    appContext = FacesContextUtils.getWebApplicationContext(
    FacesContext.getCurrentInstance());
    }

    private App(){
    }

    public static Object lookupBean(String beanName) {
    return appContext.getBean(beanName);
    }
Working...
X