I have been trying to use JNDI to store my own predefined objects with no success. I can get the jdbc object from the InitialContext and gain access to the connection object as shown below
Class.forName("com.mysql.jdbc.Driver");
InitialContext context = new InitialContext();
DataSource dataSource = (DataSource) context
.lookup("jdbc/DataSource");
Now i need to know how to add my own objects to the jndi directory. Also please can you explain the architecture of jndi service