You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Kristofor Jacobson <kr...@gmail.com> on 2007/12/04 02:46:17 UTC

Overriding binding values

Hi all,
   I've been looking through the forums, searching documentation, etc., and
can't seem to find anything obvious about how to specify bean values (or
configurable properties of some kind) on on my service unit binding
attributes.  In the environment I'm working in, it isn't practical for the
developers to know the concrete bindings at build-time (seems like a pretty
normal situation).  Our deployment artifacts also can't change from one
environment to the next, so any concrete binding data needs to be separate
from the deployable service archives.

   An example of what I'm looking for would be to have an HTTP binding
specified like this:

    <http:endpoint  service="Service"
                    endpoint="ServicePort"
                    role="provider"
                    locationURI="*#finalUrl*"
                    soap="true"
                    soapVersion="1.1"
                    soapAction=" http://www.organization.com/Service"

And to have a bean (property) defined in the servicemix.xml (or some other
location external to the service archive) that maps to "#finalUrl", such as:


        <bean id="finalUrl" class="java.lang.String">
            <constructor-arg value="http://somehost:8090/Service"/>
        </bean>

However, at deployment-time, the service archive fails to deploy with "*Cannot
resolve reference to bean 'finalUrl' while setting bean property
'locationURI'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'finalUrl' is defined*".

I have two questions for ServiceMix users:
1.  Do you have a strategy you recommend for this type of externalization of
configuration and
2.  Have you been able to make this particular approach work?  If so, how?

Thanks for any help at all!

-kris-

Re: Overriding binding values

Posted by Guillaume Nodet <gn...@gmail.com>.
You'll find the correct address at
http://servicemix.apache.org/mailing-lists.html

On Dec 4, 2007 6:02 PM, Daya K Dubey <da...@googlemail.com> wrote:

> can any one let me know how to unsubscribe from this mailing list.  I have
> tried unsubscribe@servicemix.apache.org but it doesn't work.. please do
> something..
>
> On Dec 4, 2007 3:13 PM, Jason Sando <js...@claritysys.com> wrote:
>
> > Kris, if you don't mind I'd like to try elaborate the question a
> > little bit:
> >
> > The scenario is that there is a separation between Development, QA,
> > and Production.  The developers only know their development
> > environment.  Someone outside of Development is responsible for the
> > deployment and configuration of the service-archive into the QA and
> > Production environments.  So any runtime configuration data that can
> > change from one environment to the next *must* be externalized.  Such
> > configuration would include authentication credentials, URL's, queue
> > names, server names, etc.
> >
> > The person responsible for the QA and Production deployment needs any
> > easy way to determine which values they need to fill out, to fill
> > them out, and ensure the one or more servers in the cluster for each
> > environment have the proper configuration.
> >
> > With ServiceMix we've found two ways to do this:
> >
> >   1. Modify the "conf/servicemix.xml" file (on each server in the
> > cluster?) to specify the values
> >   2. Place the values into various service-units, one for each BC or
> > SE required, bundle them into a service-archive and deploy (on each
> > server in the cluster?)
> >
> > Option #2 has the benefit of not requiring a server restart, but in
> > exchange has a much more complex folder/file layout, and requires
> > it's own build (which is easy enough with maven, but still an extra
> > step).  Option #1 is just a largish XML file, so is going to be a lot
> > less intimidating to the person doing the deployment.
> >
> > I haven't played with clustering yet so I'm not sure how this changes
> > to support that.
> >
> > Make sense so far?
> >
> > Regards,
> >
> > - Jason
> >
> >
> > On Dec 3, 2007, at 10:13 PM, Freeman Fang wrote:
> >
> > > no, your locationURI is
> > > locationURI="*#finalUrl*"
> > > but not
> > > locationURI="#finalUrl"
> > > You have two more "*"
> > > And make sure put your finalUrl bean directly under <beans> element
> > >
> > > Best Regards
> > >
> > > Freeman
> > > Kristofor Jacobson wrote:
> > >> I'm not sure I understand.
> > >> I have the locationURI set to "#finalUrl" already, but I encounter an
> > >> error.  Is there a particular place in the servicemix.xml that I
> > >> need to
> > >> define the finalUrl bean?
> > >>
> > >> Thanks for your help,
> > >>
> > >> -kris-
> > >>
> > >> On Dec 3, 2007 7:02 PM, Freeman Fang <fr...@iona.com> wrote:
> > >>
> > >>
> > >>> Change your locationURI to
> > >>> locationURI="#finalUrl"
> > >>> This works by my test.
> > >>>
> > >>> Best Regards
> > >>> Freeman
> > >>>
> > >>> Kristofor Jacobson wrote:
> > >>>
> > >>>> Hi all,
> > >>>>    I've been looking through the forums, searching
> > >>>> documentation, etc.,
> > >>>>
> > >>> and
> > >>>
> > >>>> can't seem to find anything obvious about how to specify bean
> > >>>> values (or
> > >>>> configurable properties of some kind) on on my service unit binding
> > >>>> attributes.  In the environment I'm working in, it isn't
> > >>>> practical for
> > >>>>
> > >>> the
> > >>>
> > >>>> developers to know the concrete bindings at build-time (seems
> > >>>> like a
> > >>>>
> > >>> pretty
> > >>>
> > >>>> normal situation).  Our deployment artifacts also can't change
> > >>>> from one
> > >>>> environment to the next, so any concrete binding data needs to be
> > >>>>
> > >>> separate
> > >>>
> > >>>> from the deployable service archives.
> > >>>>
> > >>>>    An example of what I'm looking for would be to have an HTTP
> > >>>> binding
> > >>>> specified like this:
> > >>>>
> > >>>>     <http:endpoint  service="Service"
> > >>>>                     endpoint="ServicePort"
> > >>>>                     role="provider"
> > >>>>                     locationURI="*#finalUrl*"
> > >>>>                     soap="true"
> > >>>>                     soapVersion="1.1"
> > >>>>                     soapAction=" http://www.organization.com/
> > >>>> Service"
> > >>>>
> > >>>> And to have a bean (property) defined in the servicemix.xml (or
> > >>>> some
> > >>>>
> > >>> other
> > >>>
> > >>>> location external to the service archive) that maps to
> > >>>> "#finalUrl", such
> > >>>>
> > >>> as:
> > >>>
> > >>>>         <bean id="finalUrl" class="java.lang.String">
> > >>>>             <constructor-arg value="http://somehost:8090/Service"/>
> > >>>>         </bean>
> > >>>>
> > >>>> However, at deployment-time, the service archive fails to deploy
> > >>>> with
> > >>>>
> > >>> "*Cannot
> > >>>
> > >>>> resolve reference to bean 'finalUrl' while setting bean property
> > >>>> 'locationURI'; nested exception is
> > >>>> org.springframework.beans.factory.NoSuchBeanDefinitionException:
> > >>>> No bean
> > >>>> named 'finalUrl' is defined*".
> > >>>>
> > >>>> I have two questions for ServiceMix users:
> > >>>> 1.  Do you have a strategy you recommend for this type of
> > >>>>
> > >>> externalization of
> > >>>
> > >>>> configuration and
> > >>>> 2.  Have you been able to make this particular approach work?
> > >>>> If so,
> > >>>>
> > >>> how?
> > >>>
> > >>>> Thanks for any help at all!
> > >>>>
> > >>>> -kris-
> > >>>>
> > >>>>
> > >>>>
> > >>
> > >>
> >
> >
>
>
> --
> Thanks and Regards
> Daya K Dubey
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Overriding binding values

Posted by Daya K Dubey <da...@googlemail.com>.
can any one let me know how to unsubscribe from this mailing list.  I have
tried unsubscribe@servicemix.apache.org but it doesn't work.. please do
something..

On Dec 4, 2007 3:13 PM, Jason Sando <js...@claritysys.com> wrote:

> Kris, if you don't mind I'd like to try elaborate the question a
> little bit:
>
> The scenario is that there is a separation between Development, QA,
> and Production.  The developers only know their development
> environment.  Someone outside of Development is responsible for the
> deployment and configuration of the service-archive into the QA and
> Production environments.  So any runtime configuration data that can
> change from one environment to the next *must* be externalized.  Such
> configuration would include authentication credentials, URL's, queue
> names, server names, etc.
>
> The person responsible for the QA and Production deployment needs any
> easy way to determine which values they need to fill out, to fill
> them out, and ensure the one or more servers in the cluster for each
> environment have the proper configuration.
>
> With ServiceMix we've found two ways to do this:
>
>   1. Modify the "conf/servicemix.xml" file (on each server in the
> cluster?) to specify the values
>   2. Place the values into various service-units, one for each BC or
> SE required, bundle them into a service-archive and deploy (on each
> server in the cluster?)
>
> Option #2 has the benefit of not requiring a server restart, but in
> exchange has a much more complex folder/file layout, and requires
> it's own build (which is easy enough with maven, but still an extra
> step).  Option #1 is just a largish XML file, so is going to be a lot
> less intimidating to the person doing the deployment.
>
> I haven't played with clustering yet so I'm not sure how this changes
> to support that.
>
> Make sense so far?
>
> Regards,
>
> - Jason
>
>
> On Dec 3, 2007, at 10:13 PM, Freeman Fang wrote:
>
> > no, your locationURI is
> > locationURI="*#finalUrl*"
> > but not
> > locationURI="#finalUrl"
> > You have two more "*"
> > And make sure put your finalUrl bean directly under <beans> element
> >
> > Best Regards
> >
> > Freeman
> > Kristofor Jacobson wrote:
> >> I'm not sure I understand.
> >> I have the locationURI set to "#finalUrl" already, but I encounter an
> >> error.  Is there a particular place in the servicemix.xml that I
> >> need to
> >> define the finalUrl bean?
> >>
> >> Thanks for your help,
> >>
> >> -kris-
> >>
> >> On Dec 3, 2007 7:02 PM, Freeman Fang <fr...@iona.com> wrote:
> >>
> >>
> >>> Change your locationURI to
> >>> locationURI="#finalUrl"
> >>> This works by my test.
> >>>
> >>> Best Regards
> >>> Freeman
> >>>
> >>> Kristofor Jacobson wrote:
> >>>
> >>>> Hi all,
> >>>>    I've been looking through the forums, searching
> >>>> documentation, etc.,
> >>>>
> >>> and
> >>>
> >>>> can't seem to find anything obvious about how to specify bean
> >>>> values (or
> >>>> configurable properties of some kind) on on my service unit binding
> >>>> attributes.  In the environment I'm working in, it isn't
> >>>> practical for
> >>>>
> >>> the
> >>>
> >>>> developers to know the concrete bindings at build-time (seems
> >>>> like a
> >>>>
> >>> pretty
> >>>
> >>>> normal situation).  Our deployment artifacts also can't change
> >>>> from one
> >>>> environment to the next, so any concrete binding data needs to be
> >>>>
> >>> separate
> >>>
> >>>> from the deployable service archives.
> >>>>
> >>>>    An example of what I'm looking for would be to have an HTTP
> >>>> binding
> >>>> specified like this:
> >>>>
> >>>>     <http:endpoint  service="Service"
> >>>>                     endpoint="ServicePort"
> >>>>                     role="provider"
> >>>>                     locationURI="*#finalUrl*"
> >>>>                     soap="true"
> >>>>                     soapVersion="1.1"
> >>>>                     soapAction=" http://www.organization.com/
> >>>> Service"
> >>>>
> >>>> And to have a bean (property) defined in the servicemix.xml (or
> >>>> some
> >>>>
> >>> other
> >>>
> >>>> location external to the service archive) that maps to
> >>>> "#finalUrl", such
> >>>>
> >>> as:
> >>>
> >>>>         <bean id="finalUrl" class="java.lang.String">
> >>>>             <constructor-arg value="http://somehost:8090/Service"/>
> >>>>         </bean>
> >>>>
> >>>> However, at deployment-time, the service archive fails to deploy
> >>>> with
> >>>>
> >>> "*Cannot
> >>>
> >>>> resolve reference to bean 'finalUrl' while setting bean property
> >>>> 'locationURI'; nested exception is
> >>>> org.springframework.beans.factory.NoSuchBeanDefinitionException:
> >>>> No bean
> >>>> named 'finalUrl' is defined*".
> >>>>
> >>>> I have two questions for ServiceMix users:
> >>>> 1.  Do you have a strategy you recommend for this type of
> >>>>
> >>> externalization of
> >>>
> >>>> configuration and
> >>>> 2.  Have you been able to make this particular approach work?
> >>>> If so,
> >>>>
> >>> how?
> >>>
> >>>> Thanks for any help at all!
> >>>>
> >>>> -kris-
> >>>>
> >>>>
> >>>>
> >>
> >>
>
>


-- 
Thanks and Regards
Daya K Dubey

Re: Overriding binding values

Posted by Chris Custine <cc...@apache.org>.
Comments inline below:

On Dec 4, 2007 11:33 AM, Kristofor Jacobson <kr...@gmail.com>
wrote:

> Thanks for your response!  I will have to spend some time working with
> this
> to see how it can help accomplish my goals.
>
> I still think I'm struggling, though, to explain the requirements, so I
> will
> provide more details than I did originally.
>
> I am in an organization that needs strong controls, both for internal
> control reasons and also to comply with third-party regulatory compliance
> requirements.  I want to build a service-unit artifact that has a checksum
> associated with it, and use that artifact in all environments, with
> specific
> data overriden as required by each environment.  I don't want different
> artifacts for each environment, nor do I want to have to open and
> repackage
> the artifacts for each environment.  I suppose what I'm looking for is
> similar to what I would get with a web container - basically, to be able
> to
> specify all of my configuration elements in my war file, but override
> anything I want at the container level (factories, connection pools,
> external URLs, etc.) without having to repackage the war file.
>
> At a minimum, at deployment-time, I think we will need to be able to (1)
> override specific attributes of a binding (for example, the URI of an
> external web service)

For overriding specific values I would look at PropertyPlaceholderConfigurer
or PropertyOverrideConfigurer in Spring.  These will allow you to
externalize properties files in each environment and in the case of the
OverrideConfigurer you can specify defaults (production values), and then
override them on your development and QA machines.  This way you don't have
to do anything special unless you want them to be different than
production.  I believe you can also retrieve properties files from http and
any other url type that Spring supports.

There are also ways to use JNDI to retrieve properties via Spring so maybe
that is an option.


> and (2) override an entire binding definition
> associated with a logical endpoint name, both without repackaging the
> service archives.


To override entire definitions (not just properties), I think you will have
to use the Spring <import> element as you mention below.


>
> Freeman Fang assisted me yesterday by showing how I can use <import> in my
> xbean.xml bindings file.  This makes it so that an external file is
> located
> on the classpath and bean definitions are loaded from it at
> deployment-time.  This is definitely progress towards what I'm looking for
> (it seems to meet requirement #1 above), and I'm going to explore the
> possibilities of this approach.  Ideally, whatever approach is used would
> also be able to pick up changes at run-time - for example, setting a file
> listener on the <import>ed files, and picking up changes as needed at
> run-time without restarting the container.
>
> I hope this helps clarify the problem; any suggestions, comments or
> experience with this approach are all greatly appreciated :-)
>
> Thanks,
>
> -kris-
>
> On Dec 4, 2007 9:16 AM, Guillaume Nodet <gn...@gmail.com> wrote:
>
> > You may want to take a look at
> > http://gnodet.blogspot.com/2007/03/using-maven-to-switch-runtime.html
> > It may be a solution to solve your problems.
> >
> > On Dec 4, 2007 4:13 PM, Jason Sando <js...@claritysys.com> wrote:
> >
> > > Kris, if you don't mind I'd like to try elaborate the question a
> > > little bit:
> > >
> > > The scenario is that there is a separation between Development, QA,
> > > and Production.  The developers only know their development
> > > environment.  Someone outside of Development is responsible for the
> > > deployment and configuration of the service-archive into the QA and
> > > Production environments.  So any runtime configuration data that can
> > > change from one environment to the next *must* be externalized.  Such
> > > configuration would include authentication credentials, URL's, queue
> > > names, server names, etc.
> > >
> > > The person responsible for the QA and Production deployment needs any
> > > easy way to determine which values they need to fill out, to fill
> > > them out, and ensure the one or more servers in the cluster for each
> > > environment have the proper configuration.
> > >
> > > With ServiceMix we've found two ways to do this:
> > >
> > >   1. Modify the "conf/servicemix.xml" file (on each server in the
> > > cluster?) to specify the values
> > >   2. Place the values into various service-units, one for each BC or
> > > SE required, bundle them into a service-archive and deploy (on each
> > > server in the cluster?)
> > >
> > > Option #2 has the benefit of not requiring a server restart, but in
> > > exchange has a much more complex folder/file layout, and requires
> > > it's own build (which is easy enough with maven, but still an extra
> > > step).  Option #1 is just a largish XML file, so is going to be a lot
> > > less intimidating to the person doing the deployment.
> > >
> > > I haven't played with clustering yet so I'm not sure how this changes
> > > to support that.
> > >
> > > Make sense so far?
> > >
> > > Regards,
> > >
> > > - Jason
> > >
> > >
> > > On Dec 3, 2007, at 10:13 PM, Freeman Fang wrote:
> > >
> > > > no, your locationURI is
> > > > locationURI="*#finalUrl*"
> > > > but not
> > > > locationURI="#finalUrl"
> > > > You have two more "*"
> > > > And make sure put your finalUrl bean directly under <beans> element
> > > >
> > > > Best Regards
> > > >
> > > > Freeman
> > > > Kristofor Jacobson wrote:
> > > >> I'm not sure I understand.
> > > >> I have the locationURI set to "#finalUrl" already, but I encounter
> an
> > > >> error.  Is there a particular place in the servicemix.xml that I
> > > >> need to
> > > >> define the finalUrl bean?
> > > >>
> > > >> Thanks for your help,
> > > >>
> > > >> -kris-
> > > >>
> > > >> On Dec 3, 2007 7:02 PM, Freeman Fang <fr...@iona.com> wrote:
> > > >>
> > > >>
> > > >>> Change your locationURI to
> > > >>> locationURI="#finalUrl"
> > > >>> This works by my test.
> > > >>>
> > > >>> Best Regards
> > > >>> Freeman
> > > >>>
> > > >>> Kristofor Jacobson wrote:
> > > >>>
> > > >>>> Hi all,
> > > >>>>    I've been looking through the forums, searching
> > > >>>> documentation, etc.,
> > > >>>>
> > > >>> and
> > > >>>
> > > >>>> can't seem to find anything obvious about how to specify bean
> > > >>>> values (or
> > > >>>> configurable properties of some kind) on on my service unit
> binding
> > > >>>> attributes.  In the environment I'm working in, it isn't
> > > >>>> practical for
> > > >>>>
> > > >>> the
> > > >>>
> > > >>>> developers to know the concrete bindings at build-time (seems
> > > >>>> like a
> > > >>>>
> > > >>> pretty
> > > >>>
> > > >>>> normal situation).  Our deployment artifacts also can't change
> > > >>>> from one
> > > >>>> environment to the next, so any concrete binding data needs to be
> > > >>>>
> > > >>> separate
> > > >>>
> > > >>>> from the deployable service archives.
> > > >>>>
> > > >>>>    An example of what I'm looking for would be to have an HTTP
> > > >>>> binding
> > > >>>> specified like this:
> > > >>>>
> > > >>>>     <http:endpoint  service="Service"
> > > >>>>                     endpoint="ServicePort"
> > > >>>>                     role="provider"
> > > >>>>                     locationURI="*#finalUrl*"
> > > >>>>                     soap="true"
> > > >>>>                     soapVersion="1.1"
> > > >>>>                     soapAction=" http://www.organization.com/
> > > >>>> Service"
> > > >>>>
> > > >>>> And to have a bean (property) defined in the servicemix.xml (or
> > > >>>> some
> > > >>>>
> > > >>> other
> > > >>>
> > > >>>> location external to the service archive) that maps to
> > > >>>> "#finalUrl", such
> > > >>>>
> > > >>> as:
> > > >>>
> > > >>>>         <bean id="finalUrl" class="java.lang.String">
> > > >>>>             <constructor-arg value="http://somehost:8090/Service
> "/>
> > > >>>>         </bean>
> > > >>>>
> > > >>>> However, at deployment-time, the service archive fails to deploy
> > > >>>> with
> > > >>>>
> > > >>> "*Cannot
> > > >>>
> > > >>>> resolve reference to bean 'finalUrl' while setting bean property
> > > >>>> 'locationURI'; nested exception is
> > > >>>> org.springframework.beans.factory.NoSuchBeanDefinitionException:
> > > >>>> No bean
> > > >>>> named 'finalUrl' is defined*".
> > > >>>>
> > > >>>> I have two questions for ServiceMix users:
> > > >>>> 1.  Do you have a strategy you recommend for this type of
> > > >>>>
> > > >>> externalization of
> > > >>>
> > > >>>> configuration and
> > > >>>> 2.  Have you been able to make this particular approach work?
> > > >>>> If so,
> > > >>>>
> > > >>> how?
> > > >>>
> > > >>>> Thanks for any help at all!
> > > >>>>
> > > >>>> -kris-
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>
> > > >>
> > >
> > >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
>

Re: Overriding binding values

Posted by Bruce Snyder <br...@gmail.com>.
On Dec 4, 2007 11:33 AM, Kristofor Jacobson
<kr...@gmail.com> wrote:

> Freeman Fang assisted me yesterday by showing how I can use <import> in my
> xbean.xml bindings file.  This makes it so that an external file is located
> on the classpath and bean definitions are loaded from it at
> deployment-time.  This is definitely progress towards what I'm looking for
> (it seems to meet requirement #1 above), and I'm going to explore the
> possibilities of this approach.  Ideally, whatever approach is used would
> also be able to pick up changes at run-time - for example, setting a file
> listener on the <import>ed files, and picking up changes as needed at
> run-time without restarting the container.

FWIW, this is just functionality from the Spring Framework. Anything
you can do with Spring, you can do in the ServiceMix configuration
files because they are just Spring configuration files.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

http://bruceblog.org/

Re: Overriding binding values

Posted by Kristofor Jacobson <kr...@gmail.com>.
Thanks for your response!  I will have to spend some time working with this
to see how it can help accomplish my goals.

I still think I'm struggling, though, to explain the requirements, so I will
provide more details than I did originally.

I am in an organization that needs strong controls, both for internal
control reasons and also to comply with third-party regulatory compliance
requirements.  I want to build a service-unit artifact that has a checksum
associated with it, and use that artifact in all environments, with specific
data overriden as required by each environment.  I don't want different
artifacts for each environment, nor do I want to have to open and repackage
the artifacts for each environment.  I suppose what I'm looking for is
similar to what I would get with a web container - basically, to be able to
specify all of my configuration elements in my war file, but override
anything I want at the container level (factories, connection pools,
external URLs, etc.) without having to repackage the war file.

At a minimum, at deployment-time, I think we will need to be able to (1)
override specific attributes of a binding (for example, the URI of an
external web service) and (2) override an entire binding definition
associated with a logical endpoint name, both without repackaging the
service archives.

Freeman Fang assisted me yesterday by showing how I can use <import> in my
xbean.xml bindings file.  This makes it so that an external file is located
on the classpath and bean definitions are loaded from it at
deployment-time.  This is definitely progress towards what I'm looking for
(it seems to meet requirement #1 above), and I'm going to explore the
possibilities of this approach.  Ideally, whatever approach is used would
also be able to pick up changes at run-time - for example, setting a file
listener on the <import>ed files, and picking up changes as needed at
run-time without restarting the container.

I hope this helps clarify the problem; any suggestions, comments or
experience with this approach are all greatly appreciated :-)

Thanks,

-kris-

On Dec 4, 2007 9:16 AM, Guillaume Nodet <gn...@gmail.com> wrote:

> You may want to take a look at
> http://gnodet.blogspot.com/2007/03/using-maven-to-switch-runtime.html
> It may be a solution to solve your problems.
>
> On Dec 4, 2007 4:13 PM, Jason Sando <js...@claritysys.com> wrote:
>
> > Kris, if you don't mind I'd like to try elaborate the question a
> > little bit:
> >
> > The scenario is that there is a separation between Development, QA,
> > and Production.  The developers only know their development
> > environment.  Someone outside of Development is responsible for the
> > deployment and configuration of the service-archive into the QA and
> > Production environments.  So any runtime configuration data that can
> > change from one environment to the next *must* be externalized.  Such
> > configuration would include authentication credentials, URL's, queue
> > names, server names, etc.
> >
> > The person responsible for the QA and Production deployment needs any
> > easy way to determine which values they need to fill out, to fill
> > them out, and ensure the one or more servers in the cluster for each
> > environment have the proper configuration.
> >
> > With ServiceMix we've found two ways to do this:
> >
> >   1. Modify the "conf/servicemix.xml" file (on each server in the
> > cluster?) to specify the values
> >   2. Place the values into various service-units, one for each BC or
> > SE required, bundle them into a service-archive and deploy (on each
> > server in the cluster?)
> >
> > Option #2 has the benefit of not requiring a server restart, but in
> > exchange has a much more complex folder/file layout, and requires
> > it's own build (which is easy enough with maven, but still an extra
> > step).  Option #1 is just a largish XML file, so is going to be a lot
> > less intimidating to the person doing the deployment.
> >
> > I haven't played with clustering yet so I'm not sure how this changes
> > to support that.
> >
> > Make sense so far?
> >
> > Regards,
> >
> > - Jason
> >
> >
> > On Dec 3, 2007, at 10:13 PM, Freeman Fang wrote:
> >
> > > no, your locationURI is
> > > locationURI="*#finalUrl*"
> > > but not
> > > locationURI="#finalUrl"
> > > You have two more "*"
> > > And make sure put your finalUrl bean directly under <beans> element
> > >
> > > Best Regards
> > >
> > > Freeman
> > > Kristofor Jacobson wrote:
> > >> I'm not sure I understand.
> > >> I have the locationURI set to "#finalUrl" already, but I encounter an
> > >> error.  Is there a particular place in the servicemix.xml that I
> > >> need to
> > >> define the finalUrl bean?
> > >>
> > >> Thanks for your help,
> > >>
> > >> -kris-
> > >>
> > >> On Dec 3, 2007 7:02 PM, Freeman Fang <fr...@iona.com> wrote:
> > >>
> > >>
> > >>> Change your locationURI to
> > >>> locationURI="#finalUrl"
> > >>> This works by my test.
> > >>>
> > >>> Best Regards
> > >>> Freeman
> > >>>
> > >>> Kristofor Jacobson wrote:
> > >>>
> > >>>> Hi all,
> > >>>>    I've been looking through the forums, searching
> > >>>> documentation, etc.,
> > >>>>
> > >>> and
> > >>>
> > >>>> can't seem to find anything obvious about how to specify bean
> > >>>> values (or
> > >>>> configurable properties of some kind) on on my service unit binding
> > >>>> attributes.  In the environment I'm working in, it isn't
> > >>>> practical for
> > >>>>
> > >>> the
> > >>>
> > >>>> developers to know the concrete bindings at build-time (seems
> > >>>> like a
> > >>>>
> > >>> pretty
> > >>>
> > >>>> normal situation).  Our deployment artifacts also can't change
> > >>>> from one
> > >>>> environment to the next, so any concrete binding data needs to be
> > >>>>
> > >>> separate
> > >>>
> > >>>> from the deployable service archives.
> > >>>>
> > >>>>    An example of what I'm looking for would be to have an HTTP
> > >>>> binding
> > >>>> specified like this:
> > >>>>
> > >>>>     <http:endpoint  service="Service"
> > >>>>                     endpoint="ServicePort"
> > >>>>                     role="provider"
> > >>>>                     locationURI="*#finalUrl*"
> > >>>>                     soap="true"
> > >>>>                     soapVersion="1.1"
> > >>>>                     soapAction=" http://www.organization.com/
> > >>>> Service"
> > >>>>
> > >>>> And to have a bean (property) defined in the servicemix.xml (or
> > >>>> some
> > >>>>
> > >>> other
> > >>>
> > >>>> location external to the service archive) that maps to
> > >>>> "#finalUrl", such
> > >>>>
> > >>> as:
> > >>>
> > >>>>         <bean id="finalUrl" class="java.lang.String">
> > >>>>             <constructor-arg value="http://somehost:8090/Service"/>
> > >>>>         </bean>
> > >>>>
> > >>>> However, at deployment-time, the service archive fails to deploy
> > >>>> with
> > >>>>
> > >>> "*Cannot
> > >>>
> > >>>> resolve reference to bean 'finalUrl' while setting bean property
> > >>>> 'locationURI'; nested exception is
> > >>>> org.springframework.beans.factory.NoSuchBeanDefinitionException:
> > >>>> No bean
> > >>>> named 'finalUrl' is defined*".
> > >>>>
> > >>>> I have two questions for ServiceMix users:
> > >>>> 1.  Do you have a strategy you recommend for this type of
> > >>>>
> > >>> externalization of
> > >>>
> > >>>> configuration and
> > >>>> 2.  Have you been able to make this particular approach work?
> > >>>> If so,
> > >>>>
> > >>> how?
> > >>>
> > >>>> Thanks for any help at all!
> > >>>>
> > >>>> -kris-
> > >>>>
> > >>>>
> > >>>>
> > >>
> > >>
> >
> >
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
>

Re: Overriding binding values

Posted by Guillaume Nodet <gn...@gmail.com>.
You may want to take a look at
http://gnodet.blogspot.com/2007/03/using-maven-to-switch-runtime.html
It may be a solution to solve your problems.

On Dec 4, 2007 4:13 PM, Jason Sando <js...@claritysys.com> wrote:

> Kris, if you don't mind I'd like to try elaborate the question a
> little bit:
>
> The scenario is that there is a separation between Development, QA,
> and Production.  The developers only know their development
> environment.  Someone outside of Development is responsible for the
> deployment and configuration of the service-archive into the QA and
> Production environments.  So any runtime configuration data that can
> change from one environment to the next *must* be externalized.  Such
> configuration would include authentication credentials, URL's, queue
> names, server names, etc.
>
> The person responsible for the QA and Production deployment needs any
> easy way to determine which values they need to fill out, to fill
> them out, and ensure the one or more servers in the cluster for each
> environment have the proper configuration.
>
> With ServiceMix we've found two ways to do this:
>
>   1. Modify the "conf/servicemix.xml" file (on each server in the
> cluster?) to specify the values
>   2. Place the values into various service-units, one for each BC or
> SE required, bundle them into a service-archive and deploy (on each
> server in the cluster?)
>
> Option #2 has the benefit of not requiring a server restart, but in
> exchange has a much more complex folder/file layout, and requires
> it's own build (which is easy enough with maven, but still an extra
> step).  Option #1 is just a largish XML file, so is going to be a lot
> less intimidating to the person doing the deployment.
>
> I haven't played with clustering yet so I'm not sure how this changes
> to support that.
>
> Make sense so far?
>
> Regards,
>
> - Jason
>
>
> On Dec 3, 2007, at 10:13 PM, Freeman Fang wrote:
>
> > no, your locationURI is
> > locationURI="*#finalUrl*"
> > but not
> > locationURI="#finalUrl"
> > You have two more "*"
> > And make sure put your finalUrl bean directly under <beans> element
> >
> > Best Regards
> >
> > Freeman
> > Kristofor Jacobson wrote:
> >> I'm not sure I understand.
> >> I have the locationURI set to "#finalUrl" already, but I encounter an
> >> error.  Is there a particular place in the servicemix.xml that I
> >> need to
> >> define the finalUrl bean?
> >>
> >> Thanks for your help,
> >>
> >> -kris-
> >>
> >> On Dec 3, 2007 7:02 PM, Freeman Fang <fr...@iona.com> wrote:
> >>
> >>
> >>> Change your locationURI to
> >>> locationURI="#finalUrl"
> >>> This works by my test.
> >>>
> >>> Best Regards
> >>> Freeman
> >>>
> >>> Kristofor Jacobson wrote:
> >>>
> >>>> Hi all,
> >>>>    I've been looking through the forums, searching
> >>>> documentation, etc.,
> >>>>
> >>> and
> >>>
> >>>> can't seem to find anything obvious about how to specify bean
> >>>> values (or
> >>>> configurable properties of some kind) on on my service unit binding
> >>>> attributes.  In the environment I'm working in, it isn't
> >>>> practical for
> >>>>
> >>> the
> >>>
> >>>> developers to know the concrete bindings at build-time (seems
> >>>> like a
> >>>>
> >>> pretty
> >>>
> >>>> normal situation).  Our deployment artifacts also can't change
> >>>> from one
> >>>> environment to the next, so any concrete binding data needs to be
> >>>>
> >>> separate
> >>>
> >>>> from the deployable service archives.
> >>>>
> >>>>    An example of what I'm looking for would be to have an HTTP
> >>>> binding
> >>>> specified like this:
> >>>>
> >>>>     <http:endpoint  service="Service"
> >>>>                     endpoint="ServicePort"
> >>>>                     role="provider"
> >>>>                     locationURI="*#finalUrl*"
> >>>>                     soap="true"
> >>>>                     soapVersion="1.1"
> >>>>                     soapAction=" http://www.organization.com/
> >>>> Service"
> >>>>
> >>>> And to have a bean (property) defined in the servicemix.xml (or
> >>>> some
> >>>>
> >>> other
> >>>
> >>>> location external to the service archive) that maps to
> >>>> "#finalUrl", such
> >>>>
> >>> as:
> >>>
> >>>>         <bean id="finalUrl" class="java.lang.String">
> >>>>             <constructor-arg value="http://somehost:8090/Service"/>
> >>>>         </bean>
> >>>>
> >>>> However, at deployment-time, the service archive fails to deploy
> >>>> with
> >>>>
> >>> "*Cannot
> >>>
> >>>> resolve reference to bean 'finalUrl' while setting bean property
> >>>> 'locationURI'; nested exception is
> >>>> org.springframework.beans.factory.NoSuchBeanDefinitionException:
> >>>> No bean
> >>>> named 'finalUrl' is defined*".
> >>>>
> >>>> I have two questions for ServiceMix users:
> >>>> 1.  Do you have a strategy you recommend for this type of
> >>>>
> >>> externalization of
> >>>
> >>>> configuration and
> >>>> 2.  Have you been able to make this particular approach work?
> >>>> If so,
> >>>>
> >>> how?
> >>>
> >>>> Thanks for any help at all!
> >>>>
> >>>> -kris-
> >>>>
> >>>>
> >>>>
> >>
> >>
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Overriding binding values

Posted by Jason Sando <js...@claritysys.com>.
Kris, if you don't mind I'd like to try elaborate the question a  
little bit:

The scenario is that there is a separation between Development, QA,  
and Production.  The developers only know their development  
environment.  Someone outside of Development is responsible for the  
deployment and configuration of the service-archive into the QA and  
Production environments.  So any runtime configuration data that can  
change from one environment to the next *must* be externalized.  Such  
configuration would include authentication credentials, URL's, queue  
names, server names, etc.

The person responsible for the QA and Production deployment needs any  
easy way to determine which values they need to fill out, to fill  
them out, and ensure the one or more servers in the cluster for each  
environment have the proper configuration.

With ServiceMix we've found two ways to do this:

   1. Modify the "conf/servicemix.xml" file (on each server in the  
cluster?) to specify the values
   2. Place the values into various service-units, one for each BC or  
SE required, bundle them into a service-archive and deploy (on each  
server in the cluster?)

Option #2 has the benefit of not requiring a server restart, but in  
exchange has a much more complex folder/file layout, and requires  
it's own build (which is easy enough with maven, but still an extra  
step).  Option #1 is just a largish XML file, so is going to be a lot  
less intimidating to the person doing the deployment.

I haven't played with clustering yet so I'm not sure how this changes  
to support that.

Make sense so far?

Regards,

- Jason


On Dec 3, 2007, at 10:13 PM, Freeman Fang wrote:

> no, your locationURI is
> locationURI="*#finalUrl*"
> but not
> locationURI="#finalUrl"
> You have two more "*"
> And make sure put your finalUrl bean directly under <beans> element
>
> Best Regards
>
> Freeman
> Kristofor Jacobson wrote:
>> I'm not sure I understand.
>> I have the locationURI set to "#finalUrl" already, but I encounter an
>> error.  Is there a particular place in the servicemix.xml that I  
>> need to
>> define the finalUrl bean?
>>
>> Thanks for your help,
>>
>> -kris-
>>
>> On Dec 3, 2007 7:02 PM, Freeman Fang <fr...@iona.com> wrote:
>>
>>
>>> Change your locationURI to
>>> locationURI="#finalUrl"
>>> This works by my test.
>>>
>>> Best Regards
>>> Freeman
>>>
>>> Kristofor Jacobson wrote:
>>>
>>>> Hi all,
>>>>    I've been looking through the forums, searching  
>>>> documentation, etc.,
>>>>
>>> and
>>>
>>>> can't seem to find anything obvious about how to specify bean  
>>>> values (or
>>>> configurable properties of some kind) on on my service unit binding
>>>> attributes.  In the environment I'm working in, it isn't  
>>>> practical for
>>>>
>>> the
>>>
>>>> developers to know the concrete bindings at build-time (seems  
>>>> like a
>>>>
>>> pretty
>>>
>>>> normal situation).  Our deployment artifacts also can't change  
>>>> from one
>>>> environment to the next, so any concrete binding data needs to be
>>>>
>>> separate
>>>
>>>> from the deployable service archives.
>>>>
>>>>    An example of what I'm looking for would be to have an HTTP  
>>>> binding
>>>> specified like this:
>>>>
>>>>     <http:endpoint  service="Service"
>>>>                     endpoint="ServicePort"
>>>>                     role="provider"
>>>>                     locationURI="*#finalUrl*"
>>>>                     soap="true"
>>>>                     soapVersion="1.1"
>>>>                     soapAction=" http://www.organization.com/ 
>>>> Service"
>>>>
>>>> And to have a bean (property) defined in the servicemix.xml (or  
>>>> some
>>>>
>>> other
>>>
>>>> location external to the service archive) that maps to  
>>>> "#finalUrl", such
>>>>
>>> as:
>>>
>>>>         <bean id="finalUrl" class="java.lang.String">
>>>>             <constructor-arg value="http://somehost:8090/Service"/>
>>>>         </bean>
>>>>
>>>> However, at deployment-time, the service archive fails to deploy  
>>>> with
>>>>
>>> "*Cannot
>>>
>>>> resolve reference to bean 'finalUrl' while setting bean property
>>>> 'locationURI'; nested exception is
>>>> org.springframework.beans.factory.NoSuchBeanDefinitionException:  
>>>> No bean
>>>> named 'finalUrl' is defined*".
>>>>
>>>> I have two questions for ServiceMix users:
>>>> 1.  Do you have a strategy you recommend for this type of
>>>>
>>> externalization of
>>>
>>>> configuration and
>>>> 2.  Have you been able to make this particular approach work?   
>>>> If so,
>>>>
>>> how?
>>>
>>>> Thanks for any help at all!
>>>>
>>>> -kris-
>>>>
>>>>
>>>>
>>
>>


Re: Overriding binding values

Posted by Freeman Fang <fr...@iona.com>.
no, your locationURI is
locationURI="*#finalUrl*"
but not
locationURI="#finalUrl"
You have two more "*"
And make sure put your finalUrl bean directly under <beans> element

Best Regards

Freeman
Kristofor Jacobson wrote:
> I'm not sure I understand.
> I have the locationURI set to "#finalUrl" already, but I encounter an
> error.  Is there a particular place in the servicemix.xml that I need to
> define the finalUrl bean?
>
> Thanks for your help,
>
> -kris-
>
> On Dec 3, 2007 7:02 PM, Freeman Fang <fr...@iona.com> wrote:
>
>   
>> Change your locationURI to
>> locationURI="#finalUrl"
>> This works by my test.
>>
>> Best Regards
>> Freeman
>>
>> Kristofor Jacobson wrote:
>>     
>>> Hi all,
>>>    I've been looking through the forums, searching documentation, etc.,
>>>       
>> and
>>     
>>> can't seem to find anything obvious about how to specify bean values (or
>>> configurable properties of some kind) on on my service unit binding
>>> attributes.  In the environment I'm working in, it isn't practical for
>>>       
>> the
>>     
>>> developers to know the concrete bindings at build-time (seems like a
>>>       
>> pretty
>>     
>>> normal situation).  Our deployment artifacts also can't change from one
>>> environment to the next, so any concrete binding data needs to be
>>>       
>> separate
>>     
>>> from the deployable service archives.
>>>
>>>    An example of what I'm looking for would be to have an HTTP binding
>>> specified like this:
>>>
>>>     <http:endpoint  service="Service"
>>>                     endpoint="ServicePort"
>>>                     role="provider"
>>>                     locationURI="*#finalUrl*"
>>>                     soap="true"
>>>                     soapVersion="1.1"
>>>                     soapAction=" http://www.organization.com/Service"
>>>
>>> And to have a bean (property) defined in the servicemix.xml (or some
>>>       
>> other
>>     
>>> location external to the service archive) that maps to "#finalUrl", such
>>>       
>> as:
>>     
>>>         <bean id="finalUrl" class="java.lang.String">
>>>             <constructor-arg value="http://somehost:8090/Service"/>
>>>         </bean>
>>>
>>> However, at deployment-time, the service archive fails to deploy with
>>>       
>> "*Cannot
>>     
>>> resolve reference to bean 'finalUrl' while setting bean property
>>> 'locationURI'; nested exception is
>>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>>> named 'finalUrl' is defined*".
>>>
>>> I have two questions for ServiceMix users:
>>> 1.  Do you have a strategy you recommend for this type of
>>>       
>> externalization of
>>     
>>> configuration and
>>> 2.  Have you been able to make this particular approach work?  If so,
>>>       
>> how?
>>     
>>> Thanks for any help at all!
>>>
>>> -kris-
>>>
>>>
>>>       
>
>   

Re: Overriding binding values

Posted by Kristofor Jacobson <kr...@gmail.com>.
I'm not sure I understand.
I have the locationURI set to "#finalUrl" already, but I encounter an
error.  Is there a particular place in the servicemix.xml that I need to
define the finalUrl bean?

Thanks for your help,

-kris-

On Dec 3, 2007 7:02 PM, Freeman Fang <fr...@iona.com> wrote:

> Change your locationURI to
> locationURI="#finalUrl"
> This works by my test.
>
> Best Regards
> Freeman
>
> Kristofor Jacobson wrote:
> > Hi all,
> >    I've been looking through the forums, searching documentation, etc.,
> and
> > can't seem to find anything obvious about how to specify bean values (or
> > configurable properties of some kind) on on my service unit binding
> > attributes.  In the environment I'm working in, it isn't practical for
> the
> > developers to know the concrete bindings at build-time (seems like a
> pretty
> > normal situation).  Our deployment artifacts also can't change from one
> > environment to the next, so any concrete binding data needs to be
> separate
> > from the deployable service archives.
> >
> >    An example of what I'm looking for would be to have an HTTP binding
> > specified like this:
> >
> >     <http:endpoint  service="Service"
> >                     endpoint="ServicePort"
> >                     role="provider"
> >                     locationURI="*#finalUrl*"
> >                     soap="true"
> >                     soapVersion="1.1"
> >                     soapAction=" http://www.organization.com/Service"
> >
> > And to have a bean (property) defined in the servicemix.xml (or some
> other
> > location external to the service archive) that maps to "#finalUrl", such
> as:
> >
> >
> >         <bean id="finalUrl" class="java.lang.String">
> >             <constructor-arg value="http://somehost:8090/Service"/>
> >         </bean>
> >
> > However, at deployment-time, the service archive fails to deploy with
> "*Cannot
> > resolve reference to bean 'finalUrl' while setting bean property
> > 'locationURI'; nested exception is
> > org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
> > named 'finalUrl' is defined*".
> >
> > I have two questions for ServiceMix users:
> > 1.  Do you have a strategy you recommend for this type of
> externalization of
> > configuration and
> > 2.  Have you been able to make this particular approach work?  If so,
> how?
> >
> > Thanks for any help at all!
> >
> > -kris-
> >
> >
>

Re: Overriding binding values

Posted by Freeman Fang <fr...@iona.com>.
Change your locationURI to
locationURI="#finalUrl"
This works by my test.

Best Regards
Freeman

Kristofor Jacobson wrote:
> Hi all,
>    I've been looking through the forums, searching documentation, etc., and
> can't seem to find anything obvious about how to specify bean values (or
> configurable properties of some kind) on on my service unit binding
> attributes.  In the environment I'm working in, it isn't practical for the
> developers to know the concrete bindings at build-time (seems like a pretty
> normal situation).  Our deployment artifacts also can't change from one
> environment to the next, so any concrete binding data needs to be separate
> from the deployable service archives.
>
>    An example of what I'm looking for would be to have an HTTP binding
> specified like this:
>
>     <http:endpoint  service="Service"
>                     endpoint="ServicePort"
>                     role="provider"
>                     locationURI="*#finalUrl*"
>                     soap="true"
>                     soapVersion="1.1"
>                     soapAction=" http://www.organization.com/Service"
>
> And to have a bean (property) defined in the servicemix.xml (or some other
> location external to the service archive) that maps to "#finalUrl", such as:
>
>
>         <bean id="finalUrl" class="java.lang.String">
>             <constructor-arg value="http://somehost:8090/Service"/>
>         </bean>
>
> However, at deployment-time, the service archive fails to deploy with "*Cannot
> resolve reference to bean 'finalUrl' while setting bean property
> 'locationURI'; nested exception is
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
> named 'finalUrl' is defined*".
>
> I have two questions for ServiceMix users:
> 1.  Do you have a strategy you recommend for this type of externalization of
> configuration and
> 2.  Have you been able to make this particular approach work?  If so, how?
>
> Thanks for any help at all!
>
> -kris-
>
>