You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Kristian Marinkovic (JIRA)" <de...@tapestry.apache.org> on 2008/09/07 23:32:44 UTC

[jira] Created: (TAPESTRY-2647) IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow

IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow
------------------------------------------------------------------------------------------------------------------

                 Key: TAPESTRY-2647
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2647
             Project: Tapestry
          Issue Type: Bug
          Components: tapestry-ioc
    Affects Versions: 5.0.14
            Reporter: Kristian Marinkovic
         Attachments: test.zip

the module class below produces a StackOverflow if i try to call the chain. if i use a serviceId instead of the marker annotation everything work as expected. it seems, that a marker annotation does not have the same behaviour as a serviceId. see also the attached maven project that examplifies the problem.

public final class StackOverflowModule 
{
	public static void bind(ServiceBinder binder)
	{
		binder.bind(ChainInterface.class, HelloWorld.class).withMarker(Default.class);
	}
	
	public ChainInterface buildChainInterface(List<ChainInterface> chainItems, ChainBuilder builder)
	{
		return builder.build(ChainInterface.class, chainItems);
	}
	
	public void contributeChainInterface(OrderedConfiguration<ChainInterface> chainItems,
			@Default ChainInterface helloWorld)
	{
		chainItems.add("Default", helloWorld);
	}
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-2647) IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow

Posted by "Kristian Marinkovic (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Marinkovic updated TAPESTRY-2647:
------------------------------------------

    Attachment: test.zip

example maven/eclipse project

> IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2647
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2647
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.0.14
>            Reporter: Kristian Marinkovic
>         Attachments: test.zip
>
>
> the module class below produces a StackOverflow if i try to call the chain. if i use a serviceId instead of the marker annotation everything work as expected. it seems, that a marker annotation does not have the same behaviour as a serviceId. see also the attached maven project that examplifies the problem.
> public final class StackOverflowModule 
> {
> 	public static void bind(ServiceBinder binder)
> 	{
> 		binder.bind(ChainInterface.class, HelloWorld.class).withMarker(Default.class);
> 	}
> 	
> 	public ChainInterface buildChainInterface(List<ChainInterface> chainItems, ChainBuilder builder)
> 	{
> 		return builder.build(ChainInterface.class, chainItems);
> 	}
> 	
> 	public void contributeChainInterface(OrderedConfiguration<ChainInterface> chainItems,
> 			@Default ChainInterface helloWorld)
> 	{
> 		chainItems.add("Default", helloWorld);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2647) IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629608#action_12629608 ] 

Howard M. Lewis Ship commented on TAPESTRY-2647:
------------------------------------------------

Thanks for the test project; this reproduces with 5.0.14 and 5.0.15-SNAPSHOT.

> IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2647
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2647
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.0.14
>            Reporter: Kristian Marinkovic
>            Assignee: Howard M. Lewis Ship
>         Attachments: test.zip
>
>
> the module class below produces a StackOverflow if i try to call the chain. if i use a serviceId instead of the marker annotation everything work as expected. it seems, that a marker annotation does not have the same behaviour as a serviceId. see also the attached maven project that examplifies the problem.
> public final class StackOverflowModule 
> {
> 	public static void bind(ServiceBinder binder)
> 	{
> 		binder.bind(ChainInterface.class, HelloWorld.class).withMarker(Default.class);
> 	}
> 	
> 	public ChainInterface buildChainInterface(List<ChainInterface> chainItems, ChainBuilder builder)
> 	{
> 		return builder.build(ChainInterface.class, chainItems);
> 	}
> 	
> 	public void contributeChainInterface(OrderedConfiguration<ChainInterface> chainItems,
> 			@Default ChainInterface helloWorld)
> 	{
> 		chainItems.add("Default", helloWorld);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2647) IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629629#action_12629629 ] 

Howard M. Lewis Ship commented on TAPESTRY-2647:
------------------------------------------------


Found the problem.

You have two services with the same service id.

The real bug is that using bind() to define a service that conflicts with a builder method is not causing an error.  It should.

The end result is that the HelloWorld implementation is "lost".  That leaves just the definition provided by the service builder method, and that's why invoking the method on the service is recursive, endlessly.

> IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2647
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2647
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.0.14
>            Reporter: Kristian Marinkovic
>            Assignee: Howard M. Lewis Ship
>         Attachments: test.zip
>
>
> the module class below produces a StackOverflow if i try to call the chain. if i use a serviceId instead of the marker annotation everything work as expected. it seems, that a marker annotation does not have the same behaviour as a serviceId. see also the attached maven project that examplifies the problem.
> public final class StackOverflowModule 
> {
> 	public static void bind(ServiceBinder binder)
> 	{
> 		binder.bind(ChainInterface.class, HelloWorld.class).withMarker(Default.class);
> 	}
> 	
> 	public ChainInterface buildChainInterface(List<ChainInterface> chainItems, ChainBuilder builder)
> 	{
> 		return builder.build(ChainInterface.class, chainItems);
> 	}
> 	
> 	public void contributeChainInterface(OrderedConfiguration<ChainInterface> chainItems,
> 			@Default ChainInterface helloWorld)
> 	{
> 		chainItems.add("Default", helloWorld);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-2647) IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-2647.
------------------------------------------

    Resolution: Invalid

> IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2647
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2647
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.0.14
>            Reporter: Kristian Marinkovic
>            Assignee: Howard M. Lewis Ship
>         Attachments: test.zip
>
>
> the module class below produces a StackOverflow if i try to call the chain. if i use a serviceId instead of the marker annotation everything work as expected. it seems, that a marker annotation does not have the same behaviour as a serviceId. see also the attached maven project that examplifies the problem.
> public final class StackOverflowModule 
> {
> 	public static void bind(ServiceBinder binder)
> 	{
> 		binder.bind(ChainInterface.class, HelloWorld.class).withMarker(Default.class);
> 	}
> 	
> 	public ChainInterface buildChainInterface(List<ChainInterface> chainItems, ChainBuilder builder)
> 	{
> 		return builder.build(ChainInterface.class, chainItems);
> 	}
> 	
> 	public void contributeChainInterface(OrderedConfiguration<ChainInterface> chainItems,
> 			@Default ChainInterface helloWorld)
> 	{
> 		chainItems.add("Default", helloWorld);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2647) IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629019#action_12629019 ] 

Howard M. Lewis Ship commented on TAPESTRY-2647:
------------------------------------------------

That looks odd; the resolution should be about the same, and the proxy for ChainInterface should be passed to contributeChainInterface()  (a dangerous idea, to be honest).

> IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2647
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2647
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.0.14
>            Reporter: Kristian Marinkovic
>         Attachments: test.zip
>
>
> the module class below produces a StackOverflow if i try to call the chain. if i use a serviceId instead of the marker annotation everything work as expected. it seems, that a marker annotation does not have the same behaviour as a serviceId. see also the attached maven project that examplifies the problem.
> public final class StackOverflowModule 
> {
> 	public static void bind(ServiceBinder binder)
> 	{
> 		binder.bind(ChainInterface.class, HelloWorld.class).withMarker(Default.class);
> 	}
> 	
> 	public ChainInterface buildChainInterface(List<ChainInterface> chainItems, ChainBuilder builder)
> 	{
> 		return builder.build(ChainInterface.class, chainItems);
> 	}
> 	
> 	public void contributeChainInterface(OrderedConfiguration<ChainInterface> chainItems,
> 			@Default ChainInterface helloWorld)
> 	{
> 		chainItems.add("Default", helloWorld);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAPESTRY-2647) IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAPESTRY-2647:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> IOC services bound using a marker behave differently than services with a serviceId thus producing a StackOverflow
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2647
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2647
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.0.14
>            Reporter: Kristian Marinkovic
>            Assignee: Howard M. Lewis Ship
>         Attachments: test.zip
>
>
> the module class below produces a StackOverflow if i try to call the chain. if i use a serviceId instead of the marker annotation everything work as expected. it seems, that a marker annotation does not have the same behaviour as a serviceId. see also the attached maven project that examplifies the problem.
> public final class StackOverflowModule 
> {
> 	public static void bind(ServiceBinder binder)
> 	{
> 		binder.bind(ChainInterface.class, HelloWorld.class).withMarker(Default.class);
> 	}
> 	
> 	public ChainInterface buildChainInterface(List<ChainInterface> chainItems, ChainBuilder builder)
> 	{
> 		return builder.build(ChainInterface.class, chainItems);
> 	}
> 	
> 	public void contributeChainInterface(OrderedConfiguration<ChainInterface> chainItems,
> 			@Default ChainInterface helloWorld)
> 	{
> 		chainItems.add("Default", helloWorld);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org