[jira] [Commented] (FELIX-4745) Support for aspectj advice static method

2015-01-04 Thread Clement Escoffier (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14263847#comment-14263847
 ] 

Clement Escoffier commented on FELIX-4745:
--

iPOJO does not manipulate static method as static method do not have a 
'reference' on the instance manager. In your case you inject a reference on the 
object into a static method. We could track this pattern. It's obviously only 
valid for field accesses (as method are replaced by _proxies_).

To sum up that would mean:

* analyzing static method
* check access for non static field belonging to the component class (owner is 
the component class)
* replacing these accesses by the `__get` or `__set` calls.

 Support for aspectj advice static method
 

 Key: FELIX-4745
 URL: https://issues.apache.org/jira/browse/FELIX-4745
 Project: Felix
  Issue Type: Bug
  Components: iPOJO
Affects Versions: ipojo-manipulator-1.12.0
Reporter: Olivier NOUGUIER
Priority: Minor
 Attachments: 0001-FELIX-4745-naive-fix.patch

   Original Estimate: 1h
  Remaining Estimate: 1h

 When using aspectj to weave classes prior to iPojo packaging, injected advice 
 are ignore by iPojo bytecode manipulation.
 Then NPE are thrown in the advice because of the lazy initialization 
 mechanism of @Requires services.
 In my usecase, I want to weave @Transactional springframework aspect in iPojo 
 component. 
 Code generated:
 static final String updateName_aroundBody0(SignupTestDao ajc$this, String 
 name) {
   LOGGER.info(*ajc$this.testDao*);
   for (Test test : *ajc$this.testDao*.findAll()) {
 test.setName(name);
 *ajc$this.testDao*.update(test);
 if (name.equals(boom)) {
   throw new RuntimeException(boom);
 }
   }
   return done;
 }
 Code expected:
 static final String updateName_aroundBody0(SignupTestDao ajc$this, String 
 name)
 {
   LOGGER.info(*ajc$this.__gettestDao()*);
   for (Test test : *ajc$this.__gettestDao()*.findAll()) {
 test.setName(name);
 *ajc$this.__gettestDao()*.update(test);
 if (name.equals(boom)) {
   throw new RuntimeException(boom);
 }
   }
   return done;
 }
 A naive fix is to apply iPojo bytecode manipulation to static methods... see 
 the patch provided.



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


[jira] [Assigned] (FELIX-4745) Support for aspectj advice static method

2015-01-04 Thread Clement Escoffier (JIRA)

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

Clement Escoffier reassigned FELIX-4745:


Assignee: Clement Escoffier

 Support for aspectj advice static method
 

 Key: FELIX-4745
 URL: https://issues.apache.org/jira/browse/FELIX-4745
 Project: Felix
  Issue Type: Bug
  Components: iPOJO
Affects Versions: ipojo-manipulator-1.12.0, ipojo-manipulator-1.12.1
Reporter: Olivier NOUGUIER
Assignee: Clement Escoffier
Priority: Minor
 Attachments: 0001-FELIX-4745-naive-fix.patch

   Original Estimate: 1h
  Remaining Estimate: 1h

 When using aspectj to weave classes prior to iPojo packaging, injected advice 
 are ignore by iPojo bytecode manipulation.
 Then NPE are thrown in the advice because of the lazy initialization 
 mechanism of @Requires services.
 In my usecase, I want to weave @Transactional springframework aspect in iPojo 
 component. 
 Code generated:
 static final String updateName_aroundBody0(SignupTestDao ajc$this, String 
 name) {
   LOGGER.info(*ajc$this.testDao*);
   for (Test test : *ajc$this.testDao*.findAll()) {
 test.setName(name);
 *ajc$this.testDao*.update(test);
 if (name.equals(boom)) {
   throw new RuntimeException(boom);
 }
   }
   return done;
 }
 Code expected:
 static final String updateName_aroundBody0(SignupTestDao ajc$this, String 
 name)
 {
   LOGGER.info(*ajc$this.__gettestDao()*);
   for (Test test : *ajc$this.__gettestDao()*.findAll()) {
 test.setName(name);
 *ajc$this.__gettestDao()*.update(test);
 if (name.equals(boom)) {
   throw new RuntimeException(boom);
 }
   }
   return done;
 }
 A naive fix is to apply iPojo bytecode manipulation to static methods... see 
 the patch provided.



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


[jira] [Updated] (FELIX-4745) Support for aspectj advice static method

2015-01-04 Thread Clement Escoffier (JIRA)

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

Clement Escoffier updated FELIX-4745:
-
Affects Version/s: ipojo-manipulator-1.12.1

 Support for aspectj advice static method
 

 Key: FELIX-4745
 URL: https://issues.apache.org/jira/browse/FELIX-4745
 Project: Felix
  Issue Type: Bug
  Components: iPOJO
Affects Versions: ipojo-manipulator-1.12.0, ipojo-manipulator-1.12.1
Reporter: Olivier NOUGUIER
Assignee: Clement Escoffier
Priority: Minor
 Attachments: 0001-FELIX-4745-naive-fix.patch

   Original Estimate: 1h
  Remaining Estimate: 1h

 When using aspectj to weave classes prior to iPojo packaging, injected advice 
 are ignore by iPojo bytecode manipulation.
 Then NPE are thrown in the advice because of the lazy initialization 
 mechanism of @Requires services.
 In my usecase, I want to weave @Transactional springframework aspect in iPojo 
 component. 
 Code generated:
 static final String updateName_aroundBody0(SignupTestDao ajc$this, String 
 name) {
   LOGGER.info(*ajc$this.testDao*);
   for (Test test : *ajc$this.testDao*.findAll()) {
 test.setName(name);
 *ajc$this.testDao*.update(test);
 if (name.equals(boom)) {
   throw new RuntimeException(boom);
 }
   }
   return done;
 }
 Code expected:
 static final String updateName_aroundBody0(SignupTestDao ajc$this, String 
 name)
 {
   LOGGER.info(*ajc$this.__gettestDao()*);
   for (Test test : *ajc$this.__gettestDao()*.findAll()) {
 test.setName(name);
 *ajc$this.__gettestDao()*.update(test);
 if (name.equals(boom)) {
   throw new RuntimeException(boom);
 }
   }
   return done;
 }
 A naive fix is to apply iPojo bytecode manipulation to static methods... see 
 the patch provided.



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


[jira] [Commented] (FELIX-4745) Support for aspectj advice static method

2015-01-04 Thread Clement Escoffier (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14263848#comment-14263848
 ] 

Clement Escoffier commented on FELIX-4745:
--

I will look to your patch this week. I'm only worried about the reuse of the 
whole code adapter. I may require some adaptations.

 Support for aspectj advice static method
 

 Key: FELIX-4745
 URL: https://issues.apache.org/jira/browse/FELIX-4745
 Project: Felix
  Issue Type: Bug
  Components: iPOJO
Affects Versions: ipojo-manipulator-1.12.0
Reporter: Olivier NOUGUIER
Priority: Minor
 Attachments: 0001-FELIX-4745-naive-fix.patch

   Original Estimate: 1h
  Remaining Estimate: 1h

 When using aspectj to weave classes prior to iPojo packaging, injected advice 
 are ignore by iPojo bytecode manipulation.
 Then NPE are thrown in the advice because of the lazy initialization 
 mechanism of @Requires services.
 In my usecase, I want to weave @Transactional springframework aspect in iPojo 
 component. 
 Code generated:
 static final String updateName_aroundBody0(SignupTestDao ajc$this, String 
 name) {
   LOGGER.info(*ajc$this.testDao*);
   for (Test test : *ajc$this.testDao*.findAll()) {
 test.setName(name);
 *ajc$this.testDao*.update(test);
 if (name.equals(boom)) {
   throw new RuntimeException(boom);
 }
   }
   return done;
 }
 Code expected:
 static final String updateName_aroundBody0(SignupTestDao ajc$this, String 
 name)
 {
   LOGGER.info(*ajc$this.__gettestDao()*);
   for (Test test : *ajc$this.__gettestDao()*.findAll()) {
 test.setName(name);
 *ajc$this.__gettestDao()*.update(test);
 if (name.equals(boom)) {
   throw new RuntimeException(boom);
 }
   }
   return done;
 }
 A naive fix is to apply iPojo bytecode manipulation to static methods... see 
 the patch provided.



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


[jira] [Commented] (FELIX-4704) Show ranking in web console services plugin

2015-01-04 Thread Alexander Klimetschek (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14264212#comment-14264212
 ] 

Alexander Klimetschek commented on FELIX-4704:
--

[~cziegeler] Have you tried with small service ranking numbers that don't make 
the column wide enough automatically? What browsers did you check?

 Show ranking in web console services plugin
 ---

 Key: FELIX-4704
 URL: https://issues.apache.org/jira/browse/FELIX-4704
 Project: Felix
  Issue Type: Improvement
  Components: Web Console
Reporter: Alexander Klimetschek
Assignee: Carsten Ziegeler
Priority: Minor
 Fix For: webconsole-4.2.6

 Attachments: FELIX-4704.patch, screenshot.png


 The service ranking is an important property of services and one often needs 
 to look for all implementations of a given service and sort them by their 
 ranking - to list them in the order they are used by some other component.
 Thus adding a new column to the services table that can be sorted like the 
 other ones would be really helpful. Filtering down to one service interface 
 is already possible since FELIX-4202 (e.g. {{(objectclass=*.MyService}}).



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


[jira] [Comment Edited] (FELIX-4704) Show ranking in web console services plugin

2015-01-04 Thread Alexander Klimetschek (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14264212#comment-14264212
 ] 

Alexander Klimetschek edited comment on FELIX-4704 at 1/5/15 6:06 AM:
--

[~cziegeler] Thanks! Have you tried with small service ranking numbers that 
don't make the column wide enough automatically? What browsers did you check?


was (Author: alexander.klimetschek):
[~cziegeler] Have you tried with small service ranking numbers that don't make 
the column wide enough automatically? What browsers did you check?

 Show ranking in web console services plugin
 ---

 Key: FELIX-4704
 URL: https://issues.apache.org/jira/browse/FELIX-4704
 Project: Felix
  Issue Type: Improvement
  Components: Web Console
Reporter: Alexander Klimetschek
Assignee: Carsten Ziegeler
Priority: Minor
 Fix For: webconsole-4.2.6

 Attachments: FELIX-4704.patch, screenshot.png


 The service ranking is an important property of services and one often needs 
 to look for all implementations of a given service and sort them by their 
 ranking - to list them in the order they are used by some other component.
 Thus adding a new column to the services table that can be sorted like the 
 other ones would be really helpful. Filtering down to one service interface 
 is already possible since FELIX-4202 (e.g. {{(objectclass=*.MyService}}).



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