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
0
votes
0 answers

Java / PicoContainer / IoC Container - Inject & Resolve a "Scoped" Dependency (Maintain Object/Reference Equality)

I am coming from .NET land and am doing some Java projects recently (converting parts of a .NET codebase to Java). Normally I use .NET along with Castle Windsor as my IoC container of choice and am very familiar with it. I am using the PicoContainer…
0
votes
1 answer

Cucumber BDD share variable between different classes

I have steps definitions, let's say ClassA and ClassB, when in ClassB i want to use variable defined in ClassA. Background: Given Test environment is DEV Then We get product info ClassA() Environment environment;//Enum like DEV("23.556.444.55",…
0
votes
1 answer

Cucumber JVM : avoid dependency injection by Picocontainer for features not tagged for execution

Assuming that I have a Cucumber feature tagged @api @api Feature: BankID authentication Scenario Outline: Successful authentication of user using BankID Given the initial flow start URL  When I enter that "" into my browser …
fg78nc
  • 4,774
  • 3
  • 19
  • 32
0
votes
1 answer

Ways to do picocontainer DI with REST assured request and response

I am building a rest assured test FW with picocontainer DI using cucumber java. I need to share the request and response using the DI, but REST assured provides RequestSpecification and Response which are Interfaces and Interfaces cannot be shared.…
HudBud108
  • 41
  • 1
  • 5
0
votes
0 answers

Something went wrong in my test with models, since I add a Dependency Injection

I try to make my test simpler with a DI (PicoContainer), but now it doesn't work corrctly anymore. I get this errormassages: java.lang.NullPointerException at org.javalite.activejdbc.Model.setRaw(Model.java:355) at…
Deviasa
  • 153
  • 1
  • 13
0
votes
1 answer

Problem auto wiring when facing object creation through methods

I am using PicoContainer to do the wiring of the classes of my application. As you can see below, everything goes perfect but in one place: CharArrayReader reader = new CharArrayReader(acCode.toCharArray()); CharStream charStream = new…
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
0
votes
1 answer

Use PicoContainer with two IntelliJ-Plugins

I have two Plugins for IntelliJ. PluginTwo depends on PluginOne, so Two is started after One. Both Plugins depends on a third Core-Module. The Structure: I want to access the Dummy-Class via the Context-Class in PluginTwo. The Context class is part…
0
votes
2 answers

Getting nullpointer exception in cucumber picocontainer

I am trying to pass webdriver into my step-definition using picocontainer but getting null pointer Please refer below my utility class having webdriver instance declared as public:- package base; import org.openqa.selenium.WebDriver; public class…
keshav dwivedi
  • 117
  • 4
  • 14
0
votes
0 answers

Facing issue after implementing Sharing Test Context between Cucumber Step Definitions using PicoContainer

I have implemented a shared Test Context between Cucumber Step Definitions using PicoContainer. Please find the complete code which I have written in the below shared…
0
votes
1 answer

Getting this error while trying BDD cucumber Selenium when designing Page object model

Exception in thread "main" cucumber.runtime.CucumberException: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)V at…
0
votes
1 answer

PicoContainer JSR-330 @Named support?

PicoContainer seems to indicate that it supports JSR-330 @Inject and @Named. (No, this other question doesn't seem to help, as it doesn't address the fact that the PicoContainer site says that some support for JSR-330 has been added.) I add…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
0
votes
3 answers

How to use PicoContainer for a constructor with paramenter

I am using PicoContainer and I have to add a component which has a constructor with paramenter. So I have public abstract class IA { @Inject protected B b; public void useB(){ b.useSomeMethodOfB(); } } public interface…
Shilaghae
  • 957
  • 12
  • 22
0
votes
2 answers

How to use Picocontainer Web?

I'm trying to use Picocontainer Web (picocontainer-web-core-2.5.1.jar). I have configured everything and I checked out that everything works just fine, until trying to retrieve anything from container... :p I though I should use static method…
kingsvid
  • 28
  • 5
0
votes
1 answer

How to replace a component via an instance of PicoContainer?

I am working in an environment where I do not control the startup of the PicoContainer, it is provided to me like this: ApplicationManager.getApplication().getPicoContainer().getComponentInstanceOfType(Xyz.class); My question is how I can replace a…
vikingsteve
  • 38,481
  • 23
  • 112
  • 156
0
votes
1 answer

redirect to custom not found jsp page

I've got HttpServlet. It redirects user to different jsp pages, depends on action user want to do. For example http://localhost:8080/collections/index.do redirects to index.jsp. Different action I keep in picocontainer like this
lapots
  • 12,553
  • 32
  • 121
  • 242
1 2 3 4
5