Joelmob
Joelmob

Reputation: 1106

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.

Upvotes: 0

Views: 516

Answers (2)

Lvca
Lvca

Reputation: 9049

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.

Upvotes: 2

AlexV
AlexV

Reputation: 3896

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.

Upvotes: 1

Related Questions