Announcement Announcement Module
Collapse
No announcement yet.
Tomcat Clustered Spring App with AOP proxyed beans Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tomcat Clustered Spring App with AOP proxyed beans

    Greetings,
    Recently develop a clustered Tomcat Spring 3.0 app with AOP proxyed Spring 3.beans.
    Having found problems with AOP proxyed Spring beans had to avoid using @Autowire in favor off applicationContext.getBean("XXxxxx") because autowired AOP proxyed beans not been Serializable.
    Is there a better way to retain autowired and clustered AOP proxyed Spring beans ?

    Thank you, Oscar

  • #2
    Hello

    Having found problems with AOP proxyed Spring beans had to avoid using @Autowire in favor off applicationContext.getBean("XXxxxx") because autowired AOP proxyed beans not been Serializable.
    Could you post your Spring configuration for clustering?

    To have a better idea and then some ideas could arise from other members

    Comment


    • #3
      Didn't have to do anything special in Spring to make the application clusterable other than:
      1 ) In web.xml add the tag <distributable/>
      2 ) Make sure that all Spring beans with session scope been serializaable

      The problem was that some "autowired web session beans" where AOP proxyed and this failed because AOP proxyed beans aren't serializable.
      My felling is that would need some sort off web session listener to refresh the Spring container on session restore what would like to know is what could be best way address this problem allowing to maintain the convinence off autowiring.
      Thank you Luis Oscar Trigueiros

      Comment


      • #4
        OK , I see your point

        Could you use other clustering solution?, perhaps Terracotta?

        My felling is that would need some sort off web session listener to refresh the Spring container on session restore what would like to know is what could be best way address this problem allowing to maintain the convinence off autowiring.
        Could be really complicated

        Just curious

        The problem was that some "autowired web session beans" where AOP proxyed and this failed because AOP proxyed beans aren't serializable.
        Have you received an error about that?, If yes, post the complete error stack trace

        Comment

        Working...
        X