Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003543 [Resin] major always 06-01-09 22:01 06-04-09 15:30
Reporter skot View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003543: Hessian @ApplicationScoped Servelet-Mapping Class created multiple times.
Description Creating an @ApplicationScoped class and adding a mapping to expose it via hessian (like below).
    <servlet-mapping url-pattern="/api/Echo" servlet-class="test.EchoService">
        <protocol uri="hessian:"/>
    </servlet-mapping>

Causes multiple instances to be created of the class.

Here is a test project that exemplifies the problem:http://scratchmonkey.googlecode.com/svn/resin4/hessian_scopes [^]
Additional Information Here is the original email sent on May 15th:

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 instance. When DeeperService also has
a <servlet-mapping>, calls to EchoService return different
DeeperService instance.

Code to demonstrate this is here:
http://scratchmonkey.googlecode.com/svn/resin4/hessian_scopes [^]

This is a bug, right?

Jeff

Attached Files

- Relationships

- Notes
(0004059)
ferg
06-04-09 15:30

server/4744
 

- Issue History
Date Modified Username Field Change
06-01-09 22:01 skot New Issue
06-01-09 23:58 voodude Issue Monitored: voodude
06-04-09 15:30 ferg Note Added: 0004059
06-04-09 15:30 ferg Assigned To  => ferg
06-04-09 15:30 ferg Status new => closed
06-04-09 15:30 ferg Resolution open => fixed
06-04-09 15:30 ferg Fixed in Version  => 4.0.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker