Hello,
I don't think you need anything else to be able to use LDAP. Pure java supports LDAP
(I mean J2SE).
Again about MySQL you just need to add a MySQL jconnect JDBC driver to your CLASSPATH
and load it's driver in your program as you may do in a normal pure command line Java
program and use it.
Synchronize between MySQL and LDAP?
By the way a sample program:
| import java.sql.*;
|
| public class CreateAgency {
|
| public static void main(String[] args) {
| String driver = "com.mysql.jdbc.Driver";
| String protocol = "jdbc:mysql://localhost:3306/Agency";
|
| try {
|
| try
| {
|Class.forName(driver).newInstance();
|System.out.println("Loaded driver: "+driver);
| }
| catch (Exception e)
| {
|System.out.println("ERROR: load mysql driver failed");
| }
|
|
| Connection conn = DriverManager.getConnection(protocol, "root",
"zlogs");
| System.out.println("Connected to: "+protocol);
|
| conn.setAutoCommit(false);
| Statement s = conn.createStatement();
|
| System.out.println("Creating new tables...");
| s.execute("create table Skill(name varchar(16), description
varchar(64))");
| conn.commit();
| s.close();
| conn.close();
| System.out.println("Committed transaction and closed
connection");
| }
| catch (SQLException ex) {
| System.out.println("SQL Exception thrown: "+ex);
| ex.printStackTrace();
| }
|
|
| // shutdown cloudscape
| // this always throws an exception
|
| try {
| DriverManager.getConnection("jdbc:mysql:;shutdown=true");
| System.out.println("Database did not shut down normally");
| }
| catch (SQLException ex) {
| System.out.println("Database shut down normally");
| }
| } //main ends
| }
|
Regards,
Mac
Programmernet.org
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844504#3844504
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844504
---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user