I've finally been able to convert http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#Generic_JavaBean_Resources from Tomcat to Jetty.
Here comes a working jetty-env.xml equivalent to tomcat resource definition:
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
<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext"> | |
<New class="org.mortbay.jetty.plus.naming.EnvEntry"> | |
<Arg><Ref id="webAppCtx"/></Arg> | |
<Arg>bean/MyBeanFactory</Arg> | |
<Arg> | |
<New class="javax.naming.Reference"> | |
<Arg>com.mycompany.MyBean</Arg> | |
<Arg>com.mycompany.MyBeanFactory</Arg> | |
<Arg /> | |
<Call name="add" id="reference"> | |
<Arg> | |
<New class="javax.naming.StringRefAddr"> | |
<Arg>bar</Arg> | |
<Arg>23</Arg> | |
</New> | |
</Arg> | |
</Call> | |
</New> | |
</Arg> | |
<Arg type="boolean">true</Arg> | |
</New> | |
</Configure> |
Комментариев нет:
Отправить комментарий