lievendoclo / Valkyrie-RCP

A fork from http://www.gitorious.org/valkyrie-rcp
Apache License 2.0
23 stars 10 forks source link

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

Open cmadsen opened 11 years ago

cmadsen commented 11 years ago

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 commented 11 years ago

Is this project dead?

ndeverge commented 11 years ago

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

cmadsen commented 11 years ago

Ok.

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

ndeverge commented 11 years ago

Done ! Thank you very much !

cmadsen commented 11 years ago

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

ndeverge commented 11 years ago

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

cmadsen commented 11 years ago

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

Would you mind trying again?

ndeverge commented 11 years ago

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.

cmadsen commented 11 years ago

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

ndeverge commented 11 years ago

Done !!

cmadsen commented 11 years ago

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

ndeverge commented 11 years ago

Yeah, probably !!

cmadsen commented 11 years ago

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

ndeverge commented 11 years ago

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.

cmadsen commented 11 years ago

Ok!

cmadsen commented 11 years ago

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

Thanks!

ndeverge commented 11 years ago

Great news !

ndeverge commented 11 years ago

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

cmadsen commented 11 years ago

lievendoclo and ndeverge are already on the Collaborators list

cmadsen commented 11 years ago

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