So I have something like this in my boot.scala:
object DBVendor extends ConnectionManager {
def newConnection(name: ConnectionIdentifier): Box[Connection] = {
try {
Class.forName("oracle.jdbc.driver.OracleDriver")
val dm = DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:orcl", "username", "password");
Full(dm)
} catch {
case e : Exception => e.printStackTrace; Empty
}
}
def releaseConnection(conn: Connection) {conn.close}
}
Couple quick questions I have are... How do I set up the driver to connect?
the @hostname from what I see has been for local databases but mine is remote... I have all the information to connect to it through the sqldeveloper I use and figured that all that I would need is the hostname there.
Is the hostname all that needs to go there if thats all I needed? or will I been in need of some kind of absolute address?