You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by selckin <gi...@git.apache.org> on 2015/03/31 23:17:41 UTC

[GitHub] wicket pull request: IoC: Optionally use objensis for proxy creati...

GitHub user selckin opened a pull request:

    https://github.com/apache/wicket/pull/114

    IoC: Optionally use objensis for proxy creation

    This allows creating proxies for concrete classes without a default
    constructor.
    
    Guice IoC cache proxies similar to spring
    
    -----
    
    It may need some  more finishing touches, but would something like this be considered for inclusion?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/selckin/wicket master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/wicket/pull/114.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #114
    
----
commit 3da1d1df3bda5ca29afadaa81300aa8235067c59
Author: Thomas Matthijs <th...@selckin.be>
Date:   2015-03-31T21:10:44Z

    IoC: Optionally use objensis for proxy creation
    
    This allows creating proxies for concrete classes without a default
    constructor.
    
    Guice IoC cache proxies similar to spring

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: IoC: Optionally use objensis for proxy creati...

Posted by selckin <gi...@git.apache.org>.
Github user selckin commented on the pull request:

    https://github.com/apache/wicket/pull/114#issuecomment-108387157
  
    Now with less api changes


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: IoC: Optionally use objensis for proxy creati...

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on the pull request:

    https://github.com/apache/wicket/pull/114#issuecomment-90409380
  
    Hi,
    
    I see this PR introduces some API changes.
    We want to release Wicket 7.0.0 next week so I am a bit hesitant to merge it.
    Please start a discussion at dev@wicket.apache.org. If others think it is something important then we will merge it. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: IoC: Optionally use objensis for proxy creati...

Posted by selckin <gi...@git.apache.org>.
Github user selckin commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/114#discussion_r33139451
  
    --- Diff: wicket-guice/src/main/java/org/apache/wicket/guice/GuiceFieldValueFactory.java ---
    @@ -64,15 +68,34 @@ public Object getFieldValue(final Field field, final Object fieldOwner)
     				{
     					boolean optional = injectAnnotation != null && injectAnnotation.optional();
     					Annotation bindingAnnotation = findBindingAnnotation(field.getAnnotations());
    -					final IProxyTargetLocator locator = new GuiceProxyTargetLocator(field, bindingAnnotation, optional);
    +					final GuiceProxyTargetLocator locator = new GuiceProxyTargetLocator(field, bindingAnnotation, optional);
    +
    +					Object cachedValue = cache.get(locator);
    --- End diff --
    
    It's not, but i'm not sure about the objensis performance, and the spring ioc also caches the proxies, so it keeps those 2 closer together aswel


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: IoC: Optionally use objensis for proxy creati...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/wicket/pull/114


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: IoC: Optionally use objensis for proxy creati...

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/114#discussion_r33138716
  
    --- Diff: wicket-guice/src/main/java/org/apache/wicket/guice/GuiceFieldValueFactory.java ---
    @@ -64,15 +68,34 @@ public Object getFieldValue(final Field field, final Object fieldOwner)
     				{
     					boolean optional = injectAnnotation != null && injectAnnotation.optional();
     					Annotation bindingAnnotation = findBindingAnnotation(field.getAnnotations());
    -					final IProxyTargetLocator locator = new GuiceProxyTargetLocator(field, bindingAnnotation, optional);
    +					final GuiceProxyTargetLocator locator = new GuiceProxyTargetLocator(field, bindingAnnotation, optional);
    +
    +					Object cachedValue = cache.get(locator);
    --- End diff --
    
    The caching is not related to Objenesis, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: IoC: Optionally use objensis for proxy creati...

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/114#discussion_r33141370
  
    --- Diff: wicket-guice/src/main/java/org/apache/wicket/guice/GuiceFieldValueFactory.java ---
    @@ -64,15 +68,34 @@ public Object getFieldValue(final Field field, final Object fieldOwner)
     				{
     					boolean optional = injectAnnotation != null && injectAnnotation.optional();
     					Annotation bindingAnnotation = findBindingAnnotation(field.getAnnotations());
    -					final IProxyTargetLocator locator = new GuiceProxyTargetLocator(field, bindingAnnotation, optional);
    +					final GuiceProxyTargetLocator locator = new GuiceProxyTargetLocator(field, bindingAnnotation, optional);
    +
    +					Object cachedValue = cache.get(locator);
    --- End diff --
    
    I'm going to revert all non-Objenesis caches.
    This should be in separate ticket.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---