ScottH and I have spent some time (fortunately, well-spent time in a
pub with wifi and a deep reserve of Magners) trying to figure out why
one of our @ApplicationScoped objects seems to have several instances
in the container. The problem seems to be when you declare the
<servlet-mapping> in resin-web.xml.
We have a test with two beans, EchoService (@Stateless) and
DeeperService (@ApplicationScoped). EchoService calls DeeperService,
which logs the object id.
When DeeperService has no <servlet-mapping>, calls to EchoService
always return the same DeeperService id. When DeeperService also has
a <servlet-mapping>, calls to EchoService return different
Code to demonstrate this is here:
This is a bug, right?
resin-interest mailing list