[ 
https://issues.apache.org/activemq/browse/AMQ-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56736#action_56736
 ] 

Dejan Bosanac commented on AMQ-2547:
------------------------------------

There's seems to be some regressions in how Spring 3.0.0 works with XBean. 
There are two issues spotted with default configuration

1. <destinationPolicy> error - it seems that Spring 3.0.0 forces elements to be 
in order (alphabetical or probably as they are listed in xsd file). The simple 
workaround is to move <destinationPolicy/> element at the begging of the 
<broker> configuration section. I still need to investigate what causes this 
change.

2. Jetty XBean configuration  doesn't work with Spring 3.0.0 - The simple 
workaround is to use plain Spring configuration. The equivalent of current 
jetty.xml file would be

{code}
<beans
    xmlns="http://www.springframework.org/schema/beans";
    xmlns:jetty="http://mortbay.com/schemas/jetty/1.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd";>
    
    <bean id="Server"
      class="org.mortbay.jetty.Server" init-method="start" 
destroy-method="stop">
    <property name="connectors">
      <list>
        <bean id="Connector" 
class="org.mortbay.jetty.nio.SelectChannelConnector">
          <property name="port" value="8161"/>
        </bean>
      </list>
    </property>

    <property name="handler">
      <bean id="handlers"
           class="org.mortbay.jetty.handler.HandlerCollection">
        <property name="handlers">
          <list>
             <bean id="contexts"
              class="org.mortbay.jetty.handler.ContextHandlerCollection">
               <property name="handlers">
                 <list>
                   <bean class="org.mortbay.jetty.webapp.WebAppContext">
                     <property name="contextPath" value="/admin"/>
                     <property name="resourceBase" 
value="${activemq.base}/webapps/admin"/>
                     <property name="logUrlOnStart" value="true"/>
                   </bean>
                   <bean class="org.mortbay.jetty.webapp.WebAppContext">
                     <property name="contextPath" value="/camel"/>
                     <property name="resourceBase" 
value="${activemq.base}/webapps/camel"/>
                     <property name="logUrlOnStart" value="true"/>
                   </bean>
                   <bean class="org.mortbay.jetty.webapp.WebAppContext">
                     <property name="contextPath" value="/demo"/>
                     <property name="resourceBase" 
value="${activemq.base}/webapps/demo"/>
                     <property name="logUrlOnStart" value="true"/>
                   </bean>
                   <bean class="org.mortbay.jetty.webapp.WebAppContext">
                     <property name="contextPath" value="/fileserver"/>
                     <property name="resourceBase" 
value="${activemq.base}/webapps/fileserver"/>
                     <property name="logUrlOnStart" value="true"/>
                   </bean>
                 </list>
               </property>
             </bean>
          </list>
        </property>
      </bean>
    </property>
</bean>
{code}

We plan to upgrade to Jetty 7 soon (so we can use their web socket 
implementation). They changed they XBean implementation and unfortunately it is 
not yet ready. I'm planning to help this happen soon, so we can upgrade to 
Jetty7 and Spring 3.0 simultaneously. 

> ActiveMQ and Spring 3.0
> -----------------------
>
>                 Key: AMQ-2547
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2547
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>            Reporter: Dejan Bosanac
>
> Make ActiveMQ work correctly with Spring 3.0

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to