« Return to Thread: Spring TCP Endpoint Does Not Start

Re: Spring TCP Endpoint Does Not Start

by Tom Purcell :: Rate this Message:

Reply to Author | View in Thread

Andy

Thanks. I'm going to add another case. This one works.

I was also going to try UMOManagerFactoryBean and create my own model. Since it looked like autowire could not find the model I thought it might help if I explicitly specified one. But UMOManagerFactoryBean has deprecated stamped all over it in the javadoc so I figure I'd stick with Case 4 for now.

Thanks
Tom

Case 4 - Good old fashion mule-config.xml with the SpringConfigurationBuilder - Deploys and starts connections

Case 4 config file:
<?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE mule-configuration PUBLIC "-//MuleSource //DTD mule-configuration XML V1.0//EN"
  "http://mule.mulesource.org/dtds/mule-configuration.dtd">

<mule-configuration id="Broker_Mule" version="1.0">

  <!--
    - Application context definition for inta7x mule/spring configuration.
  -->
  <connector name="TcpConnector" className="org.mule.providers.tcp.TcpConnector">
    <properties>
      <property name="tcpProtocolClassName" value="org.mule.providers.tcp.protocols.MuleMessageProtocol" />
    </properties>
    <connection-strategy className="org.mule.providers.SimpleRetryConnectionStrategy">
      <properties>
        <property name="retryCount" value="3" />
        <property name="frequency" value="2000" />
      </properties>
    </connection-strategy>
  </connector>

  <model name="EmployeeServiceModel">
    <mule-descriptor name="createEmployeeService60772" implementation="org.mule.components.simple.BridgeComponent">
      <inbound-router>
        <endpoint name="TcpcreateEmployeeService60772"
          address="tcp://localhost:60772/tcpcreateEmployeeService60772?method=createEmployee" connector="TcpConnector">
        </endpoint>
      </inbound-router>
    </mule-descriptor>
  </model>
</mule-configuration>

Case 4 Log:
springLoadedMule.log

Andrew Perepelytsya wrote:
Tom, I've filed http://mule.mulesource.org/jira/browse/MULE-1807 to not lose
track of it.

Andrew

On 5/29/07, Tom Purcell <tpurcell@chariotsolutions.com> wrote:
>
>
> Okay
>
> I've stripped down the configs to just the essentials. I have three cases.
> All three have a connector and single inbound endpoint.
> Case1 - Good old fashion mule-config.xml - Deploys and starts connections
> Case2 - Spring with autowire - Does not deploy
> Case3 - Spring without autowire - Deploys and does not start connections
>
> Details follow. Any help would be apprectiated.
>
> Thanks
> Tom
>
> If I run with this configuration using MuleXmlConfigurationBuilder as the
> builder:
> <?xml version="1.0" encoding="UTF-8"?>
>   <!DOCTYPE mule-configuration PUBLIC "-//MuleSource //DTD
> mule-configuration XML V1.0//EN"
>   "http://mule.mulesource.org/dtds/mule-configuration.dtd">
>
> <mule-configuration id="Broker_Mule" version="1.0">
>   <connector name="TcpConnector"
> className="org.mule.providers.tcp.TcpConnector">
>     <properties>
>       <property name="tcpProtocolClassName"
> value="org.mule.providers.tcp.protocols.MuleMessageProtocol" />
>     </properties>
>     <connection-strategy
> className="org.mule.providers.SimpleRetryConnectionStrategy">
>       <properties>
>         <property name="retryCount" value="3" />
>         <property name="frequency" value="2000" />
>       </properties>
>     </connection-strategy>
>   </connector>
>
>   <model name="EmployeeServiceModel">
>     <mule-descriptor name="createEmployeeService60772"
> implementation="org.mule.components.simple.BridgeComponent">
>       <inbound-router>
>         <endpoint name="TcpcreateEmployeeService60772"
>
>
> address="tcp://localhost:60772/tcpcreateEmployeeService60772?method=createEmployee"
> connector="TcpConnector">
>         </endpoint>
>       </inbound-router>
>     </mule-descriptor>
>   </model>
> </mule-configuration>
>
> I endpoint connection get created and I can connect (see
> straightMuleConnects.log).
> http://www.nabble.com/file/p10863972/straightMuleConnects.log
> straightMuleConnects.log
>
> If I run with this and the SpringConfigurationBuilder:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd">
> <beans>
>   <bean id="muleManager"
> class="org.mule.extras.spring.config.AutowireUMOManagerFactoryBean" />
>
>   <bean id="muleNameProcessor"
> class="org.mule.extras.spring.config.MuleObjectNameProcessor" />
>
>   <bean id="tcpConnector" name="tcpConnector"
> class="org.mule.providers.tcp.TcpConnector">
>     <property name="tcpProtocolClassName">
>       <value>org.mule.providers.tcp.protocols.MuleMessageProtocol</value>
>     </property>
>     <property name="connectionStrategy">
>       <bean id="connectionStrategy"
> class="org.mule.providers.SimpleRetryConnectionStrategy">
>         <property name="retryCount">
>           <value>3</value>
>         </property>
>         <property name="frequency">
>           <value>2000</value>
>         </property>
>       </bean>
>     </property>
>   </bean>
>
>   <bean class="org.mule.impl.MuleDescriptor"
> name="createEmployeeService60772" id="createEmployeeService60772">
>     <property name="implementation">
>       <value>org.mule.components.simple.BridgeComponent</value>
>     </property>
>     <property name="inboundEndpoint">
>       <bean class="org.mule.impl.endpoint.MuleEndpoint"
> name="tcpCreateEmployeeService60772"
>         id="tcpCreateEmployeeService60772">
>         <property name="endpointURI">
>           <bean class="org.mule.impl.endpoint.MuleEndpointURI"
> id="muleEndpointUriCreateEmployeeService60772">
>             <constructor-arg index="0" type="java.lang.String">
>
>
> <value>tcp://localhost:60772/tcpCreateEmployeeService60772?method=createEmployee</value>
>             </constructor-arg>
>           </bean>
>         </property>
>         <property name="connector">
>           <ref local="tcpConnector" />
>         </property>
>       </bean>
>     </property>
>   </bean>
> </beans>
>
> Mule does not deploy. It throws an exception (see "muleManagerNoLoad.log"
> for full log):
> ModelServiceNotFoundException: META-INF/services/org/mule/models/jca
> http://www.nabble.com/file/p10863972/muleManagerNoLoad.log
> muleManagerNoLoad.log
>
> If I run with this (no muleManager defined) and the
> SpringConfigurationBuilder:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd">
> <beans>
>   <bean id="muleNameProcessor"
> class="org.mule.extras.spring.config.MuleObjectNameProcessor" />
>
>   <bean id="tcpConnector" name="tcpConnector"
> class="org.mule.providers.tcp.TcpConnector">
>     <property name="tcpProtocolClassName">
>       <value>org.mule.providers.tcp.protocols.MuleMessageProtocol</value>
>     </property>
>     <property name="connectionStrategy">
>       <bean id="connectionStrategy"
> class="org.mule.providers.SimpleRetryConnectionStrategy">
>         <property name="retryCount">
>           <value>3</value>
>         </property>
>         <property name="frequency">
>           <value>2000</value>
>         </property>
>       </bean>
>     </property>
>   </bean>
>
>   <bean class="org.mule.impl.MuleDescriptor"
> name="createEmployeeService60772" id="createEmployeeService60772">
>     <property name="implementation">
>       <value>org.mule.components.simple.BridgeComponent</value>
>     </property>
>     <property name="inboundEndpoint">
>       <bean class="org.mule.impl.endpoint.MuleEndpoint"
> name="tcpCreateEmployeeService60772"
>         id="tcpCreateEmployeeService60772">
>         <property name="endpointURI">
>           <bean class="org.mule.impl.endpoint.MuleEndpointURI"
> id="muleEndpointUriCreateEmployeeService60772">
>             <constructor-arg index="0" type="java.lang.String">
>
>
> <value>tcp://localhost:60772/tcpCreateEmployeeService60772?method=createEmployee</value>
>             </constructor-arg>
>           </bean>
>         </property>
>         <property name="connector">
>           <ref local="tcpConnector" />
>         </property>
>       </bean>
>     </property>
>   </bean>
> </beans>
>
> Mule deploys but does not stert the connections:
>
> http://www.nabble.com/file/p10863972/deployNoConnection.log
> deployNoConnection.log
>
>
>
>
> Andrew Perepelytsya wrote:
> >
> > Tom,
> >
> > What about Weblogic RMI? The reasoning is very simple. Any extra effort
> to
> > run (or take a look) at the case automatically reduces chances of it
> being
> > reviewed at all. I do not mean your specific case, yours is easier, but
> in
> > general. Make it painless, and get better results in return.
> >
> > Andrew
> >
> > On 5/29/07, Tom Purcell <tpurcell@chariotsolutions.com> wrote:
> >>
> >>
> >> Andrew
> >>
> >> I'm using 1.4.0. As for the bare minimum, its pretty sparse now. All I
> >> have
> >> is a connector, an implmentation and a inbound endpoint.
> >>
> >> Thanks
> >> Tom
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Spring-TCP-Endpoint-Does-Not-Start-tf3834941.html#a10863972
> Sent from the Mule - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

 « Return to Thread: Spring TCP Endpoint Does Not Start