[JBoss JIRA] Commented: (JBRULES-44) Dynamic proxy for shadow fact support
by Edson Tirelli (JIRA)
[ http://jira.jboss.com/jira/browse/JBRULES-44?page=comments#action_12344728 ]
Edson Tirelli commented on JBRULES-44:
--------------------------------------
JBRULES-44:
* Proxying and delegating all methods now
* Unit test updated
$ svn commit drools-core/src/test/java/org/drools/base/ShadowProxyFactoryTest.java drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java drools-core/src/main/java/org/drools/base/ShadowProxyFactory.java drools-core/src/main/java/org/drools/base/ShadowProxy.java drools-core/src/main/java/org/drools/util/asm/ClassFieldInspector.java
Sending drools-core/src/main/java/org/drools/base/ShadowProxy.java
Sending drools-core/src/main/java/org/drools/base/ShadowProxyFactory.java
Sending drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java
Sending drools-core/src/main/java/org/drools/util/asm/ClassFieldInspector.java
Sending drools-core/src/test/java/org/drools/base/ShadowProxyFactoryTest.java
Transmitting file data .....
Committed revision 6621.
> Dynamic proxy for shadow fact support
> -------------------------------------
>
> Key: JBRULES-44
> URL: http://jira.jboss.com/jira/browse/JBRULES-44
> Project: JBoss Rules
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Drl Parser/Builder, Manual, Reteoo
> Affects Versions: 3.1-m1
> Reporter: Michael Neale
> Assigned To: Edson Tirelli
> Fix For: 3.1-m1
>
>
> The idea is to use dynamic proxies to support shadow facts. So changes to the facts can be queued up, and the shadows refreshed when propagation has finished.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Commented: (JBCACHE-679) Deadlock using transactional JBossCache with Hibernate
by Owen Taylor (JIRA)
[ http://jira.jboss.com/jira/browse/JBCACHE-679?page=comments#action_12344720 ]
Owen Taylor commented on JBCACHE-679:
-------------------------------------
I think the reported bug is actually a symptom of JBCACHE-785 ... the cache puts storing data loaded
from the database into the cache are not supposed to cause write locks on the enclosing transaction
at all... the write locks WL1 and WL2 should have been released immediately as soon as the
data was stored. The Hibernate workaround attached there should help.
It should be noted that using REQUIRES_NEW with the TreeCache is generally going to be risky
because there are *legitimate* deadlocks:
- Transaction 1 reads object A and then suspends
- Transaction 2 tries to modify object A
If you use suspended transactions extensively in your application, you might be better going with a
different cache backend and the "ReadWrite" strategy for hibernate caching; the ReadWrite
strategy provides a greater level of concurrency then the Transactional strategy.
> Deadlock using transactional JBossCache with Hibernate
> ------------------------------------------------------
>
> Key: JBCACHE-679
> URL: http://jira.jboss.com/jira/browse/JBCACHE-679
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Clustering, Replication
> Affects Versions: 1.3.0.SP2
> Environment: SUSE 10.1, kernel 2.6.15 SPM, JDK 1.5.0_06, PostgreSQL 8.0.1
> Reporter: Yegor Yenikyeyev
> Assigned To: Manik Surtani
> Priority: Critical
> Attachments: nloptc.zip
>
>
> It seems like we discovered an unpredictable Hibernate and/or TreeCache behavior after upgrade JBossCache from 1.2.4SP2 to JBossCache 1.3.0SP2. For now I can witness that the same problem appears with 1.4.0CR2. I do not think that it's Hibernate-only or TreeCache-only issue but I do think it's a kind of integration issue or misunderstanding of how TreeCache transaction isolation is implemented.
> Our application works in clustered environment and we use JBossCache as L2 cache solution for Hibernate 3.1.3 (I checked this with 3.2.0CR2 as well). Our settings for JBossCache are
> REPL_SYNC, READ_COMMITED and our target business object methods (f1 and f2) have PROPAGATION_REQUIRED and PROPAGATION_REQUIRES_NEW. Our JDBC driver is 3.0 compliant.
> Our objects hierarchy is like: Occasion contains link to Round and Round contains link to Tournament. Round is NOT configured as "lazy" field in Occasion mapping b/c we always need to have it initialized.
>
> Here is in short what we try to do in our application:
>
> (1) Transaction1: Call f1 (PROPAGATION_REQUIRED) method of a business object and it causes Occasion1 to be loaded via a cachable query. After that Hibernate initializes Occasion1.round field and loads Round1.
> (2) Transaction1: Hibernate puts loaded Occasion1 and Round1 in L2 cache.
> (3) Transaction1: TreeCache creates com/companyname/Occasion/com.companyname.Occasion#1 region and obtains WriteLock (WL1)
> (4) Transaction1: TreeCache creates com/companyname/Round/com.companyname.Round#1 region and obtains WriteLock (WL2)
> (5) Transaction1: Do some business logic stuff
> (6) Transaction1: We expect current transaction to be long and we want to change status of Occasoin1 in DB very quickly. At this point we need an exclusive lock for appropriate row in DB table to change the status and commit it. In order to do this we call f2 (PROPAGATION_REQUIRES_NEW) which suppose to be a REALLY short transaction which release lock on the DB row as fast as possible.
>
> (7) Transaction2: Transaction1 SUSPENDED at this point. We call HibernateTemplate (we use Spring as well) to load Occasion1 for update with LockMode.UPGRADE flag and get exclusive lock.
> (8) Transaction2: Hibernate does NOT check for an instance of Occasion1 in L2 cache ( I suppose it's b/c we obviously do want to lock it for update )
> (9) Transaction2: Hibernate does check for an instance of Round1 in L2 cache and it calls get() on TreeCache to obtain com/companyname/Round/com.companyname.Round#1
> (10) Transaction2: At this point 1.3.0SP2 tries to obtain ReadLock for com/companyname/Round/com.companyname.Round#1 and it can't b/c there is a WL for that node in suspended Transaction1 !!! It can't obtain ReadLock for Round#1 anyhow!
> (11) Transaction2: Stuck waiting for WL2 to be released in TreeCache but it can't be released as soon as Transaction1 suspended and waits for Transaction2 to finish.
>
> Obviously this situation is ridiculous - a legal sequence of operations causes a deadlock on TreeCache. We do not expect com/companyname/Round/com.companyname.Round#1 to be visible in Transaction2 b/c we use READ_COMMITED but WL2 must not affect Transaction2 in this way. As soon as TreeCache prevents other transactions from reading com/companyname/Round/com.companyname.Round#1 it must not tell other transactions that the node exists to keep READ_COMMITED behavior consistent. For now it simply preventing everybody from using PROPAGATION_REQUIRES_NEW.
> The described scenario works with 1.2.4SP2 without a problem and I have serious concern that READ_COMMITED strategy is really implemented in v1.2.4 but at least the behavior is more consistent comparing to v1.3.0. As far as i understand this is result of JBCACHE-218 bugfix.
>
> We tried to change PROPAGATION_REQUIRES_NEW to PROPAGATION_NESTED and take advantage of nested transactions. We assume that com/companyname/Round/com.companyname.Round#1 would be available in a nested Transaction2 from Transaction1. But PROPAGATION_NESTED isn't supported by current JBossTransaction implementation (see line 209 in TxManager.java from 4.0.4.GA).
> We could change isolation to READ_UNCOMMITED but it's simply impossible in many other places of our application.
> We could make a trick and load Occasion1 with Round1 in a separate Transaction0 before starting Transaction1 but we HAVE to use LRU policy. That is why there is no chance for us to make sure that eviction won't happen between Transaction0 and Transaction1. If it happened then we are in the same situation as described above.
> Finally we could stop using Transaction2 but our application is intend to handle large amount of traffic and as soon as Transaction1 takes up to 3sec (comparing to 50ms for Transaction2) we might get up to 700-1000 transactions on queue waiting for table row lock to be released and we just can't allow this.
>
> From what I see in Hibernate TreeCache sources and I have no idea how to avoid the situation described above. One of my developers told me that probably it's possible to put stuff into L2 cache on transaction commit which would decrease WL time and resolve the issue with the deadlock. Honestly I'm seriously concerned how it applies to existing Hibernate. I think small issues like performance issue of loading the same object during 1 transaction more then once can be resolved by using L1 cache or JDBC driver abilities. But I guess there are a plenty of work to make this working for cachable queries.
> Another option I see is to do a trick and put values for Round1 and Occasion1 into a new region for Transaction2 if we know that Transaction1 suspended and owns WLs for various nodes. I really do not like this way b/c in fact it's not a pure pessimistic locking. But the issue described before is worse price for "pure" READ_COMMITED strategy. In fact it showstopper assuming there is no way to use PROPAGATION_NESTED.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBAS-3745) org.jboss.test.compatibility.test.SerialVersionUIDUnitTestCase.test402Compatibility failure
by Len DiMaggio (JIRA)
org.jboss.test.compatibility.test.SerialVersionUIDUnitTestCase.test402Compatibility failure
-------------------------------------------------------------------------------------------
Key: JBAS-3745
URL: http://jira.jboss.com/jira/browse/JBAS-3745
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Test Suite
Affects Versions: JBossAS-4.0.5.CR1
Environment: OS/Kernel/Arch = RHEL4/U4 - Linux 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 17:57:31 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
JVM = R26.4.0-63_CR284516-68626-1.5.0_06-20060926-0859-linux-x86_64
JBossAS = 20091002 Branch_4_0 of JBoss AS, http://anonsvn.jboss.org/repos/jbossas/branches/Branch_4_0
Reporter: Len DiMaggio
This test case:
org.jboss.test.compatibility.test.SerialVersionUIDUnitTestCase.test402Compatibility
fails with JVM = R26.4.0-63_CR284516-68626-1.5.0_06-20060926-0859-linux-x86_64
The failure is seen if the test is run as a one-test or as part of the JBossAS test suite.
The error returned is:
Failures on SerialVersionComparisson:org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor
junit.framework.AssertionFailedError: Failures on SerialVersionComparisson:org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor
at org.jboss.test.compatibility.test.SerialVersionUIDUnitTestCase.test402Compatibility(SerialVersionUIDUnitTestCase.java:118)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBMESSAGING-595) Rebind of clustered durable subscription fails
by Tim Fox (JIRA)
Rebind of clustered durable subscription fails
----------------------------------------------
Key: JBMESSAGING-595
URL: http://jira.jboss.com/jira/browse/JBMESSAGING-595
Project: JBoss Messaging
Issue Type: Feature Request
Affects Versions: 1.2.0.Alpha1
Reporter: Tim Fox
Assigned To: Tim Fox
Fix For: 1.2.0.Alpha2
Creating a durable subscription on a clustered topic, then unsubscribing then subscribing again with the same subscription name fails with:
17:59:46,875 ERROR [DefaultClusteredPostOffice] Caught Exception in RequestHandler
java.lang.IllegalArgumentException: 0 Binding already exists for node Id 1 queue name id1.sub1
at org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice.addBindingFromCluster(DefaultC
at org.jboss.messaging.core.plugin.postoffice.cluster.BindRequest.execute(BindRequest.java:55)
at org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice$PostOfficeRequestHandler.handl
va:1618)
at org.jgroups.blocks.MessageDispatcher.handle(MessageDispatcher.java:588)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:597)
at org.jgroups.blocks.RequestCorrelator.access$100(RequestCorrelator.java:38)
at org.jgroups.blocks.RequestCorrelator$Request.run(RequestCorrelator.java:886)
at org.jgroups.util.ReusableThread.run(ReusableThread.java:220)
at java.lang.Thread.run(Thread.java:534)
This is because when it is unsubscribed, the unbind is only done locally.
We need to make sure a clustered unbind is issued if the sub is clustered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBAS-3747) org.jboss.test.security.test.SRPUnitTestCase.testEchoArgs failure
by Len DiMaggio (JIRA)
org.jboss.test.security.test.SRPUnitTestCase.testEchoArgs failure
-----------------------------------------------------------------
Key: JBAS-3747
URL: http://jira.jboss.com/jira/browse/JBAS-3747
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Test Suite
Affects Versions: JBossAS-4.0.5.CR1
Environment: OS/Kernel/Arch = RHEL4/U4 - Linux 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 17:57:31 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
JVM = R26.4.0-63_CR284516-68626-1.5.0_06-20060926-0859-linux-x86_64
JBossAS = 20091002 Branch_4_0 of JBoss AS, http://anonsvn.jboss.org/repos/jbossas/branches/Branch_4_0
Reporter: Len DiMaggio
This test case:
org.jboss.test.security.test.SRPUnitTestCase.testEchoArgs
fails with JVM = R26.4.0-63_CR284516-68626-1.5.0_06-20060926-0859-linux-x86_64
The failure is seen if the test is run as a one-test or as part of the JBossAS test suite.
The error returned is:
Call to echo failed: Illegal key size or default parameters
junit.framework.AssertionFailedError: Call to echo failed: Illegal key size or default parameters
at org.jboss.test.security.test.SRPUnitTestCase.testEchoArgs(SRPUnitTestCase.java:107)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
at junit.extensions.TestSetup.run(TestSetup.java:23)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBESB-181) Provide a more convenient/obvious means of accessing the "current" object on the Message Body???
by Tom Fennelly (JIRA)
Provide a more convenient/obvious means of accessing the "current" object on the Message Body???
------------------------------------------------------------------------------------------------
Key: JBESB-181
URL: http://jira.jboss.com/jira/browse/JBESB-181
Project: JBoss ESB
Issue Type: Task
Security Level: Public (Everyone can see)
Components: ESB Core
Affects Versions: 4.0
Reporter: Tom Fennelly
Assigned To: Mark Little
Priority: Minor
Fix For: 4.0
ActionProcessors need to call "Message.getBody().get(CURRENT_OBJECT)" in order to access the "current" body Object. Is this not a little obscure? Would it not be more convenient/intuitive if the "current" object could be accessed via something like "Message.getBody().getCurrent()" - it could wrap "Message.getBody().get(CURRENT_OBJECT)" in the Body impl.
Also, should CURRENT_OBJECT be defined on the ActionProcessor or Body type? It's currently defined in ActionProcessor? Of course this would mean that the current "Message.getBody().get(CURRENT_OBJECT)" calls would all need to be modified to "Message.getBody().get(Body.CURRENT_OBJECT)", but I'd think that is clearer anyway.
Just some usability thoughts - feel free to delete the issus!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months