I have WAR package with CDI beans. Deployment of the package is very slow because every time during deployment the package is scanned for CDI beans. Is there any option to disable this process?
相关问题
- ClickOnce updates all files. Why?
- Why am I getting a WELD-001303: No active contexts
- My web app works only with META-INF instead of WEB
- WCF service deployment - tools
- Robocopy to copy files to a remote machine
相关文章
- Override env values defined in container spec
- Is it possible to destroy a CDI scope?
- Inject producer method that returns String CDI
- What's the default scope for a bean created by
- What is a good way to deploy a Perl application?
- Eclipse war export: optimize for a specific server
- Deploying C++ game in Linux
- Can't get Jenkins to start using Tomcat
I have a feeling that what you're looking for is more of a tool. As mentioned, Weld uses class scanning to find annotations. There are ways to speed this up. One that works pretty well is Jandex, an annotation processor that can be used at compile time to create an index (easier to read database) of your classes and annotations. This does dramatically boost deployment times.
The correct way is to disable discovery in the beans.xml of the relevant archive:
According to the CDI specification this removes the archive from the list of bean-archives.