Search in sources :

Example 1 with NamingServer

use of org.jnp.server.NamingServer in project hibernate-orm by hibernate.

the class JBossStandaloneJtaExampleTest method startJndiServer.

private Main startJndiServer() throws Exception {
    // Create an in-memory jndi
    NamingServer namingServer = new NamingServer();
    NamingContext.setLocal(namingServer);
    Main namingMain = new Main();
    namingMain.setInstallGlobalService(true);
    namingMain.setPort(-1);
    namingMain.start();
    return namingMain;
}
Also used : NamingServer(org.jnp.server.NamingServer) Main(org.jnp.server.Main)

Aggregations

Main (org.jnp.server.Main)1 NamingServer (org.jnp.server.NamingServer)1