简体   繁体   中英

Java EE container - self managed threads?

Is it possible to start for example a OrientDB Server Instance inside a Java EE server?

Is this possible or do i need to use only Servlets or EJB inside the containers?

Can you give me a quick example on how to do start an application that manages it's own threads please.

You can start OrientDB in the same JVM, even a Java EE container. Look at this guide: http://code.google.com/p/orient/wiki/EmbeddedServer .

You could create a Servlet that simply follow the instructions to start the server.

It's possible to start an app in JavaEE. JavaEE server does not force you to not use your own threads.

Here's an exmaple of how to start a embedded (in process) HSQLDB:

Connection c = DriverManager.getConnection("jdbc:hsqldb:file:testdb", "sa", "");

Of course you need to run the code the starts in process OrientDB, I don't think that OrientDB can be started this way (in process). It has to have it's own process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM