Thursday, September 2, 2010

Java Training especially good if the configuration information is hierarchical

Java Training


Java Training is also extremely useful in the area of configuration. If many applications use common configuration data, you might consider storing the data in a directory service, such as LDAP, instead of in a file or database. LDAP is especially good if the configuration information is hierarchical-that is, if it is more like a tree structure than a flat list of values.


Java Training InitialContext constructor looks for a system property called java.naming.factory. initial that contains the name of the class that creates the InitialContext. Sometimes, you must supply this value yourself. Some EJB containers, like the one that comes with Sun's J2EE SDK, already have this property set.JDK 1.3 comes with three built-in service providers: RMI, CORBA, and LDAP. The class names for the different initial context factories are

com.sun.jndi.rmi.registry.RegistryContextFactory

com.sun.jndi.cosnaming.CNCtxFactory

com.sun.jndi.ldap.LdapCtxFactory

Don't worry about setting defining the class for the initial context factory unless you get an error telling you there's no initial Java Training context factory. When you run your program, you can specify the initial context factory on the command-line using the -D option:

java -Djava.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

usingj2ee.naming.JNDIDemoYou can also specify the initial context factory in a Hashtable that you can pass to the InitialContext

constructor:Hashtable props = new Hittable ();

props.put(Context.INITIAL_CONTEXT_FACTORY,

"com.sun.jndi.ldap.LdapCtxFactory");

Context ctx = new InitialContext(props);

Bear in mind that if you specify the initial context factory using a Hittable Java Training object, you might be limiting the portability of your classes. For example, most Web Logic examples tell you to create the InitialContext this way: The Context class is the core of the JNDI API. You use it to perform any lookup and to add any new name-value associations. When you use JNDI, you typically create an Initial Context object first

Online tutorials for Java Training- Check out online tutorials to continue your java training even if you are not enrolled at a training institute. Going through the basic tutorials on java and programming basics can help you to strengthen your fundamentals. These tutorials are designed in a number of ways to increase the comprehension. From presentations on code snippets to videos showing program execution order, there are a number of things that will appear too easy to understand with the help of pictorial tutorials on java. Be a little smart with what you study and how you study it. It becomes all too important for a professional who has to devote his time to the day job in addition to java training.

No comments:

Post a Comment