On Jun 9, 2011, at 5:40 PM, Ranga S wrote:

> Thanks David!
> Actually, I do have the beans.xml file in there. :)

And it still doesn't work?  Hmm. something else has to be going wrong.

If you put the code up on github, I can take a look at it and maybe see what is 
wrong.   Maybe fork the examples.


> I tried the "ApplicationComposer" sample and the error is "Test class should 
> have at least one @Module method"

Right that testing technique involves no classpath scanning and you basically 
buildup the app in code and feed it to the test runner.  Mostly used for our 
internal testing.


-David

> ________________________________
> From: David Blevins <[email protected]>
> To: [email protected]
> Sent: Thursday, June 9, 2011 5:19 PM
> Subject: Re: Examples - CDI
> 
> 
> On Jun 9, 2011, at 4:16 PM, Ranga S wrote:
> 
>> Thanks!
>> I tried using the createEJBContainer construct, but it complains about "not 
>> finding any modules to deploy" when I run it. 
> 
> Add a src/main/resources/META-INF/beans.xml file.  That should do the trick.  
> CDI spec requires users to have a beans.xml even if it is an empty file.
> 
> That said the EJB spec does not require an xml file so we end up having to 
> scan everything anyway.  So we could probably get it to work without the 
> empty file.
> 
> We're currently just looking for EJB annotations + @ManagedBean to determine 
> if it is a module of interest, but we could easily expand that.
> 
> Anyway, for now try with the extra xml file and give a shout if you run into 
> any issues.
> 
> 
> -David

Reply via email to