when we bind a datasource object to a Name within a context,is that means the datasource was converted into byte stream and stored in somewhere?
when we lookup a object by it's Name,is that means we revert the byte stream back to a Object ?
but i saw the tomcat source code ,bindings is just a HashMap .
Tomcat allows you to define resources which will then be cataloged into its JNDI repository. There's a special section of the Tomcat documentation that supplies detailed information on how to define a DataSource resource object in Tomcat.
Tomcat will use this information to construct and initialize the datasource and to publish it in JNDI under the name you supply as part of your datasource definition. For example, if your datasource definition defines that datasource as being named "jdbc/mydatasource", then the web application could make a JNDI lookup request for "java:comp/env/jdbc/mydatasource". This would then return the datasource interface which you would use to acquire connections from the datasource connection pool.
Science is the process of replacing what we "know" with what is TRUE. Politics, alas, often prefers to be the opposite.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop