Hi, I'm using the following code:
ODatabaseDocumentPool pool = new ODatabaseDocumentPool(url, user, password);
...
ODatabaseDocumentTx db = null;
try {
db = pool.acquire();
final OSQLSynchQuery<ODocument> query = getQuery(params);
List<ODocument> queryResult = db.query(query, paramsMap);
return results;
} catch(Exception e) {
e.printStackTrace();
} finally {
if (isNotNull(db)) db.close();
}
I can't use the GraphFactory since I'm tight to OrientDB 1.6.3 and can't
swithc right now.
Do you think it's appropriate use of connection pool?
Cheers,
Riccardo
Il giorno mercoledì 5 febbraio 2014 09:42:37 UTC+1, Andrey Lomakin ha
scritto:
>
> Hi Riccardo,
> I lost context that is answer on what message ?
>
> Also we found that passing of database may lead to problems in
> multithreading environment so you I suggest you to use graph factory with
> active pool.
>
>
> On Wed, Feb 5, 2014 at 10:38 AM, Riccardo Tasso
> <[email protected]<javascript:>
> > wrote:
>
>>
>> 2014-01-31 Andrey Lomakin <[email protected] <javascript:>>:
>>
>> Create document database and pass it in OrientGraph it is a bit
>>> inconvenient
>>
>>
>> What do you mean with inconvenient?
>>
>> Riccardo
>>
>> --
>>
>> ---
>> 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] <javascript:>.
>> 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.