<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Scanning Java Annotations at Runtime</title>
	<atom:link href="http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/feed/" rel="self" type="application/rss+xml" />
	<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/</link>
	<description>tech talk radio</description>
	<pubDate>Sat, 19 Jul 2008 13:42:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: Cristiano</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1889</link>
		<dc:creator>Cristiano</dc:creator>
		<pubDate>Mon, 05 May 2008 11:14:51 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1889</guid>
		<description>I have developed my own class that recursively scans a dir (in my case, JBoss deploy dir) getting into any zip/rar/ear/jar/war... and archives contained inside up to any depth level. It checks all existing classes using javassist to examine bytecode (thanks for your tips) and finds the annotations I need (when found, I load the class and register it in my Class Registry). About 150 lines of code.</description>
		<content:encoded><![CDATA[<p>I have developed my own class that recursively scans a dir (in my case, JBoss deploy dir) getting into any zip/rar/ear/jar/war&#8230; and archives contained inside up to any depth level. It checks all existing classes using javassist to examine bytecode (thanks for your tips) and finds the annotations I need (when found, I load the class and register it in my Class Registry). About 150 lines of code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Professional Software Development &#187; Working with Java 5 Annotations</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1888</link>
		<dc:creator>Professional Software Development &#187; Working with Java 5 Annotations</dc:creator>
		<pubDate>Sun, 04 May 2008 21:09:28 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1888</guid>
		<description>[...] all classes with a particular annotation. This is difficult functionality to provide for a number of reasons explained by Bill Burke, but since it is so valuable various open source projects such as Spring and JBoss have implemented [...]</description>
		<content:encoded><![CDATA[<p>[...] all classes with a particular annotation. This is difficult functionality to provide for a number of reasons explained by Bill Burke, but since it is so valuable various open source projects such as Spring and JBoss have implemented [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cristiano</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1882</link>
		<dc:creator>Cristiano</dc:creator>
		<pubDate>Mon, 21 Apr 2008 14:10:21 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1882</guid>
		<description>Hello Bill,

very good job... if I were able to let it work.

I have to scan the "deploy" directory of JBoss for finding annotated classes at JBoss startup, but the following code doesn't work:
            String homeDir = System.getProperty("jboss.server.home.dir") + "\\deploy\\";
            File file = new File(homeDir);
            URL url = file.toURI().toURL();
            AnnotationDB db = new AnnotationDB();
            db.scanArchives(url);
            Set annotatedClasses =
                db.getAnnotationIndex().get(MyAnnotation.class.getName());
"annotatedClasses" is null, even if there are annotated classes in existing ".ear" files.
Same result if url points to a specific ear file. "MyAnnotation", of course, is placeholder.

Is your code able to scan inside jars but not ears/sars/wars...? Or, did I wrote something wrong?

Thanks in advance for your help.</description>
		<content:encoded><![CDATA[<p>Hello Bill,</p>
<p>very good job&#8230; if I were able to let it work.</p>
<p>I have to scan the &#8220;deploy&#8221; directory of JBoss for finding annotated classes at JBoss startup, but the following code doesn&#8217;t work:<br />
            String homeDir = System.getProperty(&#8221;jboss.server.home.dir&#8221 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> + &#8220;\\deploy\\&#8221;;<br />
            File file = new File(homeDir);<br />
            URL url = file.toURI().toURL();<br />
            AnnotationDB db = new AnnotationDB();<br />
            db.scanArchives(url);<br />
            Set annotatedClasses =<br />
                db.getAnnotationIndex().get(MyAnnotation.class.getName());<br />
&#8220;annotatedClasses&#8221; is null, even if there are annotated classes in existing &#8220;.ear&#8221; files.<br />
Same result if url points to a specific ear file. &#8220;MyAnnotation&#8221;, of course, is placeholder.</p>
<p>Is your code able to scan inside jars but not ears/sars/wars&#8230;? Or, did I wrote something wrong?</p>
<p>Thanks in advance for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A beginners guide to best scanning vendors pci dss</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1722</link>
		<dc:creator>A beginners guide to best scanning vendors pci dss</dc:creator>
		<pubDate>Wed, 13 Feb 2008 11:45:45 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1722</guid>
		<description>[...] This scanning for annotations can be done at runtime using various techniques and open source libraries. I want to discuss how to do this in my blog and point you to a small project I created at sourceforge to help out with this.  Read more at http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/ [...]</description>
		<content:encoded><![CDATA[<p>[...] This scanning for annotations can be done at runtime using various techniques and open source libraries. I want to discuss how to do this in my blog and point you to a small project I created at sourceforge to help out with this.  Read more at <a href="http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/" rel="nofollow">http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis Reeder</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1705</link>
		<dc:creator>Travis Reeder</dc:creator>
		<pubDate>Fri, 08 Feb 2008 20:58:32 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1705</guid>
		<description>Forget it, figured it out: 

Set entities = db.getAnnotationIndex().get(MyAnnotation.class.getName());

Nice work Bill! Thanks.</description>
		<content:encoded><![CDATA[<p>Forget it, figured it out: </p>
<p>Set entities = db.getAnnotationIndex().get(MyAnnotation.class.getName());</p>
<p>Nice work Bill! Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis Reeder</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1704</link>
		<dc:creator>Travis Reeder</dc:creator>
		<pubDate>Fri, 08 Feb 2008 20:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1704</guid>
		<description>Any way to just find all classes that have a certain annotation and have it return a list of those classes?</description>
		<content:encoded><![CDATA[<p>Any way to just find all classes that have a certain annotation and have it return a list of those classes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alesj</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1604</link>
		<dc:creator>alesj</dc:creator>
		<pubDate>Sun, 27 Jan 2008 15:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1604</guid>
		<description>@Bill &#62;&#62; They only problem with JBoss VFS outside of jboss is that it has its own URL handlers. Because URL handler pluggability sucks in JDK, this is an issue with things like Tomcat.

So even our org.jboss.virtual.protocol.vfsXYZ packages + Handlers don't help here?
Or the VFS.init 'java.protocol.handler.pkgs' setting?</description>
		<content:encoded><![CDATA[<p>@Bill &gt;&gt; They only problem with JBoss VFS outside of jboss is that it has its own URL handlers. Because URL handler pluggability sucks in JDK, this is an issue with things like Tomcat.</p>
<p>So even our org.jboss.virtual.protocol.vfsXYZ packages + Handlers don&#8217;t help here?<br />
Or the VFS.init &#8216;java.protocol.handler.pkgs&#8217; setting?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billburke</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1571</link>
		<dc:creator>billburke</dc:creator>
		<pubDate>Fri, 18 Jan 2008 14:58:32 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1571</guid>
		<description>The DB is just a hashmap so you can add whatever you want.</description>
		<content:encoded><![CDATA[<p>The DB is just a hashmap so you can add whatever you want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heiko Braun</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1570</link>
		<dc:creator>Heiko Braun</dc:creator>
		<pubDate>Fri, 18 Jan 2008 09:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1570</guid>
		<description>One thing though: Maybe it would be cool to add override capabilities to the DB, in a way similar to what JBoss EJB3 does. So that you could query the DB for meta data regardless if it comes from source annotation or an external descriptor.</description>
		<content:encoded><![CDATA[<p>One thing though: Maybe it would be cool to add override capabilities to the DB, in a way similar to what JBoss EJB3 does. So that you could query the DB for meta data regardless if it comes from source annotation or an external descriptor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heiko Braun</title>
		<link>http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1569</link>
		<dc:creator>Heiko Braun</dc:creator>
		<pubDate>Fri, 18 Jan 2008 09:08:30 +0000</pubDate>
		<guid isPermaLink="false">http://billburke.wordpress.com/2008/01/14/scanning-java-annotations-at-runtime/#comment-1569</guid>
		<description>Cool Bill, good work. Straight and simple.</description>
		<content:encoded><![CDATA[<p>Cool Bill, good work. Straight and simple.</p>
]]></content:encoded>
	</item>
</channel>
</rss>