[Design of AOP on JBoss (Aspects/JBoss)] - Modularising the appserver bootstrap
by adrian@jboss.org
WRT: https://jira.jboss.org/jira/browse/JBAS-5535
I never really followed up on this, but the reason why this issue has stalled
is because AOP is introducing a ciruclar dependency in the bootstrap.
AspectManager -> scoping policy -> deployment unit -> main deployer -> jmx -> aop (via @JMX)
This means we can't properly setup the bootstrap classloaders to be modular,
see the FIXMEs in conf/classloader.xml
| <classloader name="bootstrap-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
| <!-- FIXME Move to Deployers -->
| <root>${jboss.lib.url}/jboss-deployers-core-spi.jar</root>
| <root>${jboss.lib.url}/jboss-deployers-core.jar</root>
| <root>${jboss.lib.url}/jboss-deployers-client-spi.jar</root>
| <root>${jboss.lib.url}/jboss-deployers-client.jar</root>
| <root>${jboss.lib.url}/jboss-deployers-structure-spi.jar</root>
| <root>${jboss.lib.url}/jboss-deployers-spi.jar</root>
| <root>${jboss.lib.url}/jboss-deployers-impl.jar</root>
| <root>${jboss.lib.url}/jboss-deployers-vfs-spi.jar</root>
| <root>${jboss.lib.url}/jboss-deployers-vfs.jar</root>
| <!-- System -->
| <root>${jboss.lib.url}/jboss-system.jar</root>
| <!-- FIXME Move to JMX -->
| <root>${jboss.lib.url}/jboss-j2se.jar</root>
| <root>${jboss.lib.url}/jboss-mbeans.jar</root>
| <root>${jboss.lib.url}/jboss-jmx.jar</root>
| <root>${jboss.lib.url}/jboss-system-jmx.jar</root>
| <root>${jboss.lib.url}/dom4j.jar</root>
| <!-- JAXB impl here, api is in endorsed -->
| <root>${jboss.lib.url}/jaxb-impl.jar</root>
| <!-- STAX2 impl here, api is in endorsed -->
| <root>${jboss.lib.url}/wstx.jar</root>
| </classloader>
|
The fix would to refactor the VFSClassLoaderScopingPolicy
such that the deployment logic is in the deployers which just invoke the
registerClassLoader()
i.e. remove its dependency on the deployment layer
That way we can bootstrap the AspectManager before the deployers and JMX
are even loaded and it becomes independent of this implementation detail.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176518#4176518
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176518
17 years, 6 months
[Design of JBoss jBPM] - Major refactoring of the jbpm3 core test suite
by thomas.diesler@jboss.com
Folks,
https://jira.jboss.org/jira/browse/JBPM-1733
I the search for a solution to the "schemaCreate() on setUp()" it became apparent that dropping/creating the schema on setup for every test (i.e. 300 times) during the testrun is not a valid option.
It is only slightly better, if not equally bad, to clear the schema on setup. This is because the code for clearing the schema currently does this is a very "unintelligent" way by dropping/recreating foreign key constraints before deleting table content in an arbitrary order. This approach is invalid because it requires the jbpmtest user to have alter table privileges and also executes a very large number of DLL statements.
Rather the opposite should be tested, which is that an "ordinary" jbpm user does not have the privileges to alter jbpm tables.
JUnit works on the premises that a test sets up its own fixture and tears it down after ward. Generally, it is incorrect to delegate the cleanup of test N to setup of test N+1. Only test N can know what records have been created and should be removed afterwards.
I refactored the testsuite according to the above, with the result that neither createSchema() nor clearSchema() is called during setUp or tearDown.
As a result, the execution time of mysql tests drops from 25min to 8min
http://jbws.dyndns.org:8280/hudson/job/jBPM-Matrix/container=jboss422,dat...
and the execution time of postgresql tests drops from 5h to 20min, which allows them to run at all.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176501#4176501
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176501
17 years, 6 months