I am new to jetty. I used to deploy solr using tomcat. But we moved to solr6 and I had hard time configuring resources in jetty which comes with solr 6.
How can I configure JNDI resource in Solr 6?
This is what I have tried so far with no luck.
Added below config in solr-6.4.0/server/etc/jetty.xml
<New id="test" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>jdbc/DSTest</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
<Set name="Url">jdbc:mysql://localhost:3306/db</Set>
<Set name="User">root</Set>
<Set name="Password"></Set>
</New>
</Arg>
</New>
And in solr-6.4.0/server/solr-webapp/webapp/WEB-INF/web.xml
<resource-ref>
<description>My DataSource Reference</description>
<res-ref-name>jdbc/DSTest</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
I added two jars jetty-plus-9.3.14.v20161028.jar
and mysql-connector-java-5.1.41-bin.jar
to solr-6.4.0/server/lib/ext/
java -jar start.jar --list-modules
says
Jetty All Available Modules:
----------------------------
[ ] Module: http
Depend: server
XML: etc/jetty-http.xml
Enabled: <not enabled in this configuration>
[ ] Module: https
Depend: ssl
XML: etc/jetty-https.xml
Enabled: <not enabled in this configuration>
[ ] Module: server
LIB: lib/*.jar
LIB: lib/ext/*.jar
LIB: resources/
XML: etc/jetty.xml
Enabled: <not enabled in this configuration>
[ ] Module: ssl
Depend: server
XML: etc/jetty-ssl.xml
Enabled: <not enabled in this configuration>
Jetty Selected Module Ordering:
------------------------------
Solr 6 documentation does not talk about how to go about JNDI. Any pointers would help. Thanks.