[JBoss Cache: Core Edition] - Re: JPA/Hibernate JBC usage
by zeravlai
Just to remember,
test case is T1 and T2 concurrently reading and entity from cache and T2 writing(modifying) that entity. I've tested 4 cases, which answers your question:
1.- PESSIMISTIC, R_R, T1 and T2 reading the entity from cache with em.find(). When T2 tries to write the entity the RL is upgraded to WL. T2 DOES NOT BLOCK till T1 commits.
2.- PESSIMISTIC, R_C, T1 and T2 reading the entity from cache with em.find(). Same behaviour as 1.
3.- PESSIMISTIC, R_R, T1 reads the entity with em.find(), T2 reads a set of entities with em.createNamedQuery(). Since T2 does not have a RL on the entity, T2 BLOCKS trying to acquire a WL till T1 commits. Then T2 proceeds.
4.- PESSIMISTIC, R_C, T1 reads the entity with em.find(), T2 reads a set of entities with em.createNamedQuery(). Same behaviour as 3.
Only test case 3 complies with what's written in the hibernate guide.
Also, READ COMMITTED semantic is being overwritten by Hibernate 1st level cache. That's why a re-read in T1 of the same entity (after T2 commited) will always have R_R semantics.
BTW: JBC version is 3.0.2. I'll be testing the same with MVCC and let you know.!!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223429#4223429
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223429
17 years
[JBoss jBPM] - Re: not binding factory to jndi, no JNDI name configured
by madhaviraut
i am facing tiese error while executing run.bat -c jbpm. Can you please help?
Errors:
10:06:21,984 ERROR [JobExecutorThread] exception in job executor thread. waiting
640000 milliseconds
org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(Datas
ourceConnectionProvider.java:56)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvi
der(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvi
der(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFa
ctory.java:414)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009
)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1292)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory
(DbPersistenceServiceFactory.java:91)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPers
istenceService.java:95)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistence
Service.java:99)
at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersiste
nceService.java:363)
at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread
.java:112)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58
)
Caused by: javax.naming.NamingException: Could not dereference object [Root exce
ption is javax.naming.NameNotFoundException: JbpmDS not bound]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1215)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:758)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:774)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.hibernate.connection.DatasourceConnectionProvider.configure(Datas
ourceConnectionProvider.java:52)
... 13 more
Caused by: javax.naming.NameNotFoundException: JbpmDS not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1209)
... 18 more
10:17:02,015 INFO [NamingHelper] JNDI InitialContext properties:{}
10:17:02,015 FATAL [DatasourceConnectionProvider] Could not find datasource: jav
a:comp/env/jdbc/JbpmDataSource
javax.naming.NamingException: Could not dereference object [Root exception is ja
vax.naming.NameNotFoundException: JbpmDS not bound]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1215)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:758)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:774)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.hibernate.connection.DatasourceConnectionProvider.configure(Datas
ourceConnectionProvider.java:52)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvi
der(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvi
der(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFa
ctory.java:414)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009
)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1292)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory
(DbPersistenceServiceFactory.java:91)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPers
istenceService.java:95)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistence
Service.java:99)
at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersiste
nceService.java:363)
at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread
.java:112)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58
)
Caused by: javax.naming.NameNotFoundException: JbpmDS not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1209)
... 18 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223416#4223416
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223416
17 years