You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Hossam Karim <hr...@gmail.com> on 2006/02/27 01:38:44 UTC

Connections addresses must be activated in order to be resolved

Hi,
  Thanks again SM Team for resolving the multiple connections issue.
Currently SM can recognize more than one connection in the deployment
descriptor of a service assembly.
The problem now is that the consumer and provider addresses in a connection
must have been activated in order to be recognized by SM. I think this
shouldn't be a requirement but don't know for sure. This is achievable if SM
can read the service units deployment descriptors and do the mix and match,
unfortunately, SM is not doing so currently. The work around is to deploy
and start a separate SA for connections after all the referenced endpoints
have been deployed and started. I appreciate if someone can share a simpler
workaround until this is resolved.

Cheers,
Hossam Karim

RE: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Hossam Karim <hr...@gmail.com>.
It just worked!
Thanks Guillaume, keep on the excellent work.

Hossam Karim

-----Original Message-----
From: Guillaume Nodet [mailto:gnodet@gmail.com] 
Sent: Wednesday, March 08, 2006 11:02 PM
To: servicemix-users@geronimo.apache.org
Subject: Re: [Resolved]Connections addresses must be activated in order to
be resolved

I have checked in some new code to retrieve the interface name of an
endpoint,
based on the jbi descritors of SUs deployed on the components.
Tell me if it works for you ...

Cheers,
Guillaume Nodet

On 3/8/06, Hossam Karim < hr.aebcg@gmail.com> wrote:
>
> Glade we came up with a conclusion, do you think I should reopen SM-295?
>
>
> -----Original Message-----
> From: Guillaume Nodet [mailto:gnodet@gmail.com]
> Sent: Tuesday, March 07, 2006 3:00 PM
> To: servicemix-users@geronimo.apache.org
> Subject: Re: [Resolved]Connections addresses must be activated in order to
> be resolved
>
> The interface connection says that when the consumer sends
> an exchange to interface csi:csi-interface, it will be
> redirected to  endpoint {ems:ems-service}/ems-smtp-endpoint.
> If you use the csi:csi-interface in your connection, you
> won't need to use a WSDL, because it will be translated into
> the provider endpoint.
> I do thing that the code i've written in my previous post
> should work as is.
>
> Interface connections do not really need informations provided
> by SU descriptors.  The only case where it is needed is when
> using endpoint connections, where the link type is retrieved
> from the SU descriptor.  However, i have not found a way
> to use it yet (recall the fact that "consumer endpoints" do
> not exist).
>
> When you create the exchange, if you use an interface name,
> other than the one specified in the consumer part of the
> connection, no connection routing will be performed, and implicit
> endpoint selection will occur using the given interface
> name.  In such a case, a WSDL should be provided, as
> ServiceMix does not currently uses the <provides /> tag
> to infer the interface name of an activated endpoint.
> Please raise a JIRA for that, though it is not in the spec.
>
> Cheers,
> Guillaume Nodet
>
> On 3/7/06, Hossam Karim < hr.aebcg@gmail.com> wrote:
> >
> > Thanks so much for your explanation. Please find my comments inline:
> >
> > On 3/7/06, Guillaume Nodet <gn...@gmail.com> wrote:
> > >
> > > I don't think what you want to achieve is jbi compliant.
> >
> >
> > Yes, I don't think so. This is because I am not addressing any provider
> in
> > my code.
> > To confirm:
> > - If I use channel.createExchangeFactory() version, then the exchange
> > should
> > be created using createExchange(javax.xml.namespace.QName serviceName,
> > javax.xml.namespace.QName operationName), or I should use other version
> of
> > createExchangeFactory*(<with parameter>).
> > - Trying the modified delivery method I get:
> > 13:41:43,906 WARN  [Broker] InterfaceName ({
> >
http://www.gaiati.com/emee/ns/ems}ems-interface<http://www.gaiati.com/emee/n
s/ems%7Dems-interface>)
> specified for routing,
> > but
> > can't find any matching components
> > I am currently returning null in getServiceDescription of the provider
> > component, should a WSDL solve this, or SUs 'provides' element is
> enough?
> > - Is 'consumes' link-type attribute currently supported?
> >
> >
> >
> > Let me explain.  Previously, when a service assembly connection
> > > was used, the default routing for the component was modified.
> > > For an endpoint connection, the previous behavior was to look
> > > for an existing endpoint with the consumer address, retrieve its
> > > activationSpec and set the default destination endpoint to the
> provider
> > > endpoint.
> > > The main problem is that exchanges are sent from a consumer component
> > > to a provider endpoint, but there is no "consumer endpoint".
> > > For example an http binding component that acts as a consumer does not
>
> > > need to activate any endpoints at all.
> > >
> > > Looking at sections 6.3.1.9 and 6.6.3, my understanding is that the
> > > consumer endoint informations in the connection are used to make a
> > > proxy / redirection.  When *a* consumer component sends an exchange,
> > > it must specify one of the three different address type:
> > >   * an interface name: if an interface connection has been activated,
> > the
> > >      exchange will be routed to the provider endpoint defined in the
> > > connection
> > >      else implicit endpoint selection occurs
> > >   * a service name: implicit endpoint selection occurs
> > >   * an endpoint: if the endpoint is an endpoint created by an endpoint
> > >      connection, the exchange will be routed to the provider endpoint
> > > defined
> > >      by the connection, else it is routed to the specified endpoint
> > >
> > > So I think your jbi descriptors should look like:
> > >
> > > SA:
> > >
> > >        <connections>
> > >          <connection>
> > >             <consumer interface-name="csi:csi-interface"/>
> > >             <provider service-name="ems:ems-service"
> > >                       endpoint-name="ems-smtp-endpoint"/>
> > >          </connection>
> > >        </connections>
> > >
> > > Consumer SU:
> > >
> > >        <services>
> > >          <consumes interface-name="csi:csi-interface"/>
> > >        </services>
> >
> > I think you meant:
> > <services>
> >          <consumes interface-name="ems:ems-interface"/>
> > </services>
> >
> > Provider SU:
> > >
> > >        <services>
> > >          <provides interface-name="ems:ems-interface"
> > >                    service-name="ems:ems-service"
> > >                    endpoint-name="ems-smtp-endpoint"/>
> > >        </services>
> > >
> > > Delivery:
> > >
> > >   public void deliver(Source source){
> > >     DeliveryChannel channel = getDeliveryChannel();
> > >     MessageExchangeFactory mef = channel.createExchangeFactory(
> > >         new QName("http://www.gaiati.com/emee/ns/csi",
> > "csi-interface"));
> > >     MessageExchange mx = getMessageExchange(mef);
> > >     NormalizedMessage message;
> > >     try{
> > >       message = mx.createMessage();
> > >       message.setContent(source);
> > >       mx.setMessage(message, "in");
> > >       mx.setOperation(getOperationName());
> > >       channel.send(mx);
> > >     }
> > >     catch(MessagingException e){
> > >       log.fatal(e.getMessage());
> > >     }
> > >   }
> >
> >
> > I also think you meant:
> > public void deliver(Source source){
> >     DeliveryChannel channel = getDeliveryChannel();
> >     MessageExchangeFactory mef = channel.createExchangeFactory (
> >         new QName("http://www.gaiati.com/emee/ns/ems",
> "ems-interface"));
> >
> > >     MessageExchange mx = getMessageExchange(mef);
> > >     NormalizedMessage message;
> > >     try{
> > >       message = mx.createMessage();
> > >       message.setContent(source);
> > >       mx.setMessage(message, "in");
> > >       mx.setOperation(getOperationName());
> > >       channel.send(mx);
> > >     }
> > >     catch(MessagingException e){
> > >       log.fatal(e.getMessage());
> > >     }
> > >   }
> >
> >
> >
> > Of course, you could also use an endpoint connection, instead of an
> > > interface connection.
> > >
> > > Cheers,
> > > Guillaume Nodet
> > >
> > > On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> > > >
> > > > Hi Guillaume,
> > > >   SM throws a MessagingException when a consumer tries to send an
> > > exchange
> > > > without addressing a provider, while there is a connection between
> > this
> > > > consumer and the provider defined through a deployed service
> assembly.
> > > > Please see " 5.4.3.2 Implicit Endpoint Selection Process"
> > > >
> > > > For example:
> > > >
> > > > The service assembly descriptor:
> > > > --------------------------------
> > > >
> > > > <jbi xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > > >      xmlns:csi=" http://www.gaiati.com/emee/ns/csi"
> > > >      xmlns="http://java.sun.com/xml/ns/jbi"
> > > >      xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> > > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > > >      version="1">
> > > >    <service-assembly>
> > > >       <identification>
> > > >          <name>csi-sa</name>
> > > >          <description>Channel Service Instance Service
> > > > Assembly</description>
> > > >       </identification>
> > > >       <service-unit>
> > > >          <identification>
> > > >             <name>csi-email-su</name>
> > > >             <description>EMail service unit</description>
> > > >          </identification>
> > > >          <target>
> > > >             <artifacts-zip> csi-email-su.zip</artifacts-zip>
> > > >
> > > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> > </component-name>
> > > >          </target>
> > > >       </service-unit>
> > > >       <service-unit>
> > > >          <identification>
> > > >             <name>csi-sms-su</name>
> > > >             <description>SMS service unit</description>
> > > >          </identification>
> > > >          <target>
> > > >             <artifacts-zip>csi-sms-su.zip</artifacts-zip>
> > > >
> > > > <component-name> com.gaiati.jbi.component.csi.CsiBinding
> > </component-name>
> > > >          </target>
> > > >       </service-unit>
> > > >       <service-unit>
> > > >          <identification>
> > > >             <name>csi-soap-email-su</name>
> > > >             <description>Soap Listener for EMail</description>
> > > >          </identification>
> > > >          <target>
> > > >             <artifacts-zip>csi-soap-email-su.zip</artifacts-zip>
> > > >
> > > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> > </component-name>
> > > >          </target>
> > > >       </service-unit>
> > > >       <connections>
> > > >          <connection>
> > > >             <consumer service-name="csi:csi-service"
> > > > endpoint-name="csi-email-endpoint"/>
> > > >             <provider service-name="ems:ems-service"
> > > > endpoint-name="ems-smtp-endpoint"/>
> > > >          </connection>
> > > >          <connection>
> > > >             <consumer service-name="csi:csi-service"
> > > > endpoint-name="csi-soap-email-endpoint"/>
> > > >             <provider service-name="ems:ems-service"
> > > > endpoint-name="ems-smtp-endpoint"/>
> > > >          </connection>
> > > >       </connections>
> > > >    </service-assembly>
> > > > </jbi>
> > > >
> > > >
> > > > The consumer service unit descriptor:
> > > > -------------------------------------
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi "
> > > >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > > >      xmlns="http://java.sun.com/xml/ns/jbi "
> > > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > >      xsi:schemaLocation=" http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > > >      version="1.0">
> > > >    <services>
> > > >       <consumes interface-name="ems:ems-interface"
> > > > service-name="ems:ems-service"
> > > >                 endpoint-name="ems-smtp-endpoint"
> > > >                 link-type="standard"/>
> > > >       <provides interface-name="csi:csi-interface"
> > > > service-name="csi:csi-service"
> > > >                 endpoint-name="csi-email-endpoint"/>
> > > >    </services>
> > > > </jbi>
> > > >
> > > > The provider service unit descriptor:
> > > > -------------------------------------
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <jbi xmlns:csi=" http://www.gaiati.com/emee/ns/csi"
> > > >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > > >      xmlns=" http://java.sun.com/xml/ns/jbi"
> > > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > > >      version="1.0">
> > > >    <services>
> > > >       <provides interface-name="ems:ems-interface"
> > > > service-name="ems:ems-service"
> > > >                 endpoint-name="ems-smtp-endpoint"/>
> > > >    </services>
> > > > </jbi>
> > > >
> > > >
> > > > Delivery method:
> > > > ----------------
> > > >
> > > > public void deliver(Source source){
> > > >     DeliveryChannel channel = getDeliveryChannel();
> > > >     MessageExchangeFactory mef = channel.createExchangeFactory();
> > > >     MessageExchange mx = getMessageExchange(mef);
> > > >     NormalizedMessage message;
> > > >     try{
> > > >       message = mx.createMessage();
> > > >       message.setContent(source);
> > > >       mx.setMessage(message, "in");
> > > >       mx.setOperation(getOperationName());
> > > >       channel.send(mx);
> > > >     }
> > > >     catch(MessagingException e){
> > > >       log.fatal(e.getMessage ());
> > > >     }
> > > >
> > > >   }
> > > >
> > > > This is logging:
> > > > 11:13:05,109 FATAL [CsiTarget] Could not find route for exchange:
> > > > org.apache.servicemix.jbi.messaging.InOnlyImpl@1b8737f for service:
> > null
> > > > and
> > > > interface: null
> > > >
> > > > This actually worked on a previous snapshot, but now is throwing the
>
> > > > exception, so I am assuming this is broken.
> > > >
> > > > Thanks,
> > > > Hossam Karim
> > > >
> > > > -----Original Message-----
> > > > From: Guillaume Nodet [mailto: gnodet@gmail.com]
> > > > Sent: Tuesday, March 07, 2006 9:55 AM
> > > > To: servicemix-users@geronimo.apache.org
> > > > Subject: Re: [Resolved]Connections addresses must be activated in
> > order
> > > to
> > > > be resolved
> > > >
> > > > Hi,
> > > >
> > > > What do you mean by default routing destinations is broken ?
> > > > Do you have an example ?
> > > >
> > > > Cheers,
> > > > Guillaume Nodet
> > > >
> > > > On 3/7/06, Hossam Karim < hr.aebcg@gmail.com> wrote:
> > > > >
> > > > > Hello,
> > > > >
> > > > >   I believe Guillaume's fix for SM-295 resolved this issue, but I
> > > think
> > > > > default routing destinations is now broken.
> > > > >
> > > > >
> > > > >
> > > > >   _____
> > > > >
> > > > > From: Hossam Karim [mailto: hr.aebcg@gmail.com]
> > > > > Sent: Monday, February 27, 2006 2:39 AM
> > > > > To: servicemix-users@geronimo.apache.org
> > > > > Subject: Connections addresses must be activated in order to be
> > > resolved
> > > > >
> > > > >
> > > > >
> > > > > Hi,
> > > > >   Thanks again SM Team for resolving the multiple connections
> issue.
> > > > > Currently SM can recognize more than one connection in the
> > deployment
> > > > > descriptor of a service assembly.
> > > > > The problem now is that the consumer and provider addresses in a
> > > > > connection
> > > > > must have been activated in order to be recognized by SM. I think
> > this
> > > > > shouldn't be a requirement but don't know for sure. This is
> > achievable
> > > > if
> > > > > SM
> > > > > can read the service units deployment descriptors and do the mix
> and
> > > > > match,
> > > > > unfortunately, SM is not doing so currently. The work around is to
>
> > > > deploy
> > > > > and start a separate SA for connections after all the referenced
> > > > endpoints
> > > > > have been deployed and started. I appreciate if someone can share
> a
> > > > > simpler
> > > > > workaround until this is resolved.
> > > > >
> > > > > Cheers,
> > > > > Hossam Karim
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Re: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Guillaume Nodet <gn...@gmail.com>.
I have checked in some new code to retrieve the interface name of an
endpoint,
based on the jbi descritors of SUs deployed on the components.
Tell me if it works for you ...

Cheers,
Guillaume Nodet

On 3/8/06, Hossam Karim < hr.aebcg@gmail.com> wrote:
>
> Glade we came up with a conclusion, do you think I should reopen SM-295?
>
>
> -----Original Message-----
> From: Guillaume Nodet [mailto:gnodet@gmail.com]
> Sent: Tuesday, March 07, 2006 3:00 PM
> To: servicemix-users@geronimo.apache.org
> Subject: Re: [Resolved]Connections addresses must be activated in order to
> be resolved
>
> The interface connection says that when the consumer sends
> an exchange to interface csi:csi-interface, it will be
> redirected to  endpoint {ems:ems-service}/ems-smtp-endpoint.
> If you use the csi:csi-interface in your connection, you
> won't need to use a WSDL, because it will be translated into
> the provider endpoint.
> I do thing that the code i've written in my previous post
> should work as is.
>
> Interface connections do not really need informations provided
> by SU descriptors.  The only case where it is needed is when
> using endpoint connections, where the link type is retrieved
> from the SU descriptor.  However, i have not found a way
> to use it yet (recall the fact that "consumer endpoints" do
> not exist).
>
> When you create the exchange, if you use an interface name,
> other than the one specified in the consumer part of the
> connection, no connection routing will be performed, and implicit
> endpoint selection will occur using the given interface
> name.  In such a case, a WSDL should be provided, as
> ServiceMix does not currently uses the <provides /> tag
> to infer the interface name of an activated endpoint.
> Please raise a JIRA for that, though it is not in the spec.
>
> Cheers,
> Guillaume Nodet
>
> On 3/7/06, Hossam Karim < hr.aebcg@gmail.com> wrote:
> >
> > Thanks so much for your explanation. Please find my comments inline:
> >
> > On 3/7/06, Guillaume Nodet <gn...@gmail.com> wrote:
> > >
> > > I don't think what you want to achieve is jbi compliant.
> >
> >
> > Yes, I don't think so. This is because I am not addressing any provider
> in
> > my code.
> > To confirm:
> > - If I use channel.createExchangeFactory() version, then the exchange
> > should
> > be created using createExchange(javax.xml.namespace.QName serviceName,
> > javax.xml.namespace.QName operationName), or I should use other version
> of
> > createExchangeFactory*(<with parameter>).
> > - Trying the modified delivery method I get:
> > 13:41:43,906 WARN  [Broker] InterfaceName ({
> > http://www.gaiati.com/emee/ns/ems}ems-interface<http://www.gaiati.com/emee/ns/ems%7Dems-interface>)
> specified for routing,
> > but
> > can't find any matching components
> > I am currently returning null in getServiceDescription of the provider
> > component, should a WSDL solve this, or SUs 'provides' element is
> enough?
> > - Is 'consumes' link-type attribute currently supported?
> >
> >
> >
> > Let me explain.  Previously, when a service assembly connection
> > > was used, the default routing for the component was modified.
> > > For an endpoint connection, the previous behavior was to look
> > > for an existing endpoint with the consumer address, retrieve its
> > > activationSpec and set the default destination endpoint to the
> provider
> > > endpoint.
> > > The main problem is that exchanges are sent from a consumer component
> > > to a provider endpoint, but there is no "consumer endpoint".
> > > For example an http binding component that acts as a consumer does not
>
> > > need to activate any endpoints at all.
> > >
> > > Looking at sections 6.3.1.9 and 6.6.3, my understanding is that the
> > > consumer endoint informations in the connection are used to make a
> > > proxy / redirection.  When *a* consumer component sends an exchange,
> > > it must specify one of the three different address type:
> > >   * an interface name: if an interface connection has been activated,
> > the
> > >      exchange will be routed to the provider endpoint defined in the
> > > connection
> > >      else implicit endpoint selection occurs
> > >   * a service name: implicit endpoint selection occurs
> > >   * an endpoint: if the endpoint is an endpoint created by an endpoint
> > >      connection, the exchange will be routed to the provider endpoint
> > > defined
> > >      by the connection, else it is routed to the specified endpoint
> > >
> > > So I think your jbi descriptors should look like:
> > >
> > > SA:
> > >
> > >        <connections>
> > >          <connection>
> > >             <consumer interface-name="csi:csi-interface"/>
> > >             <provider service-name="ems:ems-service"
> > >                       endpoint-name="ems-smtp-endpoint"/>
> > >          </connection>
> > >        </connections>
> > >
> > > Consumer SU:
> > >
> > >        <services>
> > >          <consumes interface-name="csi:csi-interface"/>
> > >        </services>
> >
> > I think you meant:
> > <services>
> >          <consumes interface-name="ems:ems-interface"/>
> > </services>
> >
> > Provider SU:
> > >
> > >        <services>
> > >          <provides interface-name="ems:ems-interface"
> > >                    service-name="ems:ems-service"
> > >                    endpoint-name="ems-smtp-endpoint"/>
> > >        </services>
> > >
> > > Delivery:
> > >
> > >   public void deliver(Source source){
> > >     DeliveryChannel channel = getDeliveryChannel();
> > >     MessageExchangeFactory mef = channel.createExchangeFactory(
> > >         new QName("http://www.gaiati.com/emee/ns/csi",
> > "csi-interface"));
> > >     MessageExchange mx = getMessageExchange(mef);
> > >     NormalizedMessage message;
> > >     try{
> > >       message = mx.createMessage();
> > >       message.setContent(source);
> > >       mx.setMessage(message, "in");
> > >       mx.setOperation(getOperationName());
> > >       channel.send(mx);
> > >     }
> > >     catch(MessagingException e){
> > >       log.fatal(e.getMessage());
> > >     }
> > >   }
> >
> >
> > I also think you meant:
> > public void deliver(Source source){
> >     DeliveryChannel channel = getDeliveryChannel();
> >     MessageExchangeFactory mef = channel.createExchangeFactory (
> >         new QName("http://www.gaiati.com/emee/ns/ems",
> "ems-interface"));
> >
> > >     MessageExchange mx = getMessageExchange(mef);
> > >     NormalizedMessage message;
> > >     try{
> > >       message = mx.createMessage();
> > >       message.setContent(source);
> > >       mx.setMessage(message, "in");
> > >       mx.setOperation(getOperationName());
> > >       channel.send(mx);
> > >     }
> > >     catch(MessagingException e){
> > >       log.fatal(e.getMessage());
> > >     }
> > >   }
> >
> >
> >
> > Of course, you could also use an endpoint connection, instead of an
> > > interface connection.
> > >
> > > Cheers,
> > > Guillaume Nodet
> > >
> > > On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> > > >
> > > > Hi Guillaume,
> > > >   SM throws a MessagingException when a consumer tries to send an
> > > exchange
> > > > without addressing a provider, while there is a connection between
> > this
> > > > consumer and the provider defined through a deployed service
> assembly.
> > > > Please see " 5.4.3.2 Implicit Endpoint Selection Process"
> > > >
> > > > For example:
> > > >
> > > > The service assembly descriptor:
> > > > --------------------------------
> > > >
> > > > <jbi xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > > >      xmlns:csi=" http://www.gaiati.com/emee/ns/csi"
> > > >      xmlns="http://java.sun.com/xml/ns/jbi"
> > > >      xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> > > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > > >      version="1">
> > > >    <service-assembly>
> > > >       <identification>
> > > >          <name>csi-sa</name>
> > > >          <description>Channel Service Instance Service
> > > > Assembly</description>
> > > >       </identification>
> > > >       <service-unit>
> > > >          <identification>
> > > >             <name>csi-email-su</name>
> > > >             <description>EMail service unit</description>
> > > >          </identification>
> > > >          <target>
> > > >             <artifacts-zip> csi-email-su.zip</artifacts-zip>
> > > >
> > > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> > </component-name>
> > > >          </target>
> > > >       </service-unit>
> > > >       <service-unit>
> > > >          <identification>
> > > >             <name>csi-sms-su</name>
> > > >             <description>SMS service unit</description>
> > > >          </identification>
> > > >          <target>
> > > >             <artifacts-zip>csi-sms-su.zip</artifacts-zip>
> > > >
> > > > <component-name> com.gaiati.jbi.component.csi.CsiBinding
> > </component-name>
> > > >          </target>
> > > >       </service-unit>
> > > >       <service-unit>
> > > >          <identification>
> > > >             <name>csi-soap-email-su</name>
> > > >             <description>Soap Listener for EMail</description>
> > > >          </identification>
> > > >          <target>
> > > >             <artifacts-zip>csi-soap-email-su.zip</artifacts-zip>
> > > >
> > > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> > </component-name>
> > > >          </target>
> > > >       </service-unit>
> > > >       <connections>
> > > >          <connection>
> > > >             <consumer service-name="csi:csi-service"
> > > > endpoint-name="csi-email-endpoint"/>
> > > >             <provider service-name="ems:ems-service"
> > > > endpoint-name="ems-smtp-endpoint"/>
> > > >          </connection>
> > > >          <connection>
> > > >             <consumer service-name="csi:csi-service"
> > > > endpoint-name="csi-soap-email-endpoint"/>
> > > >             <provider service-name="ems:ems-service"
> > > > endpoint-name="ems-smtp-endpoint"/>
> > > >          </connection>
> > > >       </connections>
> > > >    </service-assembly>
> > > > </jbi>
> > > >
> > > >
> > > > The consumer service unit descriptor:
> > > > -------------------------------------
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi "
> > > >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > > >      xmlns="http://java.sun.com/xml/ns/jbi "
> > > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > >      xsi:schemaLocation=" http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > > >      version="1.0">
> > > >    <services>
> > > >       <consumes interface-name="ems:ems-interface"
> > > > service-name="ems:ems-service"
> > > >                 endpoint-name="ems-smtp-endpoint"
> > > >                 link-type="standard"/>
> > > >       <provides interface-name="csi:csi-interface"
> > > > service-name="csi:csi-service"
> > > >                 endpoint-name="csi-email-endpoint"/>
> > > >    </services>
> > > > </jbi>
> > > >
> > > > The provider service unit descriptor:
> > > > -------------------------------------
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <jbi xmlns:csi=" http://www.gaiati.com/emee/ns/csi"
> > > >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > > >      xmlns=" http://java.sun.com/xml/ns/jbi"
> > > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > > >      version="1.0">
> > > >    <services>
> > > >       <provides interface-name="ems:ems-interface"
> > > > service-name="ems:ems-service"
> > > >                 endpoint-name="ems-smtp-endpoint"/>
> > > >    </services>
> > > > </jbi>
> > > >
> > > >
> > > > Delivery method:
> > > > ----------------
> > > >
> > > > public void deliver(Source source){
> > > >     DeliveryChannel channel = getDeliveryChannel();
> > > >     MessageExchangeFactory mef = channel.createExchangeFactory();
> > > >     MessageExchange mx = getMessageExchange(mef);
> > > >     NormalizedMessage message;
> > > >     try{
> > > >       message = mx.createMessage();
> > > >       message.setContent(source);
> > > >       mx.setMessage(message, "in");
> > > >       mx.setOperation(getOperationName());
> > > >       channel.send(mx);
> > > >     }
> > > >     catch(MessagingException e){
> > > >       log.fatal(e.getMessage ());
> > > >     }
> > > >
> > > >   }
> > > >
> > > > This is logging:
> > > > 11:13:05,109 FATAL [CsiTarget] Could not find route for exchange:
> > > > org.apache.servicemix.jbi.messaging.InOnlyImpl@1b8737f for service:
> > null
> > > > and
> > > > interface: null
> > > >
> > > > This actually worked on a previous snapshot, but now is throwing the
>
> > > > exception, so I am assuming this is broken.
> > > >
> > > > Thanks,
> > > > Hossam Karim
> > > >
> > > > -----Original Message-----
> > > > From: Guillaume Nodet [mailto: gnodet@gmail.com]
> > > > Sent: Tuesday, March 07, 2006 9:55 AM
> > > > To: servicemix-users@geronimo.apache.org
> > > > Subject: Re: [Resolved]Connections addresses must be activated in
> > order
> > > to
> > > > be resolved
> > > >
> > > > Hi,
> > > >
> > > > What do you mean by default routing destinations is broken ?
> > > > Do you have an example ?
> > > >
> > > > Cheers,
> > > > Guillaume Nodet
> > > >
> > > > On 3/7/06, Hossam Karim < hr.aebcg@gmail.com> wrote:
> > > > >
> > > > > Hello,
> > > > >
> > > > >   I believe Guillaume's fix for SM-295 resolved this issue, but I
> > > think
> > > > > default routing destinations is now broken.
> > > > >
> > > > >
> > > > >
> > > > >   _____
> > > > >
> > > > > From: Hossam Karim [mailto: hr.aebcg@gmail.com]
> > > > > Sent: Monday, February 27, 2006 2:39 AM
> > > > > To: servicemix-users@geronimo.apache.org
> > > > > Subject: Connections addresses must be activated in order to be
> > > resolved
> > > > >
> > > > >
> > > > >
> > > > > Hi,
> > > > >   Thanks again SM Team for resolving the multiple connections
> issue.
> > > > > Currently SM can recognize more than one connection in the
> > deployment
> > > > > descriptor of a service assembly.
> > > > > The problem now is that the consumer and provider addresses in a
> > > > > connection
> > > > > must have been activated in order to be recognized by SM. I think
> > this
> > > > > shouldn't be a requirement but don't know for sure. This is
> > achievable
> > > > if
> > > > > SM
> > > > > can read the service units deployment descriptors and do the mix
> and
> > > > > match,
> > > > > unfortunately, SM is not doing so currently. The work around is to
>
> > > > deploy
> > > > > and start a separate SA for connections after all the referenced
> > > > endpoints
> > > > > have been deployed and started. I appreciate if someone can share
> a
> > > > > simpler
> > > > > workaround until this is resolved.
> > > > >
> > > > > Cheers,
> > > > > Hossam Karim
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

RE: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Hossam Karim <hr...@gmail.com>.
Glade we came up with a conclusion, do you think I should reopen SM-295?


-----Original Message-----
From: Guillaume Nodet [mailto:gnodet@gmail.com] 
Sent: Tuesday, March 07, 2006 3:00 PM
To: servicemix-users@geronimo.apache.org
Subject: Re: [Resolved]Connections addresses must be activated in order to
be resolved

The interface connection says that when the consumer sends
an exchange to interface csi:csi-interface, it will be
redirected to  endpoint {ems:ems-service}/ems-smtp-endpoint.
If you use the csi:csi-interface in your connection, you
won't need to use a WSDL, because it will be translated into
the provider endpoint.
I do thing that the code i've written in my previous post
should work as is.

Interface connections do not really need informations provided
by SU descriptors.  The only case where it is needed is when
using endpoint connections, where the link type is retrieved
from the SU descriptor.  However, i have not found a way
to use it yet (recall the fact that "consumer endpoints" do
not exist).

When you create the exchange, if you use an interface name,
other than the one specified in the consumer part of the
connection, no connection routing will be performed, and implicit
endpoint selection will occur using the given interface
name.  In such a case, a WSDL should be provided, as
ServiceMix does not currently uses the <provides /> tag
to infer the interface name of an activated endpoint.
Please raise a JIRA for that, though it is not in the spec.

Cheers,
Guillaume Nodet

On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
>
> Thanks so much for your explanation. Please find my comments inline:
>
> On 3/7/06, Guillaume Nodet <gn...@gmail.com> wrote:
> >
> > I don't think what you want to achieve is jbi compliant.
>
>
> Yes, I don't think so. This is because I am not addressing any provider in
> my code.
> To confirm:
> - If I use channel.createExchangeFactory() version, then the exchange
> should
> be created using createExchange(javax.xml.namespace.QName serviceName,
> javax.xml.namespace.QName operationName), or I should use other version of
> createExchangeFactory*(<with parameter>).
> - Trying the modified delivery method I get:
> 13:41:43,906 WARN  [Broker] InterfaceName ({
> http://www.gaiati.com/emee/ns/ems}ems-interface) specified for routing,
> but
> can't find any matching components
> I am currently returning null in getServiceDescription of the provider
> component, should a WSDL solve this, or SUs 'provides' element is enough?
> - Is 'consumes' link-type attribute currently supported?
>
>
>
> Let me explain.  Previously, when a service assembly connection
> > was used, the default routing for the component was modified.
> > For an endpoint connection, the previous behavior was to look
> > for an existing endpoint with the consumer address, retrieve its
> > activationSpec and set the default destination endpoint to the provider
> > endpoint.
> > The main problem is that exchanges are sent from a consumer component
> > to a provider endpoint, but there is no "consumer endpoint".
> > For example an http binding component that acts as a consumer does not
> > need to activate any endpoints at all.
> >
> > Looking at sections 6.3.1.9 and 6.6.3, my understanding is that the
> > consumer endoint informations in the connection are used to make a
> > proxy / redirection.  When *a* consumer component sends an exchange,
> > it must specify one of the three different address type:
> >   * an interface name: if an interface connection has been activated,
> the
> >      exchange will be routed to the provider endpoint defined in the
> > connection
> >      else implicit endpoint selection occurs
> >   * a service name: implicit endpoint selection occurs
> >   * an endpoint: if the endpoint is an endpoint created by an endpoint
> >      connection, the exchange will be routed to the provider endpoint
> > defined
> >      by the connection, else it is routed to the specified endpoint
> >
> > So I think your jbi descriptors should look like:
> >
> > SA:
> >
> >        <connections>
> >          <connection>
> >             <consumer interface-name="csi:csi-interface"/>
> >             <provider service-name="ems:ems-service"
> >                       endpoint-name="ems-smtp-endpoint"/>
> >          </connection>
> >        </connections>
> >
> > Consumer SU:
> >
> >        <services>
> >          <consumes interface-name="csi:csi-interface"/>
> >        </services>
>
> I think you meant:
> <services>
>          <consumes interface-name="ems:ems-interface"/>
> </services>
>
> Provider SU:
> >
> >        <services>
> >          <provides interface-name="ems:ems-interface"
> >                    service-name="ems:ems-service"
> >                    endpoint-name="ems-smtp-endpoint"/>
> >        </services>
> >
> > Delivery:
> >
> >   public void deliver(Source source){
> >     DeliveryChannel channel = getDeliveryChannel();
> >     MessageExchangeFactory mef = channel.createExchangeFactory(
> >         new QName("http://www.gaiati.com/emee/ns/csi",
> "csi-interface"));
> >     MessageExchange mx = getMessageExchange(mef);
> >     NormalizedMessage message;
> >     try{
> >       message = mx.createMessage();
> >       message.setContent(source);
> >       mx.setMessage(message, "in");
> >       mx.setOperation(getOperationName());
> >       channel.send(mx);
> >     }
> >     catch(MessagingException e){
> >       log.fatal(e.getMessage());
> >     }
> >   }
>
>
> I also think you meant:
> public void deliver(Source source){
>     DeliveryChannel channel = getDeliveryChannel();
>     MessageExchangeFactory mef = channel.createExchangeFactory(
>         new QName("http://www.gaiati.com/emee/ns/ems", "ems-interface"));
>
> >     MessageExchange mx = getMessageExchange(mef);
> >     NormalizedMessage message;
> >     try{
> >       message = mx.createMessage();
> >       message.setContent(source);
> >       mx.setMessage(message, "in");
> >       mx.setOperation(getOperationName());
> >       channel.send(mx);
> >     }
> >     catch(MessagingException e){
> >       log.fatal(e.getMessage());
> >     }
> >   }
>
>
>
> Of course, you could also use an endpoint connection, instead of an
> > interface connection.
> >
> > Cheers,
> > Guillaume Nodet
> >
> > On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> > >
> > > Hi Guillaume,
> > >   SM throws a MessagingException when a consumer tries to send an
> > exchange
> > > without addressing a provider, while there is a connection between
> this
> > > consumer and the provider defined through a deployed service assembly.
> > > Please see "5.4.3.2 Implicit Endpoint Selection Process"
> > >
> > > For example:
> > >
> > > The service assembly descriptor:
> > > --------------------------------
> > >
> > > <jbi xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > >      xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> > >      xmlns="http://java.sun.com/xml/ns/jbi"
> > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > >      version="1">
> > >    <service-assembly>
> > >       <identification>
> > >          <name>csi-sa</name>
> > >          <description>Channel Service Instance Service
> > > Assembly</description>
> > >       </identification>
> > >       <service-unit>
> > >          <identification>
> > >             <name>csi-email-su</name>
> > >             <description>EMail service unit</description>
> > >          </identification>
> > >          <target>
> > >             <artifacts-zip>csi-email-su.zip</artifacts-zip>
> > >
> > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> </component-name>
> > >          </target>
> > >       </service-unit>
> > >       <service-unit>
> > >          <identification>
> > >             <name>csi-sms-su</name>
> > >             <description>SMS service unit</description>
> > >          </identification>
> > >          <target>
> > >             <artifacts-zip>csi-sms-su.zip</artifacts-zip>
> > >
> > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> </component-name>
> > >          </target>
> > >       </service-unit>
> > >       <service-unit>
> > >          <identification>
> > >             <name>csi-soap-email-su</name>
> > >             <description>Soap Listener for EMail</description>
> > >          </identification>
> > >          <target>
> > >             <artifacts-zip>csi-soap-email-su.zip</artifacts-zip>
> > >
> > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> </component-name>
> > >          </target>
> > >       </service-unit>
> > >       <connections>
> > >          <connection>
> > >             <consumer service-name="csi:csi-service"
> > > endpoint-name="csi-email-endpoint"/>
> > >             <provider service-name="ems:ems-service"
> > > endpoint-name="ems-smtp-endpoint"/>
> > >          </connection>
> > >          <connection>
> > >             <consumer service-name="csi:csi-service"
> > > endpoint-name="csi-soap-email-endpoint"/>
> > >             <provider service-name="ems:ems-service"
> > > endpoint-name="ems-smtp-endpoint"/>
> > >          </connection>
> > >       </connections>
> > >    </service-assembly>
> > > </jbi>
> > >
> > >
> > > The consumer service unit descriptor:
> > > -------------------------------------
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> > >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > >      xmlns="http://java.sun.com/xml/ns/jbi"
> > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > >      version="1.0">
> > >    <services>
> > >       <consumes interface-name="ems:ems-interface"
> > > service-name="ems:ems-service"
> > >                 endpoint-name="ems-smtp-endpoint"
> > >                 link-type="standard"/>
> > >       <provides interface-name="csi:csi-interface"
> > > service-name="csi:csi-service"
> > >                 endpoint-name="csi-email-endpoint"/>
> > >    </services>
> > > </jbi>
> > >
> > > The provider service unit descriptor:
> > > -------------------------------------
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> > >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > >      xmlns="http://java.sun.com/xml/ns/jbi"
> > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > >      version="1.0">
> > >    <services>
> > >       <provides interface-name="ems:ems-interface"
> > > service-name="ems:ems-service"
> > >                 endpoint-name="ems-smtp-endpoint"/>
> > >    </services>
> > > </jbi>
> > >
> > >
> > > Delivery method:
> > > ----------------
> > >
> > > public void deliver(Source source){
> > >     DeliveryChannel channel = getDeliveryChannel();
> > >     MessageExchangeFactory mef = channel.createExchangeFactory();
> > >     MessageExchange mx = getMessageExchange(mef);
> > >     NormalizedMessage message;
> > >     try{
> > >       message = mx.createMessage();
> > >       message.setContent(source);
> > >       mx.setMessage(message, "in");
> > >       mx.setOperation(getOperationName());
> > >       channel.send(mx);
> > >     }
> > >     catch(MessagingException e){
> > >       log.fatal(e.getMessage());
> > >     }
> > >
> > >   }
> > >
> > > This is logging:
> > > 11:13:05,109 FATAL [CsiTarget] Could not find route for exchange:
> > > org.apache.servicemix.jbi.messaging.InOnlyImpl@1b8737f for service:
> null
> > > and
> > > interface: null
> > >
> > > This actually worked on a previous snapshot, but now is throwing the
> > > exception, so I am assuming this is broken.
> > >
> > > Thanks,
> > > Hossam Karim
> > >
> > > -----Original Message-----
> > > From: Guillaume Nodet [mailto:gnodet@gmail.com]
> > > Sent: Tuesday, March 07, 2006 9:55 AM
> > > To: servicemix-users@geronimo.apache.org
> > > Subject: Re: [Resolved]Connections addresses must be activated in
> order
> > to
> > > be resolved
> > >
> > > Hi,
> > >
> > > What do you mean by default routing destinations is broken ?
> > > Do you have an example ?
> > >
> > > Cheers,
> > > Guillaume Nodet
> > >
> > > On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> > > >
> > > > Hello,
> > > >
> > > >   I believe Guillaume's fix for SM-295 resolved this issue, but I
> > think
> > > > default routing destinations is now broken.
> > > >
> > > >
> > > >
> > > >   _____
> > > >
> > > > From: Hossam Karim [mailto:hr.aebcg@gmail.com]
> > > > Sent: Monday, February 27, 2006 2:39 AM
> > > > To: servicemix-users@geronimo.apache.org
> > > > Subject: Connections addresses must be activated in order to be
> > resolved
> > > >
> > > >
> > > >
> > > > Hi,
> > > >   Thanks again SM Team for resolving the multiple connections issue.
> > > > Currently SM can recognize more than one connection in the
> deployment
> > > > descriptor of a service assembly.
> > > > The problem now is that the consumer and provider addresses in a
> > > > connection
> > > > must have been activated in order to be recognized by SM. I think
> this
> > > > shouldn't be a requirement but don't know for sure. This is
> achievable
> > > if
> > > > SM
> > > > can read the service units deployment descriptors and do the mix and
> > > > match,
> > > > unfortunately, SM is not doing so currently. The work around is to
> > > deploy
> > > > and start a separate SA for connections after all the referenced
> > > endpoints
> > > > have been deployed and started. I appreciate if someone can share a
> > > > simpler
> > > > workaround until this is resolved.
> > > >
> > > > Cheers,
> > > > Hossam Karim
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Re: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Guillaume Nodet <gn...@gmail.com>.
The interface connection says that when the consumer sends
an exchange to interface csi:csi-interface, it will be
redirected to  endpoint {ems:ems-service}/ems-smtp-endpoint.
If you use the csi:csi-interface in your connection, you
won't need to use a WSDL, because it will be translated into
the provider endpoint.
I do thing that the code i've written in my previous post
should work as is.

Interface connections do not really need informations provided
by SU descriptors.  The only case where it is needed is when
using endpoint connections, where the link type is retrieved
from the SU descriptor.  However, i have not found a way
to use it yet (recall the fact that "consumer endpoints" do
not exist).

When you create the exchange, if you use an interface name,
other than the one specified in the consumer part of the
connection, no connection routing will be performed, and implicit
endpoint selection will occur using the given interface
name.  In such a case, a WSDL should be provided, as
ServiceMix does not currently uses the <provides /> tag
to infer the interface name of an activated endpoint.
Please raise a JIRA for that, though it is not in the spec.

Cheers,
Guillaume Nodet

On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
>
> Thanks so much for your explanation. Please find my comments inline:
>
> On 3/7/06, Guillaume Nodet <gn...@gmail.com> wrote:
> >
> > I don't think what you want to achieve is jbi compliant.
>
>
> Yes, I don't think so. This is because I am not addressing any provider in
> my code.
> To confirm:
> - If I use channel.createExchangeFactory() version, then the exchange
> should
> be created using createExchange(javax.xml.namespace.QName serviceName,
> javax.xml.namespace.QName operationName), or I should use other version of
> createExchangeFactory*(<with parameter>).
> - Trying the modified delivery method I get:
> 13:41:43,906 WARN  [Broker] InterfaceName ({
> http://www.gaiati.com/emee/ns/ems}ems-interface) specified for routing,
> but
> can't find any matching components
> I am currently returning null in getServiceDescription of the provider
> component, should a WSDL solve this, or SUs 'provides' element is enough?
> - Is 'consumes' link-type attribute currently supported?
>
>
>
> Let me explain.  Previously, when a service assembly connection
> > was used, the default routing for the component was modified.
> > For an endpoint connection, the previous behavior was to look
> > for an existing endpoint with the consumer address, retrieve its
> > activationSpec and set the default destination endpoint to the provider
> > endpoint.
> > The main problem is that exchanges are sent from a consumer component
> > to a provider endpoint, but there is no "consumer endpoint".
> > For example an http binding component that acts as a consumer does not
> > need to activate any endpoints at all.
> >
> > Looking at sections 6.3.1.9 and 6.6.3, my understanding is that the
> > consumer endoint informations in the connection are used to make a
> > proxy / redirection.  When *a* consumer component sends an exchange,
> > it must specify one of the three different address type:
> >   * an interface name: if an interface connection has been activated,
> the
> >      exchange will be routed to the provider endpoint defined in the
> > connection
> >      else implicit endpoint selection occurs
> >   * a service name: implicit endpoint selection occurs
> >   * an endpoint: if the endpoint is an endpoint created by an endpoint
> >      connection, the exchange will be routed to the provider endpoint
> > defined
> >      by the connection, else it is routed to the specified endpoint
> >
> > So I think your jbi descriptors should look like:
> >
> > SA:
> >
> >        <connections>
> >          <connection>
> >             <consumer interface-name="csi:csi-interface"/>
> >             <provider service-name="ems:ems-service"
> >                       endpoint-name="ems-smtp-endpoint"/>
> >          </connection>
> >        </connections>
> >
> > Consumer SU:
> >
> >        <services>
> >          <consumes interface-name="csi:csi-interface"/>
> >        </services>
>
> I think you meant:
> <services>
>          <consumes interface-name="ems:ems-interface"/>
> </services>
>
> Provider SU:
> >
> >        <services>
> >          <provides interface-name="ems:ems-interface"
> >                    service-name="ems:ems-service"
> >                    endpoint-name="ems-smtp-endpoint"/>
> >        </services>
> >
> > Delivery:
> >
> >   public void deliver(Source source){
> >     DeliveryChannel channel = getDeliveryChannel();
> >     MessageExchangeFactory mef = channel.createExchangeFactory(
> >         new QName("http://www.gaiati.com/emee/ns/csi",
> "csi-interface"));
> >     MessageExchange mx = getMessageExchange(mef);
> >     NormalizedMessage message;
> >     try{
> >       message = mx.createMessage();
> >       message.setContent(source);
> >       mx.setMessage(message, "in");
> >       mx.setOperation(getOperationName());
> >       channel.send(mx);
> >     }
> >     catch(MessagingException e){
> >       log.fatal(e.getMessage());
> >     }
> >   }
>
>
> I also think you meant:
> public void deliver(Source source){
>     DeliveryChannel channel = getDeliveryChannel();
>     MessageExchangeFactory mef = channel.createExchangeFactory(
>         new QName("http://www.gaiati.com/emee/ns/ems", "ems-interface"));
>
> >     MessageExchange mx = getMessageExchange(mef);
> >     NormalizedMessage message;
> >     try{
> >       message = mx.createMessage();
> >       message.setContent(source);
> >       mx.setMessage(message, "in");
> >       mx.setOperation(getOperationName());
> >       channel.send(mx);
> >     }
> >     catch(MessagingException e){
> >       log.fatal(e.getMessage());
> >     }
> >   }
>
>
>
> Of course, you could also use an endpoint connection, instead of an
> > interface connection.
> >
> > Cheers,
> > Guillaume Nodet
> >
> > On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> > >
> > > Hi Guillaume,
> > >   SM throws a MessagingException when a consumer tries to send an
> > exchange
> > > without addressing a provider, while there is a connection between
> this
> > > consumer and the provider defined through a deployed service assembly.
> > > Please see "5.4.3.2 Implicit Endpoint Selection Process"
> > >
> > > For example:
> > >
> > > The service assembly descriptor:
> > > --------------------------------
> > >
> > > <jbi xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > >      xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> > >      xmlns="http://java.sun.com/xml/ns/jbi"
> > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > >      version="1">
> > >    <service-assembly>
> > >       <identification>
> > >          <name>csi-sa</name>
> > >          <description>Channel Service Instance Service
> > > Assembly</description>
> > >       </identification>
> > >       <service-unit>
> > >          <identification>
> > >             <name>csi-email-su</name>
> > >             <description>EMail service unit</description>
> > >          </identification>
> > >          <target>
> > >             <artifacts-zip>csi-email-su.zip</artifacts-zip>
> > >
> > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> </component-name>
> > >          </target>
> > >       </service-unit>
> > >       <service-unit>
> > >          <identification>
> > >             <name>csi-sms-su</name>
> > >             <description>SMS service unit</description>
> > >          </identification>
> > >          <target>
> > >             <artifacts-zip>csi-sms-su.zip</artifacts-zip>
> > >
> > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> </component-name>
> > >          </target>
> > >       </service-unit>
> > >       <service-unit>
> > >          <identification>
> > >             <name>csi-soap-email-su</name>
> > >             <description>Soap Listener for EMail</description>
> > >          </identification>
> > >          <target>
> > >             <artifacts-zip>csi-soap-email-su.zip</artifacts-zip>
> > >
> > > <component-name>com.gaiati.jbi.component.csi.CsiBinding
> </component-name>
> > >          </target>
> > >       </service-unit>
> > >       <connections>
> > >          <connection>
> > >             <consumer service-name="csi:csi-service"
> > > endpoint-name="csi-email-endpoint"/>
> > >             <provider service-name="ems:ems-service"
> > > endpoint-name="ems-smtp-endpoint"/>
> > >          </connection>
> > >          <connection>
> > >             <consumer service-name="csi:csi-service"
> > > endpoint-name="csi-soap-email-endpoint"/>
> > >             <provider service-name="ems:ems-service"
> > > endpoint-name="ems-smtp-endpoint"/>
> > >          </connection>
> > >       </connections>
> > >    </service-assembly>
> > > </jbi>
> > >
> > >
> > > The consumer service unit descriptor:
> > > -------------------------------------
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> > >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > >      xmlns="http://java.sun.com/xml/ns/jbi"
> > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > >      version="1.0">
> > >    <services>
> > >       <consumes interface-name="ems:ems-interface"
> > > service-name="ems:ems-service"
> > >                 endpoint-name="ems-smtp-endpoint"
> > >                 link-type="standard"/>
> > >       <provides interface-name="csi:csi-interface"
> > > service-name="csi:csi-service"
> > >                 endpoint-name="csi-email-endpoint"/>
> > >    </services>
> > > </jbi>
> > >
> > > The provider service unit descriptor:
> > > -------------------------------------
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> > >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> > >      xmlns="http://java.sun.com/xml/ns/jbi"
> > >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> > >      version="1.0">
> > >    <services>
> > >       <provides interface-name="ems:ems-interface"
> > > service-name="ems:ems-service"
> > >                 endpoint-name="ems-smtp-endpoint"/>
> > >    </services>
> > > </jbi>
> > >
> > >
> > > Delivery method:
> > > ----------------
> > >
> > > public void deliver(Source source){
> > >     DeliveryChannel channel = getDeliveryChannel();
> > >     MessageExchangeFactory mef = channel.createExchangeFactory();
> > >     MessageExchange mx = getMessageExchange(mef);
> > >     NormalizedMessage message;
> > >     try{
> > >       message = mx.createMessage();
> > >       message.setContent(source);
> > >       mx.setMessage(message, "in");
> > >       mx.setOperation(getOperationName());
> > >       channel.send(mx);
> > >     }
> > >     catch(MessagingException e){
> > >       log.fatal(e.getMessage());
> > >     }
> > >
> > >   }
> > >
> > > This is logging:
> > > 11:13:05,109 FATAL [CsiTarget] Could not find route for exchange:
> > > org.apache.servicemix.jbi.messaging.InOnlyImpl@1b8737f for service:
> null
> > > and
> > > interface: null
> > >
> > > This actually worked on a previous snapshot, but now is throwing the
> > > exception, so I am assuming this is broken.
> > >
> > > Thanks,
> > > Hossam Karim
> > >
> > > -----Original Message-----
> > > From: Guillaume Nodet [mailto:gnodet@gmail.com]
> > > Sent: Tuesday, March 07, 2006 9:55 AM
> > > To: servicemix-users@geronimo.apache.org
> > > Subject: Re: [Resolved]Connections addresses must be activated in
> order
> > to
> > > be resolved
> > >
> > > Hi,
> > >
> > > What do you mean by default routing destinations is broken ?
> > > Do you have an example ?
> > >
> > > Cheers,
> > > Guillaume Nodet
> > >
> > > On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> > > >
> > > > Hello,
> > > >
> > > >   I believe Guillaume's fix for SM-295 resolved this issue, but I
> > think
> > > > default routing destinations is now broken.
> > > >
> > > >
> > > >
> > > >   _____
> > > >
> > > > From: Hossam Karim [mailto:hr.aebcg@gmail.com]
> > > > Sent: Monday, February 27, 2006 2:39 AM
> > > > To: servicemix-users@geronimo.apache.org
> > > > Subject: Connections addresses must be activated in order to be
> > resolved
> > > >
> > > >
> > > >
> > > > Hi,
> > > >   Thanks again SM Team for resolving the multiple connections issue.
> > > > Currently SM can recognize more than one connection in the
> deployment
> > > > descriptor of a service assembly.
> > > > The problem now is that the consumer and provider addresses in a
> > > > connection
> > > > must have been activated in order to be recognized by SM. I think
> this
> > > > shouldn't be a requirement but don't know for sure. This is
> achievable
> > > if
> > > > SM
> > > > can read the service units deployment descriptors and do the mix and
> > > > match,
> > > > unfortunately, SM is not doing so currently. The work around is to
> > > deploy
> > > > and start a separate SA for connections after all the referenced
> > > endpoints
> > > > have been deployed and started. I appreciate if someone can share a
> > > > simpler
> > > > workaround until this is resolved.
> > > >
> > > > Cheers,
> > > > Hossam Karim
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Re: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Hossam Karim <hr...@gmail.com>.
Thanks so much for your explanation. Please find my comments inline:

On 3/7/06, Guillaume Nodet <gn...@gmail.com> wrote:
>
> I don't think what you want to achieve is jbi compliant.


Yes, I don't think so. This is because I am not addressing any provider in
my code.
To confirm:
- If I use channel.createExchangeFactory() version, then the exchange should
be created using createExchange(javax.xml.namespace.QName serviceName,
javax.xml.namespace.QName operationName), or I should use other version of
createExchangeFactory*(<with parameter>).
- Trying the modified delivery method I get:
13:41:43,906 WARN  [Broker] InterfaceName ({
http://www.gaiati.com/emee/ns/ems}ems-interface) specified for routing, but
can't find any matching components
I am currently returning null in getServiceDescription of the provider
component, should a WSDL solve this, or SUs 'provides' element is enough?
- Is 'consumes' link-type attribute currently supported?



Let me explain.  Previously, when a service assembly connection
> was used, the default routing for the component was modified.
> For an endpoint connection, the previous behavior was to look
> for an existing endpoint with the consumer address, retrieve its
> activationSpec and set the default destination endpoint to the provider
> endpoint.
> The main problem is that exchanges are sent from a consumer component
> to a provider endpoint, but there is no "consumer endpoint".
> For example an http binding component that acts as a consumer does not
> need to activate any endpoints at all.
>
> Looking at sections 6.3.1.9 and 6.6.3, my understanding is that the
> consumer endoint informations in the connection are used to make a
> proxy / redirection.  When *a* consumer component sends an exchange,
> it must specify one of the three different address type:
>   * an interface name: if an interface connection has been activated, the
>      exchange will be routed to the provider endpoint defined in the
> connection
>      else implicit endpoint selection occurs
>   * a service name: implicit endpoint selection occurs
>   * an endpoint: if the endpoint is an endpoint created by an endpoint
>      connection, the exchange will be routed to the provider endpoint
> defined
>      by the connection, else it is routed to the specified endpoint
>
> So I think your jbi descriptors should look like:
>
> SA:
>
>        <connections>
>          <connection>
>             <consumer interface-name="csi:csi-interface"/>
>             <provider service-name="ems:ems-service"
>                       endpoint-name="ems-smtp-endpoint"/>
>          </connection>
>        </connections>
>
> Consumer SU:
>
>        <services>
>          <consumes interface-name="csi:csi-interface"/>
>        </services>

I think you meant:
<services>
         <consumes interface-name="ems:ems-interface"/>
</services>

Provider SU:
>
>        <services>
>          <provides interface-name="ems:ems-interface"
>                    service-name="ems:ems-service"
>                    endpoint-name="ems-smtp-endpoint"/>
>        </services>
>
> Delivery:
>
>   public void deliver(Source source){
>     DeliveryChannel channel = getDeliveryChannel();
>     MessageExchangeFactory mef = channel.createExchangeFactory(
>         new QName("http://www.gaiati.com/emee/ns/csi", "csi-interface"));
>     MessageExchange mx = getMessageExchange(mef);
>     NormalizedMessage message;
>     try{
>       message = mx.createMessage();
>       message.setContent(source);
>       mx.setMessage(message, "in");
>       mx.setOperation(getOperationName());
>       channel.send(mx);
>     }
>     catch(MessagingException e){
>       log.fatal(e.getMessage());
>     }
>   }


I also think you meant:
public void deliver(Source source){
    DeliveryChannel channel = getDeliveryChannel();
    MessageExchangeFactory mef = channel.createExchangeFactory(
        new QName("http://www.gaiati.com/emee/ns/ems", "ems-interface"));

>     MessageExchange mx = getMessageExchange(mef);
>     NormalizedMessage message;
>     try{
>       message = mx.createMessage();
>       message.setContent(source);
>       mx.setMessage(message, "in");
>       mx.setOperation(getOperationName());
>       channel.send(mx);
>     }
>     catch(MessagingException e){
>       log.fatal(e.getMessage());
>     }
>   }



Of course, you could also use an endpoint connection, instead of an
> interface connection.
>
> Cheers,
> Guillaume Nodet
>
> On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> >
> > Hi Guillaume,
> >   SM throws a MessagingException when a consumer tries to send an
> exchange
> > without addressing a provider, while there is a connection between this
> > consumer and the provider defined through a deployed service assembly.
> > Please see "5.4.3.2 Implicit Endpoint Selection Process"
> >
> > For example:
> >
> > The service assembly descriptor:
> > --------------------------------
> >
> > <jbi xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> >      xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> >      xmlns="http://java.sun.com/xml/ns/jbi"
> >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> >      version="1">
> >    <service-assembly>
> >       <identification>
> >          <name>csi-sa</name>
> >          <description>Channel Service Instance Service
> > Assembly</description>
> >       </identification>
> >       <service-unit>
> >          <identification>
> >             <name>csi-email-su</name>
> >             <description>EMail service unit</description>
> >          </identification>
> >          <target>
> >             <artifacts-zip>csi-email-su.zip</artifacts-zip>
> >
> > <component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
> >          </target>
> >       </service-unit>
> >       <service-unit>
> >          <identification>
> >             <name>csi-sms-su</name>
> >             <description>SMS service unit</description>
> >          </identification>
> >          <target>
> >             <artifacts-zip>csi-sms-su.zip</artifacts-zip>
> >
> > <component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
> >          </target>
> >       </service-unit>
> >       <service-unit>
> >          <identification>
> >             <name>csi-soap-email-su</name>
> >             <description>Soap Listener for EMail</description>
> >          </identification>
> >          <target>
> >             <artifacts-zip>csi-soap-email-su.zip</artifacts-zip>
> >
> > <component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
> >          </target>
> >       </service-unit>
> >       <connections>
> >          <connection>
> >             <consumer service-name="csi:csi-service"
> > endpoint-name="csi-email-endpoint"/>
> >             <provider service-name="ems:ems-service"
> > endpoint-name="ems-smtp-endpoint"/>
> >          </connection>
> >          <connection>
> >             <consumer service-name="csi:csi-service"
> > endpoint-name="csi-soap-email-endpoint"/>
> >             <provider service-name="ems:ems-service"
> > endpoint-name="ems-smtp-endpoint"/>
> >          </connection>
> >       </connections>
> >    </service-assembly>
> > </jbi>
> >
> >
> > The consumer service unit descriptor:
> > -------------------------------------
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> >      xmlns="http://java.sun.com/xml/ns/jbi"
> >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> >      version="1.0">
> >    <services>
> >       <consumes interface-name="ems:ems-interface"
> > service-name="ems:ems-service"
> >                 endpoint-name="ems-smtp-endpoint"
> >                 link-type="standard"/>
> >       <provides interface-name="csi:csi-interface"
> > service-name="csi:csi-service"
> >                 endpoint-name="csi-email-endpoint"/>
> >    </services>
> > </jbi>
> >
> > The provider service unit descriptor:
> > -------------------------------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
> >      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
> >      xmlns="http://java.sun.com/xml/ns/jbi"
> >      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
> >      version="1.0">
> >    <services>
> >       <provides interface-name="ems:ems-interface"
> > service-name="ems:ems-service"
> >                 endpoint-name="ems-smtp-endpoint"/>
> >    </services>
> > </jbi>
> >
> >
> > Delivery method:
> > ----------------
> >
> > public void deliver(Source source){
> >     DeliveryChannel channel = getDeliveryChannel();
> >     MessageExchangeFactory mef = channel.createExchangeFactory();
> >     MessageExchange mx = getMessageExchange(mef);
> >     NormalizedMessage message;
> >     try{
> >       message = mx.createMessage();
> >       message.setContent(source);
> >       mx.setMessage(message, "in");
> >       mx.setOperation(getOperationName());
> >       channel.send(mx);
> >     }
> >     catch(MessagingException e){
> >       log.fatal(e.getMessage());
> >     }
> >
> >   }
> >
> > This is logging:
> > 11:13:05,109 FATAL [CsiTarget] Could not find route for exchange:
> > org.apache.servicemix.jbi.messaging.InOnlyImpl@1b8737f for service: null
> > and
> > interface: null
> >
> > This actually worked on a previous snapshot, but now is throwing the
> > exception, so I am assuming this is broken.
> >
> > Thanks,
> > Hossam Karim
> >
> > -----Original Message-----
> > From: Guillaume Nodet [mailto:gnodet@gmail.com]
> > Sent: Tuesday, March 07, 2006 9:55 AM
> > To: servicemix-users@geronimo.apache.org
> > Subject: Re: [Resolved]Connections addresses must be activated in order
> to
> > be resolved
> >
> > Hi,
> >
> > What do you mean by default routing destinations is broken ?
> > Do you have an example ?
> >
> > Cheers,
> > Guillaume Nodet
> >
> > On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> > >
> > > Hello,
> > >
> > >   I believe Guillaume's fix for SM-295 resolved this issue, but I
> think
> > > default routing destinations is now broken.
> > >
> > >
> > >
> > >   _____
> > >
> > > From: Hossam Karim [mailto:hr.aebcg@gmail.com]
> > > Sent: Monday, February 27, 2006 2:39 AM
> > > To: servicemix-users@geronimo.apache.org
> > > Subject: Connections addresses must be activated in order to be
> resolved
> > >
> > >
> > >
> > > Hi,
> > >   Thanks again SM Team for resolving the multiple connections issue.
> > > Currently SM can recognize more than one connection in the deployment
> > > descriptor of a service assembly.
> > > The problem now is that the consumer and provider addresses in a
> > > connection
> > > must have been activated in order to be recognized by SM. I think this
> > > shouldn't be a requirement but don't know for sure. This is achievable
> > if
> > > SM
> > > can read the service units deployment descriptors and do the mix and
> > > match,
> > > unfortunately, SM is not doing so currently. The work around is to
> > deploy
> > > and start a separate SA for connections after all the referenced
> > endpoints
> > > have been deployed and started. I appreciate if someone can share a
> > > simpler
> > > workaround until this is resolved.
> > >
> > > Cheers,
> > > Hossam Karim
> > >
> > >
> > >
> >
> >
>
>

Re: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Guillaume Nodet <gn...@gmail.com>.
I don't think what you want to achieve is jbi compliant.
Let me explain.  Previously, when a service assembly connection
was used, the default routing for the component was modified.
For an endpoint connection, the previous behavior was to look
for an existing endpoint with the consumer address, retrieve its
activationSpec and set the default destination endpoint to the provider
endpoint.
The main problem is that exchanges are sent from a consumer component
to a provider endpoint, but there is no "consumer endpoint".
For example an http binding component that acts as a consumer does not
need to activate any endpoints at all.

Looking at sections 6.3.1.9 and 6.6.3, my understanding is that the
consumer endoint informations in the connection are used to make a
proxy / redirection.  When *a* consumer component sends an exchange,
it must specify one of the three different address type:
  * an interface name: if an interface connection has been activated, the
     exchange will be routed to the provider endpoint defined in the
connection
     else implicit endpoint selection occurs
  * a service name: implicit endpoint selection occurs
  * an endpoint: if the endpoint is an endpoint created by an endpoint
     connection, the exchange will be routed to the provider endpoint
defined
     by the connection, else it is routed to the specified endpoint

So I think your jbi descriptors should look like:

SA:

       <connections>
         <connection>
            <consumer interface-name="csi:csi-interface"/>
            <provider service-name="ems:ems-service"
                      endpoint-name="ems-smtp-endpoint"/>
         </connection>
       </connections>

Consumer SU:

       <services>
         <consumes interface-name="csi:csi-interface"/>
       </services>

Provider SU:

       <services>
         <provides interface-name="ems:ems-interface"
                   service-name="ems:ems-service"
                   endpoint-name="ems-smtp-endpoint"/>
       </services>

Delivery:

  public void deliver(Source source){
    DeliveryChannel channel = getDeliveryChannel();
    MessageExchangeFactory mef = channel.createExchangeFactory(
        new QName("http://www.gaiati.com/emee/ns/csi", "csi-interface"));
    MessageExchange mx = getMessageExchange(mef);
    NormalizedMessage message;
    try{
      message = mx.createMessage();
      message.setContent(source);
      mx.setMessage(message, "in");
      mx.setOperation(getOperationName());
      channel.send(mx);
    }
    catch(MessagingException e){
      log.fatal(e.getMessage());
    }
  }

Of course, you could also use an endpoint connection, instead of an
interface connection.

Cheers,
Guillaume Nodet

On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
>
> Hi Guillaume,
>   SM throws a MessagingException when a consumer tries to send an exchange
> without addressing a provider, while there is a connection between this
> consumer and the provider defined through a deployed service assembly.
> Please see "5.4.3.2 Implicit Endpoint Selection Process"
>
> For example:
>
> The service assembly descriptor:
> --------------------------------
>
> <jbi xmlns:ems="http://www.gaiati.com/emee/ns/ems"
>      xmlns:csi="http://www.gaiati.com/emee/ns/csi"
>      xmlns="http://java.sun.com/xml/ns/jbi"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
>      version="1">
>    <service-assembly>
>       <identification>
>          <name>csi-sa</name>
>          <description>Channel Service Instance Service
> Assembly</description>
>       </identification>
>       <service-unit>
>          <identification>
>             <name>csi-email-su</name>
>             <description>EMail service unit</description>
>          </identification>
>          <target>
>             <artifacts-zip>csi-email-su.zip</artifacts-zip>
>
> <component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
>          </target>
>       </service-unit>
>       <service-unit>
>          <identification>
>             <name>csi-sms-su</name>
>             <description>SMS service unit</description>
>          </identification>
>          <target>
>             <artifacts-zip>csi-sms-su.zip</artifacts-zip>
>
> <component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
>          </target>
>       </service-unit>
>       <service-unit>
>          <identification>
>             <name>csi-soap-email-su</name>
>             <description>Soap Listener for EMail</description>
>          </identification>
>          <target>
>             <artifacts-zip>csi-soap-email-su.zip</artifacts-zip>
>
> <component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
>          </target>
>       </service-unit>
>       <connections>
>          <connection>
>             <consumer service-name="csi:csi-service"
> endpoint-name="csi-email-endpoint"/>
>             <provider service-name="ems:ems-service"
> endpoint-name="ems-smtp-endpoint"/>
>          </connection>
>          <connection>
>             <consumer service-name="csi:csi-service"
> endpoint-name="csi-soap-email-endpoint"/>
>             <provider service-name="ems:ems-service"
> endpoint-name="ems-smtp-endpoint"/>
>          </connection>
>       </connections>
>    </service-assembly>
> </jbi>
>
>
> The consumer service unit descriptor:
> -------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
>      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
>      xmlns="http://java.sun.com/xml/ns/jbi"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
>      version="1.0">
>    <services>
>       <consumes interface-name="ems:ems-interface"
> service-name="ems:ems-service"
>                 endpoint-name="ems-smtp-endpoint"
>                 link-type="standard"/>
>       <provides interface-name="csi:csi-interface"
> service-name="csi:csi-service"
>                 endpoint-name="csi-email-endpoint"/>
>    </services>
> </jbi>
>
> The provider service unit descriptor:
> -------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
>      xmlns:ems="http://www.gaiati.com/emee/ns/ems"
>      xmlns="http://java.sun.com/xml/ns/jbi"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
>      version="1.0">
>    <services>
>       <provides interface-name="ems:ems-interface"
> service-name="ems:ems-service"
>                 endpoint-name="ems-smtp-endpoint"/>
>    </services>
> </jbi>
>
>
> Delivery method:
> ----------------
>
> public void deliver(Source source){
>     DeliveryChannel channel = getDeliveryChannel();
>     MessageExchangeFactory mef = channel.createExchangeFactory();
>     MessageExchange mx = getMessageExchange(mef);
>     NormalizedMessage message;
>     try{
>       message = mx.createMessage();
>       message.setContent(source);
>       mx.setMessage(message, "in");
>       mx.setOperation(getOperationName());
>       channel.send(mx);
>     }
>     catch(MessagingException e){
>       log.fatal(e.getMessage());
>     }
>
>   }
>
> This is logging:
> 11:13:05,109 FATAL [CsiTarget] Could not find route for exchange:
> org.apache.servicemix.jbi.messaging.InOnlyImpl@1b8737f for service: null
> and
> interface: null
>
> This actually worked on a previous snapshot, but now is throwing the
> exception, so I am assuming this is broken.
>
> Thanks,
> Hossam Karim
>
> -----Original Message-----
> From: Guillaume Nodet [mailto:gnodet@gmail.com]
> Sent: Tuesday, March 07, 2006 9:55 AM
> To: servicemix-users@geronimo.apache.org
> Subject: Re: [Resolved]Connections addresses must be activated in order to
> be resolved
>
> Hi,
>
> What do you mean by default routing destinations is broken ?
> Do you have an example ?
>
> Cheers,
> Guillaume Nodet
>
> On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
> >
> > Hello,
> >
> >   I believe Guillaume's fix for SM-295 resolved this issue, but I think
> > default routing destinations is now broken.
> >
> >
> >
> >   _____
> >
> > From: Hossam Karim [mailto:hr.aebcg@gmail.com]
> > Sent: Monday, February 27, 2006 2:39 AM
> > To: servicemix-users@geronimo.apache.org
> > Subject: Connections addresses must be activated in order to be resolved
> >
> >
> >
> > Hi,
> >   Thanks again SM Team for resolving the multiple connections issue.
> > Currently SM can recognize more than one connection in the deployment
> > descriptor of a service assembly.
> > The problem now is that the consumer and provider addresses in a
> > connection
> > must have been activated in order to be recognized by SM. I think this
> > shouldn't be a requirement but don't know for sure. This is achievable
> if
> > SM
> > can read the service units deployment descriptors and do the mix and
> > match,
> > unfortunately, SM is not doing so currently. The work around is to
> deploy
> > and start a separate SA for connections after all the referenced
> endpoints
> > have been deployed and started. I appreciate if someone can share a
> > simpler
> > workaround until this is resolved.
> >
> > Cheers,
> > Hossam Karim
> >
> >
> >
>
>

RE: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Hossam Karim <hr...@gmail.com>.
Hi Guillaume,
  SM throws a MessagingException when a consumer tries to send an exchange
without addressing a provider, while there is a connection between this
consumer and the provider defined through a deployed service assembly.
Please see "5.4.3.2 Implicit Endpoint Selection Process"

For example:

The service assembly descriptor:
--------------------------------

<jbi xmlns:ems="http://www.gaiati.com/emee/ns/ems"
     xmlns:csi="http://www.gaiati.com/emee/ns/csi"
     xmlns="http://java.sun.com/xml/ns/jbi"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
     version="1">
   <service-assembly>
      <identification>
         <name>csi-sa</name>
         <description>Channel Service Instance Service
Assembly</description>
      </identification>
      <service-unit>
         <identification>
            <name>csi-email-su</name>
            <description>EMail service unit</description>
         </identification>
         <target>
            <artifacts-zip>csi-email-su.zip</artifacts-zip>
 
<component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
         </target>
      </service-unit>
      <service-unit>
         <identification>
            <name>csi-sms-su</name>
            <description>SMS service unit</description>
         </identification>
         <target>
            <artifacts-zip>csi-sms-su.zip</artifacts-zip>
 
<component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
         </target>
      </service-unit>
      <service-unit>
         <identification>
            <name>csi-soap-email-su</name>
            <description>Soap Listener for EMail</description>
         </identification>
         <target>
            <artifacts-zip>csi-soap-email-su.zip</artifacts-zip>
 
<component-name>com.gaiati.jbi.component.csi.CsiBinding</component-name>
         </target>
      </service-unit>
      <connections>
         <connection>
            <consumer service-name="csi:csi-service"
endpoint-name="csi-email-endpoint"/>
            <provider service-name="ems:ems-service"
endpoint-name="ems-smtp-endpoint"/>
         </connection>
         <connection>
            <consumer service-name="csi:csi-service"
endpoint-name="csi-soap-email-endpoint"/>
            <provider service-name="ems:ems-service"
endpoint-name="ems-smtp-endpoint"/>
         </connection>
      </connections>
   </service-assembly>
</jbi>


The consumer service unit descriptor:
-------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
     xmlns:ems="http://www.gaiati.com/emee/ns/ems"
     xmlns="http://java.sun.com/xml/ns/jbi"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
     version="1.0">
   <services>
      <consumes interface-name="ems:ems-interface"
service-name="ems:ems-service"
                endpoint-name="ems-smtp-endpoint"
                link-type="standard"/>
      <provides interface-name="csi:csi-interface"
service-name="csi:csi-service"
                endpoint-name="csi-email-endpoint"/>
   </services>
</jbi>

The provider service unit descriptor:
-------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jbi xmlns:csi="http://www.gaiati.com/emee/ns/csi"
     xmlns:ems="http://www.gaiati.com/emee/ns/ems"
     xmlns="http://java.sun.com/xml/ns/jbi"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/jbi  ./jbi.xsd"
     version="1.0">
   <services>
      <provides interface-name="ems:ems-interface"
service-name="ems:ems-service"
                endpoint-name="ems-smtp-endpoint"/>
   </services>
</jbi>


Delivery method:
----------------

public void deliver(Source source){
    DeliveryChannel channel = getDeliveryChannel();
    MessageExchangeFactory mef = channel.createExchangeFactory();
    MessageExchange mx = getMessageExchange(mef);
    NormalizedMessage message;
    try{
      message = mx.createMessage();
      message.setContent(source);
      mx.setMessage(message, "in");
      mx.setOperation(getOperationName());
      channel.send(mx);
    }
    catch(MessagingException e){
      log.fatal(e.getMessage());
    }

  }

This is logging:
11:13:05,109 FATAL [CsiTarget] Could not find route for exchange:
org.apache.servicemix.jbi.messaging.InOnlyImpl@1b8737f for service: null and
interface: null

This actually worked on a previous snapshot, but now is throwing the
exception, so I am assuming this is broken. 

Thanks,
Hossam Karim  

-----Original Message-----
From: Guillaume Nodet [mailto:gnodet@gmail.com] 
Sent: Tuesday, March 07, 2006 9:55 AM
To: servicemix-users@geronimo.apache.org
Subject: Re: [Resolved]Connections addresses must be activated in order to
be resolved

Hi,

What do you mean by default routing destinations is broken ?
Do you have an example ?

Cheers,
Guillaume Nodet

On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
>
> Hello,
>
>   I believe Guillaume's fix for SM-295 resolved this issue, but I think
> default routing destinations is now broken.
>
>
>
>   _____
>
> From: Hossam Karim [mailto:hr.aebcg@gmail.com]
> Sent: Monday, February 27, 2006 2:39 AM
> To: servicemix-users@geronimo.apache.org
> Subject: Connections addresses must be activated in order to be resolved
>
>
>
> Hi,
>   Thanks again SM Team for resolving the multiple connections issue.
> Currently SM can recognize more than one connection in the deployment
> descriptor of a service assembly.
> The problem now is that the consumer and provider addresses in a
> connection
> must have been activated in order to be recognized by SM. I think this
> shouldn't be a requirement but don't know for sure. This is achievable if
> SM
> can read the service units deployment descriptors and do the mix and
> match,
> unfortunately, SM is not doing so currently. The work around is to deploy
> and start a separate SA for connections after all the referenced endpoints
> have been deployed and started. I appreciate if someone can share a
> simpler
> workaround until this is resolved.
>
> Cheers,
> Hossam Karim
>
>
>


Re: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Guillaume Nodet <gn...@gmail.com>.
Hi,

What do you mean by default routing destinations is broken ?
Do you have an example ?

Cheers,
Guillaume Nodet

On 3/7/06, Hossam Karim <hr...@gmail.com> wrote:
>
> Hello,
>
>   I believe Guillaume's fix for SM-295 resolved this issue, but I think
> default routing destinations is now broken.
>
>
>
>   _____
>
> From: Hossam Karim [mailto:hr.aebcg@gmail.com]
> Sent: Monday, February 27, 2006 2:39 AM
> To: servicemix-users@geronimo.apache.org
> Subject: Connections addresses must be activated in order to be resolved
>
>
>
> Hi,
>   Thanks again SM Team for resolving the multiple connections issue.
> Currently SM can recognize more than one connection in the deployment
> descriptor of a service assembly.
> The problem now is that the consumer and provider addresses in a
> connection
> must have been activated in order to be recognized by SM. I think this
> shouldn't be a requirement but don't know for sure. This is achievable if
> SM
> can read the service units deployment descriptors and do the mix and
> match,
> unfortunately, SM is not doing so currently. The work around is to deploy
> and start a separate SA for connections after all the referenced endpoints
> have been deployed and started. I appreciate if someone can share a
> simpler
> workaround until this is resolved.
>
> Cheers,
> Hossam Karim
>
>
>

RE: [Resolved]Connections addresses must be activated in order to be resolved

Posted by Hossam Karim <hr...@gmail.com>.
Hello,

  I believe Guillaume's fix for SM-295 resolved this issue, but I think
default routing destinations is now broken. 

 

  _____  

From: Hossam Karim [mailto:hr.aebcg@gmail.com] 
Sent: Monday, February 27, 2006 2:39 AM
To: servicemix-users@geronimo.apache.org
Subject: Connections addresses must be activated in order to be resolved

 

Hi,
  Thanks again SM Team for resolving the multiple connections issue.
Currently SM can recognize more than one connection in the deployment
descriptor of a service assembly.
The problem now is that the consumer and provider addresses in a connection
must have been activated in order to be recognized by SM. I think this
shouldn't be a requirement but don't know for sure. This is achievable if SM
can read the service units deployment descriptors and do the mix and match,
unfortunately, SM is not doing so currently. The work around is to deploy
and start a separate SA for connections after all the referenced endpoints
have been deployed and started. I appreciate if someone can share a simpler
workaround until this is resolved. 

Cheers,
Hossam Karim