Announcement Announcement Module
Collapse
No announcement yet.
Can't find destroy-method Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't find destroy-method

    Code:
    [junit] 2004-10-20 16:54:43,284 [main] ERROR factory.support.DefaultListableBeanFactory - Couldn't find a method named 'stop' on bean with name 'csaIncomingConnectionFactory'
    To verify, right before my unit testing code closes the context, I looked up this bean and verified that it is an ActiveMQConnectionFactory and that bean.getClass().getMethods() returns a method named "stop".

    Any idea why I can see it and invoke it but Spring can't? It is a public method.

    As a sidenote, it would be nice if:

    Code:
    protected void invokeCustomDestroyMethod(String beanName, Object bean, String destroyMethodName)
    in AbstractAutowireCapableBeanFactory would print out the class name of the bean in the case of an error like this...

  • #2
    Has the stop method the signature "public void stop()"?
    If it takes arguments, I fear it might not work. However the exception message should be more detailed in that case.

    Andreas

    Comment


    • #3
      Looking at:
      http://activemq.codehaus.org/maven/apidocs/org/codehaus/activemq/ActiveMQConnectionFactory.html#stop()

      the method is
      public void stop()

      so it should be able to close it. How is the connection factory being accessed? Can you show some of the config as well?

      Comment

      Working...
      X