public synchronized ModeShapeEngine getEngine() { if (engine == null) { ModeShapeEngine engine = new ModeShapeEngine(); engine.start(); this.engine = engine; } return engine; } }
@Bean(destroyMethod="shutdown") public ModeShapeEngine modeShapeEngine(@Qualifier("springApplicationContext")SpringApplicationContext springApplicationContext) { ModeShapeEngine engine = new ModeShapeEngine(); log.info("Starting ModeShape engine..."); engine.start(); log.info("ModeShape engine started"); return engine; }
/** * This is called when a resource adapter instance is bootstrapped. * * @param ctx A bootstrap context containing references * @throws ResourceAdapterInternalException indicates bootstrap failure. */ @Override public synchronized void start( BootstrapContext ctx ) throws ResourceAdapterInternalException { if (engine == null) { engine = new ModeShapeEngine(); engine.start(); } }
ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
public static void main( String[] argv ) { ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
public static void main( String[] argv ) { ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
EngineService engine = new EngineService(new ModeShapeEngine());
ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
public static void main( String[] argv ) { ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
public static void main( String[] argv ) { ModeShapeEngine engine = new ModeShapeEngine(); engine.start();
@Before public void beforeEach() throws Exception { environment = new TestingEnvironment(); config = RepositoryConfiguration.read("{ \"name\":\"my-repo\" }").with(environment); engine = new ModeShapeEngine(); }
engine = new ModeShapeEngine(); engine.start();
@Before public void beforeEach() throws Exception { FileUtil.delete("target/concurrent_load_non_clustered"); print = false; config = RepositoryConfiguration.read("load/concurrent-load-repo-config.json").with(new TestingEnvironment()); engine = new ModeShapeEngine(); }
@Test public void shouldStartRepositoryUsingLocalEnvironmentWithDefaultPersistenceConfiguration() throws Exception { // Create the repository configuration ... String configFilePath = "config/repo-config-inmemory-no-persistence.json"; InputStream configFileStream = getClass().getClassLoader().getResourceAsStream(configFilePath); RepositoryConfiguration repositoryConfiguration = RepositoryConfiguration.read(configFileStream, "doesn't matter"); LocalEnvironment environment = new LocalEnvironment(); repositoryConfiguration = repositoryConfiguration.with(environment); // Start the engine and repository ... ModeShapeEngine engine = new ModeShapeEngine(); engine.start(); try { JcrRepository repository = engine.deploy(repositoryConfiguration); Session session = repository.login(); Node root = session.getRootNode(); root.addNode("Library", "nt:folder"); session.save(); session.logout(); session = repository.login(); Node library = session.getNode("/Library"); assertThat(library, is(notNullValue())); assertThat(library.getPrimaryNodeType().getName(), is("nt:folder")); session.logout(); } finally { engine.shutdown().get(); environment.shutdown(); } }