Hello.
After reading article http://servicemix.apache.org/nmr-flows.html NMR flows
I tired configure my Service Mix containers to use JCA flow.
JCA FLOW
mercury (DMZ) <----------------> venus (LAN)
http-consumer http-provider
The problem is DMZ and LAN restrictions.
Connection should be initialized only from LAN to DMZ.
I've opened only one port for communication between containers.
In my previous configuration I had http consumer and provider on mercury who
send queries to pair http consumer-provider on venus. But this is hard to
keep this configuration down for many services.
On mercury we should deploy only consumers without providers and only
necessary informations (no informations about venus configuration, provider
configuration etc in one world shared should by only queue between
containers).
Do you have any ideas how to configure containers to respect all
limitations?
With current configuration listed below when I send query to mercury, I get
exception:
08:55:27,608 | DEBUG | Dispatching job:
[EMAIL PROTECTED],io=0,w=true,b=false|false]
08:55:27,621 | DEBUG | Receiving HTTP request: POST /proxy/ocs/ HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.0.1
Host: mercury.code-house.org:8092
Content-Length: 417
08:55:27,636 | DEBUG | Created correlation id:
ID:192.168.22.31-11c5030abd7-11:0
08:55:27,636 | DEBUG | Send ID:192.168.22.31-11c5030abd7-11:0 in Delivery
Channel{servicemix-http}
08:55:27,637 | DEBUG | send exchange with secure broker
08:55:27,637 | WARN | ServiceName ({http://ocs2.bpsa.pl/cxf}ProxyProvider)
specified for routing, but can't find it registered
08:55:27,637 | WARN | InterfaceName
({http://ocs2.bpsa.pl/cxf}CalculateType) specified for routing, but can't
find any matching components
08:55:27,637 | WARN | ServiceName ({http://ocs2.bpsa.pl/cxf}ProxyProvider)
specified for routing, but can't find it registered
08:55:27,638 | WARN | InterfaceName
({http://ocs2.bpsa.pl/cxf}CalculateType) specified for routing, but can't
find any matching components
08:55:27,642 | DEBUG | Exception processing:
ID:192.168.22.31-11c5030abd7-11:0 in DeliveryChannel{servicemix-http}
08:55:27,669 | WARN | /proxy/ocs/
java.lang.IllegalStateException: Cannot write non xml faults for non soap
messages
at
org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
at
org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
at
org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
at
org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
But provider endpoint was deployed on venus:
08:55:00,937 | INFO | Starting service unit: ocs-lan-proxy
08:55:00,937 | DEBUG | Starting service unit
08:55:00,937 | DEBUG | Component: servicemix-http activated endpoint:
{http://ocs2.bpsa.pl/cxf}ProxyProvider : ocs-lan-proxy-provider
08:55:00,938 | DEBUG | Querying service description for
ServiceEndpoint[service={http://ocs2.bpsa.pl/cxf}ProxyProvider,endpoint=ocs-lan-proxy-provider]
08:55:00,938 | DEBUG | No description found for
{http://ocs2.bpsa.pl/cxf}ProxyProvider:ocs-lan-proxy-provider
08:55:00,938 | DEBUG | Endpoint
ServiceEndpoint[service={http://ocs2.bpsa.pl/cxf}ProxyProvider,endpoint=ocs-lan-proxy-provider]
has no service description
08:55:00,938 | DEBUG | Querying service description for
ServiceEndpoint[service={http://ocs2.bpsa.pl/cxf}ProxyProvider,endpoint=ocs-lan-proxy-provider]
08:55:00,938 | DEBUG | No description found for
{http://ocs2.bpsa.pl/cxf}ProxyProvider:ocs-lan-proxy-provider
08:55:00,939 | DEBUG | Endpoint
ServiceEndpoint[service={http://ocs2.bpsa.pl/cxf}ProxyProvider,endpoint=ocs-lan-proxy-provider]
has no service description
08:55:00,940 | DEBUG | ServiceMix: broadcasting info for
EndpointEvent[source=ServiceEndpoint[service={http://ocs2.bpsa.pl/cxf}ProxyProvider,endpoint=ocs-lan-proxy-provider]]
08:55:01,049 | DEBUG | ServiceMix: broadcasting info for
.EndpointEvent[source=ServiceEndpoint[service={http://ocs2.bpsa.pl/cxf}ProxyProvider,endpoint=ocs-lan-proxy-provider]]
08:55:01,072 | DEBUG | Service unit started
08:55:01,076 | DEBUG | JMSFlow Called Flow resume
08:55:01,077 | DEBUG | JCAFlow Called Flow resume
08:55:01,077 | INFO | Directory: hotdeploy: Finished installation of
archive: ocs-lan-sa-1.5-SNAPSHOT.zip
Does mercury should receive information about endpoint from venus?
Mercury configuration details:
servicemix.xml
<sm:container id="jbi"
rootDir="./data/smx"
MBeanServer="#jmxServer"
installationDirPath="./hotdeploy"
monitorDeploymentDirectory="false"
monitorInterval="1"
transactionManager="#transactionManager"
createJmxConnector="false"
depends-on="jndi">
<!-- Use a secured broker (see security.xml)
and define the 3 standard flows -->
<sm:broker>
<sm:securedBroker authorizationMap="#authorizationMap">
<sm:flows>
<sm:sedaFlow />
<!--
<sm:jmsFlow jmsURL="${activemq.url}" />
-->
<sm:jcaFlow connectionManager="#connectionManager"
jmsURL="tcp://venus.code-house.org:9280" />
</sm:flows>
</sm:securedBroker>
</sm:broker>
Consumer provider XBean:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:ocs="http://ocs2.jupiter.code-house.org/cxf">
<http:endpoint soap="false" role="consumer"
service="ocs:ProxyConsumer"
endpoint="ocs-dmz-proxy-consumer"
targetService="ocs:ProxyProvider"
targetEndpoint="ocs-lan-proxy-provider"
wsdlResource="classpath:/ocs.wsdl"
targetInterfaceName="ocs:CalculateType"
locationURI="http://mercury.code-house.org:8092/proxy/ocs">
</http:endpoint>
<!-- Previous configuration -->
<!-- <http:endpoint service="ocs:ProxyProvider" soap="false"-->
<!-- endpoint="ocs-dmz-proxy-provider" role="provider" -->
<!-- locationURI="http://venus.code-house.org:9280/proxy/ocs"
/>-->
</beans>
Venus configuration details
servicemix.xml
<sm:container id="jbi"
rootDir="./data/smx"
MBeanServer="#jmxServer"
installationDirPath="./hotdeploy"
monitorDeploymentDirectory="false"
monitorInterval="1"
transactionManager="#transactionManager"
createJmxConnector="false"
depends-on="jndi">
<!-- Use a secured broker (see security.xml)
and define the 3 standard flows -->
<sm:broker>
<sm:securedBroker authorizationMap="#authorizationMap">
<sm:flows>
<sm:sedaFlow />
<!--
<sm:jmsFlow jmsURL="${activemq.url}" />
-->
<sm:jcaFlow connectionManager="#connectionManager"
jmsURL="tcp://venus.code-house.org:9280" />
</sm:flows>
</sm:securedBroker>
</sm:broker>
activemq.xml
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
<amq:transportConnector uri="tcp://venus.code-house.org:9280"
/>
</amq:transportConnectors>
Provider XBean
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:ocs="http://ocs2.jupiter.code-house.org/cxf">
<!-- Old configuration -->
<!-- <http:endpoint soap="false" role="consumer"-->
<!-- service="ocs:ProxyConsumer"-->
<!-- endpoint="ocs-lan-proxy-consumer"-->
<!-- targetService="ocs:ProxyProvider"-->
<!-- targetEndpoint="ocs-lan-proxy-provider"-->
<!-- wsdlResource="classpath:/ocs.wsdl"-->
<!-- targetInterfaceName="ocs:CalculateType"-->
<!--
locationURI="http://venus.code-house.org:9280/proxy/ocs/">-->
<!-- </http:endpoint>-->
<http:endpoint service="ocs:ProxyProvider" soap="false"
endpoint="ocs-lan-proxy-provider" role="provider"
locationURI="http://jupiter.code-house.org/destination/service"
/>
</beans>
Does configuration are broken? What should I do to run these containers and
components in pair?
Regards,
Luke
--
View this message in context:
http://www.nabble.com/Two-containers-connected-by-JCA-flow-tp19529349p19529349.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.