Search in sources :

Example 1 with GlassFishDocument

use of org.glassfish.config.support.GlassFishDocument in project Payara by payara.

the class ConfigApiTest method getDocument.

@Override
public DomDocument getDocument(ServiceLocator habitat) {
    DomDocument doc = habitat.getService(GlassFishDocument.class);
    if (doc == null) {
        return new GlassFishDocument(habitat, Executors.newCachedThreadPool(new ThreadFactory() {

            public Thread newThread(Runnable r) {
                Thread t = Executors.defaultThreadFactory().newThread(r);
                t.setDaemon(true);
                return t;
            }
        }));
    }
    return doc;
}
Also used : ThreadFactory(java.util.concurrent.ThreadFactory) GlassFishDocument(org.glassfish.config.support.GlassFishDocument) DomDocument(org.jvnet.hk2.config.DomDocument)

Example 2 with GlassFishDocument

use of org.glassfish.config.support.GlassFishDocument in project Payara by payara.

the class ConfigApiTest method getDocument.

@Override
public DomDocument getDocument(ServiceLocator habitat) {
    DomDocument doc = habitat.getService(GlassFishDocument.class);
    if (doc == null) {
        return new GlassFishDocument(habitat, Executors.newCachedThreadPool(new ThreadFactory() {

            public Thread newThread(Runnable r) {
                Thread t = Executors.defaultThreadFactory().newThread(r);
                t.setDaemon(true);
                return t;
            }
        }));
    }
    return doc;
}
Also used : ThreadFactory(java.util.concurrent.ThreadFactory) GlassFishDocument(org.glassfish.config.support.GlassFishDocument) DomDocument(org.jvnet.hk2.config.DomDocument)

Example 3 with GlassFishDocument

use of org.glassfish.config.support.GlassFishDocument in project Payara by payara.

the class ConfigApiTest method getDocument.

@Override
public DomDocument getDocument(ServiceLocator habitat) {
    DomDocument doc = habitat.getService(GlassFishDocument.class);
    if (doc == null) {
        return new GlassFishDocument(habitat, Executors.newCachedThreadPool(new ThreadFactory() {

            public Thread newThread(Runnable r) {
                Thread t = Executors.defaultThreadFactory().newThread(r);
                t.setDaemon(true);
                return t;
            }
        }));
    }
    return doc;
}
Also used : ThreadFactory(java.util.concurrent.ThreadFactory) GlassFishDocument(org.glassfish.config.support.GlassFishDocument) DomDocument(org.jvnet.hk2.config.DomDocument)

Example 4 with GlassFishDocument

use of org.glassfish.config.support.GlassFishDocument in project Payara by payara.

the class ConfigApiTest method getDocument.

@Override
public DomDocument getDocument(ServiceLocator habitat) {
    DomDocument doc = habitat.getService(GlassFishDocument.class);
    if (doc == null) {
        return new GlassFishDocument(habitat, Executors.newCachedThreadPool(new ThreadFactory() {

            public Thread newThread(Runnable r) {
                Thread t = Executors.defaultThreadFactory().newThread(r);
                t.setDaemon(true);
                return t;
            }
        }));
    }
    return doc;
}
Also used : ThreadFactory(java.util.concurrent.ThreadFactory) GlassFishDocument(org.glassfish.config.support.GlassFishDocument) DomDocument(org.jvnet.hk2.config.DomDocument)

Example 5 with GlassFishDocument

use of org.glassfish.config.support.GlassFishDocument in project Payara by payara.

the class ConfigApiTest method getDocument.

@Override
public DomDocument getDocument(ServiceLocator habitat) {
    DomDocument doc = habitat.getService(GlassFishDocument.class);
    if (doc == null) {
        return new GlassFishDocument(habitat, Executors.newCachedThreadPool(new ThreadFactory() {

            public Thread newThread(Runnable r) {
                Thread t = Executors.defaultThreadFactory().newThread(r);
                t.setDaemon(true);
                return t;
            }
        }));
    }
    return doc;
}
Also used : ThreadFactory(java.util.concurrent.ThreadFactory) GlassFishDocument(org.glassfish.config.support.GlassFishDocument) DomDocument(org.jvnet.hk2.config.DomDocument)

Aggregations

ThreadFactory (java.util.concurrent.ThreadFactory)6 GlassFishDocument (org.glassfish.config.support.GlassFishDocument)6 DomDocument (org.jvnet.hk2.config.DomDocument)6