How to use org.jboss.weld.proxy.dump?

97 views Asked by At

I'm using CDI 1.2 with JBoss Weld 2.4.6, where one can configure in the weld.properties the key org.jboss.weld.proxy.dump to: "For debugging purposes, it’s possible to dump the generated bytecode of client proxies and enhanced subclasses to the filesystem." Can this classes somehow can be used to speed up the deployment by loading them to the container instead of letting the container doing the work again?

1

There are 1 answers

0
Siliarus On

As the option says, those are purely for debugging purposes.

Weld dumps these proxies as an "on-the-side" action while creating the proxies and loading them anyway, so no slow down/speed up would happen. In other words, by the time the proxy can be dumped, it is already "loaded to the container" and no duplication of work happens.

Also note that creation of proxy does not mean the actual contextual instance will be created as well - those are created lazily when you first try to use them.