[
http://mifosforge.jira.com/browse/MIFOS-3557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adam Monsen updated MIFOS-3557:
-------------------------------
Description:
http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-using-ssl.html
suggested order of experimentation:
# jdbc connection
# ssl jdbc connection
# jndi connection
# ssl jndi connection
# pentaho report using ssl jndi connection
sample code for #1:
{code}
package com.example;
import java.sql.*;
public class Main {
public static void main(String[] args) {
Main m = new Main();
m.sslConnect();
}
private void sslConnect() {
Connection con = null;
try {
String url = "jdbc:mysql://example.com/test"
+ "?verifyServerCertificate=true" + "&useSSL=true"
+ "&requireSSL=true";
String user = "username";
String password = "password";
Class dbDriver = Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection(url, user, password);
} catch (Exception ex) {
ex.printStackTrace();
} finally {
if (con != null) {
try {
con.close();
} catch (Exception e) {
}
}
}
}
}
{code}
was:http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-using-ssl.html
> discover and document how to connect to an SSL MySQL server from Java
> ---------------------------------------------------------------------
>
> Key: MIFOS-3557
> URL: http://mifosforge.jira.com/browse/MIFOS-3557
> Project: mifos
> Issue Type: Story
> Reporter: Adam Monsen
> Priority: Major
>
> http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-using-ssl.html
> suggested order of experimentation:
> # jdbc connection
> # ssl jdbc connection
> # jndi connection
> # ssl jndi connection
> # pentaho report using ssl jndi connection
> sample code for #1:
> {code}
> package com.example;
> import java.sql.*;
> public class Main {
> public static void main(String[] args) {
> Main m = new Main();
> m.sslConnect();
> }
> private void sslConnect() {
> Connection con = null;
> try {
> String url = "jdbc:mysql://example.com/test"
> + "?verifyServerCertificate=true" + "&useSSL=true"
> + "&requireSSL=true";
> String user = "username";
> String password = "password";
> Class dbDriver = Class.forName("com.mysql.jdbc.Driver");
> con = DriverManager.getConnection(url, user, password);
> } catch (Exception ex) {
> ex.printStackTrace();
> } finally {
> if (con != null) {
> try {
> con.close();
> } catch (Exception e) {
> }
> }
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues