I would like to know how can I create a DataSource for SQL Server on WLP running on Bluemix.
Do you have any example on how to upload the library and also the edited server.xml?
Thanks!
I would like to know how can I create a DataSource for SQL Server on WLP running on Bluemix.
Do you have any example on how to upload the library and also the edited server.xml?
Thanks!
You would need to push a server rather than the application. You configure the server locally, ensure the application and database driver are inside the server directory and then do cf push of the directory containing the server. The server.xml configuration for the database would look something like this:
<library id="sqlDbLib">
<fileset dir="${server.config.dir}/lib/sqlDb"/>
</library>
<jdbcDriver id="sqlDbDriver" libraryRef="sqlDbLib"/>
<dataSource jndiName="jdbc/myDataSource" jdbcDriverRef="sqlDbDriver">
<properties.microsoft.sqlserver URL="jdbc:sqlserver://host:1433;databaseName=myDB"/>
</dataSource>
The database properties for the properties.microsoft.sqlserver element are documented in the knowledge center
You'll need to ensure the application in bluemix can connect to your SQL server though.