In this day i want to share your with how to use the service provide by AppHarbour to connect with a Java App.
“AppHarbor is a fully hosted .NET Platform as a Service. AppHarbor can deploy and scale any standard .NET application to the cloud.” as it declare in their site: http://appharbor.com
In the site we can use some services for free like a databases in Mysql, MongoDB and SQL Server, but there are a lot of services, there is a free option to use for which is ideal for learning and test the technology.
I try it with Java using it in Jsp pages, to test one of my apps and it works great.
The first thing we need to do is open an account, later create an application and add then install some add-ons, in my case i install a mysql database.
Here is a screenshot of my DB and App.
There we can see all what we need to connect with the database in our apps.
Then in our Java Proyect we only need to put the information correctly:
conn= DriverManager.getConnection(“jdbc:mysql://Hostname/Database“, “Username“, “Password“);
Take a special care to put the database data otherwise we cannot connect to the DB.
The best of this service is that we dont need to install another database application in our system and we can test our apps in several enviroments.
I hope this can be usefull for you. See ya and Happy Coding!!!