Re: [picocontainer-dev] Trying an experiment to kill off ContainerRecorder (Nano)

Paul Hammant <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Folks,

I'm looking at the webwork2 example and it barfs on first request.

Looking at the stack traces it appears there are multiple containers  
in play. I've added a setName() to DPC (not committed) and added a  
toString:

     public String toString() {
         return (name != null ? name : super.toString())
                 + (getParent() != null ? "<-" +  
getParent().toString() : "");
     }

... to aid debugging.

The stack trace presently is:
org.picocontainer.injectors.AbstractInjector 
$UnsatisfiableDependenciesException:  
org.nanocontainer.nanowar.sample.webwork2.CheeseInventory has  
unsatisfied dependency: interface  
org.nanocontainer.nanowar.sample.service.CheeseService among  
unsatisfiable dependencies: [[interface  
org.nanocontainer.nanowar.sample.service.CheeseService]] where  
unRegdContainer<-immutable(actionsContainer<- 
immutable(org.picocontainer.DefaultPicoContainer@114beb40<- 
immutable(org.picocontainer.DefaultPicoContainer@789df8c<- 
immutable(org.picocontainer.DefaultPicoContainer@6cb36431)))) was the  
leaf container being asked for dependencies.
I'd be expecting it to say:
    ... where actionsContainer<-immutable(requestContainer<- 
immutable(sessionContainer<-immutable(applicationContainer))) was the  
leaf ...
  As that simpler fixed container sequence is the new way.
Regards,
- Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.