Romain

I love your brevity. Did you test this with my example project? We see the
resource being made during startup in Catalina.out but when we use
@Resource in the application it is null without any exceptions or errors.

Ron

Op wo 26 aug. 2015 10:08 schreef Romain Manni-Bucau <[email protected]>:

> tested on master and it works fine if mongo driver is in lib directory *of
> tomee*.
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-08-26 6:41 GMT+02:00 Ron Smits <[email protected]>:
>
> > The jar is in the libs directory
> >
> > Op di 25 aug. 2015 22:50 schreef Romain Manni-Bucau <
> [email protected]
> > >:
> >
> > > Hi
> > >
> > > Did you put mongo in tomee libs? If not server cant create the resource
> > > before deploying app as intended by tomee.xml.
> > > Le 25 août 2015 22:48, "Ron Smits" <[email protected]> a écrit :
> > >
> > > > 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