[JBoss Cache] - JBoss Cache - Memory Leak when many Fqn/nodes added in Cache
by Sathish
Sathish [http://community.jboss.org/people/sathish_06] created the discussion
"JBoss Cache - Memory Leak when many Fqn/nodes added in Cache"
To view the discussion, visit: http://community.jboss.org/message/617503#617503
--------------------------------------------------------------
All - Iam observing OOM in JBoss Cache, with below mentioned scenario. Would like to get suggestions/help on the approach that iam doing to over come the situation is correct or not. Here is the details on the problem,
Problem:- JBoss Cache - Memory Leak when many Fqn/nodes added in Cache using TreeCache.put() API
Explanation of the problem:- When adding new data in cache with new node in the tree, its causing memory leak.
Environment/Config settings:-
JBoss Cache Version:-JBossCache 1.2.4.SP2[ $Id: Version.java,v 1.5.2.1.4.3 2006/02/15 05:08:06 bstansberry Exp $]\
CacheMode:LOCAL
EvictionPolicy: LRUPolicy
Test Cache region - /testRegionX definition:-
<region name="/testRegionX">
<attribute name="maxNodes">1000</attribute>
<attribute name="timeToLiveSeconds">30</attribute>
<!-- Maximum time an object is kept in cache regardless of idle time -->
<attribute name="maxAgeSeconds">30</attribute>
</region>
In the test code, start adding new objects in the cache(treeCache.put(identifier, key , vo)) with different FQN/tree node, as shown below.
/testRegionX/a/b/ k1, v1
/testRegionX/a1/b1/ k2, v2
/testRegionX/a12b2/ k2, v3
.....
Snippet of the test code,
TreeCache treeCache;
try {
treeCache = new TreeCache();
treeCache.setCacheMode(TreeCache.LOCAL);
System.out.println("JBoss Cache Version:-" + treeCache.getVersion());
PropertyConfigurator config = new PropertyConfigurator();
config.configure(treeCache, "TreeCache.xml");
treeCache.startService();
String identifier_prefix = "/testRegionX";
String key_prefix = "key_01_";
for(long i=0;;i++)
{
String key = key_prefix + i;
String identifier = identifier_prefix + "/" + i + "/data/";
//String identifier = identifier_prefix;
System.out.println("Identifer = " + identifier);
DummyVO vo = new DummyVO();
System.out.println("Adding[Id=new node, Key=unique] - Key - " + key);
treeCache.put(identifier, key , vo);
//access the data from cache
treeCache.get(identifier, key);
//dont call remove
//treeCache.remove(identifier, key);
//System.out.println("cache.remove called");
}
//treeCache.stopService();
} catch (Exception e) {
e.printStackTrace();
}
Refer attached zip file contains complete Tree cache configuration(TreeCache.xml) and test code. Just point the jboss library location in the ant.properits file to run the test code.
Note that i dont call the tree.remove() to remove the cache data, instead let the Cache manager evict the object once it gets expired(configured expiry time to 30 seconds.).
Ran test with default JVM heap size, and reunning out of memory in the 50K iteration. Took JMap histo and noticed that below 2 objects are not releasing, Attached histo in text file.
C:\Documents and Settings\skandasa>jmap -histo:live 4508
num #instances #bytes class name
----------------------------------------------
1: 107609 16019856 [LEDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap$Entry;
3: 107609 6026104 EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap
When I start adding new objects in the cache(treeCache.put(identifier, key , vo)) in the same tree node ('/testRegionX' ie., not creating new nodes in the tree, as shown below) then not observing this OOM problem.
/testRegionX/ k1, v1
/testRegionX/ k2, v2
/testRegionX/ k2, v3
.....
In other words, if i simply store data in cache as a Hashmap, without creating many tree nodes, then not observing OOM.
Any thoughts on this behaviour of the JBoss cache ? How can i get control over the OOM problem when adding new nodes in the tree cache ?
Please advice!
Thanks,
Sathish
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/617503#617503]
Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
[jBPM] - jbpm5 seam 2.2.2 integration issue
by miloud haimoune
miloud haimoune [http://community.jboss.org/people/milhaim] created the discussion
"jbpm5 seam 2.2.2 integration issue"
To view the discussion, visit: http://community.jboss.org/message/638960#638960
--------------------------------------------------------------
Hi all,
I am integrating Jbpm5 with existing application developed using seam2.2.2. With a separate database for jbpm. I created a persisted ksession and it is working correctly.
Persistence.xml
<persistence-unit name=+"org.jbpm.persistence.jpa"+ transaction-type=+"JTA"+>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jdbc/testDS1</jta-data-source>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name=+"hibernate.dialect"+ value=+"org.hibernate.dialect.PostgreSQLDialect"+/>
<property name=+"hibernate.max_fetch_depth"+ value=+"3"+/>
<!-- <property name="hibernate.hbm2ddl.auto" value="create"/> -->
<property name=+"hibernate.show_sql"+ value=+"false"+ />
<property name=+"hibernate.format_sql"+ value=+"false"+ />
<property name=+"hibernate.transaction.manager_lookup_class"+ value=+"org.hibernate.transaction.JBossTransactionManagerLookup"+ />
</properties>
</persistence-unit>
I needed to access the processinstance variables to delegate a humane task to another user if the actual user did not complete the task after one hour. I am using a timer to trigger custom service task registered with a custom workItemHandler.
My issue : the transaction is canceled after time the timeout (300s)
WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-9) [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX 7f000101:e18b:4ed4a5a4:10b in state RUN
WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-10) [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id 7f000101:e18b:4ed4a5a4:10b invoked while multiple threads active within it.
WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-10) [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action 7f000101:e18b:4ed4a5a4:10b aborting with 1 threads active!
WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-10) [com.arjuna.ats.arjuna.coordinator.TransactionReaper_7] - TransactionReaper::doCancellations worker Thread[Thread-10,5,jboss] successfully canceled TX 7f000101:e18b:4ed4a5a4:10b
my workItemhandler
*public* *class* SamplelWorkItemHandler *implements* WorkItemHandler {
*public* *void* executeWorkItem(WorkItem workItem, WorkItemManager workItemManager) {
ProcessInstance processInstance = (ProcessInstance) ProcessManager.+getProcessInstance+(workItem.getProcessInstanceId());
workItemManager.completeWorkItem(workItem.getId(), *null* );
}
*public* *void* abortWorkItem(WorkItem workItem, WorkItemManager workItemManager) {
}
}
any suggestion ??,
Many thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/638960#638960]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
[JBoss Tools] - birt integration: b:param in popup/ajax not working
by u j
u j [http://community.jboss.org/people/bcn] created the discussion
"birt integration: b:param in popup/ajax not working"
To view the discussion, visit: http://community.jboss.org/message/632517#632517
--------------------------------------------------------------
I use JBoss Tools Birt Integeration in a RichFaces application.
It works fine in a normal page, but when I include the same code in a popup, I get the error:
10:33:54,187 SEVERE [org.jboss.tools.birt] (ajp-127.0.0.1-127.0.0.1-8009-1) the value of parameter estabId is invalid: org.eclipse.birt.core.exception.CoreException: Can not convert the value of to Integer type.
at org.eclipse.birt.core.data.DataTypeUtil.toInteger(DataTypeUtil.java:276) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]
at org.jboss.tools.birt.servlet.JBossBirtServlet.stringToObject(JBossBirtServlet.java:183) [jboss-birt-servlet.jar:]
at org.jboss.tools.birt.servlet.JBossBirtServlet.evaluateParameterValues(JBossBirtServlet.java:142) [jboss-birt-servlet.jar:]
at org.jboss.tools.birt.servlet.JBossBirtServlet.doGet(JBossBirtServlet.java:108) [jboss-birt-servlet.jar:]
at org.jboss.tools.birt.servlet.JBossBirtServlet.doPost(JBossBirtServlet.java:123) [jboss-birt-servlet.jar:]
The jsf is:
<rich:popupPanel autosized="true" modal="false" domElementAttachment="form">
<b:birt embeddable="true" designName="rep.rptdesign" designType="embed">
<b:param name="estabId" value="#{bean.estabId}" />
</b:birt>
</rich:popupPanel>
I verified with the debugger that the bean get method is never called. It seems that on an ajax-request the b:param is not (re-)evaluated. The popup is opened via a a4j:commandLink with a render attribute pointing to the id of the popup.
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/632517#632517]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months
[IronJacamar] - Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory
by jörg maurer
jörg maurer [http://community.jboss.org/people/liegler.maurer] created the discussion
"Ironjacamar, IBM JDK and javax.xml.stream.XMLInputFactory"
To view the discussion, visit: http://community.jboss.org/message/637796#637796
--------------------------------------------------------------
Hi all,
Tried Ironjacamar in embedded mode, Version 1.0.0Final on IBM JDK and got:
Caused by: javax.xml.stream.FactoryConfigurationError: Provider
com.sun.xml.internal.stream.XMLInputFactoryImpl not found
at javax.xml.stream.XMLInputFactory.newInstance(Unknown Source)
at
com.github.fungal.deployment.Unmarshaller.unmarshal(Unmarshaller.java:98)
... 8 more
Caused by: java.lang.ClassNotFoundException:
com.sun.xml.internal.stream.XMLInputFactoryImpl
at java.lang.Class.forName(Class.java:139)
at javax.xml.stream.FactoryFinder.newInstance(Unknown Source)
at javax.xml.stream.FactoryFinder.find(Unknown Source)
at javax.xml.stream.FactoryFinder.find(Unknown Source)
... 10 more
After some searching and head pounding i found com.github.fungal.impl.KernelImpl, Method startup:
SecurityActions.setSystemProperty("javax.xml.stream.XMLInputFactory",
"com.sun.xml.internal.stream.XMLInputFactoryImpl");
As i worked around this using the Woodstox Stax Impl, i can see no reason why this is hardcoded and should be dependent on that Stax Impl.
If any Ironjacmar Teammember may see it also that way - and if its is not fixed sind 1.0.0Final - pls add that fix to your 1.0.6 Release Roadmap.
Thx
Btw. is there a planned release date for 1.0.6Final, as we also would like to see if the usage of the Tuxedo JCA Adapter is now possible and fixed?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637796#637796]
Start a new discussion in IronJacamar at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 4 months