Scott Hernandez wrote:
> Cool, (more below)
> On Tue, Jan 19, 2010 at 8:29 AM, Alex <> wrote:
>> On 2010-01-16, at 6:47 PM, Scott Hernandez wrote:
>>> I noticed when I registered my class as a HessianService it was no
>>> longer able to inject it. Is this an expected behavior?
>> This seems broken, I've added a bug report to 
>> We are adding ResinBeanContext with the intended use from JUnit tests. 
>> Basically it's a light container
>> that bootstraps Resin CDI Implementation allowing for bean creation in a way 
>> that's done inside resin.
> Is this going to be the suggested way to unit test apps then?
Yes, although there may be some tests that need different containers.

The ResinBeanContainer is a CDI/EJB context (with the usual Resin things 
like database configuration), but it is not a servlet environment. (No 
ServletContext, no servlet listeners, etc.) So it will work fine for the 
key parts of unit testing.

For that need a servlet environment (more toward integration rather than 
unit testing), you'd need to use ResinEmbed currently (which is a full 
embedded Resin server.) Alex has brought up the idea of creating a 
WebAppContainer (or ServletContainer) which is something in between: a 
web-app context, but not a full server.

Jon's idea of running subEtha's tests as part of our nightly regressions 
is an interesting one, basically a kind of CI testing where we could svn 
update to the latest subetha, and run the tests against the current 
Resin build.

To make that happen, the subetha testing environment would need to be 
pretty self-contained, at least for the tests that we'd be running, i.e. 
they'd basically need to work in a bare environment and do any 
self-configuration/mocking/database instantiation as part of the test run.

-- Scott
> As you can probably tell from our source code the main reason we
> expose the objects as HessianServices is so that we can run unit tests
> against the container. There are still a few places where it might be
> useful to expose services for things other than unit testing, but for
> the most part that is why we need to use HessianServices.
> _______________________________________________
> resin-interest mailing list

resin-interest mailing list

Reply via email to