lundi 12 septembre 2016

Is it possible to start the OrientDb server without using reflection?

I'm running OrientDb 2.2.6 in embedded mode. I have to grant security permissions to my code so the SecurityManager allows it to run. One permission I would particularly prefer not to grant is ("java.lang.reflect.ReflectPermission" "suppressAccessChecks"). Instead of granting permissions, I would rather start the server without requiring reflection. Is there a way to start the OrientDb server in embedded mode without reflection?

Here is my configuration:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orient-server>
<network>
    <protocols>
        <protocol implementation="com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary" name="binary"/>
    </protocols>
    <listeners>
        <listener protocol="binary" socket="default" port-range="2424-2430" ip-address="0.0.0.0"/>
    </listeners>
</network>
<users>
    <user resources="*" password="root" name="root"/>
    <user resources="connect,server.listDatabases,server.dblist" password="guest" name="guest"/>
</users>
<properties>
    <entry value="1" name="db.pool.min"/>
    <entry value="50" name="db.pool.max"/>
    <entry value="true" name="profiler.enabled"/>
</properties>
</orient-server>

The code I'm using was taken from OrientDb documentation. Its only three lines:

server = OServerMain.create();
// orientServerConfigFile is a file object for the configuration given above
server.startup(orientServerConfigFile.getInputStream());
server.activate();





Aucun commentaire:

Enregistrer un commentaire