A colleague of mine pointed me to this problem. A resource for a mongodb
database is defined in $TOMEE_HOME/conf/tomee.xml:

    <Resource id="mongoUri" class-name="com.mongodb.MongoClientURI"
constructor="uri">
      uri mongodb://localhost/test
    </Resource>

This should get picked up by a ApplicationScoped producer. But it is not.
When the resource is defined in WEB-INF/resources.xml it works fine.
During the startup of the server the resource is created as can be seen in
catalina.out.

I made a very small example at https://github.com/ronsmits/mongotest Please
tell us what we are doing wrong.

Ron

Reply via email to