[jboss-dev-forums] [Design of POJO Server] - Default values for MC annotations when running in jboss
kabir.khan@jboss.com
do-not-reply at jboss.com
Tue Nov 14 12:45:59 EST 2006
Forking http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985741#3985741
"kabir" wrote :
| "bstansberry at jboss.com" wrote :
| | 3) I tried adding another attribute "boolean registerDirectly() default false;" to @JMX. But the deployment of any beans where it didn't specify the attribute failed in SimpleAnnotationValidator, which makes no attempt to read default values.
| Default values can be read, but the java reflection api kindly does not allow us a way to read them. If javassist is on the classpath these values can be read. Since the container jars are in jboss/lib:
| a) We need to move javassist from jboss/server/xxx/lib to jboss/lib so that the mc classloader can see javassist
| OR
| b) I could do something similar to what I have done for the other AOP integration and do a check for when javassist has been deployed.
|
| I will look into b), but for now you should be able to make progress with a) (which is what we might end up with anyway :-)
I have taken the easiest path and committed option a): moving javassist.jar into jboss/lib. There is a test in the testsuite that verifies the behaviour.
| Kabir at KabirDell ~/sourcecontrol/jboss-head/testsuite
| $ build.sh one-test -Dtest=org.jboss.test.aop.test.MicrocontainerDefaultAnnotationUnitTestCase
|
Scott, you mentioned something early in the other thread about moving javassist.jar here. Can you elaborate a bit please.
At the moment I don't see a way to go with option b) short of moving the javassist specific annotation stuff out of the mc project into the aop-mc-int project, or splitting jboss-container.jar into a jboss-container-boot.jar and a jboss-container-deployer.jar as has been done for the aop-mc-int project.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985866#3985866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985866
More information about the jboss-dev-forums
mailing list