Questions tagged [picocontainer]

PicoContainer is a highly embeddable, full-service, Inversion of Control (IoC) container for components honor the Dependency Injection pattern

PicoContainer

PicoContainer is a highly embeddable, full-service, Inversion of Control (IoC) container for components honor the Dependency Injection pattern. The project started in 2003 and pioneered Constructor Injection auto-wiring. It is also Open Source and therefore free to use. The license is BSD and thus you can safely use this with commercial or other open source software.

PicoContainer 2.14 is the Latest Released Version, and the download is disponible here. The project is hosted in http://picocontainer.codehaus.org/.

75 questions
2
votes
1 answer

cucumber-picocontainer not registering

I'm experiencing the same situation as this question, but none of the suggested solutions work for me. Basically, I have taken a download of this repository. It runs fine. Then, I have split the SearchSteps module into two - one that contains the…
Hester Lyons
  • 803
  • 11
  • 24
2
votes
2 answers

Shared WebDriver becomes null on second scenario using PicoContainer

I have used the accepted solution here and came up with the following code: Referenced Libraries: Feature: Feature: FeatureA Scenario: ScenarioA Given When Then Scenario: ScenarioB Given When Then BaseStep: public…
k_rollo
  • 5,304
  • 16
  • 63
  • 95
2
votes
1 answer

Difference between adding instance and caching

What's the difference between those two codes? Both of them produce the same result. With caching: DefaultPicoContainer cachingContainer = new DefaultPicoContainer(new OptInCaching().wrap(new…
user6285331
2
votes
1 answer

Configure PicoContainer with a factory method with caching behavior

I'd like to configure PicoContainer by giving it a factory method (as @Provides methods in Guice) to use to create a new instance every time I (re-)start the container. The main point here is that I need that instance to be a singleton during each…
alb-i986
  • 325
  • 2
  • 14
2
votes
0 answers

Structuring cucumber to support testing both services and ui layers in the testing pyramid

I have setup cucumber to handle both service (e.g. web service API) level testing and UI (e.g. browser DOM) level testing. I do this using tags. I tag each API level scenario with the @api tag. In my @Before scenario hook is an if statement which…
MikeJRamsey56
  • 2,779
  • 1
  • 20
  • 34
2
votes
1 answer

using picocontainer with tomcat servlets

I'm trying to use PicoContainer in a servlet based app running on Tomcat. Configuration apparently works in debug but unless as I supposed Servlet classes are not injected by construnctor and neighter by setter. Aren't servlet classes supposed to be…
Felice Pollano
  • 32,832
  • 9
  • 75
  • 115
2
votes
1 answer

using and understanding the picoContainer

I am trying to use the picoContainer in my project. I know very little about it but want to give it a shot. As I understand, I have to create a picoContainer and registercomponents with it. I did this public static PicoContainer…
2
votes
1 answer

How to use PIcocontainer

I am using Picocontainer in a study project. I am having doubts about how to use it. The following is the class I have : public class DependencySupplier { public static MutablePicoContainer pico; static { pico = new…
kaushik
  • 2,308
  • 6
  • 35
  • 50
2
votes
1 answer

JSR-330 support in Picocontainer : @Inject ... @Named("xxx)

We have found code like private String string = "Not injected."; @Inject public void setString(@Named("s") String s) { this.string = s; } (utilitzing JSR-330 annotations) to be very useful to pass in a string value for "s". We would like to…
Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
2
votes
1 answer

Converting from Waffle/Pico to Struts2/Guice

I've been tasked with converting an application which was developed by myself in the Waffle Framework using PicoContainer as a DI mechanism into our new "stack" which is to use Struts2 as a framework with Guice as the DI mechanism. Does anyone out…
TuRRIcaNEd
  • 51
  • 4
1
vote
1 answer

Nullpointer exception for pico container instantion's method running maven clean test

I am getting nullpointerException while running my cucumber tests by mvn clean test. Scenario: Run atlas # src/test/java/Atlas/Features/Atlas.feature:3 Given Go to atlas and check title # Atlas.PageObjects.AtlasPage.openAtlas() …
1
vote
1 answer

Provide third party objects via PicoContainer

Using MyBatis, I find myself having many mapper interfaces, e.g. public interface BlogMapper { @Select("SELECT * FROM blog WHERE id = #{id}") Blog selectBlog(int id); } Which are retrieved on demand using a MyBatis factory final BlogMapper…
LppEdd
  • 20,274
  • 11
  • 84
  • 139
1
vote
0 answers

cucumber.runtime.java.ObjectFactoryLoader loadSingleObjectFactory

While running my test runner class getting this: cucumber.runtime.java.ObjectFactoryLoader loadSingleObjectFactory INFO: Loading ObjectFactory via service loader: io.cucumber.picocontainer.PicoFactory
1
vote
1 answer

How to inject objects with list as an constructor argument using picocontainer?

I have a class which takes an list argument in its contructor: public class A{ private List bs; public A(List bs) { this.bs= bs; } } And I am adding this class in the container as follows: A a =…
1
vote
2 answers

Multiple ObjectFactory instances for cucumber

I wrote a set of feature files for testing a custom framework and I want to allow testing of specific implementations of the interfaces of the framework. I want to run a whole lot of features with different implementations. To do that, I have…