[JBoss Cache: Core Edition] - Need to move Jboss cache config to Spring - pls help
by cacheuser
I am using JBC 3.0. My config looks as below. I need to move the config to Spring because I have to use the connection pooling object from some other Spring config or if I cant use the connection pooling object I will have to get the Database connection stuff(server:port user password) from some other Spring config and be able to create the cache object. Does anybody have any example to show how to do that
| <?xml version="1.0" encoding="UTF-8"?>
| <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns="urn:jboss:jbosscache-core:config:3.0">
|
|
| <locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="true" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
|
| <eviction wakeUpInterval="60000">
| <!-- Cache wide default -->
| <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
| <attribute name="maxNodes">5000</attribute>
| <attribute name="timeToLive">1000000</attribute>
| </default>
|
| <region name="/root/cache" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
| <attribute name="maxNodes">5</attribute>
| <attribute name="timeToLive">1000</attribute>
| </region>
|
| </eviction>
| <loaders passivation="false" shared="true">
| <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
| <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true"
| ignoreModifications="false" purgeOnStartup="false">
| <properties>
| cache.jdbc.table.name=jboss_cache
| cache.jdbc.table.create=false
| cache.jdbc.table.drop=false
| cache.jdbc.table.select=true
| cache.jdbc.table.primarykey=cache_id
| cache.jdbc.fqn.column=fqn
| cache.jdbc.fqn.type=varchar(255)
| cache.jdbc.node.column=node
| cache.jdbc.node.type=blob
| cache.jdbc.parent.column=parent
| cache.jdbc.parent.type=varchar(255)
| cache.jdbc.driver=com.mysql.jdbc.Driver
| cache.jdbc.url=jdbc:mysql://CACHEDATABASE:3333/jboss_cache
| cache.jdbc.user=user
| cache.jdbc.password=password
| cache.jdbc.sql-concat=concat(1,2)
|
| c3p0.maxIdleTime=60
| c3p0.minPoolSize=0
| c3p0.maxPoolSize=40
| c3p0.checkoutTimeout=5000
| cache.jdbc.connection.factory=org.jboss.cache.loader.C3p0ConnectionFactory
|
| </properties>
| </loader>
| </loaders>
|
| </jbosscache>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197201#4197201
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197201
17 years, 6 months
[Performance Tuning] - Apache busy connections - JBOSS Tomcat - Threaddump bottlene
by toto3000
I have already posted this message in another rubric, but i think this is the right topic.
Hello,
I'm using JBoss v4.03 with Apache Web Server for a website which is in a Production state.
I have a strange behavior when i look at the Apache JK Status Manager page. Sometimes i can see a lot of busy connection to tomcat.
I have performed several threaddumps when this happens and yesterday I have noticed a bottle neck which is caused by this thread:
"TP-Processor23222" daemon prio=1 tid=0x3a4ed930 nid=0x61eb runnable [0x0eee8000..0x0eee8e40]
at java.util.TreeMap$3.iterator(TreeMap.java:672)
at java.util.TreeMap.putAll(TreeMap.java:320)
at javax.management.modelmbean.DescriptorSupport.init(DescriptorSupport.java:468)
at javax.management.modelmbean.DescriptorSupport.(DescriptorSupport.java:211)
at javax.management.modelmbean.DescriptorSupport.clone(DescriptorSupport.java:802)
- locked <0x54be3d00> (a javax.management.modelmbean.DescriptorSupport)
at javax.management.modelmbean.ModelMBeanOperationInfo.getDescriptor(ModelMBeanOperationInfo.java:364)
at javax.management.modelmbean.ModelMBeanInfoSupport.getDescriptor(ModelMBeanInfoSupport.java:553)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.override(ModelMBeanInvoker.java:804)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:231)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1407)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1402)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:361)
at org.apache.commons.modeler.Registry.registerComponent(Registry.java:871)
at org.apache.jk.common.ChannelSocket.registerRequest(ChannelSocket.java:439)
at org.apache.jk.common.HandlerRequest.checkRequest(HandlerRequest.java:459)
- locked <0x597f3458> (a java.lang.Object)
at org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:470)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:363)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Here is the configuration of the connector in /jbossweb-tomcat55.sar/server.xml:
Connector port="11109" address="${jboss.bind.address}"
maxThreads="1000" strategy="ms" minSpareThreads="5" maxSpareThreads="15"
emptySessionPath="true" enableLookups="false" redirectPort="11143"
bufferSize="10240" maxHttpHeaderSize="8192" tcpNoDeal="true"
protocol="AJP/1.3"
Is there a known issue which correspond to this behaviror?
Thanks for your help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197199#4197199
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197199
17 years, 6 months
[Tomcat, HTTPD, Servlets & JSP] - Apache Busy with Tomcat JBOSS connector - Bottleneck on JVM
by toto3000
Hello,
I'm using JBoss v4.03 with Apache Web Server for a website which is in a Production state.
I have a strange behavior when i look at the Apache JK Status Manager page. Sometimes i can see a lot of busy connection to tomcat.
I have performed several threaddumps when this happens and yesterday I have noticed a bottle neck which is caused by this thread:
"TP-Processor23222" daemon prio=1 tid=0x3a4ed930 nid=0x61eb runnable [0x0eee8000..0x0eee8e40]
at java.util.TreeMap$3.iterator(TreeMap.java:672)
at java.util.TreeMap.putAll(TreeMap.java:320)
at javax.management.modelmbean.DescriptorSupport.init(DescriptorSupport.java:468)
at javax.management.modelmbean.DescriptorSupport.(DescriptorSupport.java:211)
at javax.management.modelmbean.DescriptorSupport.clone(DescriptorSupport.java:802)
- locked <0x54be3d00> (a javax.management.modelmbean.DescriptorSupport)
at javax.management.modelmbean.ModelMBeanOperationInfo.getDescriptor(ModelMBeanOperationInfo.java:364)
at javax.management.modelmbean.ModelMBeanInfoSupport.getDescriptor(ModelMBeanInfoSupport.java:553)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.override(ModelMBeanInvoker.java:804)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:231)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1407)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1402)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:361)
at org.apache.commons.modeler.Registry.registerComponent(Registry.java:871)
at org.apache.jk.common.ChannelSocket.registerRequest(ChannelSocket.java:439)
at org.apache.jk.common.HandlerRequest.checkRequest(HandlerRequest.java:459)
- locked <0x597f3458> (a java.lang.Object)
at org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:470)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:363)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Here is the configuration of the connector in /jbossweb-tomcat55.sar/server.xml:
Connector port="11109" address="${jboss.bind.address}"
maxThreads="1000" strategy="ms" minSpareThreads="5" maxSpareThreads="15"
emptySessionPath="true" enableLookups="false" redirectPort="11143"
bufferSize="10240" maxHttpHeaderSize="8192" tcpNoDeal="true"
protocol="AJP/1.3"
Is there a known issue which correspond to this behaviror?
Thanks for your help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197198#4197198
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197198
17 years, 6 months
[EJB 3.0] - Re: Dynamic units within persistence.xml
by lord_jorge
Hi guys,
I had created a factory class that use Ejb3Configuration to add the dynamic persistent-units.
I tried to test connecting to a DS db001ds and made a persist and a find operation successfully.
But when I try to create 2 EntityManagerFactory's, (DS db001ds and db002ds) i get the following warn:
| ...
| 14:09:45,953 INFO [DatasourceConnectionProvider] Using datasource: java:/db002ds
| 14:09:45,984 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallo
| w] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1bc6b34
| 14:09:46,000 WARN [SettingsFactory] Could not obtain connection metadata
| org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Una
| bled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57ffbb:5b6:49492433:65 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.j
| boss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable:
| Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57ffbb:5b6:49492433:65 status: ActionStatus.ABORT_ONLY >))
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
| ...
|
And any subsequent call to the EntityManager of db002ds throws the same message, but now like error and not warn.
Someone had used Ejb3Configuration without trouble to connect in multiple persistent units?
Thanks for your time,
Jorge
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197188#4197188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197188
17 years, 6 months
[JBoss jBPM] - Re: jBPM 3.3.0GA and Oracle causing StaleObjectStateExceptio
by jjrs
I have a similar problem, although in my case the nodes have async='true'.
The exception I get is
| org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.graph.exe.Token#48]
| at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
| at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:262)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:218)
| at org.jbpm.svc.Services.close(Services.java:236)
| at org.jbpm.JbpmContext.close(JbpmContext.java:136)
| at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:190)
| at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:60)
|
I have tried::
- all the possible isolation levels (as suggested in the forum).
- the different "lock" options in the join and in the fork.
- tried to put back the flush that Tom removed some time ago in the Join class.
- selected the correct hibernate dialect.
But I still have the same issue.
The StaleObjectStateException is making one of the nodes to be executed twice, but if you have a more complicated graph, it's making a part of the graph not to be executed at all.
Any idea about how to proceed ? I saw that the issue JBPM-1757 was Deferred to 3.3.2 planned for May 2009. Is there any way that we could get the Join and Fork with parallel processing of nodes (async=true) before?
Does anyone have a similar configuration running in Oracle with 3.3.0GA or is it something that simply is not working yet due to a regression error ?
I would really appreciate any help, as I have been investigating the issue, reading the forum entries, and trying different configurations for almost a week, and I am still not able to make it work.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197186#4197186
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197186
17 years, 6 months