You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Ben Sommerville (JIRA)" <de...@tapestry.apache.org> on 2007/04/23 02:24:15 UTC

[jira] Created: (TAPESTRY-1425) Eager Loaded service (builder) cannot use object injection

Eager Loaded service (builder) cannot use object injection
----------------------------------------------------------

                 Key: TAPESTRY-1425
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1425
             Project: Tapestry
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.0.4
            Reporter: Ben Sommerville
            Priority: Minor


A service which is EagerLoaded cannot use object injection, it must use InjectService.

If the eager loaded service uses object injection then it will cause an error because the alias service has not had its mode set when eager loaded services are created.

e..g  This builder method results in an error
@EagerLoad
 public RegistryShutdownListener buildFileCleanerCleanup( RegistryShutdownHub hub)

When service injection is used it is ok.
@EagerLoad
 public RegistryShutdownListener buildFileCleanerCleanup(@InjectService("RegistryShutdownHub") RegistryShutdownHub hub)


Not sure if this can actually be fixed, or if it just needs to be documented.



-- 
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-1425) Eager Loaded service (builder) cannot use object injection

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

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

Looks like we should chnage the Alias service's object provider to NO-OP until the mode is set (rather than fail).  I'm a little nervous about injections that require the Alias service to properly disambiguate the injection.

> Eager Loaded service (builder) cannot use object injection
> ----------------------------------------------------------
>
>                 Key: TAPESTRY-1425
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1425
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.4
>            Reporter: Ben Sommerville
>            Priority: Minor
>
> A service which is EagerLoaded cannot use object injection, it must use InjectService.
> If the eager loaded service uses object injection then it will cause an error because the alias service has not had its mode set when eager loaded services are created.
> e..g  This builder method results in an error
> @EagerLoad
>  public RegistryShutdownListener buildFileCleanerCleanup( RegistryShutdownHub hub)
> When service injection is used it is ok.
> @EagerLoad
>  public RegistryShutdownListener buildFileCleanerCleanup(@InjectService("RegistryShutdownHub") RegistryShutdownHub hub)
> Not sure if this can actually be fixed, or if it just needs to be documented.

-- 
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-1425) Eager Loaded service (builder) cannot use object injection

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

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

       Resolution: Fixed
    Fix Version/s: 5.0.5
         Assignee: Howard M. Lewis Ship

> Eager Loaded service (builder) cannot use object injection
> ----------------------------------------------------------
>
>                 Key: TAPESTRY-1425
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1425
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.4
>            Reporter: Ben Sommerville
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>             Fix For: 5.0.5
>
>
> A service which is EagerLoaded cannot use object injection, it must use InjectService.
> If the eager loaded service uses object injection then it will cause an error because the alias service has not had its mode set when eager loaded services are created.
> e..g  This builder method results in an error
> @EagerLoad
>  public RegistryShutdownListener buildFileCleanerCleanup( RegistryShutdownHub hub)
> When service injection is used it is ok.
> @EagerLoad
>  public RegistryShutdownListener buildFileCleanerCleanup(@InjectService("RegistryShutdownHub") RegistryShutdownHub hub)
> Not sure if this can actually be fixed, or if it just needs to be documented.

-- 
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-1425) Eager Loaded service (builder) cannot use object injection

Posted by "Ben Sommerville (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493844 ] 

Ben Sommerville commented on TAPESTRY-1425:
-------------------------------------------

Thats a good solution.  

My use case didn't need the alias service at all, the services were all unambiguous.  It was just that the aliases were checked first & failed hard.

> Eager Loaded service (builder) cannot use object injection
> ----------------------------------------------------------
>
>                 Key: TAPESTRY-1425
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1425
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.4
>            Reporter: Ben Sommerville
>            Priority: Minor
>
> A service which is EagerLoaded cannot use object injection, it must use InjectService.
> If the eager loaded service uses object injection then it will cause an error because the alias service has not had its mode set when eager loaded services are created.
> e..g  This builder method results in an error
> @EagerLoad
>  public RegistryShutdownListener buildFileCleanerCleanup( RegistryShutdownHub hub)
> When service injection is used it is ok.
> @EagerLoad
>  public RegistryShutdownListener buildFileCleanerCleanup(@InjectService("RegistryShutdownHub") RegistryShutdownHub hub)
> Not sure if this can actually be fixed, or if it just needs to be documented.

-- 
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