<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
How to re-compile a class loader
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/lavot">lavot</a> in <i>JBoss Microcontainer</i> - <a href="https://community.jboss.org/message/746164#746164">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm completely new here. I've been requested to help to improve perf on a project that runs under jboss 5.1.0.</p><p>We've done a jstack and most of the threads that run our code are blocked in the class loader in loadClass(). I've downloaded 2.09.GA jar of the class loader which seemed to improve a little the perf but now most of the threads are blocked in doLoad().</p><p>I've activated the traces for BaseClassLoader to try to understand which classes are loaded as after a few minutes of execution, I would have expected that all the classes would have been already loaded.</p><p>And that seems to be true as far as I saw:</p><p>2012-07-03 14:21:46,429 [WorkManager(2)-3] TRACE org.jboss.classloader.spi.base.BaseClassLoader - BaseClassLoader@c9447{vfszip:/opt/ESG/absapp/jboss-5.1.0.GA/server/prime/deploy/prime-cap-sms-ejb.jar/} loadClass ...capabilities.common.adapter.CapOutgoingAdapterApi resolve=false</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2012-07-03 14:21:46,431 [WorkManager(2)-3] TRACE org.jboss.classloader.spi.base.BaseClassLoader - BaseClassLoader@c9447{vfszip:/opt/ESG/absapp/jboss-5.1.0.GA/server/prime/deploy/prime-cap-sms-ejb.jar/} already loaded class interface ...capabilities.common.adapter.CapOutgoingAdapterApi{cl=BaseClassLoader@c9447{vfszip:/opt/ESG/absapp/jboss-5.1.0.GA/server/prime/deploy/prime-cap-sms-ejb.jar/} codeSource=(jar:file:/opt/ESG/absapp/jboss-5.1.0.GA/server/prime/deploy/prime-cap-sms-ejb.jar!/ <no signer certificates>)}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Therefore, I don't understand why my class loader goes to doLoad() and then there gets blocked on the synchronize.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>So, after that long introduction, here is my point. I'd like to understand better what is done in the class loader. So, I've decided to recompile a class loader with more traces but I failed. Could someone help me ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I checked out the code:</p><p><span>c:\Program Files (x86)\Apache-Subversion-1.7.5\bin\svn.exe" co </span><a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbossas/projects/jboss-cl/tags/2.0.9.GA" target="_blank">http://anonsvn.jboss.org/repos/jbossas/projects/jboss-cl/tags/2.0.9.GA</a><span> 2.0.9.GA</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>And tried to compile:</p><p>mvn clean install</p><p>And got what I didn't understand:</p><p>[INFO] Scanning for projects...</p><p>[INFO] Reactor build order:</p><p>[INFO]   JBoss ClassLoader Parent POM</p><p>[INFO]   JBoss ClassLoader</p><p>[INFO]   JBoss ClassLoading</p><p>[INFO]   JBoss ClassLoading VFS</p><p>[INFO]   JBoss ClassLoader Distribution Build</p><p>[INFO] ------------------------------------------------------------------------</p><p>[INFO] Building JBoss ClassLoader Parent POM</p><p>[INFO]    task-segment: [clean, install]</p><p>[INFO] ------------------------------------------------------------------------</p><p>[INFO] [clean:clean {execution: default-clean}]</p><p>[INFO] [enforcer:enforce {execution: enforce-plugin-versions}]</p><p>[INFO] [enforcer:enforce {execution: enforce-java-version}]</p><p>[INFO] [enforcer:enforce {execution: enforce-maven-version}]</p><p>[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]</p><p>[INFO] [source:jar-no-fork {execution: attach-sources}]</p><p>[INFO] [install:install {execution: default-install}]</p><p>[INFO] Installing C:\Users\Lionel\Documents\Dev\JBOSS_CL\2.</p><p>0.9.GA\pom.xml to C:\Users\Lionel\Documents\M2_REPO\reposit</p><p>ory\org\jboss\cl\jboss-cl\2.0.9.GA\jboss-cl-2.0.9.GA.pom</p><p>[INFO] ------------------------------------------------------------------------</p><p>[INFO] Building JBoss ClassLoader</p><p>[INFO]    task-segment: [clean, install]</p><p>[INFO] ------------------------------------------------------------------------</p><p>[INFO] [clean:clean {execution: default-clean}]</p><p>[INFO] Deleting file set: C:\Users\Lionel\Documents\Dev\JBO</p><p>SS_CL\2.0.9.GA\classloader\target (included: [**], excluded: [])</p><p>[INFO] [enforcer:enforce {execution: enforce-plugin-versions}]</p><p>[INFO] [enforcer:enforce {execution: enforce-java-version}]</p><p>[INFO] [enforcer:enforce {execution: enforce-maven-version}]</p><p>[INFO] [resources:resources {execution: default-resources}]</p><p>[INFO] Using 'UTF-8' encoding to copy filtered resources.</p><p>[INFO] skip non existing resourceDirectory C:\Users\Lionel\Documents\</p><p>Dev\JBOSS_CL\2.0.9.GA\classloader\src\main\resources</p><p>[INFO] [compiler:compile {execution: default-compile}]</p><p>[INFO] Compiling 52 source files to C:\Users\Lionel\Documents\</p><p>Dev\JBOSS_CL\2.0.9.GA\classloader\target\classes</p><p>[INFO] ------------------------------------------------------------------------</p><p>[ERROR] BUILD FAILURE</p><p>[INFO] ------------------------------------------------------------------------</p><p>[INFO] Compilation failure</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>could not parse error message: warning: [options] bootstrap class path not set i</p><p>n conjunction with -source 1.5</p><p>C:\Users\Lionel\Documents\Dev\JBOSS_CL\2.0.9.GA\classloader</p><p>\src\main\java\org\jboss\classloader\spi\base\BaseClassLoader.java:115: warning:</p><p> [deprecation] isDebugEnabled() in Logger has been deprecated</p><p>      if (log.isDebugEnabled())</p><p>             ^</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>C:\Users\Lionel\DocumentsDev\JBOSS_CL\2.0.9.GA\classloader</p><p>\src\main\java\org\jboss\classloader\test\support\IsolatedClassLoaderTest.java:[</p><p>61,22] error: name clash: suite(Class<?>) in IsolatedClassLoaderTest and suite(C</p><p>lass) in AbstractTestCaseWithSetup have the same erasure, yet neither hides the</p><p>other</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>[INFO] ------------------------------------------------------------------------</p><p>[INFO] For more information, run Maven with the -e switch</p><p>[INFO] ------------------------------------------------------------------------</p><p>[INFO] Total time: 5 seconds</p><p>[INFO] Finished at: Wed Jul 04 21:02:32 CEST 2012</p><p>[INFO] Final Memory: 32M/342M</p><p>[INFO] ------------------------------------------------------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks for help.</p><p>Lionel</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/746164#746164">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Microcontainer at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>