Re: [jboss-user] [JBoss Microcontainer Development] - Benchmarking classloaders
by Kabir Khan
Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] replied to the discussion
"Benchmarking classloaders"
To view the discussion, visit: http://community.jboss.org/message/553790#553790
--------------------------------------------------------------
I have got some basic benchmarks working. Instead of using AS classes, I am now generating my own using Chiba's ClassFileWriter to have better control over what exists where. The classes are only generated if the target/generated-classes and target/generated-jars directories don't exist already. You tell it how many jars to create, how many packages per jar and how many classes per package. If you change these numbers, be sure to delete the target/generated-* directories. So, if 2 is selected for each of these it then creates the following jars:
interface0.jar:
org.jboss.test.interface0.pkg0.Interface0.class
org.jboss.test.interface0.pkg0.Interface1.class
org.jboss.test.interface0.pkg1.Interface0.class
org.jboss.test.interface0.pkg1.Interface1.class
interface1.jar:
org.jboss.test.interface1.pkg0.Interface0.class
org.jboss.test.interface1.pkg0.Interface1.class
org.jboss.test.interface1.pkg1.Interface0.class
org.jboss.test.interface1.pkg1.Interface1.class
abstract0.jar:
org.jboss.test.abstract0.pkg0.Abstract0.class
org.jboss.test.abstract0.pkg0.Abstract1.class
org.jboss.test.abstract0.pkg1.Abstract0.class
org.jboss.test.abstract0.pkg1.Abstract1.class
abstract1.jar:
org.jboss.test.abstract1.pkg0.Abstract0.class
org.jboss.test.abstract1.pkg0.Abstract1.class
org.jboss.test.abstract1.pkg1.Abstract0.class
org.jboss.test.abstract1.pkg1.Abstract1.class
impl0.jar:
org.jboss.test.impl0.pkg0.Impl0.class
org.jboss.test.impl0.pkg0.Impl1.class
org.jboss.test.impl0.pkg1.Impl0.class
org.jboss.test.impl0.pkg1.Impl1.class
impl1.jar:
org.jboss.test.impl1.pkg0.Impl0.class
org.jboss.test.impl1.pkg0.Impl1.class
org.jboss.test.impl1.pkg1.Impl0.class
org.jboss.test.impl1.pkg1.Impl1.class
An example of the expected inheritance hierarchies is:
class org.jboss.test.impl1.pkg1.Impl1 extends org.jboss.test.abstract1.pkg1.Abstract1{}
class org.jboss.test.abstract1.pkg1.Abstract1 implements org.jboss.test.interface1.pkg1.Interface1{}
I then create a classloader for each jar, with different classloading rules per test and try to load the Impl classes from the implx.jar loaders, which triggers searches for the superclasses/interfaces in the other classloaders.
Ales, can you take a look at how I am setting up the VFSClassLoaderFactories? I do this in the TestCase classes. The thing I found strange was that for the Module test I had to specify the packages as a capability as well as the module, but I'm not that familiar with how this works so maybe that's how it should be.
Running this a few times on a set of 50 jars with 10 packages per jar and 10 classes per package, I get the following results.:
Import/Export packages:
Deploying the VFSClassLoaderFactories and creating the loaders: 1862ms 1693ms 1847ms 1725ms 1706ms
Loading the classes: 5008ms 4883ms 4744ms 4893ms 5012ms
Export/ImportAll:
Deploying the VFSClassLoaderFactories and creating the loaders: 1657ms 1627ms 1659ms 1720ms 1573ms
Loading the classes: 4858ms 4693ms 4796ms 4714ms 4899ms
Import/Export module:
Deploying the VFSClassLoaderFactories and creating the loaders: 1785ms 1736ms 1766ms 1819ms 1901ms
Loading the classes: 4992ms 5609ms 5510ms 4991ms 5626ms
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/553790#553790]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 11 months
[jBPM] - jBPM 3.2: Trouble understanding RuntimeActions and fork/join
by Ruediger Herrmann
Ruediger Herrmann [http://community.jboss.org/people/ruediger.herrmann%40gmx.de] created the discussion
"jBPM 3.2: Trouble understanding RuntimeActions and fork/join"
To view the discussion, visit: http://community.jboss.org/message/553746#553746
--------------------------------------------------------------
I am having trouble in understanding the amount and order of runtimeActions being triggered in a process definition that contains a fork node. The process definition is rather simple, a fork node has two leaving transitions, each pointing to a plain node (called lane1 and lane2). Each of the two nodes has one leaving transition to one common join node. Apart from a start and end node, that's all. At runtime I want to be informed whenever a node is entered or left. Therefor I attached runtimeActions for Event.EVENTTYPE_NODE_ENTER and Event.EVENTTYPE_NODE_LEAVE to each node. The output is printed below: node-leave: StartState(start) node-enter: Fork(fork) node-leave: Fork(fork) node-enter: Node(lane1) node-leave: Fork(fork) node-enter: Node(lane2) node-leave: Node(lane1) node-enter: Join(join) node-leave: Node(lane2) node-enter: Join(join) node-leave: Join(join) node-enter: EndState(end) What puzzles me is that leave-Fork and enter-Join occur twice. The process instance is executed with the following code: void signalToken( Token token ) { Map children = token.getChildren(); if( children != null ) { Collection childTokens = children.values(); for( Token childToken : childTokens ) { signalToken( childToken ); } } if( !token.hasEnded() ) { token.signal(); } signalToken is initially called with processInstance.getRootToken() as the argument. Attached is a standalone snippet to reproduce what I described. Can anyone explain what is going on or what I am doing wrong? TIA Rüdiger
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/553746#553746]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 11 months