Example usage for org.springframework.context ApplicationContext wait

List of usage examples for org.springframework.context ApplicationContext wait

Introduction

In this page you can find the example usage for org.springframework.context ApplicationContext wait.

Prototype

public final void wait() throws InterruptedException 

Source Link

Document

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Usage

From source file:org.jolokia.support.spring.sample.Application.java

public static void main(String[] args) throws InterruptedException {
    System.out.println("Starting up Spring sample application");
    ApplicationContext ctx = new ClassPathXmlApplicationContext("/applicationContext.xml");
    synchronized (ctx) {
        ctx.wait();
    }/*from  w w w .ja v a  2 s .com*/
}