How to embed a OrientDB server into a Java application

2,538 views
Skip to first unread message

Luca Garulli

unread,
Apr 26, 2011, 11:25:14 AM4/26/11
to orient-database
Hi all,
below the link to a short guide to embed a OrientDB server inside your applications: http://code.google.com/p/orient/wiki/EmbeddedServer.

Lvc@

Andreas Egloff

unread,
Apr 26, 2011, 1:36:47 PM4/26/11
to orient-...@googlegroups.com
Excellent, thanks! I apologize I didn't get around to looking into a fluent api yet, but this will work for us.

Steve Ferris

unread,
Apr 27, 2011, 3:16:15 AM4/27/11
to OrientDB
Hi,

Thanks for the info about embedding OrientDB server, I do have a
question from the new wiki page.

> Java application that runs embedded with the server can bypass the remote connection and use the database directly with local mode.

So it is safe for the Java application to be using local mode as is
the embedded server will also be accessing the same database.

thanks
Steve

Luca Garulli

unread,
Apr 27, 2011, 5:17:35 AM4/27/11
to orient-database
I've not tested it a lot, but all the storages are synchronized, so all should work perfectly.

Lvc@

Guizmo

unread,
Apr 27, 2011, 10:22:16 AM4/27/11
to OrientDB
Excellent.
I suggest the same thing for the followings wiki sections : Document
Database, Object Database, GraphDatabase.
That is complete examples.

On 27 avr, 10:17, Luca Garulli <l.garu...@gmail.com> wrote:
> I've not tested it a lot, but all the storages are synchronized, so all
> should work perfectly.
>
> Lvc@
>

Andreas Egloff

unread,
Apr 27, 2011, 10:26:15 AM4/27/11
to orient-...@googlegroups.com
I haven't tested with the new API yet, just the manual approach I sent earlier. The main issue I had seen is that using the global pool in both contexts caused resource contention issues, so our app instantiates a separate pool from the embedded server global pool.
Andi

Luca Garulli

unread,
Apr 27, 2011, 10:55:22 AM4/27/11
to orient-database
There should be no problems since databases are synchronized to the underlying storage (OStorageLocal class) level.

Lvc@

Andreas Egloff

unread,
Apr 27, 2011, 11:07:58 AM4/27/11
to orient-...@googlegroups.com
Let me try to clarify: the issue we ran into wasn't related to the use of the database itself (or synchronization there), but the acquiring of the connections in the pool. But let me check if this was a failure on our side as there was a misuse where we just called release rather than close.  

Mohammad Naghavi

unread,
Jun 15, 2015, 8:41:37 AM6/15/15
to orient-...@googlegroups.com
is this guide up to date? can't somebody just use the factory (http://orientdb.com/docs/last/Graph-Factory.html) and set a plocal:/ url? I'm a bit confused and would appreciate if somebody clarifies this a bit.

Luigi Dell'Aquila

unread,
Jun 16, 2015, 1:43:54 AM6/16/15
to orient-...@googlegroups.com
Hi Mohammad,

using a DB in embedded mode is slightly different than starting an embedded server.
When you connect with plocal:/ url you just open a single DB from your local VM, but you do not actually start a server, eg. you do not open server ports (binary and HTTP, so other clients will not be able to connect to the db remotely) and you do not start plugins, like Studio.
If you want to have a full server running in your application then you have to follow that guide ;-)

Thanks

Luigi


--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohammad Naghavi

unread,
Jun 16, 2015, 3:36:04 AM6/16/15
to orient-...@googlegroups.com
Hi Luigi,
thanks for response, actually what I want is some replacement for a sqlite DB, so letting outside connection and starting plugins are actually not my intention at all. In this case the plocal:/ version seems totally fine for me then.

regards,
Mohammad

You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/eQ7bfVtvDwM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages