Search code examples
websphereibm-clouddashdb

Bluemix Services: Configuring WebSphere Application to use dashDB for Analytics


I'm using dashDB for Anayltics as a service for my Bluemix and I also added the SQL and data needed. But when I tried to start the application, I can't login. It seems that Bluemix can't find the dashDB...
My question is, when you add a service to a Bluemix app, does it automatically configure to enable the app to use the service such as "dashDB for Analytic" or do I have to manually configure something.

Addtional:
I'm trying to change the database used from DB2 to dashDB...I have changed the databaseName, password, user, portnumber, driverType to the ones I see in the Environment variables.

<applicationMonitor updateTrigger="mbean"/>
<jdbcDriver id="DB2JCC" libraryRef="DB2Library">
</jdbcDriver>
<dataSource id="jdbc/defaultDS" jndiName="jdbc/defaultDS" jdbcDriverRef="DB2JCC" statementCacheSize="60" type="javax.sql.ConnectionPoolDataSource" transactional="true">
    <properties databaseName="database_name" password="{xor}ZmdpOztrPT5oaDtp" user="username" serverName="host_name" portNumber="port_number" driverType="4"/>
</dataSource> 


<!-- <variable name="" value=""/> -->
<library id="DB2Library">
    <fileset dir="C:\Program Files\IBM\SQLLIB\java" includes="db2jcc4.jar, db2jcc_license_cu.jar"/>
</library>

Solution

  • I'm assuming by application you are referring to a Bluemix cloud foundry application.

    When you configure an application to use a service, the applications gets injected with environment variables from the service, but it is up to you to write the code to connect to the database using those environment variables.

    See here for more information: https://console.bluemix.net/docs/cli/vcapsvc.html