As far I can see in the documentation 
<http://www.orientechnologies.com/docs/last/orientdb.wiki/Java-Web-Apps.html>, 
you may use a Servlet Filter to set the database on the thread before an 
release it after. Beware, documentation will change (I hope) once 2.0 is 
released as all the pool stuff is changed.
Just ensure that ODatabaseRecordThreadLocal.INSTANCE.get() return something 
during the whole HTTP response computation.

When playing with SpringMVC, you do the same thing through an 
HandlerInterceptor 
<http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#mvc-handlermapping-interceptor>.
 
May be there is such thing in Play.

Le mercredi 14 janvier 2015 12:19:29 UTC+1, Giuseppe Annunziata a écrit :
>
> Hi Emanuel,
>   basically Java platform, usually we use Play Framework! but sometimes we 
> need to use Servlet containers (like Tomcat, Jetty, ecc.).
>
> Thank you for interesting of.
>
>
> Il giorno martedì 13 gennaio 2015 12:34:23 UTC+1, Emanuele ha scritto:
>>
>>  Hi Giuseppe,
>>
>> What are you using to write the web application ? is it java ? or other ? 
>> like you said depends a lot on the driver you use.
>>
>> bye 
>>
>> Emanuel
>>
>> On 01/08/2015 03:09 PM, Giuseppe Annunziata wrote:
>>  
>> Hello, 
>>  I'm novice on OrientDB and I'd like to use it in a web application that 
>> write and read graph-like linked informations.
>> My question is about which is the best approach to create connection to 
>> an orientdb graph; this essentially depends on intimate OrientDB and its 
>> driver architecture.
>> I think there are three kinds of approach: 
>> - create a "connection" for each group of query/insert/update, then 
>> close/release it
>> - create a "connection" at start of web page elaboration, and 
>> close/release it
>> - create a "connection-less" reference and use it (like Jongo library do 
>> for MongoDB, that handle it transparently)
>>
>>  Which is the best? There are some other best approaches?
>>
>>  
>>  -- 
>>
>> --- 
>> 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/d/optout.
>>
>>
>> 

-- 

--- 
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/d/optout.

Reply via email to