[jira] [Updated] (ISIS-780) @Inject on field and @RequestScoped are incompatible - use a MetaModelValidator to detect

2019-01-06 Thread Dan Haywood (JIRA)


 [ 
https://issues.apache.org/jira/browse/ISIS-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-780:
-
Fix Version/s: (was: 3.0.0)
   2.0.0-M5

> @Inject on field and @RequestScoped are incompatible - use a 
> MetaModelValidator to detect
> -
>
> Key: ISIS-780
> URL: https://issues.apache.org/jira/browse/ISIS-780
> Project: Isis
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: core-1.4.0
>Reporter: Dan Haywood
>Priority: Major
> Fix For: 2.0.0-M5
>
>
> Our support for @RequestScoped annotation is home-grown; we create a 
> Javassist proxy for the service, which then delegates to dynamically created 
> instances of the actual service bound on a thread-local.
> The Javassist proxy automatically forwards all method calls to the underlying 
> service for the current thread.  
> If the request-scoped service has other services injected into it via methods 
> (ie setXxx(...) or injectXxx(...), then these method calls are forwarded just 
> like any other, and everything works fine.
> However, if the request-scoped service has its other services injected via a 
> field annotated with @RequestScoped, then the service will be injected into 
> the Javassist proxy and the underlying service will get a null pointer.
> One day we might replace our home-grown injection with a more sophisticated 
> third-party library (eg a CDI impl?) that can handle the above.  But until 
> such time, as a workaround we should fail-fast: detect the situation and 
> through an exception on start-up.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-780) @Inject on field and @RequestScoped are incompatible - use a MetaModelValidator to detect

2014-09-26 Thread Jeroen van der Wal (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeroen van der Wal updated ISIS-780:

Fix Version/s: (was: core-1.7.0)
   core-2.0.0

 @Inject on field and @RequestScoped are incompatible - use a 
 MetaModelValidator to detect
 -

 Key: ISIS-780
 URL: https://issues.apache.org/jira/browse/ISIS-780
 Project: Isis
  Issue Type: Improvement
  Components: Core
Affects Versions: core-1.4.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-2.0.0


 Our support for @RequestScoped annotation is home-grown; we create a 
 Javassist proxy for the service, which then delegates to dynamically created 
 instances of the actual service bound on a thread-local.
 The Javassist proxy automatically forwards all method calls to the underlying 
 service for the current thread.  
 If the request-scoped service has other services injected into it via methods 
 (ie setXxx(...) or injectXxx(...), then these method calls are forwarded just 
 like any other, and everything works fine.
 However, if the request-scoped service has its other services injected via a 
 field annotated with @RequestScoped, then the service will be injected into 
 the Javassist proxy and the underlying service will get a null pointer.
 One day we might replace our home-grown injection with a more sophisticated 
 third-party library (eg a CDI impl?) that can handle the above.  But until 
 such time, as a workaround we should fail-fast: detect the situation and 
 through an exception on start-up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)