Hi Enrico,
Thanks for your help after using the remote it is now working well without
locking issues. I really appreciate it.
On Tuesday, August 12, 2014 3:07:39 PM UTC+4, Enrico Risa wrote:
>
> Hi Kareem
>
> you call this:
>
> OServer server = OServerMain.create();
> server.startup(new File("/usr/local/temp/db.config"));
> server.activate();
>
> At the startup of your application, then from your application code you
> can use
>
> new OrientGraphFactory("plocal:d:/db/test");
>
>
> For the db.config it is the configuration of the Server where you set the
> listening port binary http etc..
>
> I use this configuration in a Play application.
>
>
> Before starting the server i configured with java api the ORIENTDB_HOME
>
> System.setProperty("ORIENTDB_HOME", "path");
>
> I load a custom orientdb-config.xml
> start the server
>
> and then you can reproduce the folder structure of the Server with
>
> path/
> databases/
> plugins/
>
> in plugins i copied a dist of OrientDB Studio
>
> and then i was able to run queries from studio opening my browser
> to http://localhost:2481/studio/index.html#/
>
>
> 2014-08-12 11:34 GMT+02:00 Kareem Jabr <[email protected] <javascript:>>:
>
>> 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]>:
>>>
>>>> Plocal
>>>> Factory = new OrientGraphFactory("plocal:d:/db/test");
>>>> Factory.getTx()
>>>> On Aug 11, 2014 4:54 PM, "Enrico Risa" <[email protected]> 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]>:
>>>>>
>>>>>> 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].
>>>>>>
>>>>>> 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].
>>>>>
>>>>> 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.
>>>>
>>>
>>> --
>>
>> ---
>> 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.