Reply to comment

Spring Singleton

It is important to note that if you use singleton="false" in spring you will get an exception, for example:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 33 in XML document from ServletContext resource [/WEB-INF/subasta-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'singleton' is not allowed to appear in element 'bean'.

To get rid of this exception you have to change singleton="true" to scope="singleton" for more information on which scopes are available in spring I suggest visiting http://static.springsource.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options