[JBoss Cache: Core Edition] - should I write a dumb JTA impl if only need async invalidati
by dukehoops
Hi,
I am integrating JBoss Cache 3.0.2 into our app which hitherto used Spring's org.springframework.orm.hibernate3.HibernateTransactionManager (which delegates to Our hitherto stack is as follows:
Spring 2.5.6
C3p0 Cnx pool
Hibernate 3.3.1
Tomcat 6
We are running in a cluster, and will only (initially at least) need async invalidation. Given the above, do I really need a full-blown JTA impl (like Atomikos or JOTM) or can I get away with creating a delegate impl of JTA that would:
- implement javax.transaction.TransactionManager, Transaction, UserTransaction
- have MyTransaction delegate to org.hibernate.Transaction wherever possible
- do nothing on Transaction.enlistResource/delistResource
- do implement registerSynchronization
- implement own org.hibernate.transaction.factory_class and manager_lookup_class
- my javax.transaction.Transaction impl would delegate back to Hibernate's JDBCTransaction
I am wondering whether this is possible because it seems that JBossCache 3 only uses Synchronization and never Transaction.enlistResource.
thanks
-nikita
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207833#4207833
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207833
17 years, 4 months
[Clustering/JBoss] - Re: clustering/JMS problem among machines not using same par
by hale2jo
A former co-worker suggested that I try adding -b 0.0.0.0 to the start and that worked!!!
I honestly don't understand why because without -b 0.0.0.0, it says in the jboss log:
| 13:30:21,078 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=cars/150.102.65.10
| 13:30:21,085 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on cars/150.102.65.10:1102, group=228.1.2.10, HA-JNDI address=150.102.65.10:1100
|
which has nothing to do with wizard!!
With -b 0.0.0.0, it says in the jboss log:
| 13:36:34,526 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50, bindAddress=/0.0.0.0
| 13:36:34,533 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on 0.0.0.0/0.0.0.0:1102, group=228.1.2.10, HA-JNDI address=150.102.65.10:1100
|
and it no longer tries to connect with wizard.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207825#4207825
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207825
17 years, 4 months
[JBoss Tools (users)] - Error creating sessionfactory when using HQL Editor
by elenctic87
My project and all queries run fine when deployed to the server, but for some reason the exception below is thrown in the HQL editor. Do you know how to get rid of this so I can use the HQL editor again? This HQL editor used to work before I enabled query caching. (see persistence.xml below). Now, even if I disable query caching and restore persistence.xml to the way it was before, the HQL Editor still throws this exception. I have also tried explicitly enabling the second-level cache in persistence.xml to no avail.
I have seen forum posts on this subject from as long ago as 2 years. There was not a clear resolution, so I am posting again. It seems like a class loading issue, but I have no idea how to fix it. I think I am posting this in the right forum, but if not, please kindly direct me to the appropriate place. Thank you.
Exception: (Title: "Problems while creating sessionfactory")
| org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
| at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
| at org.hibernate.cache.UpdateTimestampsCache.<init>(UpdateTimestampsCache.java:42)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:337)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
| at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
| at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:399)
| at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
| at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:93)
| at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:394)
| at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
| at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:99)
| at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:105)
| at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
| at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
Persistence.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <!-- Persistence deployment descriptor for dev profile -->
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
| version="1.0">
|
| <persistence-unit name="a1">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/a1Datasource</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.show_sql" value="true"/>
| <property name="hibernate.format_sql" value="true"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/a1EntityManagerFactory"/>
| </properties>
| </persistence-unit>
|
| </persistence>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207821#4207821
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207821
17 years, 4 months
[JBoss jBPM] - Re: performance limits of jbpm
by kukeltje
no, it is still not finished, but improved a lot in 3.3.1
1) is being taken care of in 4.0... logging is changing and will be configurable as well. The thing is that 'governance' sometimes requires a lot of info... so it is a tradeoff...
2) as said before... if there is a technical error by which a transaction is rolled back, nothing has happened in the process. Yes, there is an error, but that should be dealt with on a different level... not the process logging....
In one of the production systems I developed (non-jbpm based, not even workflow) we made the logging async in a transaction to an in-memory jms queue. That would write data to the db afterwards... An issue of what to do if the system crashes and not all logging has been written to the db.... again... it is a tradeoff....Writing it to the local filesystem is *not* high availability... most crashes we had were due to disk crashes... but you can configure the jms queue to use local file persistence (we tried that and it works, but switched back to keeping it in-memory).
So logging async (JMS) with local file persistency as storage before the log is actually written to the database is imo a good solution. Regarding your main problem.... patches are always welcome....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4207817#4207817
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4207817
17 years, 4 months