You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Vladimir Dzalbo (JIRA)" <ji...@apache.org> on 2014/08/22 15:40:14 UTC

[jira] [Created] (FELIX-4611) Strategy "INSTANCE" does not seem to work with @Bind annotation

Vladimir Dzalbo created FELIX-4611:
--------------------------------------

             Summary: Strategy "INSTANCE" does not seem to work with @Bind annotation
                 Key: FELIX-4611
                 URL: https://issues.apache.org/jira/browse/FELIX-4611
             Project: Felix
          Issue Type: Bug
          Components: iPOJO
            Reporter: Vladimir Dzalbo


I am seeing some problems with strategy="instance"


First, I created a new component 
{code:java}
@Component(propagation = true)
@Provides(strategy="INSTANCE")
{code}


If I am trying to inject it with @Bind annotation, iPojo does not seem to inject it...

{code:java}
	@Bind(aggregate = true, optional = true, proxy = false)
	public void bindScreen(Screen screen) {
		log.info("Binding Screen: " + screen.getClass().getName());
	}
{code}


However @Requires annotation works like a charm..

{code:java}
	@Requires(optional = true)
	Screen[] screensArray;
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)