B4J Question Implementing jRDC2

Kiumbe

Member
Am new B4X and am currently learning B4A so as to be able to convert my legacy vb6 application to Android platform. I came across this wonderful platform that perfectly suites my legacy VB6. Am requesting guidance on how to use jRDC2 on B4A running on windows with a back end of Mysql database running on Ubuntu server 16.02. I want o be able to connect directly to the Mysql database from the B4A front-end. I understand I need both DBRequestManager and jRDC2 and I have already downloaded both on my windows computer, My request is some guide on where I will put the JRDC2 on my linux ubuntu server and the DBRequestManager on windows. I have read the guide here by Erel but still am not sure on Server configuration bit with my windows development and linux ubuntu mysql database setup. Kindly consider a step to step guide as am still a novice with B4A. Thanks in advance
 

Kiumbe

Member
Not sure if this google translation from this post is good enough, maybe it can help your
Helo Jose, I think the tutorial is very helpful, it has elavated my understanding of the jRDC2. What needs to be clear is that inorder for you to use jRDC2, you need to be running B4J application on your PC. I had only installed B4A as i assumed the jRDC2 package was compiled already. So it means if i adjust my SQL querries, I will have to recompile the .jar file in my database server to reflect new SQL statements? Am I right?
 
Upvote 0

José J. Aguilar

Expert
Licensed User
you need to be running B4J application on your PC
Just while you're developing and testing. Once you've finished with your SQL queries, etc... you compile in release mode, get the .jar file, and then you don't need B4J anymore. Just run the .jar in the database (or other) server.

So it means if i adjust my SQL querries, I will have to recompile the .jar file in my database server to reflect new SQL statements? Am I right?
You're right. But think that this is an advantage. If not, you should recompile the B4A app and every client should update. This way, you just have to update the server.
 
Upvote 0

Kiumbe

Member
Just while you're developing and testing. Once you've finished with your SQL queries, etc... you compile in release mode, get the .jar file, and then you don't need B4J anymore. Just run the .jar in the database (or other) server.


You're right. But think that this is an advantage. If not, you should recompile the B4A app and every client should update. This way, you just have to update the server.
Well Said. Am now well informed. Let me try testing connecting to my virtual Linux server hosted on my windows PC and revert. I have Oracle VM VirtualBox on windows running MySQL database server, am sure am not going to test using localhost but the IP address of the VM machine. Lastly, based on my setup, which port am I supposed to open as relates to 17178 on the tutorial. Because am under a gateway, will I need to port forward the port so as from outside my server network, I will be connecting through NAT port to 17178 on the server? Thanks and sorry for many questions.
 
Upvote 0

José J. Aguilar

Expert
Licensed User
am sure am not going to test using localhost but the IP address of the VM machine

You should use 'localhost' in the jRDC2 server, because the .jar and the database, will be in the same machine (you can use the ip, too, of course).
You should use the VM machine ip in the clients (B4A), in order the clients connect to the jRDC2 server.

will I need to port forward the port so as from outside my server network
Yes, you will need to forward your router port to your server. You can use the 17178 port or any other one according your needs. You just have to change it in the config.properties, and of course in the clients.
 
Upvote 0
Top