Thanks Enrico, I really appreciate it.
Can I then call
new OrientGraphFactory("plocal:d:/db/test");
after:
server.activate();
I prefer doing this as below,
OServer server = OServerMain.create();server.startup(new
File("/usr/local/temp/db.config"));server.activate();
The documentation is not really clear regarding the best practices on how
to use it in a prodcution level.
1) What shall I keep in this file: db.config?
2) I have come across this:
<listener protocol="http" port-range="2480-2490" ip-address="0.0.0.0">
<commands>
<command
implementation="com.orientechnologies.orient.server.network.protocol.http.command.get.OServerCommandGetStaticContent"
pattern="GET|www GET|studio/ GET| GET|*.htm GET|*.html GET|*.xml GET|*.jpeg
GET|*.jpg GET|*.png GET|*.gif GET|*.js GET|*.css GET|*.swf GET|*.ico GET|*.txt
GET|*.otf GET|*.pjs GET|*.svg">
<parameters>
<entry value="Cache-Control: no-cache, no-store, max-age=0,
must-revalidate\r\nPragma: no-cache" name="http.cache:*.htm *.html"/>
<entry value="Cache-Control: max-age=120" name="http.cache:default"/>
</parameters>
</command>
</commands></listener>
When is this needed?
> Hi Kareem
>
> you can use embedded server Take a look here.
> Let's you connect in plocal but you can use tool like Studio and Console
>
> https://github.com/orientechnologies/orientdb/wiki/Embedded-Server
>
>
> 2014-08-12 0:41 GMT+02:00 Kareem Jabr <[email protected] <javascript:>>:
>
>> Plocal
>> Factory = new OrientGraphFactory("plocal:d:/db/test");
>> Factory.getTx()
>> On Aug 11, 2014 4:54 PM, "Enrico Risa" <[email protected] <javascript:>>
>> wrote:
>>
>>> Hi Kareem
>>>
>>> how do you open the database from tomcat server?
>>>
>>> plocal or remote?
>>>
>>>
>>>
>>>
>>> 2014-08-11 14:51 GMT+02:00 Kareem Jabr <[email protected] <javascript:>
>>> >:
>>>
>>>> If I try to connect to the DB thru studio from the browser
>>>>
>>>> http://localhost:2480/studio/index.html#/database/test/browse
>>>>
>>>> *it shows this in the log:*
>>>>
>>>> java.io.IOException: The process cannot access the file because
>>>> another process has locked a portion of the file [
>>>> ONetworkProtocolHttpDb]
>>>>
>>>> Since I am already connected to the same database "test" from tomcat
>>>> server. I think whoever I open first locks the DB so other app won't be
>>>> able to access the DB. I need to access the DB from studio and code at the
>>>> same time for many reasons.
>>>> Please guide me to a best practice way to handle connections and DB
>>>> locking for my case.
>>>>
>>>> Thanks,
>>>> Kareem
>>>>
>>>> --
>>>>
>>>> ---
>>>> 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/d/optout.
>>>>
>>>
>>> --
>>>
>>> ---
>>> 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/ny6WHJZ7_Ok/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected] <javascript:>.
>>>
>>> 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] <javascript:>.
>> 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.