tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: How to add resources and still scan for beans?
Date Wed, 16 Sep 2015 13:56:58 GMT
Hi Colin

CDI just needs a beans.xml in WEB-INF.

Your dataaource is the same as the auromatically provided one so even
without resources.xml you will get the same behavior but only this file
name is read for resources.
Le 16 sept. 2015 06:09, "Uday Gire" <uday.gire@managecat.com> a écrit :

> Hi
>
> Can you please show your project directory structure and if possible
> provide sample project to github?
>
> Thanks
>
> Uday Gire
> Senior Support Engineer, ManageCat
> p. +1 (909) - 366 – 9337
> a. 340 S Lemon Ave #7996 Walnut, CA 91789
> w. http://managecat.com
> e uday.gire@managecat.com
> <http://twitter.com/managecat>
> <https://www.linkedin.com/company/managecat>
>
>
> On 16 Sep 2015, at 08:20, cfnz <reg@hill-labs.co.nz> wrote:
>
> Hi, as from my other posts, still trying to get to grips with Tomee / CDI,
> etc... :-)
>
> I am trying to add a resource via xml file and still get my beans to be
> scanned and found.
>
> To better explain what I am trying to do, consider the Tomee JPA
> Eclipselink
> example.
>
> If I want to pull the datasource out into a file (I believe it has to be
> WEB-INF/resources.xml), and have something like this in it:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Resource id="movieDatabase" type="javax.sql.DataSource">
>    JdbcDriver org.hsqldb.jdbcDriver
>    JdbcUrl jdbc:hsqldb:file:hsqldb
>    UserName sa
>    Password
> </Resource>
>
> However, as soon as this file is present (also, it seems it can be named
> any
> file, e.g. x_resources.xml does the same thing), I get an exception:
>
> org.apache.openejb.OpenEjbContainer$NoModulesFoundException: No modules
> found to deploy.
> 1)Maybe descriptors are placed in incorrect location.
> etc...
>
> Is there a way I can add the resource and still get the scanning for the
> beans??
>
> Regards
> Colin
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/How-to-add-resources-and-still-scan-for-beans-tp4676236.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
>
>

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message