Stefan,
I suggest you to create/shutdown OreintGraph instance for the each method
call (it is not already created in caller method).
For embedded db it is OK.
For remote connection you should
use com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool
and pass documentDB inside of OrientGraph instance.


On Thu, Jan 23, 2014 at 3:53 PM, <[email protected]> wrote:

> Thnx!
>
> 1. AS IS
>
> 2/3. Goes like this:
>         OrientGraph theGraph = new OrientGraph("plocal:/var/www/data/" +
> <base>);
>         if (!theGraph.getRawGraph().exists()) {
>             theGraph.getRawGraph().create();
>         }
>
> Moved to OrientGraph away fro NoTx.
>
>
> Can you please point me to Connection pooling documentation for this
> scenario?
> Or do I use "theGraph" (from the above example) for all my threads?
>
> Regards,
>   -Stefan
>
>
> On Thursday, 23 January 2014 13:42:55 UTC, Andrey Lomakin wrote:
>
>> Hi Stefan,
>> I would suggest you do not use NoTx version of graph you have a risk to
>> end up in non consistent state after concurrent modification exception.
>>
>> About you question so:
>>
>> 1.
>>   First step is correct.
>>
>> 2.
>>   Then you create database using com.orientechnologies.or
>> ient.client.remote.OServerAdmin#createDatabase and com.orientechnologies.
>> orient.client.remote.OServerAdmin#existsDatabase methods.
>> 3.
>>  Connecting on plocal:<filepath> is correct.
>>
>>
>>
>> On Wed, Jan 22, 2014 at 11:50 PM, <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I must be mixing things here but after having used the OrientDB in
>>> embedded mode before I'm not understanding how the embedded server plays
>>> with the client connections and the new OrientGraphNoTx.
>>>
>>> What I need to do programmatically is:
>>>
>>>    1. Start the server (*works fine*)
>>>    server = OServerMain.create();
>>>    server.startup(getClass().getResourceAsStream("/
>>>    orientdb-server.xml"));
>>>    server.activate();
>>>
>>>    2. Create a new/fresh graph database (*produces error*)
>>>    server.openDatabase("graph", "<database>", "<user>",
>>>    "<password>").create();
>>>    ---> Database '<database>' is not configured on server
>>>
>>>    3. Start using the new database  (*completely lost*)
>>>    - OGraphDatabasePool - is deprecated and not compatible with
>>>    OrientGraphNoTx
>>>    - Connecting on plocal:<filepath> seems wrong since I have the
>>>    server in place
>>>    - Connecting on remote:server seems wrong since I'm running the
>>>    embedded server
>>>
>>> Assistance is greatly appreciated.
>>>
>>> Regards,
>>>   -Stefan
>>>
>>> --
>>>
>>> ---
>>> 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 [email protected].
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Andrey Lomakin.
>>
>> Orient Technologies
>> the Company behind OrientDB
>>
>>   --
>
> ---
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to