Valkyrie-RCP icon indicating copy to clipboard operation
Valkyrie-RCP copied to clipboard

ApplicationListener doesn't work at all for prototype and @Configurable beans

Open cmadsen opened this issue 12 years ago • 20 comments

As e.g., AbstractObjectTable is configurable this is a problem in Valkyrie-RPC as well.

When an AbstractObjectTable is created spring will issue a warning like

37502 [main] WARN org.springframework.context.support.AbstractApplicationContext$ApplicationListenerDetector - Inner bean 'x.y.z.SummaryTable' implements ApplicationListener interface but is not reachable for event multicasting by its containing ApplicationContext because it does not have singleton scope. Only top-level listener beans are allowed to be of non-singleton scope.

See

https://jira.springsource.org/browse/SPR-9391

and

https://jira.springsource.org/browse/SPR-9387

For more information.

Every time an event is published in the spring context a new instance of the AbstractObjectTable (e.g. SummaryTable) will be created. To verify just put a break point in the constructor of the table and then publish some events.

cmadsen avatar Dec 06 '12 14:12 cmadsen

Is this project dead?

cmadsen avatar Dec 07 '12 15:12 cmadsen

Kind of. Sorry, I don't have time to maintain this project anymore. I'll add a note on the main page.

ndeverge avatar Dec 09 '12 15:12 ndeverge

Ok.

I would be willing to continue maintaining Valkyrie-RPC would you consider transferring project ownership?

cmadsen avatar Dec 09 '12 16:12 cmadsen

Done ! Thank you very much !

ndeverge avatar Dec 09 '12 16:12 ndeverge

Did you do a github transfer ownership?

I can not tell that I got ownership of Valkyrie-RPC anywhere in my github account.

https://help.github.com/articles/how-to-transfer-a-repository

cmadsen avatar Dec 10 '12 07:12 cmadsen

I was not aware of the possibility to completly transfer the repo, thanks for the tip.

But first, you need to remove this repo from your space, beacause I get an error:

cmadsen/Valkyrie-RCP already exists

ndeverge avatar Dec 10 '12 10:12 ndeverge

I renamed cmadsen/Valkyrie-RCP to cmadsen/Valkyrie-RCP-forked.

Would you mind trying again?

cmadsen avatar Dec 10 '12 11:12 cmadsen

Now I get: cmadsen already has a repo in the ndeverge/Valkyrie-RCP network

If you haven't made any updates, I think the best way is to complety remove your repo.

ndeverge avatar Dec 10 '12 11:12 ndeverge

I deleted cmadsen/Valkyrie-RCP-forked maybe you also have to remove me as a collaborator before you try to do the transfer?

cmadsen avatar Dec 10 '12 11:12 cmadsen

Done !!

ndeverge avatar Dec 10 '12 11:12 ndeverge

Hmm, I can not see Valkyrie-RPC anywhere yet. Perhaps I just being to impatient.

cmadsen avatar Dec 10 '12 11:12 cmadsen

Yeah, probably !!

ndeverge avatar Dec 10 '12 11:12 ndeverge

Are you sure you pushed the transfer button?

In my log at https://github.com I can not see the transfer. I got the "ndeverge added cmadsen to ndeverge/Valkyrie-RCP" immideatly yesterday.

Here is a dump of my log:

5 minutes ago ndeverge commented on issue ndeverge/Valkyrie-RCP#6

Yeah, probably !!

14 minutes ago ndeverge commented on issue ndeverge/Valkyrie-RCP#6

Done !!

20 minutes ago ndeverge commented on issue ndeverge/Valkyrie-RCP#6

Now I get:cmadsen already has a repo in the ndeverge/Valkyrie-RCP network If you haven't made any updates, I think the best way is to complety remo…

an hour ago ndeverge commented on issue ndeverge/Valkyrie-RCP#6

I was not aware of the possibility to completly transfer the repo, thanks for the tip. But first, you need to remove this repo from your space, bea…

19 hours ago ndeverge commented on issue ndeverge/Valkyrie-RCP#6

Done ! Thank you very much !

ndeverge added cmadsen to ndeverge/Valkyrie-RCP 19 hours ago

cmadsen avatar Dec 10 '12 11:12 cmadsen

I think it is in the pipe, from this doc https://help.github.com/articles/how-to-transfer-a-repository :

Good to know: Transfer requests may require approval from GitHub staff. If this is the case, the repo's admin page will show a pending transfer until it has been approved.

ndeverge avatar Dec 10 '12 13:12 ndeverge

Ok!

cmadsen avatar Dec 10 '12 13:12 cmadsen

I got Valkyrie-RPC on my github repository page now.

Thanks!

cmadsen avatar Dec 11 '12 07:12 cmadsen

Great news !

ndeverge avatar Dec 11 '12 08:12 ndeverge

And please add @lievendoclo to the members of the project, he is the author of the framework ;-)

ndeverge avatar Dec 11 '12 08:12 ndeverge

lievendoclo and ndeverge are already on the Collaborators list

cmadsen avatar Dec 11 '12 09:12 cmadsen

Done. Did: // implements ApplicationListener And: // partial fix for https://jira.springsource.org/browse/SPR-9391 // @Configurable does work with ApplicationListener @PostConstruct protected void postConstruct() { // this will cause a memory leak! as there is currently no support for a // call to removeApplicationListener ((ConfigurableApplicationContext) applicationConfig .applicationContext()) .addApplicationListener(new ApplicationListener() { @Override public void onApplicationEvent(ApplicationEvent event) { AbstractObjectTable.this.onApplicationEvent(event); } }); } in AbstractObjectTable.java

cmadsen avatar Dec 18 '12 09:12 cmadsen