[JBoss Microcontainer Development] - JBoss Reflect Performance Javassist vs Introspection
by Kabir Khan
Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] created the discussion
"JBoss Reflect Performance Javassist vs Introspection"
To view the discussion, visit: http://community.jboss.org/message/537409#537409
--------------------------------------------------------------
I have created a simple benchmark where I test the performance of different things using the different implementations. It can be found at https://svn.jboss.org/repos/jbossas/projects/jboss-reflect/trunk/src/test... https://svn.jboss.org/repos/jbossas/projects/jboss-reflect/trunk/src/test...
It first generates 100 classes, each with 100 fields and 100 methods, then it:
* A) Obtains a ClassInfo for each class
* B) Goes through each class and calls getDeclaredField() and getDeclaredMethod() for each field/method. This is done 50 times
* C) Calls FieldInfo.get/set and MethodInfo.get/set once for each field/method
* D) Same as C, but now it happens 50 times
Here are the times:
>
> ========== IntrospectionTypeInfoFactory
>
> A - Creating 100 ClassInfos 141ms
>
> B - Getting 100 fields and methods for 100 classes 50 times 1446ms
>
> C - First accessing 100 fields and methods for 100 classes 50 times 116ms
>
> D - Accessing 100 fields and methods for 100 classes 50 times 3545ms
>
> Done!
>
>
>
>
> ========== JavassistTypeInfoFactory
>
> A - Creating 100 ClassInfos 164ms
>
> B - Getting 100 fields and methods for 100 classes 50 times 820ms
>
> C - First accessing 100 fields and methods for 100 classes 50 times 4557ms
>
> D - Accessing 100 fields and methods for 100 classes 50 times 272ms
>
> Done!
>
* Creating the ClassInfos (A) takes about the same time with the two implementations.
* Calling getDeclaredMethod()/-Field() (B) is about twice as fast using Javassist as introspection.
* The first time a joinpoint is invoked is very slow with Javassist (due to generating the class), while subsequent calls are very fast
I'll profile C to see if it can be made faster somehow. Although, 20,000 classes are created so my guess is that creating an output stream for the class bytes for each class and then it with the classloader is the real overhead
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/537409#537409]
Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[JBoss Tools] - Building JBoss Tools Documentaion
by Svetlana Mukhina
Svetlana Mukhina [http://community.jboss.org/people/smukhina] modified the document:
"Building JBoss Tools Documentaion"
To view the document, visit: http://community.jboss.org/docs/DOC-13341
--------------------------------------------------------------
You can download a folder with a plug-in either from a Anonymous SVN (http://anonsvn.jboss.org/repos/jbosstools) or a Committer SVN (https://svn.jboss.org/repos/jbosstools) ( if you have commiter rights) repsositories . In the plug-in's folder you will find a directory with documentation.This instruction explains how you can build the documentation.
h3. Prerequisites
1.Maven building tool
2.You need to make sure you have downloaded all required files and folder from the repository:
a) Plug-in folder
b) the +*documentation*+ folder
3.Maven requires a number of plug-ins (jDocBook etc.) to generate JBoss Tools documentation and therefore you need to specify where Maven can download those plug-ins. The easiest way is to create a new profile in the Maven configuration file (*+settings.xml+*). You will find the file in *%M2_HOME%/conf/* or *%USER_HOME%/.m2/*. Open the *+settings.xml+* and add the following profile:
<profile>
<id>documentation</id>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/1</url>
<layout>legacy</layout>
</repository>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
<id>repository.jboss.com</id>
<name>Jboss Repository for Maven</name>
<url>http://repository.jboss.com/maven2/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
<id>repository.jboss.com</id>
<name>Jboss Repository for Maven</name>
<url> http://repository.jboss.com/maven2/ </url>
<layout>default</layout>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>snapshots.jboss.org</id>
<name>Jboss Snapshots Repository for Maven</name>
<url>http://snapshots.jboss.org/maven2/</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
</profile>
Then you need to activate the profile if you want to use it permanently. Find the +<activeProfiles>+ tag and add this line as a child element:
<activeProfile>documentation</activeProfile>
Otherwise you should explicitly activate the profile with *-P profile_name* option while building the documentaion.
h3. Building Steps
So, you checked out the plug-in for which you want to build documentation and the documentation folder. And now you can proceed to building the documentation.
1.Find the +*pom.xml*+ file, that is responsible for building the documentation, in the plug-in folder you downloaded. Normally it’s located in “/docs/reference”.
2.Run *mvn clean install* or *mvn clean install -P profile_name* (if you didn't activate your profile in Maven's *+settings.xml+*) command in the folder with *+pom.xml+* to start building the documentation.
Example:
user@user-desktop:/home/user/trunk/seam/docs/reference$ mvn clean install
3.If everything is configured correctly you will see a “BUILD SUCCESSFUL” message. You will also see a generated *+target+* folder that contains the built documentation.
Example:
To open the HTML version of the “Seam Dev Tools Reference Guide” guide you need to proceed to
user@user-desktop:/home/user/trunk/seam/docs/seam/docs/reference/target/docbook/publish/en-US/html_single
and open index.html file.
h3. Documentation Profiles
There are 3 profiles that you can build documentation with:
*release* builds release documentation with “new” or “updated” markers next to the corresponding chapters and sections titles
*releaseJBDS* builds release documentation with Jboss.com styles for commercial products
> Do not forget to redeploy "jbosstools-jdocbook-style" and "jbosstools-docbook-xslt" if the have been changed.
> In order to redeploy you should run 'mvn deploy' from the proper directory. You shoudl also have necessary credentials to deploy to the http://snapshots.jboss.org/maven2
*diffmk* builds documentation with markers highlighting changes comparing to the previous release version and sets “new” or “updated” markers next to the corresponding chapters and sections titles.*Note:* Please make sure that you have the master_output.xml file (normally the file can be found in \pluginName\docs\reference\en\) as a new guide may not have such file since there's nothing to compare with.
This command launches building documentation with a profile.
mvn install -Pprofile_name
By default, with no profile specified, Night Build docs are generated.
In order to build all the guide from one place you need to have JBoss Tools trunk checked out then cd to JBoss_tools_trunk/documentation/jbds-docs/ to build JBDS guides with jboss.com styles or to JBoss_tools_trunk/documentation/jboss-tools-docs to build JBoss Tools guides.
and run
mvn assembly:assembly
You can optionally use a profile in this command.
mvn assembly:assembly -Pprofile_name
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-13341]
Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
16 years
[JBoss Tools] - Building JBoss Tools Documentaion
by Svetlana Mukhina
Svetlana Mukhina [http://community.jboss.org/people/smukhina] modified the document:
"Building JBoss Tools Documentaion"
To view the document, visit: http://community.jboss.org/docs/DOC-13341
--------------------------------------------------------------
You can download a folder with a plug-in either from a Anonymous SVN (http://anonsvn.jboss.org/repos/jbosstools) or a Committer SVN (https://svn.jboss.org/repos/jbosstools) ( if you have commiter rights) repsositories . In the plug-in's folder you will find a directory with documentation.This instruction explains how you can build the documentation.
h3. Prerequisites
1.Maven building tool
2.You need to make sure you have downloaded all required files and folder from the repository:
a) Plug-in folder
b) the +*documentation*+ folder
3.Maven requires a number of plug-ins (jDocBook etc.) to generate JBoss Tools documentation and therefore you need to specify where Maven can download those plug-ins. The easiest way is to create a new profile in the Maven configuration file (*+settings.xml+*). You will find the file in *%M2_HOME%/conf/* or *%USER_HOME%/.m2/*. Open the *+settings.xml+* and add the following profile:
<profile>
<id>documentation</id>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/1</url>
<layout>legacy</layout>
</repository>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
<id>repository.jboss.com</id>
<name>Jboss Repository for Maven</name>
<url>http://repository.jboss.com/maven2/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
<id>repository.jboss.com</id>
<name>Jboss Repository for Maven</name>
<url> http://repository.jboss.com/maven2/ </url>
<layout>default</layout>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>snapshots.jboss.org</id>
<name>Jboss Snapshots Repository for Maven</name>
<url>http://snapshots.jboss.org/maven2/</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
</profile>
Then you need to activate the profile if you want to use it permanently. Find the +<activeProfiles>+ tag and add this line as a child element:
<activeProfile>documentation</activeProfile>
Otherwise you should explicitly activate the profile with *-P profile_name* option while building the documentaion.
h3. Building Steps
So, you checked out the plug-in for which you want to build documentation and the documentation folder. And now you can proceed to building the documentation.
1.Find the +*pom.xml*+ file, that is responsible for building the documentation, in the plug-in folder you downloaded. Normally it’s located in “/docs/reference”.
2.Run *mvn clean install* or *mvn clean install -P profile_name* (if you didn't activate your profile in Maven's *+settings.xml+*) command in the folder with *+pom.xml+* to start building the documentation.
Example:
user@user-desktop:/home/user/trunk/seam/docs/reference$ mvn clean install
3.If everything is configured correctly you will see a “BUILD SUCCESSFUL” message. You will also see a generated *+target+* folder that contains the built documentation.
Example:
To open the HTML version of the “Seam Dev Tools Reference Guide” guide you need to proceed to
user@user-desktop:/home/user/trunk/seam/docs/seam/docs/reference/target/docbook/publish/en-US/html_single
and open index.html file.
h3. Documentation Profiles
There are 3 profiles that you can build documentation with:
*release* builds release documentation with “new” or “updated” markers next to the corresponding chapters and sections titles
*releaseJBDS* builds release documentation with Jboss.com styles for commercial products
*diffmk* builds documentation with markers highlighting changes comparing to the previous release version and sets “new” or “updated” markers next to the corresponding chapters and sections titles.*Note:* Please make sure that you have the master_output.xml file (normally the file can be found in \pluginName\docs\reference\en\) as a new guide may not have such file since there's nothing to compare with.
This command launches building documentation with a profile.
mvn install -Pprofile_name
By default, with no profile specified, Night Build docs are generated.
In order to build all the guide from one place you need to have JBoss Tools trunk checked out then cd to JBoss_tools_trunk/documentation/jbds-docs/ to build JBDS guides with jboss.com styles or to JBoss_tools_trunk/documentation/jboss-tools-docs to build JBoss Tools guides.
and run
mvn assembly:assembly
You can optionally use a profile in this command.
mvn assembly:assembly -Pprofile_name
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-13341]
Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
16 years
Re: [jboss-user] [JBoss Microcontainer] - MC - Better error reporting?
by jaikiran pai
jaikiran pai [http://community.jboss.org/people/jaikiran] replied to the discussion
"MC - Better error reporting?"
To view the discussion, visit: http://community.jboss.org/message/537391#537391
--------------------------------------------------------------
I haven't (yet) looked at the code responsible for logging this, so I can't propose any changes on that front. But I can make some general suggestions about the messages (with the previously posted logs as an example):
1)
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.ejb3:module=myapp,component=MyNoInterfaceSFSB,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:component=MyNoInterfaceSFSB,module=myapp" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSFSB,module=myapp' **")
So this is saying that a service is missing a dependency which was expected to be in Installed state but is actually in "** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSFSB,module=myapp' **"
What does "** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSFSB,module=myapp' **" mean in the context of that message? Maybe it should be:
Dependency "jboss.naming:component=MyNoInterfaceSFSB,module=myapp" (should be in state "Installed", but is actually missing)
2) This one is more of formatting the error messages - In its current form multiple deployments which are missing dependencies are logged together like:
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.ejb3:module=myapp,component=MyNoInterfaceSFSB,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:component=MyNoInterfaceSFSB,module=myapp" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSFSB,module=myapp' **")
Deployment "jboss.ejb3:module=myapp,component=MyNoInterfaceSLSB,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:component=MyNoInterfaceSLSB,module=myapp" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSLSB,module=myapp' **")
Deployment "jboss.j2ee:jar=myapp.war,name=MyNoInterfaceSFSB,service=EJB3" is missing the following dependencies:
Dependency "jboss.ejb3:component=MyNoInterfaceSFSB,module=myapp,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")
Deployment "jboss.j2ee:jar=myapp.war,name=MyNoInterfaceSFSB,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:jar=myapp.war,name=MyNoInterfaceSFSB,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
...
When this gets logged, it's very difficult to distinguish the different deployments. It just "appears" like some random text dumped out on the console. Maybe each deployment should be separated by an empty line, so that each one stands out:
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.ejb3:module=myapp,component=MyNoInterfaceSFSB,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:component=MyNoInterfaceSFSB,module=myapp" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSFSB,module=myapp' **")
Deployment "jboss.ejb3:module=myapp,component=MyNoInterfaceSLSB,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:component=MyNoInterfaceSLSB,module=myapp" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSLSB,module=myapp' **")
Deployment "jboss.j2ee:jar=myapp.war,name=MyNoInterfaceSFSB,service=EJB3" is missing the following dependencies:
Dependency "jboss.ejb3:component=MyNoInterfaceSFSB,module=myapp,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")
Deployment "jboss.j2ee:jar=myapp.war,name=MyNoInterfaceSFSB,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:jar=myapp.war,name=MyNoInterfaceSFSB,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
3) The other section "Deployments in ERROR":
DEPLOYMENTS IN ERROR:
Deployment "jboss.naming:component=MyNoInterfaceSLSB,module=myapp" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSLSB,module=myapp' **
Deployment "jboss.naming:component=MyNoInterfaceSFSB,module=myapp" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSFSB,module=myapp' **
Deployment "jboss.ejb3:component=MyNoInterfaceSLSB,module=myapp,service=EjbEncFactory" is in error due to the following reason(s): Described
Deployment "jboss.ejb3:component=MyNoInterfaceSFSB,module=myapp,service=EjbEncFactory" is in error due to the following reason(s): Described
This section (atleast in this specific deployment) is confusing and redundant. The message:
Deployment "jboss.naming:component=MyNoInterfaceSLSB,module=myapp" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:component=MyNoInterfaceSLSB,module=myapp' **
is trying to say that jboss.naming:component=MyNoInterfaceSLSB,module=myapp has not been deployed (i.e. is missing). This was already conveyed in the earlier "Deployments missing dependencies" section. Why repeat it again? Also the ** NOT FOUND Depends...", as in the earlier case, is confusing.
The other message:
Deployment "jboss.ejb3:component=MyNoInterfaceSLSB,module=myapp,service=EjbEncFactory" is in error due to the following reason(s): Described
This too has already been conveyed (in a slightly different form) in the earlier "Deployments missing dependencies" section. So why repeat again? :)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/537391#537391]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
DevStudio and JBPM
by Bender Heri
Hello
I am quite new to JBoss. I have installed the Developer Studio 3.0 doing some testing. I have ported successfully several of the seam examples (JSP) to EAR-Projects which were generated by the seam project wizard (xhtml with templates). I also succeeded in porting the TodoList example after a lot of try and error with the jbpm stuff, after having put the needed files to todoList-ear/EARContent folder (todo.jpdl.xml, jbmp.cfg.xml and hibernate.cfg.xml). If I put these Files in the top level project todoList (regardless if in the root or in the WebContent folder) the deploy fails with the error that the todo.jpdl.xml is not found.
Now I want to add a process definition to another EAR project (with the same structure). I tried the wizards in the new menu of the Developer Studio:
- jBPM 3 Process Definition: The source folder obviously cannot be the XXX-ear project (like I managed above in the todoList example). Only the other sub projects are listed (XXX and XXX-ejb) when I click the browse button. Defining the XXX-ear folder manually then the error "Source folder is not valid" is shown.
- jBPM 3 Project: The wizard ask for a jbpm runtime. No defaults. What the hell is this? Short search in Internet showed me the UserGuide of jBPM (http://docs.jboss.com/jbpm/v4/userguide/html_single/#d0e140) where the Getting started chapter describes the download and installation process of a whole new package, without mentioning JBoss Developer Studio or eclipse. But: Product description of JBoss Developer Studio notes that JBoss jBPM is fully integrated!.
What now? I am very confused what to do now. Shall I just copy the sample process definition file to my project XXX-ear and do all by hand? But what are the wizards good for?
It would be nice if someone could explain on this topic.
Heri Bender
16 years