[webbeans-issues] [JBoss JIRA] Updated: (WBX-31) Bind Manager to java:app/Manager on Jetty
Dan Allen (JIRA)
jira-events at lists.jboss.org
Wed Apr 22 18:51:22 EDT 2009
[ https://jira.jboss.org/jira/browse/WBX-31?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Allen updated WBX-31:
-------------------------
Attachment: ManagerReferenceFactory.java
I figured out how to feed the Manager to Jetty. By default, Jetty assumes that the class you provide is going to give you the instance, not the factory. Drawing on the MailSessionReference from the Jetty code base, I was able to figure out that we need to extend Reference in order for Jetty to realize it needs to call the getObjectInstance() method on the factory. This same class will work on Tomcat, so it is a drop in replacement. Perhaps we can rename it to ManagerReferenceFactory to reflect it is both a factory and a reference.
With that in place, here is the contents of WEB-INF/jetty-env.xml needed to bind the Manager to JNDI:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
<New id="jdci" class="org.mortbay.jetty.plus.naming.Resource">
<Arg><Ref id="webAppCtx"/></Arg>
<Arg>jcdi/Manager</Arg>
<Arg>
<New class="org.jboss.webbeans.resources.ManagerReferenceFactory"/>
</Arg>
</New>
</Configure>
> Bind Manager to java:app/Manager on Jetty
> -----------------------------------------
>
> Key: WBX-31
> URL: https://jira.jboss.org/jira/browse/WBX-31
> Project: Web Beans Extensions
> Issue Type: Feature Request
> Components: Servlet Containers
> Reporter: Pete Muir
> Attachments: ManagerReferenceFactory.java
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list