Alright... I finally have it working, though not the way I thought I would 
have to accomplish it.

It seems like all the graph related functions that are registered by the

   -  *com.orientechnologies.orient.graph.sql.functions.*
   *OGraphFunctionFactory* 

class are somehow not also registered with the OSQLEngine when we run with 
OrientDB embedded in our Apache Karaf OSGi container.

Maybe we are failing to start or initialize something? Our workaround was 
to create and call this method after OrientDB has been started:

    private void registerGraphFunctions() {
        OGraphFunctionFactory graphFunctions = new OGraphFunctionFactory();
        Set<String> names = graphFunctions.getFunctionNames();
        
        for (String name : names) {
            System.out.println("ODB graph function found: [" + name + "]");
            OSQLEngine.getInstance().registerFunction(name, graphFunctions.
createFunction(name)); 
            OSQLFunction function = OSQLEngine.getInstance().getFunction(
name);
            if (function != null) {
                System.out.println("ODB graph function [" + name + "] is 
registered: [" + function.getSyntax() + "]");
            }
            else {
                System.out.println("ODB graph function [" + name + "] NOT 
registered!!!");
            }
        }
    }

I'm guessing the graph functions should auto-register with the 
OSQLEngine... I'd like to avoid the code above, are there any ideas and 
other directions I could try?

Thanks in advance for your time...

Regards,

Andrew


-- 

--- 
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