Thanks for the reply

I probably did something wrong because now it's working. 
There is mistake in 

OObjectDatabaseTx db = OObjectDatabasePool.global().acquire(
"local:c:/tmp/odb", "admin","admin");
and shold be only 'dbPool' instead 'OObjectDatabaseTx db'.

Anyway, there is warning when deploying:
WARNING:   Sun Unsafe direct  memory implementation is going to be used, 
this implementation isnot stable so please use JNA version instead.

And an error when undeploying:
SEVERE:   The web application [/OrientDB_WebTest] created a ThreadLocal with 
key 
of type[com.orientechnologies.orient.core.db.OScenarioThreadLocal] (value [
com.orientechnologies.orient.core.db.OScenarioThreadLocal@186807a8]) and a 
value of type [com.orientechnologies.orient.core.db.OScenarioThreadLocal.
RUN_MODE] (value [DEFAULT]) but failed to remove it when the web 
application was stopped. Threads are going to be renewed over time to try 
and avoid a probable memory leak.
I know close() method only release it to the owner pool, but what's the 
proper way to close all pool?

Also I have an error when I'm trying to open "remote:localhost/tmp/odb" 
similar way like in OreintDB documentation.
SEVERE:   Startup of context /OrientDB_WebTest failed due to previous errors
SEVERE:   Exception during cleanup after start failed
org.apache.catalina.LifecycleException: Manager has not yet been started
      at org.apache.catalina.session.StandardManager.stop(StandardManager.
java:934) ...

What's the correct way for access to the database?
Should I use ServletContextListener just for register all entity classes 
and then open the database in EJB or servlet each time I need access to 
database? 
OObjectDatabaseTx db = OObjectDatabasePool.global().acquire(
"plocal:c:/tmp/odb", "admin","admin");
...
db.close();

Cheers,
Tomek

-- 

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