-1

With Basic4Android I can get access to a SQL server database using Remote Database Connector (RDC) (see http://www.b4x.com/android/forum/threads/remote-database-connector-rdc-connect-to-any-remote-db.31540/ ). I can put the SQL server database on Azure. But how can I put the Java web server on Azure ?

lvdp
  • 5
  • 5
  • 1
    The page you pointed to already explains how to set up and configure, and runs on Windows or Linux. So... you just need to explore options in Azure for running Windows or Linux, which can be Virtual Machines, Cloud Services (Windows) or Web Apps (Windows and supports Java). Which you choose is a matter of opinion, based on the level of control you're interested in (and I can't recommend one over the other, except that if you're trying to follow that getting-started guide as closely as possible, then you might want to consider a Windows VM). – David Makogon Aug 27 '15 at 12:23
  • Thank you for the answer. I now created a Windows Virtual Machine on Azure With Java JDK 8.51. It will take me some time to understand everything. – lvdp Aug 30 '15 at 09:54

1 Answers1

0

Per my experience, I suggest you to create a Windows VM on Azure and install Java Environment to deploy the RDC on it. Please refer to https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial-classic-portal/ and https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-log-on-windows-server/.

Why is Azure VM? Why is Windows?

The causes are as following:

  1. The RDC is a lightweight Java web server based on Jetty, and the Jetty version is 7.4.2. However, the version of Jetty on Azure Webapps from gallery is 9.1.2. They have the incompatible component of different implementation, such as Websocket.
  2. The Jetty Server of RDC is running as a standalone application, not a Java servlet container. So RDC can not be deployed on Azure Webapps.
  3. The RDC http listen port is 17178. It can be configured in config.properties. But if RDC as a CloudService run on Azure, you need to configure some properties for Cloud Service Role such as public ip & port.
  4. If you want to deploy it on Azure Linux VM, you need to run command chmod u+x for the decompressed files in RDC.zip and create a RunRLC.sh for boot Main class 'RemoteServer'.

Note: I recommend Microsoft SQL JDBC version 4.0+ Driver to access Azure SQLDatabase and SQL Server on Azure. The RDC's default JDBC for MSSQL is jTDS that it is incompatible with MSSQL on Azure.

Best Regards.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43
  • Thank you for the detailed answer. I now created a Windows Virtual Machine on Azure With Java JDK 8.51. But I forgot the virtual net, which I will probably need to Access the Azure SQL server. I will also Explore RDC with the Microsoft JDBC driver. – lvdp Aug 30 '15 at 09:55
  • @lvdp About the vnet, you can refer to https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-set-up-endpoints/ and https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-create-custom/. Using the MSSQL JDBC driver on RDC, you need to replace the DriverClass & JdbcUrl string from jTDS's to MSSQL's. The jdbc infos of MSSQL is "com.microsoft.sqlserver.jdbc.SQLServerDriver" and "jdbc:sqlserver://{db_host}:1433;database={dbname}". – Peter Pan Aug 31 '15 at 07:39