[jboss-dev] Improving scanning performance
Scott Marlow
smarlow at redhat.com
Tue Jun 16 08:24:58 EDT 2009
Ales Justin wrote:
>> Yes, with jboss-scanning.xml which has the following contents. I
>> ended up putting a copy of this file in almost every
>> juddi-service.sar folder but still see trace messages during boot,
>> indicating that juddi.jar classes are being scanned for annotation.
>> The trick of including "noop" seems to work at the moment (intention
>> is to exclude scanning of all classes in juddi.jar).
>> <scanning xmlns="urn:jboss:scanning:1.0">
>> <path name="juddi.jar">
>> <include name="noop"/>
>> </path>
>> <path name="juddi-saaj.jar">
>> <include name="noop"/>
>> </path>
>> <path name="juddi-service.jar">
>> <include name="noop"/>
>> </path>
>> <path name="scout.jar">
>> <include name="noop"/>
>> </path>
>> <path name="juddi-service.sar/juddi.war/WEB-INF/classes">
>> <include name="noop"/>
>> </path>
>> </scanning>
>>
>> The important target to exclude above is "juddi.jar" as it contains
>> the classes that we seem to scan for annotations about 400 times
>> (only when starting the "all" profile).
>
> You could simply have just a single noop path.
>
>>>> Do we need to juddi-service.sar to
>>>> server/target/etc/deployers/metadata-deployer-jboss-beans.xml?
>>>> Other service archives are listed there but not the UDDI service
>>>> (only include in the AS/server/all profile).
>>>
>>> Sure, as I doubt it uses any of the EJB3 annotations to describe its
>>> services.
>>>
>>> I didn't update that list for a while now.
>>> I can check if you still have issues, just let me know.
>>
>> Is there anything special that we have to do in the AS to enable
>> jboss-scanning.xml to prevent annotation scanning in a service
>> archive like "deploy/juddi-service.sar"?
>
> No.
> Why?
I'm trying to understand what the possible reasons are for
jboss-scanning.xml not working for the juddi-service.sar. If this
should work, then I probably did something wrong. Are there any trace
messages that will tell me if the jboss-scanning.xml file is being read?
I don't see any indications that we read the jboss-scanning.xml for
juddi-service.sar. I do see log messages for other deployments:
"
2009-06-15 17:35:24,365 TRACE
[org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext]
(main) Found jboss-scanning.xml in WEB-INF
2009-06-15 17:35:24,365 DEBUG
[org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper] (main)
Parsing file:
FileHandler at 23098803[path=httpha-invoker.sar/invoker.war/WEB-INF/jboss-scanning.xml
context=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/
real=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/httpha-invoker.sar/invoker.war/WEB-INF/jboss-scanning.xml]
for type: class
org.jboss.deployers.plugins.annotations.AbstractScanningMetaData
2009-06-15 17:35:24,379 DEBUG
[org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper] (main)
Parsed file:
FileHandler at 23098803[path=httpha-invoker.sar/invoker.war/WEB-INF/jboss-scanning.xml
context=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/
real=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/httpha-invoker.sar/invoker.war/WEB-INF/jboss-scanning.xml]
to: org.jboss.deployers.plugins.annotations.AbstractScanningMetaData at 8bed44
2009-06-15 17:35:24,805 TRACE
[org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext]
(main) Found jboss-scanning.xml in META-INF
2009-06-15 17:35:24,805 DEBUG
[org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper] (main)
Parsing file:
FileHandler at 5516771[path=cluster/jboss-cache-manager.sar/META-INF/jboss-scanning.xml
context=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/
real=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-scanning.xml]
for type: class
org.jboss.deployers.plugins.annotations.AbstractScanningMetaData
2009-06-15 17:35:24,811 DEBUG
[org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper] (main)
Parsed file:
FileHandler at 5516771[path=cluster/jboss-cache-manager.sar/META-INF/jboss-scanning.xml
context=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/
real=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-scanning.xml]
to: org.jboss.deployers.plugins.annotations.AbstractScanningMetaData at e77cbd
2009-06-15 17:35:24,843 TRACE
[org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext]
(main) Found jboss-scanning.xml in META-INF
2009-06-15 17:35:24,843 DEBUG
[org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper] (main)
Parsing file:
FileHandler at 16176900[path=jbossweb.sar/META-INF/jboss-scanning.xml
context=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/
real=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/jbossweb.sar/META-INF/jboss-scanning.xml]
for type: class
org.jboss.deployers.plugins.annotations.AbstractScanningMetaData
2009-06-15 17:35:24,849 DEBUG
[org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper] (main)
Parsed file:
FileHandler at 16176900[path=jbossweb.sar/META-INF/jboss-scanning.xml
context=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/
real=file:/work/as/trunk/build/output/jboss-6.0.0.Alpha1/server/all/deploy/jbossweb.sar/META-INF/jboss-scanning.xml]
to: org.jboss.deployers.plugins.annotations.AbstractScanningMetaData at 144311c
"
Here are the contents of my currently hacked juddi-service.sar tree. I
do have jboss-scanning.xml in the juddi-service.sar/META-INF folder:
|-- META-INF
| |-- MANIFEST.MF
| |-- ddl
| | |-- juddi_create_db.ddl
| | |-- juddi_data.ddl
| | `-- juddi_drop_db.ddl
| |-- jboss-scanning.xml
| `-- jboss-service.xml
|-- jboss-scanning.xml
|-- juddi-saaj.jar
|-- juddi-service.jar
|-- juddi.jar
|-- juddi.war
| |-- WEB-INF
| | |-- classes
| | | `-- org
| | | `-- jboss
| | | `-- jaxr
| | | `-- juddi
| | | `-- JUDDIServlet.class
| | |-- jboss-scanning.xml
| | |-- jboss-web.xml
| | |-- juddi.properties
| | `-- web.xml
| |-- index.html
| `-- styles.css
`-- scout.jar
>
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
More information about the jboss-development
mailing list