Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Context-Scoped JNDI Datasource in Context XML - SOLVED

I was fairly careful to ensure I had met all the requirements you
mentioned, though I was not entirely sure about the requirement
regarding resource-ref. It might be helpful to emphasize that
requirement, because as you mentioned Tomcat does indeed support
accessing JNDI resources without registering them in the servlet
deployment descriptor. I suppose the following text suggests the
requirement:

If you have the appropriate <resource-ref> setup in your web.xml, then
it is available from application lookups asjava:comp/env/jdbc/myds.

I would imagine that a wiki "warning" box would be very helpful for
folks coming to Jetty from Tomcat that spells out the requirement.

In any case it turns out that the problem was caused by including
non-compatible configurations in start.ini. I had included
jetty-annotations.xml _after_ jetty-plus.xml, which presumably caused
the configuration classes to be overwritten by a set that did not
include the important EnvConfiguration. Once I removed
jetty-annotations.xml, specifying the data source in the context XML
worked like a charm.

Thanks,
M


Back to the top