[JBossCache] - Re: TreeCache/Hibernate/JBossAS optimistic locking problem
by floefliep
I'll dig into this further tomorrow.
But just by quickly looking at the test case you mention, and according to what I saw TreeCache doing today, that test may pass since it only seems to deal with non-versioning stuff within a transaction. But that might not be the case when running for real, since you'll have mixed non-versioning (query cache) calls and versioning (regular versioned data cache) calls within the *same transaction*. But as it seems, as pointed out before, TreeCache's transaction workspace is set to explicit user versioning as soon as you pass in a DataVersion via an Option (e.g. using write, writeLoad, ...). Hence subsequent non-versioning calls seem to be ought versioning calls, which, according to what I saw, fails. So your test may fail once you add a regular versioning call in between there.
As for your reply to point 2, yes, then that is likely to be the reason, since once source==null, you effectively pass in an Option with dataversion=null (=non-versioning), which fails in the aforementioned situation, i.e. when mixed in the same transaction with a versioning call.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957157#3957157
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957157
19 years, 9 months
[JBossCache] - Problem registering JTA with Hibernate (JBossCache)
by Pragmaticus
Hi,
I have a configuration using TreeCache + Hibernate + Spring. I it almost working but I am not able to get the cache work with JBoss JTA. The problem seems to be that the I am not able to locate the JBoss TransactionManager when I deploy. Maybe this is not the right place to this post but I believe the problem must somehow be related to how I configure JBoss JTA and lookup of the JTA jndi resource. Any help would be appreciated.
The configuration file in Spring...
<!-- Reference to the MySqlDS defined in JBoss -->
| <bean id="mySqlDS" class="org.springframework.jndi.JndiObjectFactoryBean">
| <property name="jndiName" value="MySqlDS"/>
| </bean>
|
| <!-- Hibernate configuration -->
| <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
| <property name="dataSource" ref="mySqlDS"/>
| <property name="schemaUpdate" value="true"/>
| <property name="mappingResources">
| <list>
| <value>hibernate/userdomain.hbm.xml</value>
| <value>hibernate/systemdomain.hbm.xml</value>
| </list>
| </property>
| <property name="hibernateProperties">
| <props>
| <prop key="hibernate.dialect">${xtrade.hibernate.dialect}</prop>
| <prop key="hibernate.showsql">${xtrade.hibernate.showsql}</prop>
| <!-- <prop key="hibernate.hbm2ddl.auto">${xtrade.hibernate.hbm2ddl.auto}</prop> -->
| <prop key="hibernate.cache.provider_class">${xtrade.hibernate.cache.provider}</prop>
| <prop key="hibernate.cache.use_query_cache">true</prop>
| <prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</prop>
| <prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</prop>
| </props>
| </property>
| <!-- <property name="jtaTransactionManager" ref="jbossTxManager"/> -->
| </bean>
|
|
I have bundled the treecache.xml with the deployed JAR-file and I works ok when deployed outside JBoss (but without JTA).
| <!-- ==================================================================== -->
| <!-- Defines TreeCache configuration -->
| <!-- ==================================================================== -->
| <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
| <depends>jboss:service-Naming</depends>
| <depends>jboss:service-TransactionManager</depends>
| <attribute name="ClusterName">xtradeCluster</attribute>
| <attribute name="CacheMode">REPL_ASYNC</attribute>
| <attribute name="LockAcquisitionTimeout">15000</attribute>
| <attribute name="FetchStateOnStarup">true</attribute>
| ....
|
And here is the exception..
| 22:50:15,233 INFO [STDOUT] 22:50:15,231 ERROR [[/xtrade-web]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
| org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [dao-config.xml]: Invocation of init method failed; nested exception is org.hibernate.cache.CacheException: org.hibernate.HibernateException: Could not locate TransactionManager
| Caused by:
| org.hibernate.cache.CacheException: org.hibernate.HibernateException: Could not locate TransactionManager
| at org.hibernate.cache.TreeCacheProvider.start(TreeCacheProvider.java:58)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:169)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
| at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:871)
| ...
| Caused by: org.hibernate.HibernateException: Could not locate TransactionManager
| at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:26)
| at org.hibernate.cache.TreeCacheProvider.start(TreeCacheProvider.java:53)
| ... 152 more
| Caused by: javax.naming.NameNotFoundException: TransactionManager not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
|
|
I would really love to see a code example with a working configuration for how to setup TreeCache + Hibernate + Spring.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957154#3957154
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957154
19 years, 9 months
[JBoss jBPM] - Timers Documentation and Eclipse incorrect.
by falazar
Bug:
When defining a node timer in the Eclipse plugin according to the rules of Chapter 12, it says cvc-complex-type.2.4.b: The content of element 'timer' is not complete. One of action , script is expected.
And it wont allow a deployment of the process.
It does not say this is a requirement in Ch 12, and it does not appear that it is needed, I have neither an action nor a script I need to perform here, simply a timed transition.
I added a dummy script there, and it appears to work ok.
<task-node name="Pending CSD Key Approval">
<![CDATA[
System.out.println("*** TIMER FIRED !!!");
]]>
</task-node>
And it doesnt mention the various setting that can be used for timing here either.
It looks like it is mentioned under the calendar but not here, what the duration variables can be.
Regards,
James Ratcliff
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957152#3957152
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957152
19 years, 9 months