Announcement Announcement Module
Collapse
No announcement yet.
inner class as a bean ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • inner class as a bean ?

    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.

    Thanks,
    boz

  • #2
    Fixed.

    The inner class was not static. Making it static works fine.

    Comment

    Working...
    X