Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Regarding mongoDB javascript functionality in kundera #212

Closed
sbheda opened this Issue · 4 comments

3 participants

@sbheda

How can i call MongoDB javascript file in kundera ?

@mevivs
Collaborator

2.4 release doesn't provide a handle for raw mongodb instance. It's in our roadmap and 2.5 release will enable this feature. Will post an update on this once it's checked-in current trunk branch.

-Vivek

@jmcollin78

Here is how I access to the MongoDB driver from Kundera:
Map clients = null;
MongoDBClient client = null;
clients = (Map) em.getDelegate();
if (clients != null) client = (MongoDBClient) clients.get(persistenceUnitName);
if (client != null) {
try {
Field db = client.getClass().getDeclaredField("mongoDb");
if (!db.isAccessible()) {
db.setAccessible(true);
}
mongoDB = (DB) db.get(client);
} catch(Exception e) {
log.error("Cannot access MongoDB driver. Cause : '{}'",e.getMessage());
throw new ExceptionTechnique(e);
}
}

Hope this helps

@sbheda
@mevivs
Collaborator

Please refer:
#248

for proper fix on this.

-Vivek

@mevivs mevivs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.