[jboss-user] [JBoss AOP] - Re: How to deploy a WebApplication in Tomcat with Jboss AOP?
do-not-reply at jboss.com
Tue Oct 21 07:41:12 EDT 2008
You could probably push the urls of your classes into the AspectAnnotationLoader. Which of these two methods you want to use is up to you. The first one shows how to create a ClassFile:
| public void deployInputStreamIterator(Iterator<InputStream> it) throws Exception
| while (it.hasNext())
| InputStream stream = it.next();
| DataInputStream dstream = new DataInputStream(stream);
| ClassFile cf = null;
| cf = new ClassFile(dstream);
| public void deployClassFile(ClassFile cf) throws Exception
Note that the deployClassFile() method only exists in AOP 2.0. Previous versions only contain deployInputStreamIterator(). You basically need to scan the archive you want to look for annotations in, and create an InputStream for each class, put those in a collection, and pass its iterator in to the deployInputStreamIterator() method.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183476#4183476
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183476
More information about the jboss-user