I logged an issue 
at https://github.com/orientechnologies/orientdb/issues/5779

On Wednesday, February 24, 2016 at 4:53:17 PM UTC-8, Harish wrote:
>
> I'm seeing the same thing as well. By default, the function library in the 
> metadata is empty on acquiring ODatabaseDocumentTx from the pool. Just 
> checked on Orient 2.2 beta, but the problem probably exists earlier as well.
>
> If I make an extra call such as:
>
> odbTx.getMetadata().getFunctionLibrary().load();
>
> then the function library finally gets populated with the function names. 
> But this is inefficient to do every time especially in the pooling 
> scenario. 
>
> This appears to be a bug, The function library should be populated as soon 
> as the dbtx is acquired.
>
>
> On Monday, September 21, 2015 at 2:02:41 AM UTC-7, Mihai Ocneanu wrote:
>>
>> Hello,
>>
>> I'm trying to run a JS function from within the java API, like so:
>>
>> ODatabaseDocumentTx odbTx = oPartitionedDatabasePool.acquire();
>> OFunction function = odbTx.getMetadata().getFunctionLibrary().getFunction
>> ("functionName");
>> Number result = (Number)function.execute(userId);
>>
>> The trouble is 
>> odbTx.getMetadata().getFunctionLibrary()
>> gives me an empty function library.
>>
>> Of course, I can access and run the functions from within studio without 
>> any issues.
>>
>> Any idea what I'm doing wrong?
>>
>> Thanks,
>> Mihai
>>
>

-- 

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