[Design of JBossCache] - Node locking and transactions
by manik.surtani@jboss.com
I'm kicking off this discussion in response to JBCACHE-923 and Jacek Halat's post on node locking algorithms on http://jboss.org/index.html?module=bb&op=viewtopic&p=4084417#4084417.
Most of the problems reported centre around a premise that a transaction manager may attempt to clean up timed out transactions (by rolling them back) in a separate thread.
Now this can lead to problems with the existing pessimistic lock interceptor since locks are obtained and held on Thread (in the non-tx case) or GlobalTransaction (in the tx case). This almost implies that only a single thread may at any time use a GlobalTransaction, and we do see problems when two threads (one being a cleanup rollback thread) try and use the same gtx at the same time.
1. App thread starts tx, writes to /a
2. App thread attempts to write to /a again
3. Tx times out, TM attempts a rollback in a separate thread
4. The write lock on /a is owned by the gtx, which means the rollback thread is allowed to restore the state of /a and the app thread is *also* allowed to change the state of /a in (2).
In addition to inconsistent state, this can also lead to stale locks.
Now a lot of these issues come from the fact that there is an assumption that the TM will not attempt a rollback in a different thread, simultaeous to the app thread working in the transaction. A proper fix would involve rearchitecting how locking is handled in the cache (and this is underway) but as a workaround, does it make sense to serialize access to the cache on a per-gtx basis?
1. Tx interceptor to maintain a list of 'currently working' gtxs.
2. Only allow one thread at a time up the interceptor chain per gtx, causing other threads to block.
This should effectively prevent such collissions. Keep in mind I haven't spent much time thinking about this solution yet - so by all means do tear it apart! :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085078#4085078
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085078
17 years, 1 month
[Design of POJO Server] - JBoss5 Maven issues
by alesj
Just to start a thread with current Maven2 issues when using it to build current trunk ...
For me it all starts with trying to get the initial build in order to be able to run Maven IDEA plugin to create all IDEA config files.
btw: How do other IDEA users (Bill, Emmanuel, ...) configure jbossas trunk?
Aha, having pom.xml in testsuite module would be nice too. ;-)
This is what I currently get:
anonymous wrote :
| [INFO] Scanning for projects...
| [INFO] Reactor build order:
| [INFO] JBoss Application Server (parent)
| [INFO] JBoss Application Server Main
| [INFO] JBoss Application Server Bootstrap
| [INFO] JBoss Application Server J2SE
| [INFO] JBoss Application Server MBeans
| [INFO] JBoss Application Server JMX
| [INFO] JBoss Application Server System
| [INFO] JBoss Application Server System JMX
| [INFO] JBoss Application Server Naming
| [INFO] JBoss Application Server Transaction
| [INFO] JBoss Application Server Security
| [INFO] JBoss Application Server Server
| [INFO] JBoss Application Server Deployment
| [INFO] JBoss Application Server JBossAS
| [INFO] JBoss Application Server JBossas-Remoting
| [INFO] JBoss Application Server JBossAS JMX Remoting
| [INFO] JBoss Application Server Messaging
| [INFO] JBoss Application Server JBossMQ
| [INFO] JBoss Application Server Cluster
| [INFO] JBoss Application Server Varia
| [INFO] JBoss Application Server IIOP
| [INFO] JBoss Application Server Aspects
| [INFO] JBoss Application Server Profile Service
| [INFO] JBoss Application Server Connector
| [INFO] JBoss Application Server Management
| [INFO] JBoss Application Server EJB3
| [INFO] JBoss Application Server Tomcat
| [INFO] JBoss Application Server Webservices
| [INFO] JBoss Application Server Hibernate Integration
| [INFO] JBoss Application Server Console
| [INFO] JBoss Application Server (aggregator)
| WAGON_VERSION: 1.0-beta-2
| [INFO] ----------------------------------------------------------------------------
| [INFO] Building JBoss Application Server (parent)
| [INFO] task-segment: [install]
| [INFO] ----------------------------------------------------------------------------
| [INFO] [site:attach-descriptor]
| [INFO] Preparing source:jar
| [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
| [INFO] No goals needed for project - skipping
| [INFO] [source:jar {execution: attach-sources}]
| [INFO] [jar:test-jar {execution: test-jar}]
| [WARNING] JAR will be empty - no content was marked for inclusion!
| [INFO] Building jar: C:\projects\jboss5\trunk\build\target\jboss-as-parent-5.0.0-SNAPSHOT-tests.jar
| [INFO] [install:install]
| [INFO] Installing C:\projects\jboss5\trunk\build\pom.xml to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-parent\5.0.0-SNAPSHOT\jboss-as-parent-5.0.0-SNAPSHOT.pom
| [INFO] Installing C:\projects\jboss5\trunk\build\target\jboss-as-parent-5.0.0-SNAPSHOT-tests.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-parent\5.0.0-SNAPSHOT\jboss-as-parent-5.0.0-SNAPSHOT-tests.jar
| [INFO] ----------------------------------------------------------------------------
| [INFO] Building JBoss Application Server Main
| [INFO] task-segment: [install]
| [INFO] ----------------------------------------------------------------------------
| [INFO] [resources:resources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:compile]
| [INFO] Compiling 9 source files to C:\projects\jboss5\trunk\main\target\classes
| [INFO] [resources:testResources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:testCompile]
| [INFO] No sources to compile
| [INFO] [surefire:test]
| [INFO] No tests to run.
| [INFO] [jar:jar]
| [INFO] Building jar: C:\projects\jboss5\trunk\main\target\jboss-as-main-5.0.0-SNAPSHOT.jar
| [INFO] Preparing source:jar
| [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
| [INFO] No goals needed for project - skipping
| [INFO] [source:jar {execution: attach-sources}]
| [INFO] Building jar: C:\projects\jboss5\trunk\main\target\jboss-as-main-5.0.0-SNAPSHOT-sources.jar
| [INFO] [jar:test-jar {execution: test-jar}]
| [WARNING] JAR will be empty - no content was marked for inclusion!
| [INFO] Building jar: C:\projects\jboss5\trunk\main\target\jboss-as-main-5.0.0-SNAPSHOT-tests.jar
| [INFO] [install:install]
| [INFO] Installing C:\projects\jboss5\trunk\main\target\jboss-as-main-5.0.0-SNAPSHOT.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-main\5.0.0-SNAPSHOT\jboss-as-main-5.0.0-SNAPSHOT.jar
| [INFO] Installing C:\projects\jboss5\trunk\main\target\jboss-as-main-5.0.0-SNAPSHOT-sources.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-main\5.0.0-SNAPSHOT\jboss-as-main-5.0.0-SNAPSHOT-sources.jar
| [INFO] Installing C:\projects\jboss5\trunk\main\target\jboss-as-main-5.0.0-SNAPSHOT-tests.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-main\5.0.0-SNAPSHOT\jboss-as-main-5.0.0-SNAPSHOT-tests.jar
| [INFO] ----------------------------------------------------------------------------
| [INFO] Building JBoss Application Server Bootstrap
| [INFO] task-segment: [install]
| [INFO] ----------------------------------------------------------------------------
| [INFO] [resources:resources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:compile]
| [INFO] Compiling 5 source files to C:\projects\jboss5\trunk\bootstrap\target\classes
| [INFO] [resources:testResources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:testCompile]
| [INFO] No sources to compile
| [INFO] [surefire:test]
| [INFO] No tests to run.
| [INFO] [jar:jar]
| [INFO] Building jar: C:\projects\jboss5\trunk\bootstrap\target\jboss-as-bootstrap-5.0.0-SNAPSHOT.jar
| [INFO] Preparing source:jar
| [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
| [INFO] No goals needed for project - skipping
| [INFO] [source:jar {execution: attach-sources}]
| [INFO] Building jar: C:\projects\jboss5\trunk\bootstrap\target\jboss-as-bootstrap-5.0.0-SNAPSHOT-sources.jar
| [INFO] [jar:test-jar {execution: test-jar}]
| [WARNING] JAR will be empty - no content was marked for inclusion!
| [INFO] Building jar: C:\projects\jboss5\trunk\bootstrap\target\jboss-as-bootstrap-5.0.0-SNAPSHOT-tests.jar
| [INFO] [install:install]
| [INFO] Installing C:\projects\jboss5\trunk\bootstrap\target\jboss-as-bootstrap-5.0.0-SNAPSHOT.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-bootstrap\5.0.0-SNAPSHOT\jboss-as-bootstrap-5.0.0-SNAPSHOT.jar
| [INFO] Installing C:\projects\jboss5\trunk\bootstrap\target\jboss-as-bootstrap-5.0.0-SNAPSHOT-sources.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-bootstrap\5.0.0-SNAPSHOT\jboss-as-bootstrap-5.0.0-SNAPSHOT-sources.jar
| [INFO] Installing C:\projects\jboss5\trunk\bootstrap\target\jboss-as-bootstrap-5.0.0-SNAPSHOT-tests.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-bootstrap\5.0.0-SNAPSHOT\jboss-as-bootstrap-5.0.0-SNAPSHOT-tests.jar
| [INFO] ----------------------------------------------------------------------------
| [INFO] Building JBoss Application Server J2SE
| [INFO] task-segment: [install]
| [INFO] ----------------------------------------------------------------------------
| [INFO] [resources:resources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:compile]
| [INFO] Compiling 222 source files to C:\projects\jboss5\trunk\j2se\target\classes
| [INFO] [resources:testResources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:testCompile]
| [INFO] Compiling 207 source files to C:\projects\jboss5\trunk\j2se\target\test-classes
| [INFO] [surefire:test]
| [INFO] Surefire report directory: C:\projects\jboss5\trunk\j2se\target\surefire-reports
| org.apache.maven.surefire.booter.SurefireExecutionException: null; nested exception is org.jboss.test.jmx.compliance.server.support.MyScreamingException: null
| org.jboss.test.jmx.compliance.server.support.MyScreamingException
| at org.jboss.test.jmx.compliance.server.support.ConstructorTest.(ConstructorTest.java:36)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at java.lang.Class.newInstance0(Class.java:350)
| at java.lang.Class.newInstance(Class.java:303)
| at org.apache.maven.surefire.testset.PojoTestSet.(PojoTestSet.java:55)
| at org.apache.maven.surefire.junit.JUnitDirectoryTestSuite.createTestSet(JUnitDirectoryTestSuite.java:64)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
| at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:150)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:111)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
| [ERROR] There are test failures.
| [INFO] [jar:jar]
| [INFO] Building jar: C:\projects\jboss5\trunk\j2se\target\jboss-as-j2se-5.0.0-SNAPSHOT.jar
| [INFO] Preparing source:jar
| [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
| [INFO] No goals needed for project - skipping
| [INFO] [source:jar {execution: attach-sources}]
| [INFO] Building jar: C:\projects\jboss5\trunk\j2se\target\jboss-as-j2se-5.0.0-SNAPSHOT-sources.jar
| [INFO] [jar:test-jar {execution: test-jar}]
| [INFO] Building jar: C:\projects\jboss5\trunk\j2se\target\jboss-as-j2se-5.0.0-SNAPSHOT-tests.jar
| [INFO] [install:install]
| [INFO] Installing C:\projects\jboss5\trunk\j2se\target\jboss-as-j2se-5.0.0-SNAPSHOT.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-j2se\5.0.0-SNAPSHOT\jboss-as-j2se-5.0.0-SNAPSHOT.jar
| [INFO] Installing C:\projects\jboss5\trunk\j2se\target\jboss-as-j2se-5.0.0-SNAPSHOT-sources.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-j2se\5.0.0-SNAPSHOT\jboss-as-j2se-5.0.0-SNAPSHOT-sources.jar
| [INFO] Installing C:\projects\jboss5\trunk\j2se\target\jboss-as-j2se-5.0.0-SNAPSHOT-tests.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-j2se\5.0.0-SNAPSHOT\jboss-as-j2se-5.0.0-SNAPSHOT-tests.jar
| [INFO] ----------------------------------------------------------------------------
| [INFO] Building JBoss Application Server MBeans
| [INFO] task-segment: [install]
| [INFO] ----------------------------------------------------------------------------
| [INFO] [resources:resources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:compile]
| [INFO] Compiling 84 source files to C:\projects\jboss5\trunk\mbeans\target\classes
| [INFO] [resources:testResources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:testCompile]
| [INFO] No sources to compile
| [INFO] [surefire:test]
| [INFO] No tests to run.
| [INFO] [jar:jar]
| [INFO] Building jar: C:\projects\jboss5\trunk\mbeans\target\jboss-as-mbeans-5.0.0-SNAPSHOT.jar
| [INFO] Preparing source:jar
| [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
| [INFO] No goals needed for project - skipping
| [INFO] [source:jar {execution: attach-sources}]
| [INFO] Building jar: C:\projects\jboss5\trunk\mbeans\target\jboss-as-mbeans-5.0.0-SNAPSHOT-sources.jar
| [INFO] [jar:test-jar {execution: test-jar}]
| [WARNING] JAR will be empty - no content was marked for inclusion!
| [INFO] Building jar: C:\projects\jboss5\trunk\mbeans\target\jboss-as-mbeans-5.0.0-SNAPSHOT-tests.jar
| [INFO] [install:install]
| [INFO] Installing C:\projects\jboss5\trunk\mbeans\target\jboss-as-mbeans-5.0.0-SNAPSHOT.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-mbeans\5.0.0-SNAPSHOT\jboss-as-mbeans-5.0.0-SNAPSHOT.jar
| [INFO] Installing C:\projects\jboss5\trunk\mbeans\target\jboss-as-mbeans-5.0.0-SNAPSHOT-sources.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-mbeans\5.0.0-SNAPSHOT\jboss-as-mbeans-5.0.0-SNAPSHOT-sources.jar
| [INFO] Installing C:\projects\jboss5\trunk\mbeans\target\jboss-as-mbeans-5.0.0-SNAPSHOT-tests.jar to C:\Documents and Settings\Ales\.m2\repository\org\jboss\jbossas\jboss-as-mbeans\5.0.0-SNAPSHOT\jboss-as-mbeans-5.0.0-SNAPSHOT-tests.jar
| [INFO] ----------------------------------------------------------------------------
| [INFO] Building JBoss Application Server JMX
| [INFO] task-segment: [install]
| [INFO] ----------------------------------------------------------------------------
| [INFO] [resources:resources]
| [INFO] Using default encoding to copy filtered resources.
| [INFO] [compiler:compile]
| [INFO] Compiling 131 source files to C:\projects\jboss5\trunk\jmx\target\classes
| [INFO] ------------------------------------------------------------------------
| [ERROR] BUILD FAILURE
| [INFO] ------------------------------------------------------------------------
| [INFO] Compilation failure
|
| C:\projects\jboss5\trunk\jmx\src\main\test\compliance\ComplianceSUITE.java:[69,49] package org.jboss.test.jmx.compliance does not exist
|
| C:\projects\jboss5\trunk\jmx\src\main\test\compliance\FullComplianceSUITE.java:[44,49] package org.jboss.test.jmx.compliance does not exist
|
| C:\projects\jboss5\trunk\jmx\src\main\test\serialization\SerializationSUITE.java:[47,55] package org.jboss.test.jmx.serialization does not exist
|
|
| [INFO] ------------------------------------------------------------------------
| [INFO] For more information, run Maven with the -e switch
| [INFO] ------------------------------------------------------------------------
| [INFO] Total time: 24 seconds
| [INFO] Finished at: Mon Sep 17 15:59:00 CEST 2007
| [INFO] Final Memory: 14M/43M
| [INFO] ------------------------------------------------------------------------
|
So, no initial build == no IDEA config files.
OK, the files get built, but are useless since there are no satisfied dependencies.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085064#4085064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085064
17 years, 1 month