You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Leonard Lu (JIRA)" <ji...@apache.org> on 2010/02/24 19:27:27 UTC

[jira] Created: (TAP5-1030) RegistryImpl.autobuild() does not inject resources into constructor parameters

RegistryImpl.autobuild() does not inject resources into constructor parameters
------------------------------------------------------------------------------

                 Key: TAP5-1030
                 URL: https://issues.apache.org/jira/browse/TAP5-1030
             Project: Tapestry 5
          Issue Type: Bug
    Affects Versions: 5.1.0.5
            Reporter: Leonard Lu


The Javadoc for ObjectLocator.autobuild() states that it "Autobuilds a class by finding the public constructor with the most parameters. Services and resources will be injected into the parameters of the constructor."  However, this seems to only be true for the ServiceResourcesImpl implementation of the interface, which is aware of the following resources (code from 5.1.0.5, AbstractServiceCreator, line 63):

        injectionResources.put(String.class, serviceId);
        injectionResources.put(ObjectLocator.class, resources);
        injectionResources.put(ServiceResources.class, resources);
        injectionResources.put(Logger.class, logger);
        injectionResources.put(Class.class, resources.getServiceInterface());
        injectionResources.put(OperationTracker.class, resources.getTracker());

On the other hand, RegistryImpl is only aware of the OperationTracker resource (RegistryImpl line 841)

        resourcesMap.put(OperationTracker.class, tracker);

Specifically, one cannot call registry.autobuild() on any class that has a Logger resource in its constructor. If this is the intended behavior than the ObjectLocator javadoc should be updated.

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


[jira] Closed: (TAP5-1030) Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't

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

Howard M. Lewis Ship closed TAP5-1030.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.2.0

Oops, I think some of the commits listed TAP5-1050!

> Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1030
>                 URL: https://issues.apache.org/jira/browse/TAP5-1030
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.1.0.5
>            Reporter: Leonard Lu
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.0
>
>
> The Javadoc for ObjectLocator.autobuild() states that it "Autobuilds a class by finding the public constructor with the most parameters. Services and resources will be injected into the parameters of the constructor."  However, this seems to only be true for the ServiceResourcesImpl implementation of the interface, which is aware of the following resources (code from 5.1.0.5, AbstractServiceCreator, line 63):
>         injectionResources.put(String.class, serviceId);
>         injectionResources.put(ObjectLocator.class, resources);
>         injectionResources.put(ServiceResources.class, resources);
>         injectionResources.put(Logger.class, logger);
>         injectionResources.put(Class.class, resources.getServiceInterface());
>         injectionResources.put(OperationTracker.class, resources.getTracker());
> On the other hand, RegistryImpl is only aware of the OperationTracker resource (RegistryImpl line 841)
>         resourcesMap.put(OperationTracker.class, tracker);
> Specifically, one cannot call registry.autobuild() on any class that has a Logger resource in its constructor. If this is the intended behavior than the ObjectLocator javadoc should be updated.

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


[jira] Updated: (TAP5-1030) Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't

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

Howard M. Lewis Ship updated TAP5-1030:
---------------------------------------

    Summary: Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't  (was: RegistryImpl.autobuild() does not inject resources into constructor parameters)

Did a little digging and found out that java.util.logging.Logger, not org.slf4j.Logger, was being set up for injection!

> Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1030
>                 URL: https://issues.apache.org/jira/browse/TAP5-1030
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.1.0.5
>            Reporter: Leonard Lu
>            Assignee: Howard M. Lewis Ship
>
> The Javadoc for ObjectLocator.autobuild() states that it "Autobuilds a class by finding the public constructor with the most parameters. Services and resources will be injected into the parameters of the constructor."  However, this seems to only be true for the ServiceResourcesImpl implementation of the interface, which is aware of the following resources (code from 5.1.0.5, AbstractServiceCreator, line 63):
>         injectionResources.put(String.class, serviceId);
>         injectionResources.put(ObjectLocator.class, resources);
>         injectionResources.put(ServiceResources.class, resources);
>         injectionResources.put(Logger.class, logger);
>         injectionResources.put(Class.class, resources.getServiceInterface());
>         injectionResources.put(OperationTracker.class, resources.getTracker());
> On the other hand, RegistryImpl is only aware of the OperationTracker resource (RegistryImpl line 841)
>         resourcesMap.put(OperationTracker.class, tracker);
> Specifically, one cannot call registry.autobuild() on any class that has a Logger resource in its constructor. If this is the intended behavior than the ObjectLocator javadoc should be updated.

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


[jira] Closed: (TAP5-1030) Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't

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

Howard M. Lewis Ship closed TAP5-1030.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.2.0

Oops, I think some of the commits listed TAP5-1050!

> Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1030
>                 URL: https://issues.apache.org/jira/browse/TAP5-1030
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.1.0.5
>            Reporter: Leonard Lu
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.2.0
>
>
> The Javadoc for ObjectLocator.autobuild() states that it "Autobuilds a class by finding the public constructor with the most parameters. Services and resources will be injected into the parameters of the constructor."  However, this seems to only be true for the ServiceResourcesImpl implementation of the interface, which is aware of the following resources (code from 5.1.0.5, AbstractServiceCreator, line 63):
>         injectionResources.put(String.class, serviceId);
>         injectionResources.put(ObjectLocator.class, resources);
>         injectionResources.put(ServiceResources.class, resources);
>         injectionResources.put(Logger.class, logger);
>         injectionResources.put(Class.class, resources.getServiceInterface());
>         injectionResources.put(OperationTracker.class, resources.getTracker());
> On the other hand, RegistryImpl is only aware of the OperationTracker resource (RegistryImpl line 841)
>         resourcesMap.put(OperationTracker.class, tracker);
> Specifically, one cannot call registry.autobuild() on any class that has a Logger resource in its constructor. If this is the intended behavior than the ObjectLocator javadoc should be updated.

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


[jira] Assigned: (TAP5-1030) RegistryImpl.autobuild() does not inject resources into constructor parameters

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

Howard M. Lewis Ship reassigned TAP5-1030:
------------------------------------------

    Assignee: Howard M. Lewis Ship

> RegistryImpl.autobuild() does not inject resources into constructor parameters
> ------------------------------------------------------------------------------
>
>                 Key: TAP5-1030
>                 URL: https://issues.apache.org/jira/browse/TAP5-1030
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.1.0.5
>            Reporter: Leonard Lu
>            Assignee: Howard M. Lewis Ship
>
> The Javadoc for ObjectLocator.autobuild() states that it "Autobuilds a class by finding the public constructor with the most parameters. Services and resources will be injected into the parameters of the constructor."  However, this seems to only be true for the ServiceResourcesImpl implementation of the interface, which is aware of the following resources (code from 5.1.0.5, AbstractServiceCreator, line 63):
>         injectionResources.put(String.class, serviceId);
>         injectionResources.put(ObjectLocator.class, resources);
>         injectionResources.put(ServiceResources.class, resources);
>         injectionResources.put(Logger.class, logger);
>         injectionResources.put(Class.class, resources.getServiceInterface());
>         injectionResources.put(OperationTracker.class, resources.getTracker());
> On the other hand, RegistryImpl is only aware of the OperationTracker resource (RegistryImpl line 841)
>         resourcesMap.put(OperationTracker.class, tracker);
> Specifically, one cannot call registry.autobuild() on any class that has a Logger resource in its constructor. If this is the intended behavior than the ObjectLocator javadoc should be updated.

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


[jira] Updated: (TAP5-1030) Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't

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

Howard M. Lewis Ship updated TAP5-1030:
---------------------------------------

    Summary: Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't  (was: RegistryImpl.autobuild() does not inject resources into constructor parameters)

Did a little digging and found out that java.util.logging.Logger, not org.slf4j.Logger, was being set up for injection!

> Injecting a Logger into a non-service object, created as part of constructing a service configuration, should work but doesn't
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1030
>                 URL: https://issues.apache.org/jira/browse/TAP5-1030
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.1.0.5
>            Reporter: Leonard Lu
>            Assignee: Howard M. Lewis Ship
>
> The Javadoc for ObjectLocator.autobuild() states that it "Autobuilds a class by finding the public constructor with the most parameters. Services and resources will be injected into the parameters of the constructor."  However, this seems to only be true for the ServiceResourcesImpl implementation of the interface, which is aware of the following resources (code from 5.1.0.5, AbstractServiceCreator, line 63):
>         injectionResources.put(String.class, serviceId);
>         injectionResources.put(ObjectLocator.class, resources);
>         injectionResources.put(ServiceResources.class, resources);
>         injectionResources.put(Logger.class, logger);
>         injectionResources.put(Class.class, resources.getServiceInterface());
>         injectionResources.put(OperationTracker.class, resources.getTracker());
> On the other hand, RegistryImpl is only aware of the OperationTracker resource (RegistryImpl line 841)
>         resourcesMap.put(OperationTracker.class, tracker);
> Specifically, one cannot call registry.autobuild() on any class that has a Logger resource in its constructor. If this is the intended behavior than the ObjectLocator javadoc should be updated.

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


[jira] Assigned: (TAP5-1030) RegistryImpl.autobuild() does not inject resources into constructor parameters

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

Howard M. Lewis Ship reassigned TAP5-1030:
------------------------------------------

    Assignee: Howard M. Lewis Ship

> RegistryImpl.autobuild() does not inject resources into constructor parameters
> ------------------------------------------------------------------------------
>
>                 Key: TAP5-1030
>                 URL: https://issues.apache.org/jira/browse/TAP5-1030
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.1.0.5
>            Reporter: Leonard Lu
>            Assignee: Howard M. Lewis Ship
>
> The Javadoc for ObjectLocator.autobuild() states that it "Autobuilds a class by finding the public constructor with the most parameters. Services and resources will be injected into the parameters of the constructor."  However, this seems to only be true for the ServiceResourcesImpl implementation of the interface, which is aware of the following resources (code from 5.1.0.5, AbstractServiceCreator, line 63):
>         injectionResources.put(String.class, serviceId);
>         injectionResources.put(ObjectLocator.class, resources);
>         injectionResources.put(ServiceResources.class, resources);
>         injectionResources.put(Logger.class, logger);
>         injectionResources.put(Class.class, resources.getServiceInterface());
>         injectionResources.put(OperationTracker.class, resources.getTracker());
> On the other hand, RegistryImpl is only aware of the OperationTracker resource (RegistryImpl line 841)
>         resourcesMap.put(OperationTracker.class, tracker);
> Specifically, one cannot call registry.autobuild() on any class that has a Logger resource in its constructor. If this is the intended behavior than the ObjectLocator javadoc should be updated.

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