Jump to content
  • BW6.X - BWCE - How to select a connection configuration at runtime in BusinessWorks 6.X and BusinessWorks Container Edition


    It is quiet common to have to use different connection configurations in runtime environments, like for example to use a simple HTTP connection configuration in the ‘TEST’ environment and an HTTPS connection configuration with additional parameters, like the keystore file path and password, in the ‘PROD’ environment.

    An interesting feature of BusinessWorks 6.X is that this is possible to have multiple connection shared resources in an application and to define which one is used at runtime by using a property.

    The solution described below works for any kind of transport but note that for HTTP connections a new feature introduced in BusinessWorks 6.8 makes things more simple. Details are available at the end of this article.

    This can be done by using the following approach :

    . Define multiple connection shared resources as needed (for example one for HTTP and one for HTTPS)

    1*ZMcKzWQD7YE-zlqOkdJk3w.jpeg

    . Create a Module Property with the type of the connection to be managed (for example ‘HTTP Connector’) and select a default connection

    1*P6wvwiEu4e5Doz4x7ipFJQ.jpeg

    . In the activities or bindings that need to use one of these connections at runtime configure the target connection using the created Module Property

    1*PgGNBVOyJ8SvaXhxPIiXbw.jpeg

    . In the target runtime environment set the name of the connection to use in the profile of the application or using the TEA (the names of the available connections have to be provided by the development team).

    For HTTP client configuration it is possible to use the approach below that is more simple:

    . Create a Boolean property and set it to the default value ‘true’

    1*QQJeSAfGW5Ajt4x9zbKpYg.png

    . In the Security section of the HTTP Client resource, configure the ‘Confidentiality’ field to have its value defined by the property defined in previous step. Note that because the default value has been set to true the ‘SSL Client Configuration’ panel appears.

    1*Yxq2u9XNUkwHwEPJIpQVDA.png

    . Select the SSL Client Configuration to use when SSL is enabled, you can re-use an existing Configuration or create a new one

    1*7ThSkNKMPDCEA-pXVB-j7w.png

    . If SSL is not used in the development environment, you will need to change the value of the property controlling the SSL activation to false before testing your application

    1*E8BwmY2leD8kSxrhwpijhA.png

    Management of HTTP connections in BusinessWorks 6.8 / BusinessWorks Container Edition 2.7

    Details are available in the following article:
    How to switch between HTTP and HTTPS using a property in BusinessWorks and BusinessWorks Container Edition


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...