I tried using RemoteServiceMixClient.

    private ServiceMixClient getClient() throws Exception {
        
        RemoteServiceMixClient remoteClient = new
RemoteServiceMixClient("tcp://localhost:61616");
        remoteClient .init();
        remoteClient .start();
        remoteClient client;        
    }

   public static void main(String[] args) throws Exception {
        ServiceMixClient remoteClient  = getClient();

        InOnly exchange = remoteClient  .createInOnlyExchange();

        NormalizedMessage message = exchange.getInMessage();
        QName service = new QName("http://aharsola.com";,
"TransformationService");
        exchange.setService(service); 
        remoteClient  .send(exchange);       
   }


  I started the ServiceMix 3.0.1 in console and ran the above code from from
another console on the same machine. I get following error

javax.jbi.messaging.MessagingException: Could not find route for exchange:
InOnly[
  id: ID:amith-KRISH-4155-1173608201625-14:0
  status: Active
  role: provider
  service: {http://aharsola.com}TransformationService
  in: null
] for service: {http://aharsola.com}TransformationService and interface:
null
        at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:313)
        at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:809)
        

Am I doing anything wrong?

Regards,
Amit



bsnyder wrote:
> 
> On 2/15/07, aharsola <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I have one application that comprises of core processing logic and CRUD
>> operations. We plan to have a web application for CRUD operations for end
>> users. Core/Business logic  comprises of trasformation and communication
>> with different external systems using different protocols and message
>> formats. For this, we feel ServiceMix is the right solution. As I read
>> from
>> document/website, there are two ways to deploy servicemix
>>
>> a. Standalone. Here ServiceMix is not part of WAR/EAR and run
>> independently
>> of web application
>> b. Combine and package both servicemix and web application as a WAR/EAR
>> and
>> deploying to the container
>>
>> If we go with first approach, WEB application would use a POJO BC
>> component
>> to communicate with  SEs for services (assuming both are running on same
>> machine and different JVMs). Now since WEB app and ServiceMix are on diff
>> JVMs and  have different classloaders, how WEB app would access a POJO
>> component?
>>
>> I am not sure how second approach can be implemented. I do not find any
>> good
>> documentation on it.
> 
> Amit, if you're going to use a POJO to communicate from the web
> container JVM to the ServiceMix JVM, you could use the
> RemoteServiceMixClient to create message exchanges and send them to
> the ServiceMix container:
> 
> http://incubator.apache.org/servicemix/maven/servicemix-core/apidocs/org/apache/servicemix/client/RemoteServiceMixClient.html
> 
> There's a test demonstrating it's use here:
> 
> http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/RemoteServiceMixClientTest.java?view=markup
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache Geronimo - http://geronimo.apache.org/
> Apache ActiveMQ - http://activemq.org/
> Apache ServiceMix - http://servicemix.org/
> Castor - http://castor.org/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-ServiceMix-with-App-Server-Web-Container-tf3233110s12049.html#a9419175
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to