13 Replies Latest reply on Apr 1, 2010 9:15 AM by Nicklas Karlsson

    Using XML Bean Config to set default conversation timeout

    Dan Allen Master

      I'm attempting to use the XML Bean Config module to set the default conversation timeout. However, it's not working.


      At first, I tried the following:


      <beans xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:s="urn:java:seam:core" 
         xsi:schemaLocation="
            http://java.sun.com/xml/ns/javaee 
            http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
         
         <s:Conversation>
            <s:extends/>
            <s:timeout>5000</s:timeout>
         </s:Conversation>
         
      </beans>



      But that led to a NullPointer exception when attempting to find the method setTimeout on Conversation, perhaps because Conversation is an interface.


      Out of desperation, I tried to apply the field value to the Conversation implementation in Weld:


      <beans xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:s="urn:java:seam:core"
         xmlns:w="urn:java:org.jboss.weld.conversation" 
         xsi:schemaLocation="
            http://java.sun.com/xml/ns/javaee 
            http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
      
         <w:ConversationImpl>
            <s:extends/>
            <w:timeout>5000</w:timeout>
         </w:ConversationImpl>
         
      </beans>



      However, no matter what combination of <s:extends/> or <s:override/> I tried, I got an ambiguous dependency problem. Any solution?


      Also, if I'm just setting initial property values, which nested tag should I use, extends or override?