Remote Database Connector (RDC) on Azure - java

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 ?

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:
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.
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.
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.
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.

Related

How to connect MsAccess database existing in windows folder using Kubernetes

I have an MSAccess database in my local windows. and I need to connect it with java code using Kubernetes.
I tried to use the below:
jdbc:ucanaccess:///run/desktop/mnt/host/c/Users/Public/fdb/F_B_1_2.mdb;jackcessOpener=com.sms-manager.mobile_app.mobileapp.manage.CryptCodecOpener
But it's not working with me.
it's giving java error database not existing.
Is your java application running in container and trying to connect to ms access db which is in another machine? if yes then you can create Kubernetes service and endpoint of your db server or external name of db server. Choose suitable JDBC and ODBC driver to connect to MS Access Database

Connect to RDS AWS db using SSH key from java

I have a java application that is deployed on AWS EC2 instance. This application is connecting to an AWS RDS db. This works fine. But from my local windows when I debug the code in intellij, it is not able to connect to db because it require an ssh key and EC2 instance ip for connection along with password.
Java application uses oracle hibernate connection with entity manager.
I came across this solution
https://www.jetbrains.com/help/idea/connectivity-problems.html#step-4-check-if-the-connection-with-ssh-ssl
but I don't see SSH configuration option on Tool windows in my Intellij.
Could someone help me on how can I make db connection using java application using intellij or by deploying application in tomcat in my local?

Web application unable to connect to Postgres database on virtual machine

I have created a web application in Java and hosted it on a VM. It is getting hosted as I can see the start page of web application. But the problem arises when the hosted web application tries to connect to the Postgres database.
This web application is properly getting connected on the local host if I use the following connection string for JDBC:
DriverManager.getConnection("jdbc:postgresql://localhost:5432/postgres",
"postgres", "password");
But when hosted on VM it is not getting connected. I tried everything from other stackoverflow thread like this to change the configuration files of Postgres in VM but still it is not working.
Note: Postgres is also running on VM.
I have converted my web application from local host to .war file and deployed this file on the VM.
Can anyone tell if I have to do any other additional settings in order for the hosted web application to query the database in the VM?
Resolved this issue. The problem was that I didn't include some of the jar files that I was using in the web application in Apache Tomcat lib folder.
Do you also run Postgres on VM ? If not you can not connect it through localhost since the localhost for your web app is VM's address. If so check the firewall and allow the 5432 port to be able to connect.

SSAS on SQL Server Docker Linux Container With Java Application

I have start SQL Server Docker Container and i have Java as backend application which communicate with database.
I can do all the JDBC call without any issue.
Now i need to use SSAS to display data in Pivot Table in frontend. I am not sure if this is possible or not. Because most of tutorial says i need IIS server, which is windows specific application, the SQL Server is image on top of Linux OS image.
I got this blog which talks about connecting Java to SSAS (But it require IIS). Since container OS is Linux, and IIS can't work with Linux.
This URL Microsoft says SSAS feature is part of SQL Server 2017 release.
Any Idea if this is possible or not?
Can i use SASS with IIS?
http://www.olap4j.org/ is for JAVA but it required IIS.
SQL Server for Linux doesn't include SSAS, it's only available on the windows version.

Add Remote Glassfish server to Netbeans

I am a .NET Developer trying to learn Java. I have created a simple CRUD based EJB application and it works in Netbeans.
I am trying to add a remote Glassfish server (installed on another PC) to Netbeans so that I can deploy the application (EJBs) from Netbeans. Think of the remote server as a live server (though it is not).
Is it possible to add a remote Glassfish server to Netbeans 7.4. It only seems to allow you to add a local instance.
Assuming you have done asadmin enable-secure-admin (etc) on your remote server, the only way I have found is to remotely mount the (physical) server and then you can point Netbeans at the glassfish directory on the remotely mounted server.

Categories