|
Mantis - Resin
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 2490 | minor | always | 03-03-08 14:50 | 03-04-08 15:33 | |
|
|
|||||
| Reporter: | ferg | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.1.5 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.1.6 | ||
|
|
|||||
| Summary: | 0002490: IoC injection in jars timing | ||||
| Description: |
(rep by Andreas Fischer) Actually one more note: I got it to work by declaring every bean in the resin-web.xml. But doesn't the resin doc say if there is a web-beans.xml in a .jar file resin will automatically scan? Also if I move the beans declaration into web-beans.xml it seems to be ignored and it seems to be a better place to have all the beans / components. On Mar 3, 2008, at 4:16 PM, Andreas Fischer wrote: I got a WebBean that represents a DirectoryService. The bean is declared as following:
@Component
@Singleton
public class DirectoryService {
@In private AuthenticationService authentication;
...
Authentication services is declared as follows:
@Component
@Singleton
public class AuthenticationService {
Basically the directory relies on an authentication service to make sure that only validated users can access the directory. Now the @In in the directory services throws an exception: <em>com.caucho.config.ConfigException: com.jmeeting.directory.service.DirectoryService.authentication: Can't find a component for 'com.jmeeting.directory.service.AuthenticationService'</em> If I got the resin documentation right it states: <em>Any Resin-managed object can use the entire WebBeans dependency-injection system and all of the managed objects, while objects you create using new are still plain Java objects. Once you've got a root object managed by the system, any futher WebBeans components or singletons you bring in will also be managed. The starting set of managed objects is pretty broad and includes: ...</em> This sounds like a Webbean looking up another Webbean should work. |
||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||