This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

inner class as a bean ?

Sep 28th, 2004, 09:33 AM

Can an inner class be declared as a bean?...

<bean id="myThingSyncLock"
class="com.moo.MyThing$SyncLock"/>

What I'm trying to do is synchronize cache access from a non-singleton bean. I want to use IoC to pass in an application-context scoped singleton that can be used as a lock. Using an inner class would make the code cleaner, I think.