Connection Java with AppHarbour & MySql


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

Sin título3

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. Sin título2

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.

Sin título3

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!!!

 

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

Subir ↑

A %d blogueros les gusta esto: