[weld-dev] Adding Classes at Run-time

Stuart Douglas stuart at baileyroberts.com.au
Mon Feb 15 00:07:45 EST 2010


Are you opening the jars before weld starts? If so you can add the classes from a PE using BeforeBeanDiscovery.addAnnotatedType().

Stuart

________________________________________
From: weld-dev-bounces at lists.jboss.org [weld-dev-bounces at lists.jboss.org] On Behalf Of Jason Lee [jason at steeplesoft.com]
Sent: Monday, 15 February 2010 4:06 PM
To: Weld-Dev
Subject: [weld-dev] Adding Classes at Run-time

I have an odd question.  I have a situation where I'm manually opening a
JAR and adding its classes to the ClassLoader.  What I'd like to be able
to do is have Weld scan these classes for any relevant annotations and
take the proper actions, just as if the JARs were in the classpath when
the application started.  I've been staring at the JavaDocs (build
locally, btw, as I can't find them on the web :| ) but I don't see any
way to request that Weld inspect a given class.  Is it there and I'm
missing it?  Am I going to have cobble together that functionality?  Am
I asking for something that can't be done (right now)?  Any nudges in
the right direction would be much appreciated. :)

--
Jason Lee, SCJP
President, Oklahoma City Java Users Group
Senior Java Developer, Sun Microsystems
http://blogs.steeplesoft.com

_______________________________________________
weld-dev mailing list
weld-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev



More information about the weld-dev mailing list