Created
November 29, 2011 17:16
-
-
Save jfuerth/1405580 to your computer and use it in GitHub Desktop.
Get weld bootstrapped in Tomcat (save under META-INF/context.xml)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This context.xml causes Tomcat to insert Weld's CDI BeanManager into | |
the JNDI context at java:/comp/env/BeanManager. This is required in | |
Tomcat because Weld's normal boostrap doesn't work: the JNDI context | |
is read-only to the webapp. | |
For details, see http://docs.jboss.org/weld/reference/1.0.0/en-US/html/environments.html | |
--> | |
<Context> | |
<Resource name="BeanManager" | |
auth="Container" | |
type="javax.enterprise.inject.spi.BeanManager" | |
factory="org.jboss.weld.resources.ManagerObjectFactory"/> | |
</Context> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment